inertia rotation
- Started
- Last post
- 18 Responses
- ********
anyone got a good flash rotation script, with inertia?
i had this working once, but lost the fla in a disk failure.
thx!
(btw the rotation degree must be a variable, not fixed, na meen?)
- imakedesign0
import mx.transitions.Tween;
import mx.transitions.easing.*;
function rotater(who) {
var rotate:Tween = new Tween(who, "_rotation", Strong.easeOut, 200, 360, 2, true);
rotate.onMotionFinished = function() {
// do somthing
};
}
rotater(your_mc);
- ********0
not sure what is whar, but i may try that! thx!
- imakedesign0
put the code on frame one. place a movie clip called your_mc.
hit apple+enter.
- ********0
nice! one virtual beer for you!!
- ********0
:(
----
**Error** Scene=Scene 1, layer=actions, frame=1:Line 5: There is no property with the name 'onMotionFinished'.
rotate.onMotionFinished = function() {Total ActionScript Errors: 1 Reported Errors: 1
- imakedesign0
make sure you publish, flash 7, AS 2.0
- ********0
ok
- ********0
apparently i did..
have you tried this?
- imakedesign0
yep, make sure there are no spaces in the code. NT adds these
rotate.onMotionFinis hed = function() {
should be:
rotate.onMotionFinished = function() {
- imakedesign0
ha! rotate.onMotionFinised
- ********0
corrected that too!
no luck.
can't find this in as dictionary either..
- imakedesign0
sorry, i have not idea why it wont work for you, should be a copy and paste job.
the mx tweens are not documented.
- ********0
on actionscript.org it is posted as a valid property..
is it the combination of rotate and onMotionFinished?
should it be rotater instead?
- ********0
yeah that bit worked.. so 200 is the amount of degrees you entered?
- imakedesign0
yep
- ********0
cheers!
- ********0
one more thing, what should i alter if the starting point is already on a certain degree, not zero?
- ********0
ah nevermind. i just found out.
thx!