Форум Flasher.ru

Форум Flasher.ru (http://www.flasher.ru/forum/index.php)
-   ActionScript 3.0 (http://www.flasher.ru/forum/forumdisplay.php?f=83)
-   -   Зависает лоадер (http://www.flasher.ru/forum/showthread.php?t=134916)

alekson 12.01.2010 10:37

Зависает лоадер
 
Лоадер грузит список графических файлов в массив ~100 файлов
Код AS3:

 
/**
 * Загружает один файл
 * @param        filename
 */

protected function _loadFile(file:String):void {
var _loader:Loader = new Loader();
this.configureListeners(_loader.contentLoaderInfo);
(IOErrorEvent.IO_ERROR, this._onIOError);
_loader.load(new URLRequest(file));
}

Код AS3:

 
/**
 * Завершение загрузки файла
 */

protected function _onComplete(event:Event):void {
        trace(this + "first");
        this._results[this._indexes[this._currentIndex]] = event.target.content;
        this._currentIndex++;
        if (this._currentIndex != this._indexes.length) {
                this._loadFile(this._files[this._indexes[this._currentIndex]]);
                this._preloader.setValues(this._currentIndex, this._indexes.length - 1);
                trace(this + "next");
        }
        else {
                try {
                        trace(this + "callback");
                        this.callback();
                }
                catch (error:Error) {
                        trace(this + "error");
                        this._exception.setMessage(this + ": ошибка при выполнении callback-функции" + "\r\n" + error);                       
                        return;
                }
        }
}

и периодически зависает в разеный момент, все события обрабатываются и трейсятся, последнее что выводит трейс:
Код AS3:

initHandler: [Event type="init" bubbles=false cancelable=false eventPhase=2]
httpStatusHandler: [HTTPStatusEvent type="httpStatus" bubbles=false cancelable=false eventPhase=2 status=0]
[object MultiBitmapLoader]first
[object MultiBitmapLoader]next
openHandler: [Event type="open" bubbles=false cancelable=false eventPhase=2]
progressHandler: bytesLoaded=0 bytesTotal=2008
progressHandler: bytesLoaded=2008 bytesTotal=2008

в чем может быть дело?


Часовой пояс GMT +4, время: 16:50.

Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.