Graphics and Flash

Dear all,\r\rCould i draw dynamically in Flash using ActionScript? that is, to draw graphics like the ones of GDI in VC++…\rThanks.\r\rCathy

What do you mean, draw dynamically ? Something like you ask Flash to draw a dog and it does it ?\rSeriously, be more precise.\r\rpom

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…\ris it ok to use Flash with this ?

To draw a line, yes. To fill an object, ???\rAbout that line thing, you can check a post of mine calld “Suprabeener line between points tutorial”, it should help you.\r\rpom

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. :slight_smile: 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.)\r\rNow 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.\r\rWhere are you Suprabeener… my savior!!!

I didn’t think of that. Since flash looks like C++, this filling thing should be doable. I’l check it.\rpom\rOK, dead-end.\rMaybe using XML ???

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.\r\rit’s stupidly complicated though, and as soon as you get to a moderate number of triangles, it goes really slowly.\r\rthere 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…\r\rmost seem to perform better than mine (sigh). ; )\r\rthere’s no draw poly of these coordinates, fill poly type commands. : (

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…?

i would tend to agree. flash is certainly not up to moving thousands of triangles around.\r\rif 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.\r\rmaybe in 6? probably wishful thinking, i am hoping for a moderate power boost though.