DynImage: Powerful AS3 Image Util

Loading an external image in your flash/flex project isn’t that difficult, but mostly there are too many steps involved just for showing a regular image. As a flashdeveloper I need to show a bunch of external images for almost all my projects. Therefore I decided to write something that does all the loading logic and displays it in a smart way. DynImage is a very simple but powerful image util with extensible functionality. It’s very lightweight and easy to use! You can even assign a preloader and create custom animations in a single line of code. Besides, cropping and scaling an image to fulfill your needs can be done in a breeze!

So how does it works?

addChild( new Image("image.jpg") );

Is it really that easy?

Yes it’s that easy. The example above loads the image in it’s original size.
Mostly you want to constrain an image to a certain bounding box. Play with the parameters below and watch the generated AS3 code!

(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)

A zip file of DynImage can be downloaded at github.com. The zip file contains the source code and working examples (Flash CS4/CS5 & pure AS3).

If you have suggestions or questions please let me know! Or fork me at Github.com.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • YahooMyWeb

One thought on “DynImage: Powerful AS3 Image Util

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">