Thanks for the info - I found what I was looking for in that info.

So, in my example code below, I had to make this change for the lines
to actually show:

this.rawChildren.addChild(canvas);


Thanks all for the info.

--- In [email protected], "Matt Horn" <[EMAIL PROTECTED]> wrote:
>
> The comments thread on this page should help you get going:
> 
> http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.
> htm?context=LiveDocs_Parts&file=00001855.html
> 
> -matt  
> 
> > -----Original Message-----
> > From: [email protected] 
> > [mailto:[EMAIL PROTECTED] On Behalf Of devworkit
> > Sent: Wednesday, October 03, 2007 9:28 PM
> > To: [email protected]
> > Subject: [flexcoders] A simple graphics.lineTo 
> > question...should be simple.
> > 
> > I am just starting to look at the drawing capabilities of 
> > Flex. I'm trying to get an example working from the Essential 
> > ActionScript 3.0 book but it does not work for me. It seems 
> > awfully simple. Here is what the book gives for the example 
> > to draw 4 different lines:
> > 
> > var canvas:Shape = new Shape();
> > canvas.graphics.lineStyle(1, 0x000000);
> > canvas.graphics.lineTo(100, 0);
> > canvas.graphics.lineStyle(5, 0xFF0000);
> > canvas.graphics.lineTo(100, 100);
> > canvas.graphics.lineStyle(10, 0x00FF00); 
> > canvas.graphics.lineTo(0, 100); canvas.graphics.lineStyle(15, 
> > 0x0000FF); canvas.graphics.lineTo(0, 0);
> > 
> > addChild(canvas); 
> > 
> > I created a mxml application and placed the above code in a 
> > myInit() function and I call the myInit() function from the 
> > creationComplete event of the Application object.
> > 
> > When I run the application, nothing happens. The book says it 
> > should show a simple box with different sized lines. 
> > 
> > Anything else I need to do?
> > 
> > Thanks!
> > 
> > 
> > 
> >  
> >
>


Reply via email to