A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Animated button funky behaviour

  1. #1
    Junior Member
    Join Date
    Nov 2009
    Posts
    1

    Animated button funky behaviour

    Got animated buttons that consist of multiple graphics. And two problems go with that.
    Problem 1 - when you rollover them the animation runs, that's fine. But when you click them the animation starts to run again, that's bad. Simply need it to stay in the last frame of rollover when you click.
    Problem 2 - when you click the button it is supposed to fade away (that is done with some tweener in AS3). And it does, that's fine. But when fading out, you can somehow see the different elements that make up the button and that's bad. I'd like it to smoothly fade away all as one thing.

    See the actual buttons here http://www.geographics.cz/fotky
    - those three film cuts.

    Thanks for any hints.

  2. #2
    Westendartist
    Join Date
    Dec 2009
    Location
    Vancouver BC Canada
    Posts
    6
    Beautiful site.
    I know what you mean about the rollover button thing. I "break apart" CTRL B my buttons elements to one flat object and fade alpha to 7% not 0% with a blank last frame, or instead of fading my flat alpha I fade to a very similar colour as the background with the last frames at 96% not 100.

    just a thought.

  3. #3
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    Pulecz, As Westendartist mention it is a nice looking site. Those problem are not too difficult, but lets start with the second problem first.

    This type of issue is very common and happens more often than not because how different levels are affected by the fade. Surprisingly, it is happening while using actionscript, where this commonly appears when tweening on the timeline. Westendartist has a great idea that may eliminate the problem. You can maintain the button as is, but add a single frame at the end and is a flatten image of all layers. Prior to the fade beginning, switch to that frame. This should suppress the multi-layer fading issue.

    With problem 1, without viewing the code I cannot provide a conclusive answer, but it is possible that there is code within the MOUSE_UP or MOUSE_RELEASE listener that calls a play or maybe there isn't a stop action to halt the animation. If you can provide the code surrounding the buttons, I may be able to provide additional feedback.
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

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