I'm trying this:

var mc:MovieClip = new MovieClip();
this.addChild( mc );
mc.x = 50;
mc.y = 50;

mc.graphics.beginFill(0x0000FF);
mc.graphics.drawRect( 0, 0, 500, 500 );
mc.graphics.endFill();

It works flawlessly in Flash CS3 though...


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Britton
Sent: Monday, April 30, 2007 1:39 PM
To: [email protected]
Subject: Re: [AFFUG Discuss] drawing colored rectangle movieclips in Flex

var channelBar5 = new Sprite();
channelBar5.graphics.beginFill(0xFFFFFF);
channelBar5.graphics.drawRect(27,-20,5,30);
channelBar5.graphics.endFill();
addChild(channelBar5);  


hth,

Mike



On 4/30/07, Justin Haygood <[EMAIL PROTECTED]> wrote:
>
>
>
>
> I'm trying to draw two rectangles in Flex 2. In the Flash CS3 prototype, I
> used library instances, but I'm trying to do the same thing using pure
code,
> and I can't for the life of me figure out how to draw a colored rectangle
> that is a MovieClip (or subclass of one).
>
>
>
> Basically, I just want to draw a movieclip that has a blue background
inside
> Flex 2 using pure ActionScript 3.0
>
>
>
> Thanks In advance!
>
>
>
> --Justin Haygood
> -------------------------------------------------------------
> To unsubscribe from this list, simply email the list with unsubscribe in
the
> subject line
>
> For more info, see http://www.affug.com
> Archive @
> http://www.mail-archive.com/discussion%40affug.com/
> List hosted by FusionLink
> -------------------------------------------------------------


-- 
Mike
----------
http://www.mikebritton.com
http://www.mikenkim.com


-------------------------------------------------------------
To unsubscribe from this list, simply email the list with unsubscribe in the
subject line

For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------





-------------------------------------------------------------
To unsubscribe from this list, simply email the list with unsubscribe in the 
subject line

For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------


Reply via email to