The starting point is that I load an external PNG file into an open SWF application with the following code:
var loadListener:Object = new Object();
loadListener.onLoadInit = function():Void {
//do certain actions - not relevant for my question
};
var pngLoader:MovieClipLoader = new MovieClipLoader();
pngLoader.addListener(loadListener);
var mc1:MovieClip = this.createEmptyMovieClip(“mc1”, this.getNextHighestDepth());
pngLoader.loadClip(“http://memetic-tv.net/temp/flower02.png”, mc1);
That works fine. The problem is how can I later reference to ‘flower02.png’
as BitmapData which is loaded as a movieClip into the movieClip ‘mc1’ to execute certain BitmapData methods like in particular ‘copyPixels()’?
I’m aware that I could use:
import flash.display.BitmapData;
var libId:String = “flower”;
var flowerBmp:BitmapData = BitmapData.loadBitmap(libId);
In this way I could reference my BitmapData by its variable identifier ‘flowerBmp’. But this would require that my ‘flower02.png’ is already in the library which is not possible for my purpose.
For any work-arounds and clues I would be very grateful.
thanx