Our Swish tutorials provide you with step-by-step instructions on how to create beautiful Flash animations and integrate them into your website.  Home Flash & Swish Swish Tutorials Drawing With Swishmax

Drawing With Swishmax


Example: Drawing With Swishmax

Click on the above example and start to draw.

Open swishmax and add the following code to Scene_1.

onLoad () {
_root.lineStyle(0, 0x000000, 100);
}
on (press) {
draw = true;
startX = _root._xmouse;
startY = _root._ymouse;
_root.moveTo(startX,startY);
}
on (release) {
draw = false;
}
onEnterFrame(includingFirstFrame) {
if (draw) {
newX = _root._xmouse;
newY = _root._ymouse;
if ((newX != startX) or (newY != startY)) {
_root.lineTo(newX,newY);
startX = newX;
startY = newY;
}
}
}

Thats it, press Ctrl+T and draw away.

Take a look here to see what is capable from this script.



Author's URL: Craig Lowe
Final results of our readers
New!
Passed through all the steps? Share your result!
Your result will be premoderated.
Please make sure you choose the right image.
 
 



Captcha

*Required fileds
Our Swish tutorials provide you with step-by-step instructions on how to create beautiful Flash animations and integrate them into your website. More Swish Tutorials: Featured Materials | Fresh Materials | More Swish Tutorials at FlashPerfection.com

Reader's comments
comments YOUNG January 01, 2011 says:
SWI
Reply
Add comments to "Drawing With Swishmax"

Captcha