0
votes

I have this project at school, where I am supposed to make an image recognizer not importing any photos into Flash. Here's the error I´m getting:

Error #2044: Unhandled ioError:. text=Error #2035: URL Not Found. URL: file

Anyway, this is the file (p.s. it's Norwegian. And yeah, I'm a noob, I know.)

http://www.megafileupload.com/en/file/507257/recognizer-fla.html

I have tried similar methods, but nothing seems to work - again, I'm a noob. I have only been coding for two months.

1

1 Answers

0
votes

not importing any photos into Flash

It's easy to load external image. You will need Loader class, image will be represented as instance of the Bitmap class. If you get IOError, I assume your url isn't correct.

Example:

var loader: Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
loader.load(new URLRequest("http://www.billboard.com/files/styles/promo_650/public/stylus/1235529-taylor-swift-woman-of-the-year-617-409.jpg"));

function onComplete(e:Event):void{
    var bitmap: Bitmap = LoaderInfo(e.currentTarget).content as Bitmap;
    addChild(bitmap);
    //Do whatever you want with the image
}