Jump to content


  • Posts

  • Joined

  • Last visited

impaler's Achievements


Newbie (1/14)



  1. thank greensock this seems to be working so far; var selection_rect:Rectangle = _manager.getSelectionBounds(); if ( selection_rect ) { var xms:Number = stage.stageWidth*.5 - selection_rect.width*.5; var yms:Number = stage.stageHeight*.5 - selection_rect.height*.5; var xm:Number = 0 - ( selection_rect.x - xms); var ym:Number = 0 - ( selection_rect.y - yms); _manager.moveSelection(xm,ym); }
  2. I was wanting to create a button that would set the location of an selection to the centre of the stage or parent. To send an item to the top left I can see we can just mc1.x = mc1.y = 0; and moveSelection(0,0); updates everything. How could we approach using the selection itself and using it's real width and height to find the center right etc of the stage or parent? I have seen moveSelection() but this is relative to the selection's current position, how would we write a moveSelectionTo() ? Thankyou, I am very much enjoying the wonderful work done here in GreenSock.