This question will strike many of you as utterly retarded, I've no doubt, but I've really, *really* tried to find the solution without having to ask for it, to no avail.
I have an animation. It is 100 frames. Within the animation, I have a movieclip type symbol of a man, which is ten frames. The man is a stick-figure. His head, torso (arms+body), and legs, are each their own movie clips. Each of those is ten frames.
On the main timeline, the Man movieclip walks across the stage. His legs and arms move in sync, in their ten-frame looped animation.
At 70 frames, on the main timeline, the man stops moving across the stage.
How do I make his legs and arms stop moving at this point?
Posts
If you do need to use script, for whatever reason, I'd suggest finding a tutorial, as it'd likely take longer to explain it. This is very basic stuff.
_root.man.leg.stop();
This would be ActionScript 2.0, and even that I haven't used in a while so it may be slightly different.
I did look through a number of tutorials, but they all seem to skip over the type of things I'm trying to figure out (IE very basic stuff).
Really, all I'm trying to do with this project is get a method down for basic animation. I asked a question here a few weeks ago about an animation I was working on, in which I was using a one-level configuration (no movie clips or embedded movie clips), and between here and a few other places, the consensus seemed to be that working in embedded movie clips is the way to go for most animations. So that's what I'm trying to learn to do. I'm just not familiar with the process.
The animation for that clip (the man as a whole) stops, but the embedded clips within that graphic (the feet and arms) still play. Is the only way to stop that going to be to make the foot motion 70 frames long? It seems like there would have to be a simpler and more practical way.
Another question: what is the syntax error in this code? I keep getting a return error of "Extra characters found after program". I see nothing wrong here -- in fact, I ripped it straight from a tutorial.
The most elegant way is the one Revolutionary mentioned though. The key with doing it that way is to make sure you give everything its own instance name (in the movieclip properties), then just stop the animation on the main timeline with:
man.stop();
man.legs.stop();
man.arms.stop();
(where your animated man movieclip is named "man", and it contains movieclips named "arms" and "legs")
Also, there is no syntax error in that code. I doublechecked it by drawing a box, converting it to movieclip, clicking on box, pasting in the code and it worked fine. If you are using ActionScript 2 your problem is definitely elsewhere.
First of all, don't turn anything into graphics, that would be dumb.
Second, don't use _root. - Actionscript should be centralized and _root encourages you to just throw shit wherever in your Flash documents making them harder to maintain. It doesn't really matter in something this small but you might as well get it out of your system.
Your problem is you have your man animating and when you stop him on frame 70 his appendages keep moving.
Well, you didn't specify how you were animating the man, but let's assume you have the man as an MC and you are tweening him across the stage, and within the "man" movie clip you have the arms and legs on an infinite loop.
First of all you want to make sure that your movie clips on the stage have Instance Names, you can find this in the bottom panel of Flash towards the left, name them mc_man, mc_leg, etc.
Now, on the frame wherein your guy stops moving, create a fresh layer if you don't already have an Actionscript layer and you basically want to create a series of stops on that frame.
So, if your Man is stopping automatically because it's the end of the tween, then all you need to do is say
man.leg.stop();
and so on.
As for this
I think you are going about this the wrong way (at least in AS2). You want this key press events to only exist after a certain frame?
What you would do (or rather, what I would do) is establish these event handlers on Frame 1 of the main timeline. Then you add a line something along the lines of
this.enabled = false;
Where this is the MC who has these event handlers.
This SHOULD prevent this event handler code from executing until you re-enable the MC.
Then you just proceed to the frame where you want the events to start working and add in a
this.enabled = true;
I think that is sound unless you are dealing with AS3, which had it's own unique brand of lunacy.
we also talk about other random shit and clown upon each other