Back to basics, tracking mouse coords into an array

Hello all,

I’ve been reading through all the various threads related to the drawing API and saving drawings. About a hundred times I’ve seen mention of “log mouse positions into an array” and stuff like that, but I can’t find any clear and simple examples of how to do this.

Let’s take a very simple use of the drawing object to do freeform drawing. What is the AS to capture the mouse XYs as the user draws and put that into an array. I can’t figure out how to get Flash to keep updating things as I go, it invariably grabs the fist point and that’s it.

Could one of you AS gods just write out a super simple routine for this? I know I’m not the only one that needs this (as it seems to be asked every week)

Let’s use the most basic drawing example I can find:


_root.onMouseDown = function(){
this.onEnterFrame = function(){
_root.onMouseUp = function(){
this.onEnterFrame = null;

Where/what gets added to just capture all those _xmouse and _ymouse?

Thanks a bajillion everyone

Anytime :wink: