Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 25th, 2012  |  syntax: None  |  size: 0.52 KB  |  hits: 5  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Disable autoscaling in AS3
  2. private function expand(event:Event):void {
  3.   TweenLite.killTweensOf(this);
  4.   TweenLite.to(this, .2, {
  5.     height: _dimensions.tall_height
  6.   });
  7.   return;
  8. }
  9.        
  10. var m:Sprite = new Sprite();
  11.  
  12. var g:Graphics = m.graphics;
  13. g.beginFill(0);
  14. g.drawRect(0, 0, box.width, 200);
  15. g.endFill();
  16.  
  17. // Apply mask
  18. box.mask = m;
  19.        
  20. var m:Sprite = Sprite(box.mask);
  21.  
  22. // Redraw mask, now 400px
  23. var g:Graphics = m.graphics;
  24. g.beginFill(0);
  25. g.drawRect(0, 0, box.width, 400);
  26. g.endFill();
  27.  
  28. // Reapply mask
  29. box.mask = m;