Показать сообщение отдельно
Старый 08.12.2010, 19:39
franco вне форума Посмотреть профиль Отправить личное сообщение для franco Найти все сообщения от franco
  № 1  
Ответить с цитированием
franco

Регистрация: Jun 2001
Адрес: Минск
Сообщений: 16
Отправить сообщение для franco с помощью ICQ
По умолчанию ошибка #1172 в примере Adobe Help

Почему выдается ошибка 1172?

1172: Definition fl.containers:UILoader could not be found.
1172: Definition fl.events:ComponentEvent could not be found.
1172: Definition fl.containers:UILoader could not be found.
1172: Definition fl.events:ComponentEvent could not be found.
1046: Type was not found or was not a compile-time constant: UILoader.
1046: Type was not found or was not a compile-time constant: Label.
1180: Call to a possibly undefined method addFrameScript.
1180: Call to a possibly undefined method UILoader.
1180: Call to a possibly undefined method Label.


loader.fla

Код AS3:
import fl.containers.UILoader;
import fl.events.ComponentEvent;
 
var uiLoader:UILoader = new UILoader();
addChild(uiLoader);
var uiLoaderLabel:Label = new Label();
addChild(uiLoaderLabel);

UILoaderExample.as

Код AS3:
package
{
    import flash.display.Sprite;
    import flash.net.URLRequest;
    import flash.events.Event;
    import flash.events.ProgressEvent;
 
 
    public class UILoaderExample extends Sprite
    {
        private var sampleImagePath:String = "test.jpg";
 
        public function UILoaderExample() {
            var request:URLRequest = new URLRequest(sampleImagePath);
            uiLoader.scaleContent = false;
            uiLoader.addEventListener(Event.COMPLETE,loadComplete);
            uiLoader.addEventListener(ProgressEvent.PROGRESS,loadProgress);            
            uiLoader.load(request);
        }
        private function loadProgress(e:ProgressEvent):void {
            uiLoaderLabel.text = String(e.target.percentLoaded);
        }
        private function loadComplete(e:Event):void {
            uiLoaderLabel.text = "Load Complete";    
        }
    }
}