A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: Flash Button help

  1. #1
    Junior Member
    Join Date
    Oct 2004
    Location
    USA
    Posts
    10

    Flash Button help

    I know how to make the 'on' part of the flash button. But when I let it off how do I make it so the button does something? I see people with buttons where they have an animation, but when you move your mouse off of it another animation plays. How is this done?

  2. #2
    Senior Member sharma's Avatar
    Join Date
    Oct 2004
    Location
    Canadia
    Posts
    1,017
    create a movie clip.. give it an instance name of "button1"

    on the movieclips actions put
    code:

    on(rollover){
    _root.button1.gotoAndPlay("onstate")
    }
    on(press){
    _root.button1.gotoAndPlay("downstate")
    }
    on(rollOut){
    _root.button1.gotoAndPlay("outstate")
    }


    within the button1 MC create the different states of the button and label the proper frames..
    what the hell's a motion tween?

  3. #3
    Junior Member
    Join Date
    Oct 2004
    Location
    USA
    Posts
    10
    Thanks, appreciate the help

  4. #4
    Junior Member
    Join Date
    Oct 2004
    Location
    USA
    Posts
    10
    actually I am totally confused at the moment..

    I have made the frames and labeled them accordingly with an animation in the onstate. However when I preview it, the animation plays automaticlaly without me even having to scroll over the image.

    Could you make me up a sample fls please using the simplest example possible? I'd GREATLY appreciate that
    Last edited by southern gumbo; 12-18-2004 at 07:31 PM.

  5. #5
    Senior Member Cass101's Avatar
    Join Date
    Dec 2004
    Posts
    131
    you will need to add a keyframe with stop(); in it where the last frame of each state is. so, for example, when it reaches the end of your downstate animation, it doesn't play through to your outstate animation.

    hope this helps

  6. #6
    Junior Member
    Join Date
    Oct 2004
    Location
    USA
    Posts
    10
    http://www.templatemonster.com/websi...ates/6773.html


    see that menu? mind making a simple one in flash and send me the fls please!! i don't understand this at all. i understand the Button symbol, but it has no animation when you roll off, therefore leaving the button symbol useless

  7. #7
    Senior Member Cass101's Avatar
    Join Date
    Dec 2004
    Posts
    131
    ok, this is a very quickly made and basic example, but should give you an idea of what sharma was trying to say.
    Attached Files Attached Files

  8. #8
    Junior Member
    Join Date
    Oct 2004
    Location
    USA
    Posts
    10
    wow, thanks a bunch!!! i have been tearing my hair out at this, thanks soooo much!!!


    I've looked through the code, only part I do not understand is how you have defined such a big 'hit' area.
    Last edited by southern gumbo; 12-18-2004 at 08:48 PM.

  9. #9
    Senior Member Cass101's Avatar
    Join Date
    Dec 2004
    Posts
    131
    the hit area doing it that way is just the size of the mc itself. it is the size of the white box with the black border in the example
    Last edited by Cass101; 12-18-2004 at 10:05 PM.

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