|
-
Drawing box with ActionScript
I am trying to draw a box with ActionScript at runtime, but cannot get it to work. Here is the code I am using. Does anyone know why it is not working?
function drawBox(clip, color, alpha, lineType, x, y, w, h)
{
clip.lineStyle(lineType);
clip.beginFill(color,alpha);
clip.moveTo(x, y);
clip.lineTo(x+w, y);
clip.lineTo(x+w, y+h);
clip.lineTo(x, y+h);
clip.lineTo(x, y);
clip.endFill();
};
var myMC = _root.createEmptyMovieClip("myClip",1);
drawBox(myMC,0xDB3030,0xEEEEEE,1,20,30,100,30);
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|