Hi.
I was messing around with movieclip duplication the other day for part of a project and I came across something that made no sense to me whatsoever.
When running this code in the main timeline it works fine, however if I add
Code:
_root.btn1.onRelease = function(){
to the top of it and try to duplicate these clips on a press of a button, it doesn't do anything...
Code:
_root.btn1.onRelease = function(){ //*doesn't function if I add this
for (var i:Number = 0; i<4; i++) {
circle2.duplicateMovieClip("circleCopy"+i, this.getNextHighestDepth());
this["circleCopy"+i]._x = Math.random()*200;
this["circleCopy"+i]._y = Math.random()*200;
}
} //*
Any ideas anyone?
Thanks guys