|
-
[F8] Strange prob with attach & removeMC
I am using some attachMovie and removeMovieClip's in my movie.
Basically I have 5 MCs that will bringup a different MC each in the same spot.
so on MC1 I have this:
Code:
on (release) {
_root.MC2.removeMovieClip();
_root.attachMovie("MC3", "MC3", _root.getNextHighestDepth(),{_x:350.0, _y:149.0});
}
And the same on MC2 (with the names swapped, of course).
Now this works well.. if I click on MC1 I see MC3, if I click on MC2, MC3 disappears and MC4 appears. And vice versa. I noticed though, that if you click MC1 twice you make 2 MC3's, thus only one gets removed when you click MC2.
Is there a way to stop this?
Also, and better, since I have so many attach and removes, is there a code to attach MC1 and remove ANY previous attached MC?
~MoN
If I am wrong, please just correct me and move on.. there is no need for all that pointing and laughing! ~MoN
-
Once again the posting fairy's have done it. I posted and as soon as I did I solved it.
Instead of nextHighestDepth, I removed the remove coding and gave each MC the same depth in the attach code, thus resulting in the replacement of the MCs. Just what I wanted , and it works great.
Sorry for forgetting this and posting a stupid question. 
~MoN
If I am wrong, please just correct me and move on.. there is no need for all that pointing and laughing! ~MoN
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
|