|
-
Best way to unattach a movieclip?
I've got a problem and have racked my brain - and searching this forum - for a solution.
I have a movieClip called mcAttract on Level10. In this clip I've got another movieClip in which there's a button. This button has the following command:
Code:
on (press) {
_root.attachMovie("mcAttractC2MovieBackground","mcAttractC2MovieBackground",20);
}
mcAttractC2MovieBackground is a clip in which there's some video, as well as a close button. The close button has the following command:
Code:
on (release) {
unloadMovie(this)
}
So far so good. My close button does the job and gets rid of the clip on Level 20.
However, my original movieClip has a back button. This button brings you to the following on the timeline:
Code:
this.attachMovie("mcMainMenu","mcMainMenu",10);
mcMainMenu.gotoAndPlay(140);
Normally this does the job of getting me back to my main menu page. What it doesn't do is get rid of the blasted mcAttractC2MovieBackground clip.
I've tried various scenarios - including putting an unloadMovieNum(20) on frame 140 of the mcMainMenu timeline, but that doesn't work.
How in the world do I get rid of that pesky movieClip on Level20 when I press by Back button?
Here's a visual!

Any help would be much appreciated. Like most of my Flash challenges, I'm sure the answer is right in front of me.
-
Well, it seems as though I've narrowed the problem down to the fact that I used _root. in my initial attachment of mcAttractC2MovieBackground.
If I remove that everything works fine.
However, when you remove root you of course have to move all the graphic contents of mcAttractC2MovieBackground into some bizarre location so that everything lines up when it's dumped into the main clip.
Anyone have any ideas?
-
Developing For Dunkets
in the back button putting _root.removeMovieClip("mcAttractC2MovieBackground" );
doesn't do the trick? I'm not sure what you mean by
you of course have to move all the graphic contents of mcAttractC2MovieBackground into some bizarre location so that everything lines up when it's dumped into the main clip.
edit: you have depths and levels confused. You can have many depths on a level. And you assign an mc to a depth when you attach it with attachMovie.
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
|