On click function in CS4

hi guys …

i am trying to add a on click - get url function in cs4.
its on a banner so i want someone to be able to click the banner

im using this code:
gotoAndPlay(1);

on (“release”)
{
getURL(“http://www.amazon.com”,“_parent”);
}

it was specified on actionscript 3… didnt work :slight_smile:
i then specified it to actionscript2, didnt work…

is it because i have the go to and play before?
is it because i have the action on its own layer?

(see attached)

i dont understand :frowning:

Yes having gotoAndPlay() before the remaining code might be causing the problem.

hi guys
ok ive found an indepth tutorial to do this !

http://www.adobe.com/designcenter/flash/articles/flacs3it_firstflash_pt2_05.html

Yay -
The code is actually really different in actionscript 3.0:
inv_btn.addEventListener(MouseEvent.CLICK, buttonClickHandler);
function buttonClickHandler(event:MouseEvent):void {
navigateToURL(new URLRequest(“http://www.deseloper.com/gnome”));
trace(“You clicked me.”);
}