I really need some help on this, as I have no idea how to fix it! :/
Got a problem here.
My application is working fine on my computer, both offline and online (flash uploaded to our webservers). It works fine in both IE and Firefox.
However, some user do have problem running it in IE, while Firefox is still ok..
The app itself works, the error comes when trying to buffer some frames to a BitmapData.
So, in Firefox, it works great.
In IE (on my computer) it works great.
In IE (on other computers) it does not work, and this error is cast. It happens right at the end, which means it all works fine until the last time the function is run. (it's run like this to allow updating the progressbar. If I set the for loop to 180 then it all freezes untill completed. Thats why I do 10 and 10.)
Any help regarding this would be great, as I'm completely stuck here...
I've traced the size of the bitmapdata, and at the time of the error it's 1920x1080, which is what it's supposed to be.
This is the code where it fails:
fpsoSWFBuffer = new BitmapData(fpsoMC.width, fpsoMC.height, false, 0x00ff0000);
And this is the whole function where the code is located:
public function bufferFpsoImages(evt:TimerEvent):void{
for (var i:int = 0; i<10; i++){
fpsoMC.gotoAndStop(currentFpsoFrame);
fpsoSWFBuffer = new BitmapData(fpsoMC.width, fpsoMC.height, false, 0x00ff0000);
fpsoSWFBuffer.draw(fpsoMC);
fpsoImgArray[currentFpsoFrame] = fpsoSWFBuffer;
currentFpsoFrame++;
}
if (currentFpsoFrame <= (totImg360-10)){
// Still buffering frames //
myLoadingPanel.setBufferProg(currentFpsoFrame);
var fpsoTimer:Timer = new Timer(1,1);
fpsoTimer.addEventListener(TimerEvent.TIMER_COMPLETE, bufferFpsoImages);
fpsoTimer.start();
}else{
// All frames buffered //
currentFpsoFrame = 0;
fpsoLoaded = true;
fpsoLoading = false;
ncFPSO.removeElement(myLoadingPanel);
myLoadingPanel = null;
var fpsoBitmap:Bitmap = new Bitmap(fpsoImgArray[0]);
fpsoBitmap.smoothing = true;
fpsoImage.source = fpsoBitmap;
}
}
EDIT:
I've added some debugging functions to it now, to be able to know where it fails. (as it works during debugging, I need to debug the realtime version online).
This is what I get:
ErrorID=2015
ErrorMessage=Error #2015
ErrorPos=fpsoSWFBuffer = new BitmapData(1920, 1080, false, 0x00ff0000);
CurrentFpsoFrame=168
Position in For Loop=8
EDIT2: And here is the error message I finally got inside of Flash Builder. So now it's crashing here too.. =/
ArgumentError: Error #2015: Invalid BitmapData.
at flash.display::BitmapData/ctor()
at flash.display::BitmapData()
at Main/bufferTemplateImages()[E:\Workspace - Flash Builder\vCog Workspace\vCog Communicator 3.0\src\Main.mxml:461]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.utils::Timer/tick()