Posted By

wintondeshong on 07/12/07


Tagged

textmate actionscript background drawingAPI


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

arala22


fillBackground


 / Published in: ActionScript
 

  1. /**
  2. * Fills a supplied MovieClip with a specific width, height, color, and opacity
  3. */
  4. private function fillBackground(_obj:MovieClip, _w:Number, _h:Number, _color, _opacity:Number):Void
  5. {
  6. _obj.beginFill( _color, _opacity );
  7. _obj.moveTo(0, 0);
  8. _obj.lineTo(_w, 0);
  9. _obj.lineTo(_w, _h);
  10. _obj.lineTo(0, _h);
  11. _obj.lineTo(0, 0);
  12. _obj.endFill();
  13. };

Report this snippet  

You need to login to post a comment.