dcsimg
A Flash Developer Resource Site

Page 2 of 2 FirstFirst 12
Results 21 to 25 of 25

Thread: AS3 Tween Class stalls

  1. #21
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    Try TweenLite.from() - same as to() but the beginning and end are swapped...

    PHP Code:
    TweenLite.from(content_mc4, {alpha:0ease:Regular.easeOut}); 

  2. #22
    Senior Member
    Join Date
    Nov 2003
    Posts
    385
    Oh yes, that makes sense. Thanks.

  3. #23
    Senior Member Awoogamuffin's Avatar
    Join Date
    Nov 2008
    Posts
    208
    Is tweenLite less processor expensive too? I remember a while back using tweens to do some simple shape animations, and I noticed the whole thing begin to chug if a lot of these shapes were on at the same time (and they would be - they were smoke particles). I ended up replacing the tweens with just ENTER_FRAME events and changing the various settings mathematically (lots of tutorials online to give you all the different kinds of interpolation you might need).
    Check out my blog showing the development of my flash game, the Dregs of War

  4. #24
    AS3 Mod
    Join Date
    Sep 2007
    Location
    O-H-I-O
    Posts
    2,385
    TweenLite is the fastest tween engine out there by miles. You can view speed comparisons at their site for proof.

  5. #25
    Junior Member
    Join Date
    May 2009
    Posts
    1
    For those looking for an answer to the original question, the reason the tween class was stalling is because the tween variable was declared inside the function.

    By declaring the tweens outside the function, the problem would have been solved

    PHP Code:
    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    import fl.transitions.TweenEvent;

    var 
    mover:Tween;
    var 
    revealContent:Tween;

    function 
    display(endX,frame):void {
        
    mover = new Tween(line_mc"x"Regular.easeOutline_mc.xendX.5true);
        
    content_mc.gotoAndStop(frame);
        
    revealContent = new Tween(content_mc"alpha"Regular.easeOut0,1,4,true);

    I'm glad, however, that you solved the issue another way. I just wanted to point this out in case someone else found this problem and searched the forms for it.
    Last edited by sstalder; 05-19-2009 at 10:57 AM.

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