|
-
This is probably pretty darned basic, but I can't seem to figure it out- What I have is a 3 frame movie with an MC that slides onto the stage via ActionScript that looks something like this:
//code in frame 1:
xpos=0;
ypos=225;
//Code in Frame 2:
setProperty("box", _x, xpos);
xpos= 2 + xpos;
setProperty("box", _y, ypos);
//Code in Frame 3:
gotoAndPlay(2);
And what I want to do is have it stop at a specific point and I'm having no luck at all....
Thanks for any help
-
Lets say you want it to stop when it gets to xlocation 400. All you have to do is on frame 3 say ..
if (xpos > 400) {
stop() or whatever you want to happen
} else {
gotoAndPlay(2)
}
-
-
As you get more used to FLASH action script its cool to make an mc do its own thing, that leaves the the main timeline open to whatever. So when you double click on the particular mc to edit it, when its surrounded with a blue box, you are within the mc's "action". Try placing an
onClipEvent(enterFrame){
if (this._x <= 400){
return;
}else
this._x += 2
}
there, and then the mc does what its supposed to, and leaves you to utilise the main timeline even more.
swills
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|