2
我已經厭倦加載圖像形式的URL下面是我的示例代碼,當試圖加載大於8191像素的寬度或高度的大圖像Event.COMPLETE沒有調度,我知道的Flash Player 10 BitmapData的限制,所以我們不能加載超過這個8191像素限制的圖像?有沒有解決這個問題的方法或者你建議的其他方法?大圖像加載問題
private function loadImage(url:String):void
{
var request:URLRequest = new URLRequest(url);
var imageLoader:Loader = new Loader();
var context:LoaderContext;
context = new LoaderContext();
context.checkPolicyFile = true;
imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, image_completeHandler);
imageLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
imageLoader.load(request,context);
}
private function image_completeHandler(event:Event):void
{
trace(" Image load Complete");
}
private function ioErrorHandler(event:IOErrorEvent):void
{
trace("ioErrorHandler: " + event);
}
拆分和合並是一種痛苦,但。 – boring 2010-11-24 07:40:05