[mtasc] removeMovieClip() works, but just in sort of a way

jannerick aye at gmx.at
Sun Oct 15 14:06:55 CEST 2006


hi there,

i am currently working on bigger project where i have a main movie wich
has a container where i load some other movie into. in these other swfs
i am building a few movieclips with the createEmptyMovieclip statement,
which should be (alpha)animated into the scene after a delay.
it all works fine when i first load the movie into the container. but
after unloading it, loading a new movie, unloading this one and
reloading the first movie. the movieclips that should be animated into
the scene, could be seen on first sight. i also had nearly same error
with a streaming flv, before i deleted the netconnection explicit.

here is the code for the content switch:

private function loadLink(link:String):Void {
	var scope:MovieClip = cnt_mc._parent;
	var name:String = cnt_mc._name;
	var depth:Number = cnt_mc.getDepth();
	var x:Number = cnt_mc._x;
	var y:Number = cnt_mc._y;
	trace(cnt_mc); // shows a reference on the mc
	cnt_mc.removeMovieClip();
	trace(cnt_mc); // shows nothing
	cnt_mc = scope.createEmptyMovieClip(name, depth);
	cnt_mc._x = x;
	cnt_mc._y = y;
	// cnt_loader is a MovieClipLoader
	cnt_loader.loadClip(link, cnt_mc);
}

i would be very thankfull for any help.
greets, jan eric




More information about the mtasc mailing list