Форум Flasher.ru

Форум Flasher.ru (http://www.flasher.ru/forum/index.php)
-   ActionScript 3.0 (http://www.flasher.ru/forum/forumdisplay.php?f=83)
-   -   Странный Exception при загрузке картинки в IE (http://www.flasher.ru/forum/showthread.php?t=133621)

Division 09.12.2009 12:31

Странный Exception при загрузке картинки в IE
 
Привет. Есть флешка 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 для каждого изображения?


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

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