A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Button Game AS3.0

  1. #1
    Junior Member
    Join Date
    Jun 2012
    Posts
    1

    Question Button Game AS3.0

    I'm new to Flash in general and would like to make a basic game with a button. I'm using CS5. I have set the UP, OVER, DOWN, HIT keyframes but I would like to make it so when someone clicks it, it goes to a new frame that has text. Please send me feedback, Thanks!

  2. #2
    Senior Member
    Join Date
    Jun 2008
    Posts
    549
    To make you button clickable, you need to add a click event listener to your button. Then you can use the gotoAndStop() method to go to a different frame.

    PHP Code:
    yourButtonInstanceName.addEventListener(MouseEvent.CLICKclicked);

    function 
    clicked(e:MouseEvent):void
    {
    gotoAndStop(yourFrameNumberHere);


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center