ok…let me try to explain this in a simple way…obviously I am confusing even myself.
I want to create a dynamic background composed of a 3d object that will change it’s orientation when the user moves from one section to another. ( see attached zip file ) This movie clip start with the object in it’s original position with a stop action, then, when the user clicks to go to section one, the object will move to a different orientation/position with a stop action when it gets there. When the user clicks to go to another section, the 3d object will go on playing until it is back in the starting position ( for testing purposes, each transitions if 20 frames long )
This is pretty easy to do if the user clicks the 4 section in order 1, 2, 3, 4 but what about when he clicks section 4 right after clicking section 1 ? The movie clip has to be “smart” and know that it has to start the right set of frames. I assume actionscript needs to determine what section the user is in and what frames to play depending on where the user clicks next… At any rate, please check out my source file, ( just edit the MC called Hexx )the frame labels will make it clear.
You will have to make a few changes for this to work.
Take the spaces out of your frame names.
change your names to be Start1, Start1b, Start2, Start2b, etc…
Make four buttons on the main timeline called b1 b2 b3 b4 (those are their instance names).
Go at it! Check the attachment.
Good luck.
wel… attachment too large, so I’ll just post the code here…
moviestat="";
b1.onRelease=function(){//when you release the button
hexx.gotoandplay(_root.moviestat); //play the movie described in moviestat;
//check for end of the movie first, then go to next one.
this.onEnterFrame=function(){ //check every frame until moviestate==""
if(moviestat==""){
moviestat="start1b"; //now that it equals "", change it to start1b, so we know the last one played
hexx.gotoandplay("start1");
delete this.onEnterframe; //stop checking once you're done with this movie
}
}
}
b2.onRelease=function(){
hexx.gotoandplay(_root.moviestat);
//check for end of the movie first, then go to next one.
this.onEnterFrame=function(){
if(moviestat==""){
moviestat="start2b";
hexx.gotoandplay("start2");
delete this.onEnterframe;
}
}
}
b3.onRelease=function(){
hexx.gotoandplay(_root.moviestat);
//check for end of the movie first, then go to next one.
this.onEnterFrame=function(){
if(moviestat==""){
moviestat="start3b";
hexx.gotoandplay("start3");
delete this.onEnterframe;
}
}
}
yikes… pretty advanced stuff man !! You’ll have to excuse my Actionscript newbeeness but I don’t even know where to put this code… in a frame on my main timeline ?.. inside the hexx movie clip ?.. I tried both with no success eventhough I did change the names of the frame labels as you said.
I think I know where you are going with this code thanks to the comment VERY nice touch for the programing challenged such as I but I obviously have a long way to go…
Thanks for the quick reply.
Can’t wait to hear your answer Jedi Master ( don’t worry… won’t call you yoda )