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
 

Reply via email to