Вот столкнулся с такой проблемой:
Код: Выделить всё
import fl.containers.UILoader;import flash.events.Event;import flash.display.DisplayObject;import resourses.GraphicsEngineimport flash.net.URLRequest;import flash.display.MovieClip;import resourses.Converter; var wrapper: Object;var GRE:GraphicsEngine = new GraphicsEngine(807,640) var viewer_id; var convert:Converter = new Converter; var friendsSlotPos:Array = new Array(365.00,65.00,165.00,265.00,365.00,465.00,565.00,665.00)var friends:Array = new Array()var friendSlot:Array = new Array() this.addEventListener(Event.ADDED_TO_STAGE, onAddedToStage); function onAddedToStage(e: Event): void { Security.allowDomain("*"); stage.dispatchEvent(new Event(Event.DEACTIVATE)); stage.dispatchEvent(new Event(Event.ACTIVATE)); wrapper = Object(this.parent.parent); viewer_id = wrapper.application.parameters.viewer_id setParams() } function setParams(){ wrapper.external.api('getProfiles', {uids:viewer_id,fields:'photo_big' }, onProfilesLoaded, errorProfile); wrapper.external.api('friends.getAppUsers',{}, onFreindsLoaded,errorFriends); } function onProfilesLoaded(data: Object):void { infoBox.infoText1.text = data[0]['first_name'] +'\n' + data[0]['last_name'] var link:String = data[0]['photo_big']; infoBox.photoField.imgLoader.load(new URLRequest(link)); infoBox.photoField.imgLoader.addEventListener(ProgressEvent.PROGRESS, progressInfo); infoBox.photoField.imgLoader.addEventListener(Event.COMPLETE, completeLoadAvatar); } function progressInfo(e:ProgressEvent):void{ var percent:int = infoBox.photoField.imgLoader.percentLoaded; infoBox.photoField.lBar.setProgress(e.bytesLoaded,e.bytesTotal); infoBox.photoField.lTxt.text = percent + "%" } function completeLoadAvatar(e:Event){ infoBox.photoField.lBar.visible = false; infoBox.photoField.lTxt.visible = false; var avatar:DisplayObject = infoBox.photoField.imgLoader.content; infoBox.photoField.addChild(avatar) infoBox.photoField.avatar.width = 120; infoBox.photoField.avatar.height = 102; GRE.alphaShowObj(avatar)} function onFreindsLoaded(data:Object):void{ var count:int = data.length; var temp:int = count; var friend:FreindProfile; for(var t:int = 0; t<count; t++){ friends.push(data[i]); } for(var i:int=0; i<temp; i++){ if(count==8){ break; } friend = new FreindProfile(); addChild(friend) friend.y = 532.80; friend.x = friendsSlotPos[count] friendSlot.push(friend) count++ } var friendsString:String = convert.array2string(friends) wrapper.external.api('getProfiles', {uids:friendsString,fields:'photo_big'}, onFriendsLoaded, errorProfile); }var currFriendSlot:FreindProfile; function onFriendsLoaded(data: Object):void { var link:String; for(var i:int=0;i<data.length;i++){ friendSlot[i].infoText.text = data[i]['first_name'] + "\n" + data[i]['last_name'] link = data[i]['photo_big'] friendSlot[i].imgLoader.load(new URLRequest(link)) friendSlot[i].imgLoader.addEventListener(ProgressEvent.PROGRESS, FriendsProgressInfo); friendSlot[i].imgLoader.addEventListener(Event.COMPLETE, completeLoadFriendAvatar); currFriendSlot = friendSlot[i] } } function FriendsProgressInfo(e:ProgressEvent):void{ var percent:int = infoBox.photoField.imgLoader.percentLoaded; e.target.lBar.setProgress(e.bytesLoaded,e.bytesTotal); } function completeLoadFriendAvatar(e:Event){ currFriendSlot.lBar.visible = false; var avatar:DisplayObject = currFriendSlot.imgLoader.content; } function errorFriends(error:Object):void{ errorTxt.text = "Ошибка получения друзей:" + "\n" + error.error_msg;} function errorProfile(error:Object){ errorTxt.text = "Ошибка получения профиля:" + "\n" + error.error_msg;} Когда я тестирую ролик, вывод выдаёт это:
TypeError: Error #1010: Термин не определен и не имеет свойств.
at mainMenu_fla::MainTimeline/setParams()
at mainMenu_fla::MainTimeline/onAddedToStage()
at flash.display::DisplayObjectContainer/addChildAt()
at flash.display::Stage/addChildAt()
at fl.rsl::RSLPreloader/contentComplete()
При загрузки в контакт приложение просто перестаёт загружать данные от api !
Самое интересное, что эта фигня появилась в определённый момент (я делал много откатов, не помогает!)
Помогите плз!

