I already suggested that. The function would be:
private var v:Object;
private var a:Number;
private var b:Number;
private function initLine(x1:Number, y1:Number, x2:Number, y2:Number):void {
a = (y2 - y1) / (x2 - x1);
b = y1 - a * x1;
v = {x:x1};
You could do it sending and object to TweenLite and monitoring its variables
to create lines from A to B.
Leandro Ferreira
On 1/29/08, Merrill, Jason [EMAIL PROTECTED] wrote:
Tried on another Flash list without any luck, so I'll try here.
I'm trying to see if there is a way to combine
Not sure about TweenLite, but there is some useful stuff here:
http://www.reflektions.com/miniml/template_permalink.asp?id=254
and here:
http://labs.zeh.com.br/blog/?p=104
Leandro Ferreira wrote:
You could do it sending and object to TweenLite and monitoring its variables
to create lines
Any straight line can be described as this simple equation: y = ax + b
If you have the starting point (x1, y1) and the end point (x2, y2), it's
easy to work out two constants a and b.
The beauty of TweenLite is you can tween any property of any object
(thanks Jack!). In this case you will
Jason,
I recently put together a bar chart, rendered entirely by code in AS2,
where the points must be connected by a line. I draw the entire line
(which might look like a profile of the Rocky Mountains) in one mc, and
set a mask over it in another mc. I use the tween class on the _width
, Michael
Sent: Wednesday, January 30, 2008 8:49 AM
To: Flash Coders List
Subject: RE: [Flashcoders] Animating sprite.graphics.lineTo
Jason,
I recently put together a bar chart, rendered entirely by
code in AS2, where the points must be connected by a line. I
draw the entire line (which might
Tried on another Flash list without any luck, so I'll try here.
I'm trying to see if there is a way to combine TweenLite and the draw
functions (i.e. sprite.graphics.lineto) to slowly draw a line from point
A to point B. Maybe there isn't, but I thought I would ask.
Is it possible or would
7 matches
Mail list logo