Reputation: 5497
I have the following code. (its ugly, because I've tried a lot of stuff to make it work.) So i set the img.source, and wait for it to load, so I can use its bitmapdata. the funny thing is that in debug mode it works perfect, we enter the else part once, but in release mode, it gets into an infinite loop, because img.bitmapData is staying null forever. How can I get bitmapdata in release mode? Thanks!
protected function completeHandler(event:Event):void
{
img.source = fileReference.data;
encodeAndSendIfBitmapDataAvailable();
}
protected function encodeAndSendIfBitmapDataAvailable():void {
if(img.bitmapData != null) {
setTimeout(encodeAndSend, 1000);
mylog("Starting encoding...");
} else {
setTimeout(encodeAndSendIfBitmapDataAvailable, 1000);
mylog("loading image...");
}
}
....
<s:Image id="img" right="10" top="10" maxHeight="145" maxWidth="145"/>
Upvotes: 0
Views: 101
Reputation: 578
Player and debugger are running in different sandboxes from security aspect. Handle all other events and log them too see if security violation has occurred.
Upvotes: 1