Thanks Randy - I will have a look at that site and source. However, for now, I was hoping to get an insight on why this simple code below is not drawing lines for me. The example comes right out of a book. I want to start small (then I will have a look at that PrimitiveExplorer code)
I am trying to get a simple HelloWorld-type line drawing app working. Code below does not seem to work for me. --- In [email protected], "Randy Martin" <[EMAIL PROTECTED]> wrote: > > You might take a look at this: > > HYPERLINK > "http://www.3gcomm.fr/Flex/PrimitiveExplorer/Flex2PrimitiveExplorer.html"htt > p://www.3gcomm.fr/Flex/PrimitiveExplorer/Flex2PrimitiveExplorer.html > > ~randy > > > _____ > > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of devworkit > Sent: Wednesday, October 03, 2007 8: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! > > > > > > > No virus found in this outgoing message. > Checked by AVG. > Version: 7.5.488 / Virus Database: 269.14.0/1048 - Release Date: 10/3/2007 > 8:22 PM >

