PDA

View Full Version : Movie clips >< (It's holding me back! Part3)



Drexegar
October 15th, 2004, 11:17 PM
Ok ok I have my player his name is "Drex" In side drex is three movie clips "Stance" "Foward" "Attack" Now in the "Attack" is a three frame punch. Now i was wondering is there a way on the last frame of that attack I can tell the "Drex" Movie clip to go back to Frame one which is the "Stance"?

mizer
October 16th, 2004, 02:42 AM
you can set this on the last frame:gotoAndStop(u choose wich frame);

Dr Warm
October 16th, 2004, 04:09 AM
And also please don't post a new thread for every problem, maybe if it was a different game, especially if we'll need to cross-post code, because all these questions are related

Drexegar
October 16th, 2004, 09:38 AM
yeah sorry about ^_^; that but i lok for like hours and why I couldnt find and answer to this question so i was thinking if i should put it on the same thread r maybe this answer might help a lot of people so do ya think it possible?

Drexegar
October 16th, 2004, 09:39 AM
you can set this on the last frame:gotoAndStop(u choose wich frame);
Yes i need a go to stop action that will control another movie that outside of it I cant use root. becasue it only goes to movieclips inside >_< .... or does it?

Dr Warm
October 16th, 2004, 09:58 AM
no u don't need _root, u can make it go to a different frame inside a mc, from a frame within it (if that made sense), so yeah just go
gotoAndStop("some frame"); and that'll loop it back to there (called moving the playhead actually)

lostinbeta
October 16th, 2004, 11:29 AM
It would be _parent.gotoAndStop(frame).

--Character
----Timeline with 'action' clips
------Attack Timeline

You need to go from the attack timeline, back up to the timeline that contains the clips... this requires the use of _parent to go back 1 timeline.

Drexegar
October 17th, 2004, 03:26 PM
thanx a lot man taht is very very useful! Thanx a lot man! that really did the trick so far my character can move left and rigth and can punch but i didnt want any glithes so i figured out a way to not let the character punch while hes moving. Now i going to mess with this _parent thing all the way ^_^

Hey.... Do ya think its possibel to have an action to control a movie clip thats inside a movie clip to give it actions to control a movie that is not associate with the parent?

lostinbeta
October 17th, 2004, 04:18 PM
Yes it is... just read up more with targetting using _root, _parent, and 'this' and you can do anything ;)

Though I recommend straying from using _root... makes your cod/movie more portable when you can use relative addressing instead of static addressing.

Drexegar
October 17th, 2004, 05:15 PM
yeah man cool! thanx so much this is very helpful code =^_^=