Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / General Flash Topics / July 2008



Tip: Looking for answers? Try searching our database.

Please Help Me Connect URL to Image

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Comp. 792 - 05 Jul 2008 22:28 GMT
I converted a graphic into a symbol, then I made it a button. I then added an
action (a "getURL" action) and typed in this info, getURL(info.html);

**Error** Scene=Scene 1, layer=Banner Image, frame=1:Line 1: Statement must
appear within on handler
     getURL(info.html);

Total ActionScript Errors: 1     Reported Errors: 1

but I get an error when I test it in Flash. What is the correct way to turn an
image into a link so it is a button when it is an .SWF? I hope this makes some
sense?

Thanks
Noelbaland - 06 Jul 2008 03:49 GMT
Hello there,

It looks like you didn't put your action between an on(release) statement.
If you attach script to a button it should be within an release or press
statement, like so

on(release)
{
     getURL("info.html");
}

If you want to attach script for a button on a frame in it's timeline, then
you need to give your button a name in the Properties panel and refer to it
from your script like this.

myButtonName.onRelease = function()
{
     getURL("info.html");
}

Also the first parameter for the getURL function is a string and must be
enclosed in quotes "".

Hope that helps
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.