![]() |
|
||||||||||
|
|||||
|
Почему выдается ошибка 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 import fl.containers.UILoader; import fl.events.ComponentEvent; var uiLoader:UILoader = new UILoader(); addChild(uiLoader); var uiLoaderLabel:Label = new Label(); addChild(uiLoaderLabel); UILoaderExample.as 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"; } } } |
|
|||||
|
Регистрация: Jun 2006
Адрес: Москва
Сообщений: 461
|
Эм... у вас что, и документ класс присутствует, и код в кадрах???
|
|
|||||
|
Компилю в CS4. А что не так?
|
|
|||||
|
в библиотеку компоненту перетащить вроде надо
__________________
http://cleptoman.free-lance.ru achivements: дважды благословлен на воровство. осеяный благодатью |
|
|||||
|
.
|
Добавьте (перетащите) компонент UILoader в библиотеку. Библиотека открывается по Ctrl + L. Окно с компонентами открывается так: Window -> Components (Ctrl+F7).
Упс. Опередили. |
|
|||||
|
пардон, как её туда перетащить?
|
|
|||||
|
.
|
Компонент UILoader нужно перетащить из окна Components в окно Library. Обычный drag&drop.
Кстати, double click по компоненту тоже добавит его в библиотеку. |
|
|||||
|
теперь выдает:
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 Label. |
![]() |
![]() |
Часовой пояс GMT +4, время: 17:25. |
|
|
« Предыдущая тема | Следующая тема » |
|
|