SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: AS easing?

  1. #1
    SitePoint Zealot
    Join Date
    Feb 2007
    Posts
    127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    AS easing?

    when you want to move something with AS you can increment an mc and use onEnterFrame.
    (EX: this._x += 5

    but how do I get the mc not to overshoot the final destination if the number it's being incremented by is big (say 30). In other words how do I get it to slow down at the end and stop right on the place I want?

    Thanks,
    R

  2. #2
    SitePoint Member
    Join Date
    Sep 2008
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Instead of using an onEnterFrame counter, you could use mx tween /laco /tweener etc, easier to use and more advanced features.

  3. #3
    SitePoint Zealot
    Join Date
    Feb 2007
    Posts
    127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you referring to the tween class? If not, I have no idea what you're talking about. Perhaps you could elaborate.
    In this case I'll have 4 buttons spread across the screen and I want an mc (underneath the buttons) to move to each button's "x value" when the buttons are hovered over.
    Any ideas?
    Thanks,
    R

  4. #4
    SitePoint Member
    Join Date
    Sep 2008
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes the built in tween class (or 3rd party libraries such as tweener or laco)
    e.g using tweener

    Tweener.addTween(myAnimatedMC,{
    _x:destinationX,
    time:animationTimeVar,
    transition:"easeIn"
    });


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •