A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: StartDrag and bring to front?

  1. #1
    Senior Member
    Join Date
    Jul 2003
    Posts
    119

    StartDrag and bring to front?

    Hey, have a thing where i have a million drageable objects and to make it easy i made each one of them a movieclip with this on

    on (press) {
    startDrag ("");
    }
    on (release) {
    stopDrag ();
    }

    very copy paste friendly since the same script works on every movieclip.
    Here's my question; I would like that when i click an object and start dragging it it will be brought forth to the "top layer" so to say. Ergo every thing i start drag will be shown above everything else and when i click and drag another object that object will be above everything else.

  2. #2
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    Actionscript Code:
    on (press) {
    startDrag ("");
    this.swapDepths(_root.getNextHighestDepth());
    }
    on (release) {
    stopDrag ();
    }

    there are better and more efficient ways to apply same effect to multiple movieclips, but only wanted help with one thing, so I'm not going to go any further into that!
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center