-
2 questions. (Tweening and Reverse)
I was wondering if there was a way to "tween" a number through a scene similar the way you can do it to an object without going frame by frame and setting it individually. For example, the starting frame would be at 0 and the ending frame would be at 100, and depeding on when you clicked the object you would get a different value of that number
So far I tried to test it using this and it just oputs 0
First Frame for the Object
Code:
on (press) {
x=0;
trace(x);
}
End Frame for the Object
Code:
on (press) {
x=100;
trace(x);
}
What I'm thinking is that the object assumes the actionscript of the first frame until the last frame and thats why I'm getting 0.
Secondly, is there anyway to say
"when you get to frame 'y' play in reverse until frame 'z' supposing you started at 'z'"
-
this trial version is expired
quick thinking
High,
basis idea is to get the framenumer where the playhead is.
Movies have an attribute and yes one of them is current
framenumber, so to read-out your movieclip currentframe,
this is how you can do it.
on(press){
framenumber=yourmovieclipname._currentframe;
trace(yourmovieclipname.framenumber)}
The rest is yours
Your second question has to do with setting the playhead of
the movie to a previousframe. First I have to put something into my
body to think better so that is for later or one of the other flashkitmembers.
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
|