
Create a Box Button. Again Convert this button to MovieClip.
Now create multi instance of this MovieClip in the stage and name the instance of the each MovieClip like source_mc,source1_mc,source2_mc.
Select the button to write the actionscript by, RightClicking the MovieClip > 'Edit in place', select the button press F9.
Add the code:
- on (press, dragOver) {
- this.startDrag();
- this.swapDepths(this.getNextHighestDepth());
- }
- on (release, dragOut) {
- this.stopDrag();
- }
Here we are changing the swapDepths by getting the HighestDepth in the Stage.
Due the multi instance every movieclip has the same function.
No comments:
Post a Comment