The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.39 / 5.00 38,635 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.09 / 5.00 15,161 ViewsAlrighty, so I'm learning the AS to MC controls such as stop, play, etc. And I'm trying to do something but I can't really seem to do it right..
I'm making a game were MC1 has to come into contact with MC2 a certain number of times before moving to the next level. I've been able to code it so that MC2 goes to the next frame in it's own timeline when it hits, but I can't quite figure out how to make it go to the next scene after MC1 hits MC2 while it's on say, frame 5. (Or maybe the next frame on the main timeline)
Also, I'm trying to learn to make a timer for the game.
Can anyone help with this?
Use _root.gotoAndStop to make it go to the next frame. As for the timer, there is a good tutorial in AS: Main, but im too lazy to find it.
At 8/24/08 11:27 AM, andy70707 wrote: Use _root.gotoAndStop to make it go to the next frame. As for the timer, there is a good tutorial in AS: Main, but im too lazy to find it.
Thanks.
I was thinking that when it actually gets hit by the other MC that is would go to the next frame on the main timeline. Do you know the code for a hitTest that could work on the timeline of a Movie Clip?
its the same code, but you need to use roots. Use _root.instance to target another MC (you can do _root.mc1.mc2) And just _root.action to taget the main timeline.
At 8/24/08 11:44 AM, andy70707 wrote: its the same code, but you need to use roots. Use _root.instance to target another MC (you can do _root.mc1.mc2) And just _root.action to taget the main timeline.
I mean how can you put a hitTest into the timeline inside the MC, where it doesn't have to be on a Clip Event.
for on a timeline, use onEnterFrame=function(){ instead of onClipEvent (enterFrame){ They do exactly the same exept one is for on an MC and teh other is for on a timeline.
At 8/24/08 11:44 AM, andy70707 wrote: its the same code, but you need to use roots. Use _root.instance to target another MC (you can do _root.mc1.mc2) And just _root.action to taget the main timeline.
I mean how can you put a hitTest into the timeline inside the MC, where it doesn't have to be on a Clip Event.
At 8/24/08 11:58 AM, andy70707 wrote: for on a timeline, use onEnterFrame=function(){ instead of onClipEvent (enterFrame){ They do exactly the same exept one is for on an MC and teh other is for on a timeline.
Thank you!
Oops! Sorry for the double post.