i have created instances of a movieclip dynamically with a duplicate movieclip action. now i want those dynamic instances to be draggable.
this is the code that creates the dup movieclip
var i = 0
clip.onPress = function(){
i++
this.duplicateMovieClip(“clip”+i, i)
eval(“clip”+i).startDrag(false)
}
clip.onReleaseOutside = function(){
eval(“clip”+i).stopDrag();
}
clip.onRelease = clip.onReleaseOutside
<-----------------end of code---------------------------->
how do i make the dynamic clips draggable. i tried to anticipate the name of the new movieclip by using the code below but that didnt work.
clip1.onPress = function(){
this.startDrag(true)
}
the goal is to create a building block game and i want the user to have an unlimited supply of shapes.
thanks in advance for any help you can offer.