all groups > flash actionscript > march 2004 >
You're in the

flash actionscript

group:

Manually Controlling Movie Objects


Manually Controlling Movie Objects JazzinAl
3/31/2004 11:01:17 PM
flash actionscript:
As part of a Flash presentation Im putting together, I'm including videos of
some rotating 3D objects Ive created. What I'm seeking is to have the user be
able to control the rotation of the objects. The movies are very simple 360
revolves around the object. I've achieved partial success just by using the
embedded video files and having a simple button with simple actionscript to
play the video when you click to rotate the object in one direction and to stop
when the button is not being clicked. Simple stuff... however, I'd like to be
able to do this but also be able to reverse the rotation (basically just play
the movie backwards.... get the idea? very simple rotation control) How can I
do this? The other thing I'd like to do is to instead, place a movie clip
symbol in the frame (as opposed to embedding it and dealing with 250
unneccessary frames) and be able to control the clip in the same manner as
described before. I'm still pretty new at this but I'm gradually figuring the
tricks of this program out, but this one has eluded me completely. Anybody have
some solutions for this use?
Re: Manually Controlling Movie Objects kglad
3/31/2004 11:17:08 PM
to play a movieclip backwards you can use this attached to your button:

on(press){
clearInterval(reverseI);
reverseI=setInterval(reverseF,60,mc); // where mc is the instance name of the
movieclip you want to reverse play.
}

and attached to the timeline:

function reverseF(mc){
if(mc._currentframe==1){
clearInterval(reverseI);
mc.prevFrame();
}
}

for your current situation where you want to reverse the main timeline, use
_root in the button's code instead of mc. if you place a movieclip on your
main timeline (with instance name say, 3d_object), use 3d_object in the
button's code instead of mc.
AddThis Social Bookmark Button