Ultrashock Forums > Flash > ActionScript
mx.effects.Tween flicker problem

You are currently viewing our website as a guest which gives you limited access to forums, files and other resources.

Click here to join now for free, and start interacting with our members, download files and much more!

Click here if you are looking for our Flash files and other professional assets.
 
Post Reply | View first unread | Rate Thread Search this Thread | Thread Tools | Display Modes

#1
Bookmark and Share!
mx.effects.Tween flicker problem
Old 2004-04-26

Hi guys.
I have been using the mx.effects tween a bit lately, its handy for tweening multiple properties. Say you mant a mc to fly in from off stage on an angle, fading in at the same time. You would need 3 Tween instances if using mx.transitions.Tween


Example using mx.transitions.Tween:
ActionScript Code:
  1. import mx.transitions.easing.*;;
  2. import mx.transitions.Tween;
  3.  
  4. new Tween(myMC, '_x', Strong.easeOut, 0, 600, 30);
  5. new Tween(myMC, '_y', Strong.easeOut, 0, 300, 30);
  6. new Tween(myMC, '_alpha', Strong.easeOut, 0, 100, 30);

This does the same thing but uses mx.effects.Tween:
ActionScript Code:
  1. import mx.transitions.easing.*;;
  2. import mx.effects.Tween;
  3.  
  4. var tw = new Tween(myMC, [0, 0, 0], [600, 300, 100], 1000);
  5. tw.easingEquation = mx.transitions.easing.Strong.easeOut;
  6. myMC.onTweenUpdate = function(p_arg){
  7.     _x = p_arg[0];
  8.     _y = p_arg[1];
  9.     _alpha = p_arg[2];
  10. }

Not any less code, but it only executes the easing equation once per update cycle.

Anyway, I find that with the effects tween it often falters when it starts, ie: the movieclip is drawn before the tween gets to it. and so a fade in begins with the mc flashing in at 100% alpha, followed by a fade in. Perhaps it is because this Tween class is time based rather than frame based. I notice the Transition subclasses ( Wipe, Fly, Fade etc) have the same issue when used with movieclips, havn't tried them with screens, which is what they are designed for though.

Anyone else encountered this?

Is it a general issue with time based animation?

Anyone got the effects.Tween class workin with frames instead?

might have to look into it, I don't really like using time based animation.

< :
Bruce Pomeroy
postbit arrow 2 comments | 975 views postbit arrow Reply: with Quote   
Registered User
Bruce_P is offline
seperator
Posts: 142
2003-02-06
seperator

Ultrashock Member Comments:
schlagzeug schlagzeug is offline schlagzeug lives in United States 2006-06-03 #2 Old  
Yeah I'm working on a time based tween right now that is giving me trouble. A post on one thread mentioned that the time needs to be the same for all the tweens you're using, but not sure. There's not a lot of information on the tween class beyond just how to use it...
Reply With Quote  
sagarenas sagarenas is offline sagarenas lives in India 2009-07-03 #3 Old  
Yea. Even i had the same problem..i changed the Duration to .1 sec(for al the tween) and i think its working fine...ooh god i cant even think about doing that script in pure actionscript without using this tween script!! before i used to do only motiontween and shapetween..lolz so u can understand my situation rite!!anywys Good luck guys...make money!!
Reply With Quote  
Thread Tools
Display Modes Rate This Thread
Rate This Thread: