-
How to slow down animation using a code?
I have a moving woman on the screen, she moves from one side of the stage to the other. I did motion tween for that. However, she moves too fast and I would like to slow her down, but not by extending the frames. Is there a code for that? If the movie clip is woman_mc, how would the code look like to make her move more slowly. She stops at one point. Can somebody help please?
thanks
-
trace("AKA: Biro Barna");
I don't know of any other way then extending frames. As far as I'm concerned you can't change the frame rate for individual objects. Using a timer to call a nextFrame(); method would be a solution but that would lead to really ugly animation... dunno, maybe with the timer, but in 80% of the cases it doesn't really produce a desired smooth result.
| Windows MSN: birobarna [at] hotmail [dot] com | Skype: barna.biro | WebLog: http://blog.wisebisoft.com/ |
| Software Developer / Flash & Flex Developer | Student ( Computer Science ) | Interested in: Sharing Knowledge |
| Romanian Adobe Flash, Flex, AIR Forum: http://www.flashforum.ro/ | By perseverance the snail reached the ark. |
-
Palindrome emordnilaP
Odd, I read in the documentation you can adjust individual framerates of movieclips now so long as they have their own ENTER_FRAME listener. Just do a mc_name.frameRate = number;
But of course the documentation could have been wrong I have never tested the theory.
-
This should do the trick!
//try using this code (AS3.0)
import fl.transitions.*;
import fl.transitions.easing.*;
var xstart:int = 10; //x start position of mc_name
var ystart:int = 10; //y start position of mc_name
var xfinish:int = 200; //x start position of mc_name
var yfinish:int = 200; //y start position of mc_name
var ftime:int = 2; //time it takes to complete animation in seconds
var xTween:Tween = new Tween(mc_name,"x",None.easeOut,xstart,xfinish,ftim e,true);
var yTween:Tween = new Tween(mc_name,"y",None.easeOut,ystart,yfinish,ftim e,true);
xTween.start();
yTween.start();
/*
Use these in a frame to stop the animation.
xTween.stop();
yTween.stop();
*/
-
I don't know if it is right for your situation, but you could experiment with:
stage.frameRate = 12; //or whatever framerate you want.
This alters the entire timeline frame-rate.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|