Привет. Есть флешка
http://gresso.ru/flash.
Странное дело, у меня работает отлично во всех браузерах, но на некоторых машинах вылетает такой вот Exception в IE:
Код:
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::Loader/flash.display:Loader::_load()
at flash.display::Loader/load()
at utils.imagequeue::ImageQueue/utils.imagequeue:ImageQueue::processLoading()[D:\myutils\utils\imagequeue\ImageQueue.as:124]
at utils.imagequeue::ImageQueue/utils.imagequeue:ImageQueue::loadCompleteHandler()[D:\myutils\utils\imagequeue\ImageQueue.as:149]
Впервые сталкиваюсь, кто-то знает в чём может быть причина?
Код AS3:
protected function processLoading() : void {
if (!_enabled || _isLoading || imagesToLoad == 0) return;
_isLoading = true;
var item : ImageQueueItem = _queue[0];
_loader.load(new URLRequest(item.url)); // строка 124, на неё и ругается
}
Класс ImageQueue грузит картинки по очереди используя один объект Loader для всех. В этом не может быть причины?
UPDATE:
Выяснил что не работает в 9 плеере.
В 10 всё отлично. Проект компилю для девятого при помощи Flex SDK. Есть идеи?
UPDATE2:
Выяснил, что это по причине того что не пересоздаю Loader.
Поменял код на:
Код AS3:
protected function processLoading() : void {
if (!_enabled || _isLoading || imagesToLoad == 0) return;
_isLoading = true;
var item : ImageQueueItem = _queue[0];
_loader = new Loader();
_loader.contentLoaderInfo.addEventListener(Event.INIT, loadCompleteHandler, false, 0, true);
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadErrorHandler, false, 0, true);
_loader.load(new URLRequest(item.url));
}
Эксепшена больше нету.
Так и надо, я не правильно пользовался Loader'ом? Все создают отдельный Loader для каждого изображения?