[thelist] Flash problem: removeMovieClip
joe
stowaway at uklinux.net
Sun Jun 27 05:55:22 CDT 2004
Millie Niss wrote:
>If anyone can solve this Flash 2004 problem I'd be very grateful.... I am up
>against a deadline with this, and I am really stuck!
>
>I am defining a component that makes a movie clip from the library appear
>when you roll over it. This works. I use attachMovie and give it a unique
>name made up of the linkage name of the thing I'm attaching plus the depth
>I'm attaching at.
>
>But when I try to remove it, it won't go away! I want RollOut to remove the
>thing. When I trace the thing I'm trying to remove I get what I expect...
>
>My code is as follows:
>
>
>
>
hey Millie
the easy way is to give yourself a nice handle for the clip you've made:
myClip = _root.attachMovie(toappear, clipname, depth);
then you don't need the eval(...), just access it using myClip:
myClip._x = this.x;
myClip._y = this.y;
myClip._xscale = this.xs;
myClip._yscale = this.ys;
myClip._rotation = this.rot;
myClip._alpha = this.a;
or myClip.removeMovieClip() to get rid of it.
if you have more than one at any time being instantiated, you can use an
array:
myClip[depth] = _root.attachMovie(toappear, clipname, depth);
this.rememberMyDepth = depth;
..
myClip[this.rememberMyDepth].removeMovieClip();
hth
joe
More information about the thelist
mailing list