Search
Results
Recent Posts
Categories
- 3D
- ACTIONSCRIPT 2.0
- ACTIONSCRIPT 3.0
- ADOBE CS4
- ADOBE MAX
- ADOBE OS
- AIR
- AMP
- API
- APOLLO
- BETAS
- COCOMO
- EXAMPLES
- FLASH CATALYST
- FLASH CS3
- FLASH CS4
- FLASH IDE
- FLASH LITE
- FLASH PLATFORM
- FLASH PLAYER
- FLASH PLAYER 10
- FLASH VIDEO
- FLEX IDE
- FLEX SDK
- FRAMEWORKS
- GENERAL
- GOOGLE ANALYTICS
- INTERVIEWS
- OPEN SOURCE
- PHOTOSHOP EXPRESS
- SDK
- SHARE
- TUTORIALS
- WORDPRESS
- WORK



![Validate my RSS feed [Valid RSS]](http://www.cloudfaces.com/swfgeekblogexamples/images/valid-rss.png)


Drawing API and Mouse Events
Click on the image to see the example and get the code.
A pair of days ago I found the blog of Sorin Haidan in wish he post some very useful tutorials on Flash and Actionscript 3.0 in a very understandable way, I found one that caught my attention called Draw Custom shapes with ActionScript 3.0. In this tutorial he explains how to make a “Ball” appear on screen every time you click and move your mouse on the screen by using the Drawing API and MouseEvents, the change of the color on the ball was achieved doing a loop in a 10 frame movie clip with a ball of different gradient fill on each frame, so occurred to me to wrap that code on a class on a Flex 3 Actionscript Project and get rid of the Flash assets by drawing the ball in a dynamic way and this let me Change the color of the Ball more than the 10 times of Sorin example, so check the example be sure to check Sorin’s blog .
In my example if you right click on the file you get to see the source that it’s also included below this text here’s what I got: Drawing API Ball Example.
Thanks Sorin for letting me mess around with his code keep up with those good tutorials.
The Drawing API and Mouse Events by David Gamez, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial 2.5 Mexico License.
Hide Sites