-
[MX04] How can I store a mc's x-position between scenes?
Hi. I make making a basic animation / game. Basically I need to have a movieclip named "ground" stay in the same position between scenes. It will be moving around and at certain moments, the movie goes to other scenes and it needs to place the ground at the x-postion where it was last at. So I had:
I set a variable (xpos) to be 0 earlier and then i have:
if(blah blah happens){
gotoAndStop(nextScene()){
_root.xpos = _root.ground._x;
}
and then in the next scene I have
_root.ground._x = _root.xpos;
But it only works randomly. Some time it will work for certain scenes and certain actions and other's it doesn't work. Is there a better way to do this?
Last edited by Newbieian; 02-17-2009 at 07:38 AM.
-
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
|