Flash CS4: Giving a link to a button (ascript 3.0)

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
9,643
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Aug 14, 2010

Action script 3.0 for a button

stop()
instance-NAME-goes-here.addEventListener(MouseEvent.CLICK, mouseClick);
function mouseClick(event:MouseEvent):void
{
var request = new URLRequest("LINK-goes-here");
navigateToURL(request,"_blank");
}

Category:

Education

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:
see all

All Comments (19)

Sign In or Sign Up now to post a comment!
  • @LesiureBoy To Fix this problem simply add a number after both "mouseClick" for ex:stop()

    instance-NAME-goes-here.addEve­ntListener(MouseEvent.CLICK, mouseClick2);

    function mouseClick2(event:MouseEvent):­void

    {

    var request = new URLRequest("LINK-goes-here");

    navigateToURL(request,"_blank"­);

    }

  • When I make two different links and test it, it doesn't work saying I have "duplicate function definition." But when I test them by themselves, it works. I've named them different instance name, what am I doing wrong?

  • Simple, fast and working great - thx

  • thanks, you help me out big time..

  • where the script ????? link

    

  • Thanks Mate

  • Works like a charm, Thank you for this :)

  • This is the only video about this that I could follow with success in the end!

    Thank you!!!!

  • Works Perfecto, thank you :D

  • Thanks! I now made an advertisement for my website (it is in my website too :P)!

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more