It's an ActionScript project, homey, has nothing to do with the Flex 
framework, just uses plain ActionScript:
http://www.jessewarden.com/archives/2005/10/as3_chronicles.html

If you want to incorporate Flex framework stuff, check here for an example:
http://www.helpqlodhelp.com/blog/archives/000140.html


----- Original Message ----- 
From: "Mark Wales" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, October 31, 2005 1:52 PM
Subject: RE: [flexcoders] Drawing Examples in Flex 2?



Thanks Jesse - this certainly looks like the right approach -
unfortunately I've not been able to get it to work. I've tried calling
it directly within MXML, calling it from a creationComplete function,
and embedding the SWF in an existing simple application. I'm sure I'm
missing something obvious, any thoughts?


-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of JesterXL
Sent: Monday, October 31, 2005 12:51 AM
To: [email protected]
Subject: Re: [flexcoders] Drawing Examples in Flex 2?

Bling, bling!

package

{

import flash.display.StageScaleMode;

import flash.display.StageAlign;

import flash.display.Sprite;

import flash.display.Graphics;

import flash.events.MouseEvent;

import flash.events.MouseEventType;

import flash.util.trace;


public class DrawingMouse extends Sprite

{


private var canvas_sprite:Sprite;


public function DrawingMouse()

{

stage.scaleMode = StageScaleMode.NO_SCALE;

stage.align = StageAlign.TOP_LEFT;


canvas_sprite = new Sprite();

addChild(canvas_sprite);

var g:Graphics = canvas_sprite.graphics;

g.clear();

g.beginFill(0x000000, 0);

g.lineTo(500, 0);

g.lineTo(500, 500);

g.lineTo(0, 500);

g.lineTo(0, 0);

g.endFill();


canvas_sprite.addEventListener(MouseEventType.MOUSE_MOVE,
mouseMoveListener);

}


private function mouseMoveListener(event:MouseEvent)

{

trace("mouse move");

var g:Graphics = graphics;

g.clear();

g.lineStyle(2, 0x000000);

g.moveTo(100, 100);

g.lineTo(mouseX, mouseY);

g.endFill();

}


}

}

----- Original Message ----- 
From: "Mark Wales" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Sunday, October 30, 2005 5:05 PM
Subject: [flexcoders] Drawing Examples in Flex 2?



Has anyone spent any time drawing simple shapes (lines, circles, etc.)
in Flex 2?? Can someone point me to a couple examples? An ideal scenario
would be something that showed how to draw a line between a point and
the current location of the mouse.

Thanks in advance...






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links








--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links









--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to