Hello everybody,\rI have a request to build an animated escalator. How can I do this using duplicate mc. I have one stair moving along a guide, now I need it to duplicate but not all at once, maybe after 1/6 seconds or so to give the escalator effect. Any and all help is much appreciated.
The problem is : I’m not sure you can apply a guide to a movie clip with Actionscript (as a matter of fact, I’m pretty sure you can’t. What you could do then is duplicate the whole movie clip, with the guide and all, and then send it to a certain frame. I’m going to try to make an example for you.\r\rpom 0]
Ok, what I have done : I create a new movie clip. In it I put the tween I want to do, between frame 1 and frame 20. I give it the linkage name “stair” in my library and then I put this code :
for (i=0;i<6;i++) {\r\r        attachMovie("stair","t"+i,i) ;\r\r        mc = _root["t"+i];\r\r        mc._x = 200 ;\r\r        mc._y = 200 ;\r\r        mc.gotoAndPlay (3*i+1) ;\r\r}
pom 0]
Ok do I put that code in the frame or with the movie
I think you may have bigger problems than that. If you’re doing a front view… you would need to use perspective on each step to make sure it looks good. Obviously… a side view would be much better, and easier…\r\rEither way it’s doable… You’ll need to determine the number of steps you will duplicate to make your effect complete… and perhaps turn the whole thing into a movie…
In the frame. With nothing else.\r\rpom 0]
First, thank you for the code. I’m sure it will work, but I’m not that good with action script. What do the variables do. I’m not sure how to replace them with mine.\r\rIs i the number of stairs. (I want it to be continuous)?\r\rFor mc put the instance name of my movie clip?\r\rStair is the exported name from the library?\r\rWhat is 3*?\r\rfor (i=0;i<6;i++) {\r attachMovie(“stair”,“t”+i,i) ;\r mc = _root[“t”+i];\r mc._x = 200 ;\r mc._y = 200 ;\r mc.gotoAndPlay (3*i+1) ;\r}
This code works but it is not a continuos loop. How do I make\rit run continuously with out running out.
It’s not supposed to stop. Can I have a look at your fla ?\r\r[email protected]\r\rpom 0]
You put a stop action at the end of the stepguide movie clip ! Remove it and then change the number of duplications to 20 or so. You also might want to have that shape tween work right, because as it is, it doesn’t fit in so well.\r\rpom 0]
well… I came up with a non-a/s version. Rustic, but I feel it accomplishes the task. Let me know and I’ll email it to you.\r\rI say non-as…although it does have stop() and a gotoandplay().\r