モバイル デバイスに URLRequest をロードしています。インターネットがむらがある場合は停止します。ほとんどの場合は機能しますが、特定の割合で動かなくなることがあります。読み込みが停止したかどうかを確認し、3 秒後に「再試行」する方法はありますか? また、たとえば 10 回試してみて、その後エラー メッセージをスローして、ユーザーに知らせることはできますか?
public function loadIt()
{
var theImage = "http://www.Example.com/Example.png"; // real url not given here
my_loader.load(new URLRequest(theImage));
my_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, startListener);
my_loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressListener);
if(autoPlayAd=="true")
{
playAd();
}
}
public function progressListener(e:ProgressEvent):void
{
loadingStatus.Per.text = Math.floor((e.bytesLoaded/e.bytesTotal)*100)+ "%";
}