/ Published in: ActionScript
Params: Color, alpha, x pos, y pos, width, height
Expand |
Embed | Plain Text
// Draws a solid rectangle inside a movieClip function drawRectangle(target:MovieClip, color:Number, alpha:Number, x:Number, y:Number, w:Number, h:Number ):Void{ target.beginFill(color, alpha); target.moveTo(x, y); target.lineTo(w, y); target.lineTo(w, h); target.lineTo(x, h); target.lineTo(x, y); target.endFill(); }// draw rectangle // USAGE ---------------------------------------------------------// drawRectangle(movieClip_MC, 0xFF0FFF, 0, 0, 100, 100, 100);
You need to login to post a comment.
