A Flash Developer Resource Site

Results 1 to 20 of 38

Thread: Select and move multiple movieclips dynamically (AS2, CS4)

Threaded View

  1. #21
    Member
    Join Date
    Sep 2005
    Posts
    64
    That's a great find.



    I'd been looking through this thread

    http://board.flashkit.com/board/showthread.php?t=629305

    but the "Dynamic MovieClip Registration with AS2" by darronschall was great and easy to use... Thanks!

    Actionscript Code:
    import com.darronschall.DynamicRegistration;

    import mx.transitions.Tween;// Import tween class
    import mx.transitions.easing.*;// Import easing class

    // Assume there is an instance named square_mc on the stage  
    var square_mc:MovieClip;  
     
    DynamicRegistration.initialize(square_mc);  
    // set up initial registration point
    var centerX = square_mc._width / 2;
    var centerY = square_mc._height / 2;
    square_mc.setRegistration(centerX,centerY);

    var rotateMe = 90;

    my_butt.onRelease = function() {
        my_butt.enabled = false;
         var thisTween:Tween = new Tween(square_mc, "_rotation2", Regular.easeOut, square_mc._rotation2, rotateMe, 1, true);
         thisTween.onMotionFinished = function() {
            delete this;
            rotateMe += 90;
            if(rotateMe > 270) {
                rotateMe = 0;
            }
            trace("rotateMe = " + rotateMe);
            my_butt.enabled = true;
         };  
    };

    Now, back to the problem of rotating (or flipping) more than one selected item...


    Last edited by mr_proud; 03-24-2010 at 01:37 PM.

Tags for this Thread

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