PDA

View Full Version : Graphics and Flash



syau7
January 25th, 2002, 03:19 AM
Dear all,

Could i draw dynamically in Flash using ActionScript? that is, to draw graphics like the ones of GDI in VC++..
Thanks.

Cathy

ilyaslamasse
January 25th, 2002, 02:35 PM
What do you mean, draw dynamically ? Something like you ask Flash to draw a dog and it does it ?
Seriously, be more precise.

pom

syau7
January 27th, 2002, 09:27 PM
For example, i have a set of coordinates points (x1, y1), (x2, y2), (x3, y3), (x4, y4)..and i want to draw lines through it, or fill the rectangle that i drew with a specified color..
is it ok to use Flash with this ?

ilyaslamasse
January 28th, 2002, 12:12 AM
To draw a line, yes. To fill an object, ???
About that line thing, you can check a post of mine calld "Suprabeener line between points tutorial", it should help you.

pom

upuaut8
January 29th, 2002, 06:03 AM
I think that what you're saying is, you'd like to draw objects in flash, the way you would in another program like C++. The answer is no. :) Sorry. You can do lines, and very complex 3D structures of lines at that. but they don't have that option to create them filled in.. (at least this is what I've heard.)

Now some people do it by creating a single movie clip, having a frame for each side, and a whole bunch for the angles of the turning, and then they have some sort of array set up with trig functions telling the movie clip which frame to go to, and which way to turn. This is all a little beyond me, but I believe that Suprabeener has done this for some things.

Where are you Suprabeener.. my savior???!!!!

ilyaslamasse
January 29th, 2002, 03:03 PM
I didn't think of that. Since flash looks like C++, this filling thing should be doable. I'l check it.
pom
OK, dead-end.
Maybe using XML ???

suprabeener
January 29th, 2002, 07:52 PM
yeah, i've successfully filled polygons using right angled triangles to draw a triangle of any shape, and using those triangles to fill any polygon.

it's stupidly complicated though, and as soon as you get to a moderate number of triangles, it goes *really* slowly.

there are a number of examples out on the web. some use tweened squares (rotate a square 45 degrees, make that a movie in a movie and you can change it in all kinds of ways), some use non-right angled triangles...

most seem to perform better than mine (sigh). ; )

there's no draw poly of these coordinates, fill poly type commands. : (

syau7
January 30th, 2002, 01:01 AM
Thanks all~! however, i need to draw a lot of polygons (around a thousand) and filled them with colors..so i don't think flash is suitable to be used in this case..?

suprabeener
January 30th, 2002, 01:15 AM
i would tend to agree. flash is certainly not up to moving thousands of triangles around.

if you'd like to ascertain that, make a movie that moves around a little, and then dup it a thousand times or so. then imagine that each movement was created by a trig heavy script. forget it.

maybe in 6? probably wishful thinking, i am hoping for a moderate power boost though.