dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Flash Buttons (Up, Over, Down, Hit)

  1. #1
    Junior Member
    Join Date
    Mar 2010
    Posts
    8

    Flash Buttons (Up, Over, Down, Hit)

    Recently I am feeling like an idiot in Flash with buttons! I think perhaps I am forgetting something about the up, over, down, and hit states.

    What I am trying to do is to have the button color change to a different color when it is on the page. The color only changes when I roll over it or hit it.

    Once I am on the page it changes back to the color it is on the up state.

  2. #2
    Senior Member jweeks123's Avatar
    Join Date
    Mar 2006
    Posts
    1,124
    Your best option here is to make your button a movieclip

    Make 4 frames - one for each state, and add a stop command to an actions frame in the movieclip

    Then when your on said page, have it command the movieclip to gotoAndStop(frameNecessary);

  3. #3
    Junior Member
    Join Date
    Mar 2010
    Posts
    8
    I looked a up a few video tutorials and they got me only so far. I am confusing on how to connect the "movie clip button", so that it is clickable and will bring another movie clip, so in the end I will have working flash site.

    Here is the code I have:

    about_btn.addEventListener(MouseEvent.ROLL_OVER, aboutOver);
    about_btn.addEventListener(MouseEvent.ROLL_OUT, aboutOut);

    function aboutOver (e:MouseEvent):void{
    about_btn.gotoAndPlay("over")
    }

    function aboutOut (e:MouseEvent):void{
    about_btn.gotoAndPlay(45- (about_btn.currentFrame-10));
    }



    Quote Originally Posted by jweeks123 View Post
    Your best option here is to make your button a movieclip

    Make 4 frames - one for each state, and add a stop command to an actions frame in the movieclip

    Then when your on said page, have it command the movieclip to gotoAndStop(frameNecessary);

  4. #4
    Senior Member jweeks123's Avatar
    Join Date
    Mar 2006
    Posts
    1,124
    could you attach your source file? I'm afraid I'm a bit confused on your exact needs at this point and perhaps that may help me to help you. Thanks.

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