|
-
[F8] Simple: Drag and duplicate MC
Hi
Heres probably a simple one: I've got three buttons, wich I each assign an onPress function: I want to drag the MC/BTN and when this MC is dragged from it's position, a new MC is copied and placed in where the old MC where placed before it was dragged. This new MC has the exact same function attached, wich means, that you can copy and drag as many of this MC as you wish. Can anyone tell me, what I'm doing wrong?
Code:
for(var i:Number = 0; i < 3; i++){
MyMovieClip_int = this["test_mc_" + i]._name.substr(8)
this["test_mc_" + i].onPress = function(){
duplicateMovieClip(this["test_mc_" + MyMovieClip_int], "new_mc" + MyMovieClip_int , _root.getNextHighestDepth())
startDrag(this["test_mc_" + MyMovieClip_int])
}
}
-
When in doubt ask
Please see the attached FLA (F8) from my library
Last edited by Eager Beaver; 08-19-2007 at 02:25 PM.
<signature removed by admin>
-
well, I've downloaded your exampel, but can't really recognize my problem in your file. I repeat my function in a 'for-loop', and need to integrate this duplicate-function in this loop ..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|