Help - Search - Members - Calendar
Full Version: Flash CS4 button problem
Forums > Resource Center > Webmasters' Corner > Webmasters' Corner Resolved Topics
CandyPop
I am trying to create a button link in Flash CS4 and I am having a hard time. What is the correct action script?

I have tried using this:

CODE
myButton_btn.onRelease=function(){
getURL("http://www.tutorial5.com/", "_blank");
}


but the Compiler Error box keeps coming up everytime I play the timeline.
Mikeplyts
That looks like Actionscript 2.0. I'm guessing you're making this file in Actionscript 3.0, so it would actually look a bit different.

I haven't really used Flash in a while, but I think the code would be a little something like this:
CODE
stop();
myButton_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
function mouseDownHandler(event:MouseEvent):void {
    gotoAndStop(2);
}
manny-the-dino
Topic Closed, and Moved to Resolved Topics. Please PM a moderator if you would like this reopened.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.