-
Fill half the stage
I'm trying to fill half the stageheight with a single color and I can get it work in flash when I preview it, but when I check it in the browser it doesn't work.
PHP Code:
square = new Sprite();
square.graphics.beginFill(0xCCFF00);
square.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight/2);
addChild(square);
-
Put an endFill in there and see if that helps.
-
Oops, I accidently left that out on my post. It will fill up half the stage when its first loaded and if you make the stage larger, but if you make the stage smaller it won't resize. Or maybe it is resizing but its just not erasing the previous fill.
-
If this is being called repeatedly, you'll probably want to call graphics.clear before beginFill.
Is this an event listener for RESIZE?
-
yeah clearing it worked, thanks!
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
|