`

Friday, September 24, 2010

Importing external images using AS3

Today we will learn how to load an external image into flash using
Actionscript 3 and then work with it.

Say, we need to load a picture from a site, change its size and place
it in the upper left corner, placing it behind all existing objects on the
stage. First we need to create a Loader:

var imageLoader:Loader = new Loader(); 
'Feed' it the url to the picture:

imageLoader.load(new URLRequest("http://www.blueidea.com/
articleimg/2006/08/3904/images/image-2.jpg"));

No comments: