Drawing something


this is the prob. i want to do something like a blackboard wherein i get to write something on the blackboard using the chalk. (i.e. a circle will do for now)

how do i do that?

attached is the file.

would appreciate some help.


i was thinking of motion guides.

sorry… i couldn’t load it…

please help.

there is a tutorial on using the drawing api on this site. Check out the tutorials section.

thanks ian. it was very helpful.

just one more thing, what if I want flash to just draw a perfect circle say for example a slide show how do I do that?

the scene is just supposed to draw a circle because the lesson is about teaching shapes and the next scene i’ll discuss a square so i want flash to make a square in the window using the chalk I have on the bottom of the screen. it’s like the chalk from the bottom is the one that’s going to draw the circle and the square.

will that be hard to do?

thanks so much.


Thanks Ian? :stuck_out_tongue:
Anywa, it shouldn’t be too difficult, but not too easy either. Especially for the circle. By the way, do you want your shapes to appear on the screen or to be drawn on the screen?

pom :asian:

ilyaslamasse… :stuck_out_tongue:

i want it drawn…

can you help me with it?? :frowning:

ok ok so i forgot to type in the whole iam… :stuck_out_tongue:

thanks inigo for the help on the drawing board.

but ilyaslamasse… how do i make it turn out
that it’s drawn right in front of me??


I’m trying, I’m trying… But it’s more difficult than I thought. The thing is I can draw little by little a line between 2 points, but then when it’s done I can’t get it to draw the newt line :frowning:

But I’m getting there…

pom =)

hey thanks!!! :slight_smile:

i’ve been trying to find a script everywhere… i’ve been in front of the computer the whole afternoon but still no sign of a light bulb lighting up anytime soon… i’m glad you’re trying to help me out… really… :slight_smile:

as soon as you come up with anything i’d be really grateful if you’d post…

Phwew! That wasn’t easy at all. Strangely enough, I eventually made it by mistake :P. An error in a sign, I forget something else and it works perfectly. Go figure…

The good thing is: it’s just code.
The bad thing is: it’s nothing but code. I’ll try and explain it:

*// My little drawing prototype :)
// destx: final _x destination
// fromx: start _x position
// stage: number of stages from the origin to the destination*

MovieClip.prototype.lineStage = function (destx,desty,fromx,fromy,stage)
	if (i<=stage)
*// if I'm not arrived to the new point, draw a bit of the line*
	} else
*// otherwise let's go to the next point, referenced in the 
// array aPos. We reset i (stage counter) and increment j
// (point counter)*
		if (j++==aPos.length) _root.onEnterFrame=null;

*// Now the easy stuff! The array declaration, then we create 
// the clip in which we'll draw, we position it, set a style, put
// the point counter on the first point, put the drawing point
// where it should be (told you it's the easy part :)*

aPos=new Array(new Array(0,0),new Array(0,50),new Array(50,50),new Array(50,0));

*// We define the enterFrame, which simply calls the prototype
// on the drawing clip.*


And voila! If you want it to draw a circle, you’ll have to populate your aPos array with the right coordinates.

Hope you can handle all this =)

pom :asian:


thanks!!! :slight_smile: :slight_smile: :slight_smile: :slight_smile: :slight_smile:

i downloaded it already and saw the swf file… you’re astonishing!!!

now all i have to do the rest of my afternoon is try to figure it out…

wish me luck!!!

really ilyaslamasse, thanks!

:slight_smile: kate

Good luck!:stuck_out_tongue:
By the way, my advice would be: don’t bother trying to understand that code. First if you don’t have a good level in Actionscript you won’t understand it, and secondly I have a very twisted mind so my scripting is as illogical as it gets.

By the way, I’m in the middle of creating something nice based on that drawing idea. I’ll show you when I’m done.


pom :asian:

If you want to ‘teach’ shapes, that can be fun :slight_smile:

pom :asian: