A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: [RESOLVED] movie clip button animation fade in/out

  1. #1
    Junior Member
    Join Date
    May 2009
    Posts
    19

    resolved [RESOLVED] movie clip button animation fade in/out

    I have web content with simple rollover animations. When someone rolls over the target a text box fades in. When they roll out it fades out.

    How can I have a smooth transition if the user rolls out before the roll over animation ends (i.e. before it's faded all the way in) ?

    See attached. "Receiver's Key" is the hit area
    Attached Files Attached Files

  2. #2
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    To do that, you can't use the timeline. You'd have to use code (Tween Class) to fade in and enlarge during mouse over and fade out and reduce from the current size and opacity on roll out.

    I have you latest file and I'm adding the code you can use to complete the function you would like. I'm make some significant changes. You code looks good, but we want to remove some items from the timeline and use actionscript to perform the necessary functions.
    Last edited by samac1068; 05-20-2009 at 07:53 PM.
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

  3. #3
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813

    Talking Solution 1

    bob,

    I've updated you code to allow for what you asked for, but there is still a small problem. Because the object being animated isn't part of the button that controls the rollover, you may have accidental rollouts. The position of the object fading in CANNOT pass in front of the button over the button, otherwise it will think it has rollout and perform as such.

    I'm still working on that issue, but wanted to provide you with something. Oh, I changed the button color, just so I could see it during authoring and forgot to change it back. I've placed a couple of comments in there, so you would know what must be done to expand the number of rollover objects quickly. There is a naming convention that must be followed to properly use the functions.

    If (when) I come up with a solution for the rollover problem, I'll let you know. This should keep you moving forward.
    Last edited by samac1068; 06-11-2009 at 10:07 PM.
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

  4. #4
    Junior Member
    Join Date
    May 2009
    Posts
    19

    Tweener to the rescue

    A friend of mine pointed me to "Tweener (caurina.transitions.Tweener)" and that really simplified things for me.

    Thank you so much for writing nearly 100 lines of code Samac! I really do appreciate you taking your time to teach a newbie some flash.

Tags for this Thread

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