-
playing video movie clip backwards
can't use the reverse frames on an imported MPEG, so
what is the most efficient way to play the video forward then backward in a loop?
thanks!!!
-
Flash Video Moderator
-
thanks! I finally did a search in the forums and found something....it worked perfectly! Should have done that in the first place! Hind Site - 20/20
Cheers!!!
-
Flash Video Moderator
Well... Where is it? Do share.
-
Make a MC that has this actionscript on it and drop it on the timeline of the MC that contains your movie
Code:
onClipEvent (enterFrame) {
if (parent.mode == "reverse") {
_parent.prevFrame();
}else {
_parent.nextFrame();
}
}
In the MC that contains your video put a lable on frame 1 called "forward" and on the last frame of your movie put a label called "reverse"
This worked very well for me!
I found the code in the video forum, but can't remember who was the clever poster of the info.
Luck!
-
Flash Video Moderator
So you are just reversing if the movie reaches the last frame?
You could write a function:
Code:
// on first frame (root)
_root.runReverse = false;
function reverseIt() {
this.onEnterFrame = function() {
if (runReverse) {
stop();
prevFrame();
} else {
play();
this.onEnterframe = null;
}
};
}
// then on last frame
stop();
_root.runReverse= true;
reverseIt();
This could be more effiecient, since it will only run when you call it. That way there is no event running while the video is playing forward, only backward.
Last edited by Wheels; 11-25-2002 at 02:21 PM.
-
so if there is a script running constantly, does it slow down the play of the movie?
or is this better if you have a situation where you might not reach the last frame?
thanks!
-
Flash Video Moderator
I just tested it and made some changes, so I edited the code.
You can call the function with a button as well:
Code:
on(release){
_root.runReverse = true;
reverseIt();
}
Yes, this will keep from having a script running in the background at all times. It is always best not to run an event unless you have to - especially with video. This is one of the nice new features of scripting with MX.
Last edited by Wheels; 11-25-2002 at 02:12 PM.
-
Escape artist
Originally posted by meredith
In the MC that contains your video put a lable on frame 1 called "forward" and on the last frame of your movie put a label called "reverse"
this may be a really silly question but here goes:
how do you put a label on frame one and the last frame? When i import the video it lays out over all the frame, then when you try to create a frame it asks if you need to add all the frames to handle the vid again? am i doing somehting wrong? do i need to add empty frames or another layer??
You can't have everything...where would you put it?
-
Flash Video Moderator
Right, just create another layer and make key frames at each end and lable the frames in the properties inspector.
You can add as much other content this way as you like. You just do it on other layers.
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
|