[Flash8]bitmapdata eating ram!

I need help with how to dispose bitmapdata objects that have no linkage.
The thing is that I have bitmap pictures (PNG) wrapped inside movieclips (as you can’t set linkage to PNG files with jsfl) and when I begin to load them into my movie from the library I can’t dispose of them to free up ram memory, i’ve tried to use movieclip.removeMovieClip(); and movieclip.dispose(); but the bitmap inside still takes up ram! I use over 1000 pictures so i really need to dispose them…

Anyone have a clue how to fix this or if there is some workaround to get linkage set to PNG files with jsfl?? :puzzled:

should it not be bitmapDataInstance.dispose(); rather than movieclip.dispose();

Yep but i have no instance name of the bitmapdata that’s the problem… :puzzle:
I only got the instance name of the movieclip which it is wrapped in…i need some way to refer to the bitmap inside or someway to kill it by refering to the movieclip it is wrapped in…

ahhh ok, then reference it as

movieclip.bitmapdata.dispose();
movieclip.delete();

the bitmap data must have an instance name if you created an instance…

ahh ok I’ll try that… so the default instancename should be the same as the filename in the library … ex. image00002.png

A small problem I need the instancename to be dynamic when I dispose of the bitmap.
The instancename changes image00001.png, image00002.png and so on
I tried this but I guess it won’t refer to what is stored in variable bitmapID but instead refer to the variable name “bitmapID”… how can i solve this reference problem!


var bitmapID:String;

//cVI is an array with dataobjects with information about the image
bitmapID = cVI.imageID+".png"; 
                
tempMC.imageMC.bitmapID.dispose();

trace("kill: "+bitmapID);

tempMC.imageMC.removeMovieClip();

hmm shouldn’t an instance name “image00001.png” be non valid/illegal since there is a dot in it?? And what default name is actually given to a bitmap dragged from the library to the stage???! (it only says “Instance of: image00001.png” in the properties panel is that actually the instance name then?)