music_lp90 Posted September 16, 2008 Share Posted September 16, 2008 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 More sharing options...
justsomeguy Posted September 16, 2008 Share Posted September 16, 2008 The linkage name for attachMovie is a string, so it needs to be quoted. Link to comment Share on other sites More sharing options...
music_lp90 Posted September 16, 2008 Author Share Posted September 16, 2008 Oh wow, that was easy. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.