A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: [Resolved] buttons over state. how to play once?

  1. #1
    Junior Member
    Join Date
    May 2001
    Location
    Brazil
    Posts
    9

    buttons over state. how to play once?

    Hello,

    I am trying to make a button with an animated over state that plays just once when the mouse roll over.

    I´ve made a movie clip for the over state and icluded a stop action at the end of the movie clip.

    But, when I play my movie, the movie clip of the over state doesn´t stop playing!

    Could you please give me some advice?

    Thank you!
    xama

  2. #2
    See-n-reMember azwaldo's Avatar
    Join Date
    Mar 2003
    Location
    Sonoran Desert
    Posts
    745
    Did you write the stop line correctly [ stop(); ]? I have often forgotten to include the () in the command.
    __azwaldo__

  3. #3
    Junior Member
    Join Date
    May 2001
    Location
    Brazil
    Posts
    9
    Thank you for your reply but I wrote it correctly...

    Last edited by xama; 03-17-2004 at 08:22 PM.

  4. #4
    See-n-reMember azwaldo's Avatar
    Join Date
    Mar 2003
    Location
    Sonoran Desert
    Posts
    745
    Can you attach the .fla ?
    __azwaldo__

  5. #5
    Junior Member
    Join Date
    May 2001
    Location
    Brazil
    Posts
    9
    Here is the .fla
    Attached Files Attached Files

  6. #6
    Senior Member MiLo_Anderson's Avatar
    Join Date
    Feb 2004
    Location
    Canada
    Posts
    292
    Im not sure what is wrong with it, but im going to make a suggestion. I would scrap the button and use a movie clip with some script on it to make it a button. I've posted a new file that has what i mean.
    Ask if there is anything you don't understand. Id be happy to explain how the code works.
    Attached Files Attached Files
    "A piece of toast always lands butter side down, and a cat always lands of its feet. If one was to tie a piece of toast to the back of a cat butter side up, would it hover above the ground in perpetual indecision?"

  7. #7
    See-n-reMember azwaldo's Avatar
    Join Date
    Mar 2003
    Location
    Sonoran Desert
    Posts
    745
    Hey hey xama,
    Check out the fla I have attached (notes inside)...

    Hey MiLo,
    I am just now modifying the button movie myself. Am wondering if the following msg (that I included in the modifyied .fla for xama) is correct...

    Initial problem may have been that the mouseOver event fires continuously while the cursor is over a button, so your clip played over and over.
    If not, what was the cause of the looping of his 'fade' movie clip?
    Last edited by azwaldo; 03-18-2004 at 02:45 AM.
    __azwaldo__

  8. #8
    Senior Member MiLo_Anderson's Avatar
    Join Date
    Feb 2004
    Location
    Canada
    Posts
    292
    I think that might be your problem. I would go with the movieclips instead. They will do what you want and more...
    "A piece of toast always lands butter side down, and a cat always lands of its feet. If one was to tie a piece of toast to the back of a cat butter side up, would it hover above the ground in perpetual indecision?"

  9. #9
    See-n-reMember azwaldo's Avatar
    Join Date
    Mar 2003
    Location
    Sonoran Desert
    Posts
    745

    Curioser and curioser.

    Hey hey xama,
    I just looked at MiLo's .fla and movie. It was interesting to see a different approach to the same problem. You might want to compare them yourself - could be instructive. (MiLo's seems a more trim solution, too.)
    __azwaldo__

  10. #10
    Junior Member
    Join Date
    May 2001
    Location
    Brazil
    Posts
    9
    Hi azwaldo,

    Thank you very much for taking your time to make such an explanative .fla. The notes were really helpful

    I am relieved that the reason why my button wasn´t working was because "the mouseOver event fires continuously while the cursor is over a button". I spent so much time trying to solve this on my own and I was feeling an idiot because I couldn´t find an answer.

    ***

    Hi MiLo_Anderson,

    Hey, I´ve never seen a movie clip working that way! And, the best part is that is simple to implement! I will always keep this in mind.


    Well, now I´ve got two solutions for my question! I am so excited that I need to keep me away from the "!" key.


    Best regards for you both,

    xama

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