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
Your Ad Here

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
Thank you for voting.
Rate this Materials:
Bad 
1 2 3 4 5 Excellent
print this page subscribe to newsletter subscribe to rss

Internet & computing Flash is a vector-based moving graphics format created by Macromedia for the publication of animations on the World Wide Web. More Flash & Swish: Most Popular Materials | Fresh Materials | More Swish Tutorials at FlashPerfection.com

Add comments to "Drawing With Swishmax"

Only registered users can write comment

No comments yet...