Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove attached movie clip [Code Supplied] 1

Status
Not open for further replies.

QuantumDoja

Programmer
Jun 11, 2004
76
GB
Hi, I have the following function, when called it puts an movie clip on the screen, this attached movie clip has a movieclip on it, that when pressed, should remove the attached movieclip, I can capture the event, but I can remove the clip.

here is my code

Code:
//function to show error mc
function LoadError():Void {
	trace("Loading error.")
	var mcError:MovieClip = this.attachMovie("mcConError","mcError",this.getNextHighestDepth());
		
		mcError.mcbtnClose.onPress = function():Void {
			trace("Close Clicked")
			removeMovieClip(mcError);
		};
}

 
That's weird - I just used your code and created the relevant clips with linkages/instance names etc and it worked perfectly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top