Jump to content

attachmovie, duplicatemovie, or something else


music_lp90

Recommended Posts

Hi, I'm trying to have it so when a user clicks a button, a movieclip from the library is placed on the stage and each time they continue to press the button a new instance of that clip is placed on the stage. The button they are clicking is btn_chimney and the movieclip that I want placed on the stage from the library is mc_chimney.I've tried lots of things, but here's the last one that doesn't seem to work:I set the linkage properties as follows:name: mc_ChimneyIdentifier: mc_chimneyExport for actionscript: checkedExport in first frame: checkedHere's the actionscript:

btn_chimney.onPress = function() : Void {	$i++;	$dynamicName = "chimney" + $i;	$dynamicName2 = "contain" + $i;	var $contain = createEmptyMovieClip($dynamicName2, $i);	$i++;	$contain.attachMovie(mc_chimney, $dynamicName, $i,[$dynamicName._x = 40, $dynamicName._y = 40]);}

Thanks for any help!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...