//script524 package org.osmf.traits{ //class(instance)_index:522 public class DRMTrait extends MediaTraitBase { //static constructor public static function DRMTrait$cinit() { //MethodID:5186, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function DRMTrait() { //MethodID:5187, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 22 this._drmState = DRMState.UNINITIALIZED; super(MediaTraitType.DRM); } //variables/etc. private var _period:Number = 0.0; //slotID:0 private var _endDate:Date; //slotID:0 private var _drmState:String; //slotID:0 private var _startDate:Date; //slotID:0 public function authenticate(hug1:String=null, hug2:String=null):void { //MethodID:5188, LocalCount= 3 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } public function authenticateWithToken(hug1:Object):void { //MethodID:5189, LocalCount= 2 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } public function get drmState():String { //MethodID:5190, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._drmState; } public function get startDate():Date { //MethodID:5191, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._startDate; } public function get endDate():Date { //MethodID:5192, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._endDate; } public function get period():Number { //MethodID:5193, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._period; } protected function setPeriod(hug1:Number):void { //MethodID:5194, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this._period = hug1; } protected function setStartDate(hug1:Date):void { //MethodID:5195, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this._startDate = hug1; } protected function setEndDate(hug1:Date):void { //MethodID:5196, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this._endDate = hug1; } protected function setDrmState(hug1:String):void { //MethodID:5197, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this._drmState = hug1; } } } //script525 package org.osmf.traits{ import org.osmf.events.DVREvent //class(instance)_index:523 public class DVRTrait extends MediaTraitBase { //static constructor public static function DVRTrait$cinit() { //MethodID:5199, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function DVRTrait(hug1:Boolean=false) { //MethodID:5200, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 17 this._isRecording = hug1; super(MediaTraitType.DVR); } //variables/etc. private var _isRecording:Boolean; //slotID:0 public function get isRecording():Boolean { //MethodID:5201, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._isRecording; } protected function setIsRecording(hug1:Boolean):void { //MethodID:5202, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 28 if(hug1 != this._isRecording){ this.isRecordingChangeStart(hug1); this._isRecording = hug1; this.isRecordingChangeEnd(); } } protected function isRecordingChangeStart(hug1:Boolean):void { //MethodID:5203, LocalCount= 2 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } protected function isRecordingChangeEnd():void { //MethodID:5204, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 23 dispatchEvent(new DVREvent(DVREvent.IS_RECORDING_CHANGE)); } } } //script526 package org.osmf.traits{ import org.osmf.events.AudioEvent //class(instance)_index:524 public class AudioTrait extends MediaTraitBase { //static constructor public static function AudioTrait$cinit() { //MethodID:5206, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function AudioTrait() { //MethodID:5207, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 12 super(MediaTraitType.AUDIO); } //variables/etc. private var _muted:Boolean = false; //slotID:0 private var _volume:Number = 1.0; //slotID:0 private var _pan:Number = 0.0; //slotID:0 public function get volume():Number { //MethodID:5208, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._volume; } public function set volume(hug1:Number):void { //MethodID:5209, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 74 if(isNaN(hug1)){ hug1 = 0; }else if(hug1 > 1){ hug1 = 1; }else if(hug1 < 0){ hug1 = 0; } if(hug1 != this._volume){ this.volumeChangeStart(hug1); this._volume = hug1; this.volumeChangeEnd(); } } public function get muted():Boolean { //MethodID:5210, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._muted; } public function set muted(hug1:Boolean):void { //MethodID:5211, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 28 if(hug1 != this._muted){ this.mutedChangeStart(hug1); this._muted = hug1; this.mutedChangeEnd(); } } public function get pan():Number { //MethodID:5212, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._pan; } public function set pan(hug1:Number):void { //MethodID:5213, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 74 if(isNaN(hug1)){ hug1 = 0; }else if(hug1 > 1){ hug1 = 1; }else if(hug1 < (-1)){ hug1 = -1; } if(hug1 != this._pan){ this.panChangeStart(hug1); this._pan = hug1; this.panChangeEnd(); } } protected function volumeChangeStart(hug1:Number):void { //MethodID:5214, LocalCount= 2 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } protected function volumeChangeEnd():void { //MethodID:5215, LocalCount= 1 , MaxScope= 1, MaxStack= 7, CodeLength= 30 dispatchEvent(new AudioEvent(AudioEvent.VOLUME_CHANGE, false, false, false, this._volume)); } protected function mutedChangeStart(hug1:Boolean):void { //MethodID:5216, LocalCount= 2 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } protected function mutedChangeEnd():void { //MethodID:5217, LocalCount= 1 , MaxScope= 1, MaxStack= 6, CodeLength= 29 dispatchEvent(new AudioEvent(AudioEvent.MUTED_CHANGE, false, false, this._muted)); } protected function panChangeStart(hug1:Number):void { //MethodID:5218, LocalCount= 2 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } protected function panChangeEnd():void { //MethodID:5219, LocalCount= 1 , MaxScope= 1, MaxStack= 8, CodeLength= 33 dispatchEvent(new AudioEvent(AudioEvent.PAN_CHANGE, false, false, false, NaN, this._pan)); } } } //script527 package Components.Forms{ import fl.controls.TextInput import flash.display.Shape import flash.events.Event import flash.events.FocusEvent import flash.events.KeyboardEvent import flash.events.TextEvent import flash.system.Capabilities import flash.text.TextFormat //class(instance)_index:525 public class InputText extends TextInput { //static constructor public static function InputText$cinit() { //MethodID:5221, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 19 NOTHING = -1; INVALID = -2; } //static variables/etc. private static const NOTHING:int = -1; //slotID:1 private static const INVALID:int = -2; //slotID:2 //constructor public function InputText(hug1:String, hug2:int=0):void { //MethodID:5226, LocalCount= 4 , MaxScope= 1, MaxStack= 5, CodeLength= 172 this.tfDefault = new TextFormat("_sans", 12, 0); this.tfPromt = new TextFormat("_sans", 12, 0x888888); super(); setStyle("focusRectSkin", Shape); setStyle("textPadding", 1); focusEnabled = false; this.maxChars = hug2; if(hug1){ super.text = this.promt = hug1; this.asPromt = true; } setStyle("textFormat", (hug1 ? this.tfPromt : this.tfDefault)); addEventListener(FocusEvent.FOCUS_IN, this.onFocusIn); addEventListener(FocusEvent.FOCUS_OUT, this.onFocusOut); this.fixLinuxInput(); } //variables/etc. private var tfPromt:TextFormat; //slotID:0 private var asPromt:Boolean = false; //slotID:0 private var promt:String = null; //slotID:0 private var bits_left:int = 0; //slotID:0 private var character:int = 0; //slotID:0 private var tfDefault:TextFormat; //slotID:0 private var utf32_char:int = -1; //slotID:0 private function fixLinuxInput():void { //MethodID:5222, LocalCount= 1 , MaxScope= 1, MaxStack= 5, CodeLength= 60 if(Capabilities.os.indexOf("Linux") != (-1)){ textField.addEventListener(TextEvent.TEXT_INPUT, this.onTextInputHandler, false, 1); textField.addEventListener(KeyboardEvent.KEY_DOWN, this.onKeyDownHandler, false, 1); } } private function utf8Decode(hug1:int):int { //MethodID:5223, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 285 if(this.bits_left == 0){ if((hug1 & 128) == 0) return (hug1 & 127); if((hug1 & 224) == 192){ this.character = ((hug1 & 31) << 6); this.bits_left = 6; }else if((hug1 & 240) == 224){ this.character = ((hug1 & 15) << 12); this.bits_left = 12; }else if((hug1 & 248) == 240){ this.character = ((hug1 & 7) << 18); this.bits_left = 18; }else if((hug1 & 252) == 248){ this.character = ((hug1 & 3) << 24); this.bits_left = 24; }else if((hug1 & 254) == 252){ this.character = ((hug1 & 1) << 30); this.bits_left = 30; }else{ return INVALID; } return NOTHING; } if((hug1 & 192) != 128) return INVALID; this.bits_left -= 6; this.character |= ((hug1 & 63) << this.bits_left); if(this.bits_left == 0) return this.character; if(this.bits_left > 30){ this.bits_left = 0; return INVALID; } return NOTHING; } private function onKeyDownHandler(hug1:KeyboardEvent):void { //MethodID:5224, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 19 var hug2:int = hug1.charCode; this.utf32_char = this.utf8Decode(hug2); } private function onTextInputHandler(hug1:TextEvent):void { //MethodID:5225, LocalCount= 6 , MaxScope= 1, MaxStack= 5, CodeLength= 282 var hug2:String = null; var hug3:String = null; var hug4:int = 0; if((this.utf32_char == 10) && !textField.multiline){ hug1.preventDefault(); hug1.stopImmediatePropagation(); return; } if(hug1.text.length == 1){ if((this.utf32_char != NOTHING) && (this.utf32_char != INVALID)){ if(textField.selectionBeginIndex == textField.selectionEndIndex){ hug2 = textField.text.substr(0, textField.caretIndex); hug3 = textField.text.substr(textField.caretIndex); hug4 = (textField.caretIndex + 1); }else{ hug2 = textField.text.substr(0, textField.selectionBeginIndex); hug3 = textField.text.substr(textField.selectionEndIndex); hug4 = (textField.selectionBeginIndex + 1); } var hug5:String = (hug2 + String.fromCharCode(this.utf32_char) + hug3); textField.text = hug5; hug1.text = hug5; textField.setSelection(hug4, hug4); textField.dispatchEvent(new Event(Event.CHANGE)); }else{ hug1.stopImmediatePropagation(); } hug1.preventDefault(); } } private function onFocusIn(hug1:FocusEvent):void { //MethodID:5227, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 36 if(this.asPromt){ super.text = ""; setStyle("textFormat", this.tfDefault); this.asPromt = false; } } private function onFocusOut(hug1:FocusEvent):void { //MethodID:5228, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 50 if(this.promt && !this.text){ this.asPromt = true; super.text = this.promt; setStyle("textFormat", this.tfPromt); } } override public function set text(hug1:String):void { //MethodID:5229, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 27 super.text = hug1; if(this.asPromt){ this.asPromt = false; this.onFocusOut(null); } } override public function get text():String { //MethodID:5230, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 22 return (this.asPromt ? "" : super.text); } override public function set htmlText(hug1:String):void { //MethodID:5231, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 22 if(this.asPromt) this.onFocusIn(null); super.htmlText = hug1; } override public function get htmlText():String { //MethodID:5232, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 22 return (this.asPromt ? "" : super.htmlText); } } } //script528 package Components.Forms{ import Components.Component import flash.display.BlendMode import flash.display.Shape import flash.filters.BitmapFilterQuality import flash.filters.DropShadowFilter //class(instance)_index:526 public class BackgroundPanelEx extends Component { //static constructor public static function BackgroundPanelEx$cinit() { //MethodID:5234, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function BackgroundPanelEx(hug1:*):void { //MethodID:5235, LocalCount= 3 , MaxScope= 1, MaxStack= 13, CodeLength= 203 this.shadow = new Shape(); this.background = new Shape(); this.panel = new Shape(); this.tabsPanel = new TabsPanel(); super(); this.shadow.filters = [new DropShadowFilter(0, 0, 0x404040, 1, 6, 6, 2, BitmapFilterQuality.HIGH, false, true, true)]; this.shadow.blendMode = BlendMode.MULTIPLY; addChild(this.shadow); addChild(this.background); this.tabsPanel.addTabs((hug1 is Array) ? hug1 : [hug1]); addChild(this.tabsPanel); var hug2:int = 8; this.tabsPanel.y = hug2; this.tabsPanel.x = hug2; addChild(this.panel); this.panel.y = 34; } //variables/etc. private var shadow:Shape; //slotID:0 private var panel:Shape; //slotID:0 public var tabsPanel:TabsPanel; //slotID:0 private var background:Shape; //slotID:0 override protected function onUpdate(hug1:Number, hug2:Number):void { //MethodID:5236, LocalCount= 3 , MaxScope= 1, MaxStack= 6, CodeLength= 166 this.shadow.graphics.clear(); this.shadow.graphics.beginFill(0); this.shadow.graphics.drawRoundRect(0, 0, hug1, hug2, 10); this.background.graphics.clear(); this.background.graphics.beginFill(0x404142, 0.6); this.background.graphics.drawRoundRect(0, 0, hug1, hug2, 10); this.background.graphics.beginFill(0xFFFFFF); this.background.graphics.drawRoundRect(0, 34, hug1, (hug2 - 33), 10); this.panel.graphics.clear(); this.panel.graphics.beginFill(0xFFFFFF); this.panel.graphics.drawRect(0, 0, hug1, 50); } } } //script529 package Components.Forms{ import fl.controls.ScrollPolicy import fl.controls.TextArea import flash.display.Shape import flash.events.Event import flash.events.FocusEvent import flash.events.KeyboardEvent import flash.events.TextEvent import flash.system.Capabilities import flash.text.TextFormat //class(instance)_index:527 public class Memo extends TextArea { //static constructor public static function Memo$cinit() { //MethodID:5238, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 19 NOTHING = -1; INVALID = -2; } //static variables/etc. private static const NOTHING:int = -1; //slotID:1 private static const INVALID:int = -2; //slotID:2 //constructor public function Memo(hug1:String, hug2:uint=0):void { //MethodID:5243, LocalCount= 4 , MaxScope= 1, MaxStack= 5, CodeLength= 189 this.tfDefault = new TextFormat("_sans", 12, 0); this.tfPromt = new TextFormat("_sans", 12, 0x888888); super(); horizontalScrollPolicy = ScrollPolicy.OFF; verticalScrollPolicy = ScrollPolicy.AUTO; setStyle("focusRectSkin", Shape); wordWrap = true; maxChars = hug2; if(hug1){ super.text = this.promt = hug1; this.asPromt = true; } setStyle("textFormat", (this.asPromt ? this.tfPromt : this.tfDefault)); addEventListener(FocusEvent.FOCUS_IN, this.onFocusIn); addEventListener(FocusEvent.FOCUS_OUT, this.onFocusOut); this.fixLinuxInput(); } //variables/etc. private var tfPromt:TextFormat; //slotID:0 private var asPromt:Boolean = false; //slotID:0 private var promt:String = null; //slotID:0 private var bits_left:int = 0; //slotID:0 private var character:int = 0; //slotID:0 private var tfDefault:TextFormat; //slotID:0 private var utf32_char:int = -1; //slotID:0 private function fixLinuxInput():void { //MethodID:5239, LocalCount= 1 , MaxScope= 1, MaxStack= 5, CodeLength= 60 if(Capabilities.os.indexOf("Linux") != (-1)){ textField.addEventListener(TextEvent.TEXT_INPUT, this.onTextInputHandler, false, 1); textField.addEventListener(KeyboardEvent.KEY_DOWN, this.onKeyDownHandler, false, 1); } } private function utf8Decode(hug1:int):int { //MethodID:5240, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 285 if(this.bits_left == 0){ if((hug1 & 128) == 0) return (hug1 & 127); if((hug1 & 224) == 192){ this.character = ((hug1 & 31) << 6); this.bits_left = 6; }else if((hug1 & 240) == 224){ this.character = ((hug1 & 15) << 12); this.bits_left = 12; }else if((hug1 & 248) == 240){ this.character = ((hug1 & 7) << 18); this.bits_left = 18; }else if((hug1 & 252) == 248){ this.character = ((hug1 & 3) << 24); this.bits_left = 24; }else if((hug1 & 254) == 252){ this.character = ((hug1 & 1) << 30); this.bits_left = 30; }else{ return INVALID; } return NOTHING; } if((hug1 & 192) != 128) return INVALID; this.bits_left -= 6; this.character |= ((hug1 & 63) << this.bits_left); if(this.bits_left == 0) return this.character; if(this.bits_left > 30){ this.bits_left = 0; return INVALID; } return NOTHING; } private function onKeyDownHandler(hug1:KeyboardEvent):void { //MethodID:5241, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 19 var hug2:int = hug1.charCode; this.utf32_char = this.utf8Decode(hug2); } private function onTextInputHandler(hug1:TextEvent):void { //MethodID:5242, LocalCount= 6 , MaxScope= 1, MaxStack= 5, CodeLength= 282 var hug2:String = null; var hug3:String = null; var hug4:int = 0; if((this.utf32_char == 10) && !textField.multiline){ hug1.preventDefault(); hug1.stopImmediatePropagation(); return; } if(hug1.text.length == 1){ if((this.utf32_char != NOTHING) && (this.utf32_char != INVALID)){ if(textField.selectionBeginIndex == textField.selectionEndIndex){ hug2 = textField.text.substr(0, textField.caretIndex); hug3 = textField.text.substr(textField.caretIndex); hug4 = (textField.caretIndex + 1); }else{ hug2 = textField.text.substr(0, textField.selectionBeginIndex); hug3 = textField.text.substr(textField.selectionEndIndex); hug4 = (textField.selectionBeginIndex + 1); } var hug5:String = (hug2 + String.fromCharCode(this.utf32_char) + hug3); textField.text = hug5; hug1.text = hug5; textField.setSelection(hug4, hug4); textField.dispatchEvent(new Event(Event.CHANGE)); }else{ hug1.stopImmediatePropagation(); } hug1.preventDefault(); } } private function onFocusIn(hug1:FocusEvent):void { //MethodID:5244, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 36 if(this.asPromt){ super.text = ""; setStyle("textFormat", this.tfDefault); this.asPromt = false; } } private function onFocusOut(hug1:FocusEvent):void { //MethodID:5245, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 50 if(this.promt && !this.text){ this.asPromt = true; super.text = this.promt; setStyle("textFormat", this.tfPromt); } } override public function set text(hug1:String):void { //MethodID:5246, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 27 super.text = hug1; if(this.asPromt){ this.asPromt = false; this.onFocusOut(null); } } override public function get text():String { //MethodID:5247, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 22 return (this.asPromt ? "" : super.text); } override public function set htmlText(hug1:String):void { //MethodID:5248, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 22 if(this.asPromt) this.onFocusIn(null); super.htmlText = hug1; } override public function get htmlText():String { //MethodID:5249, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 22 return (this.asPromt ? "" : super.htmlText); } } } //script530 package Components.Forms{ import fl.controls.ComboBox import flash.events.Event //class(instance)_index:528 public class ComboBox extends ComboBox { //static constructor public static function ComboBox$cinit() { //MethodID:5251, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function ComboBox():void { //MethodID:5252, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 38 super(); addEventListener(Event.OPEN, this.onOpenList); addEventListener(Event.CLOSE, this.onCloseList); } //variables/etc. private var isOpenList:Boolean = false; //slotID:0 public function get opened():Boolean { //MethodID:5253, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this.isOpenList; } private function onOpenList(hug1:Event):void { //MethodID:5254, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this.isOpenList = true; } private function onCloseList(hug1:Event):void { //MethodID:5255, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this.isOpenList = false; } } } //script531 package Components.Timeline{ import Components.Component import Components.SkinManager import Components.Window.MarkEditWindow import Components.Window.MarkPreviewWindow import Components.Window.WindowDispatcher import fl.events.SliderEventClickTarget import flash.display.BitmapData import flash.display.GradientType import flash.display.MovieClip import flash.display.Sprite import flash.events.Event import flash.events.EventDispatcher import flash.events.MouseEvent import flash.geom.Point import ru.rutube.event.ControlPanelEvent import ru.rutube.event.EventManager import ru.rutube.event.EventSources import ru.rutube.event.InternalEvent //class(instance)_index:529 public class Timeline extends Component { //static constructor public static function Timeline$cinit() { //MethodID:5257, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function Timeline(hug1:EventDispatcher=null):void { //MethodID:5288, LocalCount= 3 , MaxScope= 1, MaxStack= 7, CodeLength= 435 this.timelineMarks = []; this.trackPanel = new Sprite(); this.marksPanel = new Sprite(); this.slider = new Component(); this.timeSlider = this.playEnd; this.groupMarks = []; super(hug1); size(100, 10); this.borderColor = SkinManager.getStyle("borderColorTimeline", {color:0xFFFFFF, alpha:0.3}); this.backgroundColor = SkinManager.getStyle("backgroundColorTimeline", {color:0x201F1F, alpha:1}); this.downloadColorSkin = SkinManager.getSkin("Timeline.DownloadColorSkin"); if(this.downloadColorSkin){ this.downloadColorSkin.visible = false; this.trackPanel.addChild(this.downloadColorSkin); } this.playedColorSkin = SkinManager.getSkin("Timeline.PlayedColorSkin"); if(this.playedColorSkin){ this.playedColorSkin.visible = false; this.trackPanel.addChild(this.playedColorSkin); } var hug2:Boolean = false; this.trackPanel.mouseChildren = hug2; this.trackPanel.mouseEnabled = hug2; this.marksPanel.mouseEnabled = false; addChild(this.trackPanel); addChild(this.marksPanel); var hug2:int = 2; this.marksPanel.x = hug2; this.trackPanel.x = hug2; var hug2:int = 2; this.marksPanel.y = hug2; this.trackPanel.y = hug2; this.slider.setSkin(SkinManager.getSkin("Timeline.TimelineSliderSkin")); this.slider.buttonMode = true; this.slider.mouseChildren = false; addChild(this.slider); this.slider.y = -6; this.slider.addEventListener(MouseEvent.MOUSE_DOWN, this.listenerMouseDownSlider); this.slider.addEventListener(MouseEvent.ROLL_OVER, this.onRollSlider); this.slider.addEventListener(MouseEvent.ROLL_OUT, this.onRollSlider); addEventListener(MouseEvent.MOUSE_DOWN, this.listenerMouseDown); addEventListener(MouseEvent.MOUSE_MOVE, this.listenerMouseMove); } //variables/etc. private var timelineMarks:Array; //slotID:0 private var playEnd:Number = 0.0; //slotID:0 private var markPreviewWindow:MarkPreviewWindow = null; //slotID:0 private var timeSlider:Number; //slotID:0 private var borderColor:Object = null; //slotID:0 private var loadEnd:Number = 0.0; //slotID:0 private var toggleSliderDown:Boolean = false; //slotID:0 private var groupMarks:Array; //slotID:0 private var toggleSliderLinkage:Boolean = false; //slotID:0 public var showBufferLine:Boolean = false; //slotID:0 private var _lockMarkMode:Boolean = false; //slotID:0 private var markEditWindow:MarkEditWindow = null; //slotID:0 private var playBegin:Number = 0.0; //slotID:0 private var downloadColorSkin:MovieClip = null; //slotID:0 private var backgroundColor:Object = null; //slotID:0 private var marksPanel:Sprite; //slotID:0 private var slider:Component; //slotID:0 private var loadBegin:Number = 0.0; //slotID:0 private var xStage:Number; //slotID:0 private var playedColorSkin:MovieClip = null; //slotID:0 private var _markMode:Boolean = false; //slotID:0 private var trackPanel:Sprite; //slotID:0 public function get loadedEnd():Number { //MethodID:5258, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this.loadEnd; } public function set marks(hug1:Array):void { //MethodID:5259, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 36 do{ }while(this.timelineMarks.pop() != null); if(hug1 != null) this.timelineMarks = hug1.concat(); } public function get marks():Array { //MethodID:5260, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 11 return this.timelineMarks.concat(); } public function set markMode(hug1:Boolean):void { //MethodID:5261, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 22 if(this._lockMarkMode) return; this._markMode = hug1; this.updateSkinSlider(); } public function set lockMarkMode(hug1:Boolean):void { //MethodID:5262, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 55 if(this._lockMarkMode){ this.markMode = false; if(this.isMarkPreviewWindowVisible()) this.markPreviewWindow.visible = false; if(this.isMarkEditWindowVisible()) this.markEditWindow.visible = false; } this._lockMarkMode = hug1; } public function setBufferLength(hug1:Number):void { //MethodID:5263, LocalCount= 2 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } public function setStartPosition(hug1:Number):void { //MethodID:5264, LocalCount= 3 , MaxScope= 1, MaxStack= 4, CodeLength= 17 this.loadBegin = this.playBegin = hug1; } public function setCurrentPosition(hug1:Number):void { //MethodID:5265, LocalCount= 2 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } public function setLength(hug1:Number):void { //MethodID:5266, LocalCount= 2 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } public function get sliderTime():Number { //MethodID:5267, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this.timeSlider; } public function setThumbPos(hug1:Number):Array { //MethodID:5268, LocalCount= 4 , MaxScope= 1, MaxStack= 4, CodeLength= 60 this.playBegin = this.loadBegin; this.timeSlider = this.playEnd = this.validTime(hug1); var hug2:Boolean = this.toggleSliderLinkage; this.toggleSliderLinkage = false; this.checkTime(); this.toggleSliderLinkage = hug2; return this.isMark(this.timeSlider); } public function setLoader(hug1:Number, hug2:Number):void { //MethodID:5269, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 28 this.loadBegin = this.validTime(hug1); this.loadEnd = this.validTime(hug2); this.checkTime(); } public function showMarkPreviewWindow(hug1:Number, hug2:String, hug3:BitmapData=null, hug4:Boolean=false):void { //MethodID:5270, LocalCount= 5 , MaxScope= 1, MaxStack= 9, CodeLength= 130 if(this.markPreviewWindow == null){ this.markPreviewWindow = new MarkPreviewWindow("", EventManager.instance); addChild(this.markPreviewWindow); this.markPreviewWindow.params({w:(originalWidth + 20), x:(-10), y:(2 - this.markPreviewWindow._height), right:true}); } this.markPreviewWindow.updateData([{time:hug2, title:"", avatar:null}]); this.markPreviewWindow.time = hug1; this.markPreviewWindow.visible = true; onPaint(); } public function hideMarkPreviewWindow():void { //MethodID:5271, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 19 if(this.markPreviewWindow) this.markPreviewWindow.visible = false; } public function isMarkPreviewWindowVisible():Boolean { //MethodID:5272, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 24 return (this.markPreviewWindow ? this.markPreviewWindow.visible : false); } public function showMarkEditWindow(hug1:String, hug2:String, hug3:String, hug4:String, hug5:Boolean=false):void { //MethodID:5274, LocalCount= 7 , MaxScope= 2, MaxStack= 11, CodeLength= 223 internal var link:String = ""; //slotID:1 internal var code:String = ""; //slotID:2 internal var ljcode:String = ""; //slotID:3 internal var licode:String = ""; //slotID:4 internal var isLogged:Boolean = false; //slotID:5 link = hug1; code = hug2; ljcode = hug3; licode = hug4; isLogged = hug5; WindowDispatcher.groupHide(); if(this.markEditWindow == null){ this.markEditWindow = new MarkEditWindow("timeline", EventManager.instance); this.markEditWindow.addEventListener(MouseEvent.MOUSE_DOWN, function(hug1:Event):void{ //MethodID:5273, LocalCount= 2 , MaxScope= 0, MaxStack= 1, CodeLength= 6 hug1.stopPropagation(); }); addChild(this.markEditWindow); this.markEditWindow.params({y:(2 - this.markEditWindow._height), right:true, bottom:true, wContainer:460, hContainer:270}); this.markEditWindow.onResize(null, stage.stageWidth, stage.stageHeight); } this.markEditWindow.allowSendInvite(isLogged); this.markEditWindow.updateData(link, code, ljcode, licode); this.markEditWindow.time = this.timeSlider; this.markEditWindow.visible = true; onPaint(); } public function hideMarkEditWindow():void { //MethodID:5275, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 19 if(this.markEditWindow) this.markEditWindow.visible = false; } public function isMarkEditWindowVisible():Boolean { //MethodID:5276, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 24 return (this.markEditWindow ? this.markEditWindow.visible : false); } private function validTime(hug1:Number):Number { //MethodID:5277, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 30 if(hug1 < 0){ hug1 = 0; }else if(hug1 > 1){ hug1 = 1; } return hug1; } private function newTimelineEvent(hug1:String, hug2:Number=-1.0, hug3:String="thumb", hug4:Array=null):TimelineEvent { //MethodID:5278, LocalCount= 5 , MaxScope= 1, MaxStack= 7, CodeLength= 64 if(hug2 < 0) hug2 = this.timeSlider; return new TimelineEvent(hug1, hug2, hug3, (hug2 <= this.playEnd), (hug2 <= this.loadEnd), hug4); } private function isMark(hug1:Number):Array { //MethodID:5279, LocalCount= 5 , MaxScope= 1, MaxStack= 3, CodeLength= 162 if(this._lockMarkMode) return null; var hug2:Array = null; var hug3:Number = ((1 / _width) * 3); if(hug1 < hug3){ hug1 = hug3; }else if(hug1 > (1 - hug3)){ hug1 = (1 - hug3); } var hug4:int = (this.groupMarks.length - 1); while(hug4 >= 0){ if((this.marks[this.groupMarks[hug4][0]] >= (hug1 - hug3)) && (this.marks[this.groupMarks[hug4][0]] <= (hug1 + hug3))){ hug2 = this.groupMarks[hug4]; break; } hug4--; } return hug2; } private function listenerMouseDown(hug1:MouseEvent):void { //MethodID:5280, LocalCount= 3 , MaxScope= 1, MaxStack= 7, CodeLength= 61 hug1.stopPropagation(); var hug2:Number = this.validTime((hug1.localX - 2) / (_width - 4)); EventManager.instance.dispatchEvent(this.newTimelineEvent(ControlPanelEvent.EVENT_TRACK_PRESS, hug2, SliderEventClickTarget.TRACK, this.isMark(hug2))); } private function listenerMouseMove(hug1:MouseEvent):void { //MethodID:5281, LocalCount= 4 , MaxScope= 1, MaxStack= 6, CodeLength= 75 if(hug1.target != this) return; var hug2:Number = this.validTime((hug1.localX - 2) / (_width - 4)); var hug3:Array = this.isMark(hug2); if(hug3) EventManager.instance.dispatchEvent(this.newTimelineEvent(ControlPanelEvent.EVENT_MARK_OVER, hug2, SliderEventClickTarget.TRACK, hug3)); } private function listenerMouseDownSlider(hug1:MouseEvent):void { //MethodID:5282, LocalCount= 2 , MaxScope= 1, MaxStack= 5, CodeLength= 112 hug1.stopPropagation(); if(this._markMode && (hug1.localY < 0)){ this.slider.addEventListener(MouseEvent.MOUSE_UP, this.listenerMouseUpSlider); return; } this.toggleSliderDown = true; EventManager.instance.dispatchEvent(this.newTimelineEvent(ControlPanelEvent.EVENT_THUMB_PRESS)); this.xStage = localToGlobal(new Point(0, 0)).x; EventManager.instance.addEventListener(InternalEvent.STAGE, this.listenerStageMouse); } private function listenerStageMouse(hug1:InternalEvent):void { //MethodID:5283, LocalCount= 4 , MaxScope= 1, MaxStack= 2, CodeLength= 149 if(hug1.sourceId != EventSources.SOURCE_STAGE) return; var hug2:MouseEvent = (hug1.data as MouseEvent); if(!hug2) return; switch(hug2.type){ case MouseEvent.MOUSE_MOVE: this.listenerMouseMoveStage(hug2); break; case MouseEvent.MOUSE_UP: case MouseEvent.ROLL_OUT: this.listenerMouseUpStage(hug2); break; default: break; } } private function listenerMouseMoveStage(hug1:MouseEvent):void { //MethodID:5284, LocalCount= 4 , MaxScope= 1, MaxStack= 4, CodeLength= 76 var hug2:Number = this.validTime((hug1.stageX - this.xStage - 2) / (_width - 4)); if(hug2 != this.timeSlider){ this.playEnd = this.timeSlider = hug2; this.checkTime(); EventManager.instance.dispatchEvent(this.newTimelineEvent(ControlPanelEvent.EVENT_THUMB_DRAG)); } } private function listenerMouseUpStage(hug1:MouseEvent):void { //MethodID:5285, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 45 EventManager.instance.removeEventListener(InternalEvent.STAGE, this.listenerStageMouse); this.toggleSliderDown = false; EventManager.instance.dispatchEvent(this.newTimelineEvent(ControlPanelEvent.EVENT_THUMB_RELEASE)); } private function listenerMouseUpSlider(hug1:MouseEvent):void { //MethodID:5286, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 49 this.slider.removeEventListener(MouseEvent.MOUSE_UP, this.listenerMouseUpSlider); if(hug1.localY < 0) EventManager.instance.dispatchEvent(this.newTimelineEvent(ControlPanelEvent.EVENT_MARK_SHOW_ADD)); } private function onRollSlider(hug1:MouseEvent):void { //MethodID:5287, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 47 EventManager.instance.dispatchEvent(new Event((hug1.type == MouseEvent.ROLL_OVER) ? ControlPanelEvent.EVENT_THUMB_OVER : ControlPanelEvent.EVENT_THUMB_OUT)); } private function updateSkinSlider():void { //MethodID:5289, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 55 var hug1:String = null; if(this._markMode){ hug1 = "mark"; }else{ hug1 = ((this.playBegin != this.playEnd) ? "play" : "stop"); } this.slider.changeSkin(hug1); } private function checkTime(hug1:Boolean=true):void { //MethodID:5290, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 114 if(this.loadEnd < this.loadBegin) this.loadEnd = this.loadBegin; if(this.playEnd < this.playBegin) this.playEnd = this.playBegin; if(this.loadBegin > this.playBegin) this.playBegin = this.loadBegin; if(this.loadEnd < this.playEnd) this.playEnd = this.loadEnd; if(this.toggleSliderLinkage) this.timeSlider = this.playEnd; this.updateSkinSlider(); if(hug1) this.onPaintTrack(); } private function onPaintTrack():void { //MethodID:5291, LocalCount= 6 , MaxScope= 1, MaxStack= 8, CodeLength= 543 var hug1:Number = (_width - 4); var hug2:Number = (_height - 4); var hug3:int = (Math.round(this.timeSlider * hug1) + 2); this.trackPanel.graphics.clear(); var hug4:Number = Math.round(hug1 * this.loadBegin); var hug5:Number = 0; if(!isNaN(this.loadEnd) && (this.loadBegin >= 0)) hug5 = Math.round(hug1 * (this.loadEnd - this.loadBegin)); if(isNaN(hug5)) hug5 = 0; if(this.showBufferLine){ if(hug5 > 0){ if(this.downloadColorSkin){ this.downloadColorSkin.x = hug4; this.downloadColorSkin.width = hug5; this.downloadColorSkin.visible = true; }else{ this.trackPanel.graphics.beginFill(0x505050); this.trackPanel.graphics.drawRect(hug4, 0, hug5, hug2); this.trackPanel.graphics.beginGradientFill(GradientType.LINEAR, [0x525252, 0x4D4D4D, 0x404141, 0x353636], [1, 1, 1, 1], [0, 89, 193, 255]); this.trackPanel.graphics.drawRect((hug4 + 1), 1, (hug5 - 2), (hug2 - 2)); } }else if(this.downloadColorSkin){ this.downloadColorSkin.visible = false; } } hug4 = Math.round(hug1 * this.playBegin); hug5 = Math.round(hug1 * (this.playEnd - this.playBegin)); if(hug3 > 0){ if(this.playedColorSkin){ this.playedColorSkin.x = hug4; this.playedColorSkin.width = (hug3 - hug4); this.playedColorSkin.visible = true; }else{ this.trackPanel.graphics.beginFill(0x95C31E); this.trackPanel.graphics.drawRect(hug4, 0, (hug3 - 2 - hug4), hug2); this.trackPanel.graphics.beginGradientFill(GradientType.LINEAR, [0x75B841, 0x65A53A, 0x559233], [1, 1, 1], [0, 171, 255]); this.trackPanel.graphics.drawRect((hug4 + 1), 1, (hug3 - 2 - hug4), (hug2 - 2)); } }else if(this.playedColorSkin){ this.playedColorSkin.visible = false; } this.slider.x = hug3; } protected function positionMark(hug1:Number):Number { //MethodID:5292, LocalCount= 4 , MaxScope= 1, MaxStack= 3, CodeLength= 54 var hug2:Number = (_width - 4); var hug3:Number = Math.round(hug1 * hug2); if(hug3 < 1){ hug3 = 1; }else if(hug3 > (hug2 - 2)){ hug3 = (hug2 - 2); } return hug3; } override protected function onUpdate(hug1:Number, hug2:Number):void { //MethodID:5293, LocalCount= 7 , MaxScope= 1, MaxStack= 6, CodeLength= 625 var hug4:Array = null; var hug5:uint = 0; var hug6:uint = 0; graphics.clear(); graphics.beginFill(this.borderColor.color, this.borderColor.alpha); graphics.drawRect(0, 0, hug1, hug2); if(this.backgroundColor.alpha == 0) graphics.drawRect(1, 1, (hug1 - 2), (hug2 - 2)); graphics.beginFill(this.backgroundColor.color, this.backgroundColor.alpha); graphics.drawRect(1, 1, (hug1 - 2), (hug2 - 2)); this.onPaintTrack(); hug1 -= 4; hug2 -= 4; var hug3:Number = 0; this.marksPanel.graphics.clear(); if(this.marks.length > 0){ hug4 = []; hug5 = 0; while(hug5 < this.marks.length){ hug3 = (Math.round(this.marks[hug5] * hug1) - 3); if(hug3 < 0){ hug3 = 0; }else if((hug3 + 5) > hug1){ hug3 = (hug1 - 5); } hug4.push(hug3); hug5++; } this.groupMarks = [[0]]; hug6 = 0; hug5 = 1; while(hug5 < hug4.length){ if(hug4[hug5] < (hug4[this.groupMarks[hug6][0]] + 5)){ this.groupMarks[hug6].push(hug5); }else{ this.groupMarks.push([hug5]); hug6++; } hug5++; } hug5 = 0; while(hug5 < this.groupMarks.length){ hug3 = hug4[this.groupMarks[hug5][0]]; this.marksPanel.graphics.beginFill(0xFBF17A); this.marksPanel.graphics.drawRect(hug3, 0, 5, hug2); this.marksPanel.graphics.beginFill(0xF9A926); this.marksPanel.graphics.drawRect((hug3 + 1), 1, 3, (hug2 - 2)); hug5++; } }else{ this.groupMarks.length = 0; } if(this.isMarkPreviewWindowVisible()){ this.markPreviewWindow.positionArrow = this.positionMark(this.markPreviewWindow.time); this.markPreviewWindow.onResize(null, hug1, hug2); } if(this.isMarkEditWindowVisible()){ this.markEditWindow.setPosition(this.positionMark(this.markEditWindow.time), hug1); this.markEditWindow.params({x:this.markEditWindow.x}, false, true, false, false); this.markEditWindow.onResize(null, stage.stageWidth, stage.stageHeight); } } } } //script532 package Components.Volume{ import Components.Component import Components.SkinManager import fl.events.InteractionInputType import fl.events.SliderEvent import fl.events.SliderEventClickTarget import fl.transitions.Tween import fl.transitions.TweenEvent import fl.transitions.easing.Back import fl.transitions.easing.Bounce import flash.display.Sprite import flash.events.EventDispatcher import flash.events.MouseEvent import flash.events.TimerEvent import flash.utils.Timer import ru.rutube.event.ControlPanelEvent //class(instance)_index:530 public class VolumeButton extends Component { //static constructor public static function VolumeButton$cinit() { //MethodID:5295, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function VolumeButton(hug1:EventDispatcher=null, hug2:Boolean=true):void { //MethodID:5296, LocalCount= 5 , MaxScope= 1, MaxStack= 6, CodeLength= 683 var hug4:Sprite = null; this.box = new Sprite(); this.maskSprite = new Sprite(); this.showSprite = new Sprite(); this.groupPanel = new Sprite(); this.timer = new Timer(1200); super(hug1); setSkin(SkinManager.getSkin("Volume.VolumeButtonSkin")); this.slider = new VolumeSlider(dispatcher); addChildAt(this.groupPanel, 0); this.boxMode = hug2; this.box.graphics.beginFill(0xFFFFFF, (hug2 ? 0.3 : 0)); this.box.graphics.drawRoundRect(0, 0, 23, 101, 6); if(hug2){ this.box.graphics.beginFill(0, 0.6); this.box.graphics.drawRoundRect(1, 1, 21, 99, 6); }else{ this.slider.alphaBorder = 0.75; } this.box.visible = false; this.box.addChild(this.slider); this.slider.x = 8; this.slider.y = 8; this.groupPanel.addChild(this.box); this.box.x = -4; this.box.y = -3; this.showSprite.graphics.beginFill(0xFFFFFF, 0.3); this.showSprite.graphics.drawRoundRect(0, 0, 23, 24, 6); this.showSprite.graphics.beginFill(0, 0.6); this.showSprite.graphics.drawRoundRect(1, 0, 21, 23, 6); this.showSprite.visible = false; this.groupPanel.addChildAt(this.showSprite, 0); this.showSprite.x = this.box.x; this.showSprite.y = -3; var hug3:Sprite = new Sprite(); hug3.graphics.beginFill(0); hug3.graphics.drawRect(0, 0, 23, 21); hug3.y = 3; this.showSprite.addChild(hug3); this.showSprite.mask = hug3; this.maskSprite.graphics.beginFill(0); this.maskSprite.graphics.drawRect(0, 0, 23, 100); this.maskSprite.visible = false; this.groupPanel.addChild(this.maskSprite); this.maskSprite.x = this.box.x; this.maskSprite.y = -100; hug4 = new Sprite(); hug4.graphics.beginFill(0, 0); hug4.graphics.drawRect(0, 0, 15.8, 17.1); hug4.buttonMode = true; hug4.addEventListener(MouseEvent.MOUSE_UP, this.onMouseUpButton); addChild(hug4); this.slider.onFinishChange = this.onFinishCnangeVolume; this.timer.addEventListener(TimerEvent.TIMER, this.onDelayHide); addEventListener(MouseEvent.ROLL_OVER, this.onRollOverButton); addEventListener(MouseEvent.ROLL_OUT, this.onRollOutBox); dispatcher.addEventListener(ControlPanelEvent.EVENT_CHANGE_VOLUME, this.onChangeVolume); } //variables/etc. private var groupPanel:Sprite; //slotID:0 private var showingBox:Boolean = false; //slotID:0 private var saveLevel:Number = 0.0; //slotID:0 private var box:Sprite; //slotID:0 private var boxMode:Boolean = true; //slotID:0 private var maskSprite:Sprite; //slotID:0 private var timer:Timer; //slotID:0 private var mute:Boolean = false; //slotID:0 private var slider:VolumeSlider = null; //slotID:0 private var showSprite:Sprite; //slotID:0 private var tween:Tween = null; //slotID:0 public function set horizontalMode(hug1:Boolean):void { //MethodID:5297, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 68 if(hug1 == this.slider.horizontalMode) return; this.groupPanel.rotation = (hug1 ? (-90) : 0); this.groupPanel.y = (hug1 ? 16 : 0); this.slider.horizontalMode = hug1; } public function set level(hug1:Number):void { //MethodID:5298, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 16 this.slider.level = hug1; this.updateView(); } public function get level():Number { //MethodID:5299, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 10 return this.slider.level; } private function onChangeVolume(hug1:SliderEvent):void { //MethodID:5300, LocalCount= 2 , MaxScope= 1, MaxStack= 1, CodeLength= 8 this.updateView(); } private function updateView():void { //MethodID:5301, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 112 var hug1:Number = this.slider.level; if(this.mute && (hug1 != 0)) this.mute = false; var hug2:uint = 1; if((hug1 > 0.45) && (hug1 < 0.8)){ hug2 = 2; }else if((hug1 > 0.1) && (hug1 <= 0.45)){ hug2 = 3; }else if(hug1 <= 0.1){ hug2 = 4; } skin.gotoAndStop(hug2); } public function hideBox(hug1:Boolean=false):void { //MethodID:5302, LocalCount= 2 , MaxScope= 1, MaxStack= 9, CodeLength= 135 if(this.tween != null) this.tween.stop(); this.showingBox = false; if(hug1){ if(this.timer.running) this.timer.stop(); this.onHideFinish(null); }else{ if(this.boxMode) this.showSprite.visible = true; this.box.mask = this.maskSprite; this.tween = new Tween(this.box, "y", Back.easeIn, -80, -3, 0.8, true); this.tween.addEventListener(TweenEvent.MOTION_FINISH, this.onHideFinish); } } private function onHideFinish(hug1:TweenEvent):void { //MethodID:5303, LocalCount= 3 , MaxScope= 1, MaxStack= 4, CodeLength= 36 var hug2:Boolean = false; this.box.visible = hug2; this.showSprite.visible = hug2; this.box.mask = null; this.tween = null; } public function showBox():void { //MethodID:5304, LocalCount= 1 , MaxScope= 1, MaxStack= 9, CodeLength= 109 if(this.boxMode) this.showSprite.visible = true; this.showingBox = true; this.box.mask = this.maskSprite; this.box.visible = true; if(this.tween != null) this.tween.stop(); this.tween = new Tween(this.box, "y", Bounce.easeOut, -3, -80, 0.8, true); this.tween.addEventListener(TweenEvent.MOTION_FINISH, this.onShowFinish); } private function onShowFinish(hug1:TweenEvent=null):void { //MethodID:5305, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 24 this.showSprite.visible = false; this.box.mask = null; this.tween = null; } private function onRollOverButton(hug1:MouseEvent):void { //MethodID:5306, LocalCount= 2 , MaxScope= 1, MaxStack= 1, CodeLength= 35 if(this.timer.running) this.timer.stop(); if(!this.showingBox) this.showBox(); } private function onDelayHide(hug1:TimerEvent):void { //MethodID:5307, LocalCount= 2 , MaxScope= 1, MaxStack= 1, CodeLength= 16 this.timer.stop(); this.hideBox(); } private function onRollOutBox(hug1:MouseEvent):void { //MethodID:5308, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 34 if(this.showingBox && !this.slider.changed) this.timer.start(); } private function onFinishCnangeVolume(hug1:MouseEvent):void { //MethodID:5309, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 36 if(!RutubePlayer.instance.getStageBounds().contains(hug1.stageX, hug1.stageY)) this.timer.start(); } private function onMouseUpButton(hug1:MouseEvent):void { //MethodID:5310, LocalCount= 2 , MaxScope= 1, MaxStack= 6, CodeLength= 98 if(this.mute){ this.slider.level = this.saveLevel; }else{ this.saveLevel = this.slider.level; this.slider.level = 0; } dispatcher.dispatchEvent(new SliderEvent(ControlPanelEvent.EVENT_MUTE, this.slider.level, SliderEventClickTarget.THUMB, InteractionInputType.MOUSE)); this.mute = !this.mute; this.updateView(); } } } //script533 package Components.EndScreen{ import Components.Button import Components.Component import Components.Player import Components.SkinManager import Components.Forms.InputText import Components.Forms.TitleText import flash.events.MouseEvent import flash.system.System import flash.text.TextField //class(instance)_index:531 public class CodePanel extends Component { //static constructor public static function CodePanel$cinit() { //MethodID:5312, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function CodePanel():void { //MethodID:5313, LocalCount= 4 , MaxScope= 1, MaxStack= 5, CodeLength= 381 this.linkTI = new InputText(); this.codeTI = new InputText(); this.linkButton = new Button(SkinManager.getSkin("EndScreen.CopyButtonSkin")); this.codeButton = new Button(SkinManager.getSkin("EndScreen.CopyButtonSkin")); super(); size(200, 95, false, 200); var hug1:TitleText = new TitleText("R|{p ~p |y{", 11); addChild(hug1); hug1.y = 5; addChild(this.linkTI); this.linkTI.y = 24; this.linkTI.editable = false; this.linkTI.addEventListener(MouseEvent.CLICK, this.listenerMouseTextFieldClick); var hug2:TitleText = new TitleText("Kt |uup", 11); addChild(hug2); hug2.y = 46; addChild(this.codeTI); this.codeTI.y = 64; this.codeTI.editable = false; this.codeTI.addEventListener(MouseEvent.CLICK, this.listenerMouseTextFieldClick); var hug3:int = 0xD0CFCF; hug2.textColor = hug3; hug1.textColor = hug3; addChild(this.linkButton); this.linkButton.y = (this.linkTI.y + 1); addChild(this.codeButton); this.codeButton.y = (this.codeTI.y + 1); this.linkButton.useModes(true, "normal", ["normal", "copy"]); this.codeButton.useModes(true, "normal", ["normal", "copy"]); this.linkButton.addEventListener(MouseEvent.CLICK, this.onClickHandler); this.codeButton.addEventListener(MouseEvent.CLICK, this.onClickHandler); } //variables/etc. public var codeTI:InputText; //slotID:0 private var codeButton:Button; //slotID:0 private var linkButton:Button; //slotID:0 public var linkTI:InputText; //slotID:0 private function listenerMouseTextFieldClick(hug1:MouseEvent):void { //MethodID:5314, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 33 var hug2:TextField = (hug1.target as TextField); if(!hug2) return; hug2.setSelection(0, hug2.text.length); } private function onClickHandler(hug1:MouseEvent):void { //MethodID:5315, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 108 var hug2:String = null; if(hug1.currentTarget == this.linkButton){ hug2 = this.linkTI.text; this.linkButton.mode = "copy"; this.codeButton.mode = "normal"; }else{ hug2 = this.codeTI.text; this.codeButton.mode = "copy"; this.linkButton.mode = "normal"; } if(hug2.length > 0){ System.setClipboard(hug2); Player.alert("{yrp~ r qu q}u~p"); } } override protected function onUpdate(hug1:Number, hug2:Number):void { //MethodID:5316, LocalCount= 4 , MaxScope= 1, MaxStack= 4, CodeLength= 60 var hug3:Number = (hug1 - this.codeButton.width); this.linkButton.x = hug3; this.codeButton.x = hug3; var hug3:int = (this.codeButton.x - 10); this.linkTI.width = hug3; this.codeTI.width = hug3; } } } //script534 package Components.EndScreen{ import Components.Button import Components.Component import Components.SkinManager import Data.TSearchInfo import fl.transitions.Transition import fl.transitions.TransitionManager import fl.transitions.Wipe import fl.transitions.easing.None import flash.display.MovieClip import flash.events.Event import flash.events.IOErrorEvent import flash.events.MouseEvent import flash.events.SecurityErrorEvent import flash.net.URLLoader import flash.net.URLRequest import flash.text.TextField import flash.text.TextFormat import flash.text.TextFormatAlign import ru.rutube.ui.components.preloader.MacCirclePreloader //class(instance)_index:532 public class SearchPanel extends Component { //static constructor public static function SearchPanel$cinit() { //MethodID:5318, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 29 EVENT_BACKGROUND_REPAINT = "bgRepaint"; SITE_SEARCH_URL = "http://rutube.ru/search.html"; MIN_HEIGHT = 105; } //static variables/etc. public static const EVENT_BACKGROUND_REPAINT:String = "bgRepaint";//slotID:1 private static const SITE_SEARCH_URL:String = "http://rutube.ru/search.html";//slotID:2 private static const MIN_HEIGHT:uint = 105; //slotID:3 //constructor public function SearchPanel():void { //MethodID:5319, LocalCount= 2 , MaxScope= 1, MaxStack= 11, CodeLength= 337 this.urlLoader = new URLLoader(); this.prevButton = new Button(SkinManager.getSkin("PrevPageSearchButtonSkin")); this.nextButton = new Button(SkinManager.getSkin("NextPageSearchButtonSkin")); this.waitPanel = new MacCirclePreloader(); this.statusText = new TextField(); this.searchInfo = new TSearchInfo(); this.animPanel = new MovieClip(); this.frames = []; super(); addChild(this.animPanel); addChild(this.statusText); this.statusText.selectable = false; this.statusText.defaultTextFormat = new TextFormat("_sans", 12, 0x73AED6, true, false, true, SITE_SEARCH_URL, "_blank", TextFormatAlign.CENTER); this.statusText.height = 20; this.statusText.x = 30; addChild(this.prevButton); addChild(this.nextButton); var hug1:Boolean = false; this.nextButton.visible = hug1; this.prevButton.visible = hug1; this.prevButton.addEventListener(MouseEvent.CLICK, this.onChangeItemIndexHandler); this.nextButton.addEventListener(MouseEvent.CLICK, this.onChangeItemIndexHandler); addChild(this.waitPanel); this.waitPanel.y = 20; this.urlLoader.addEventListener(Event.COMPLETE, this.onLoadCompleteHandler); this.urlLoader.addEventListener(IOErrorEvent.IO_ERROR, this.onErrorHandler); this.urlLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.onErrorHandler); } //variables/etc. private var pageIndex:uint = 0; //slotID:0 private var prevButton:Button; //slotID:0 private var $height:Number = 105.0; //slotID:0 private var nextButton:Button; //slotID:0 private var statusText:TextField; //slotID:0 private var waitPanel:MacCirclePreloader; //slotID:0 private var isEnd:Boolean = false; //slotID:0 private var urlLoader:URLLoader; //slotID:0 private var frames:Array; //slotID:0 private var isSearch:Boolean = false; //slotID:0 private var animPanel:MovieClip; //slotID:0 private var searchText:String = ""; //slotID:0 private var searchInfo:TSearchInfo; //slotID:0 private var itemIndex:int = 0; //slotID:0 public function getHeight():Number { //MethodID:5320, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this.$height; } public function setSearchText(hug1:String):void { //MethodID:5321, LocalCount= 5 , MaxScope= 1, MaxStack= 4, CodeLength= 172 var hug2:SearchFrame = null; hug1 = encodeURIComponent(hug1); if((hug1 == this.searchText) || (hug1.length == 0)) return; if(this.isSearch){ this.isSearch = false; this.urlLoader.close(); } if(!visible) this.updateFrames(true); this.searchText = hug1; this.statusText.text = ""; for each(hug2 in this.frames){ hug2.clear(); hug2.visible = false; } this.isEnd = false; this.pageIndex = this.itemIndex = 0; this.searchInfo.clear(); this.search(); this.showItems(); } private function search(hug1:uint=0):void { //MethodID:5322, LocalCount= 4 , MaxScope= 5, MaxStack= 4, CodeLength= 126 internal var page:uint = 0; //slotID:1 page = hug1; if(this.isEnd || (this.searchText.length == 0)) return; this.isSearch = true; try{ this.urlLoader.load(new URLRequest("http://rutube.ru/cgi-bin/xmlapi.cgi?rt_mode=search&utf=1&page_size=" + this.frames.length + "&text=" + this.searchText + "&p=" + page)); } catch(error:SecurityError){ trace("SearchPanel.search:", error); onErrorHandler(); } } private function onLoadCompleteHandler(hug1:Event):void { //MethodID:5323, LocalCount= 4 , MaxScope= 5, MaxStack= 5, CodeLength= 257 internal var event:Event; //slotID:1 internal var xml:XML; //slotID:2 xml = null; event = hug1; try{ xml = new XML(URLLoader(event.target).data); } catch(error:Error){ onErrorHandler(); return; } this.isSearch = false; this.waitPanel.hide(); if(this.searchInfo.load(xml, false) <= 0){ this.isEnd = true; if(this.searchInfo.items.length == 0) this.statusText.htmlText = ("Np Rutube crptu~yz ~u ~pztu~"); }else{ this.statusText.htmlText = (("Npztu~ ~p Rutube " + this.searchInfo.count + " |y{p"); if(this.searchInfo.items.length >= this.searchInfo.count) this.isEnd = true; } this.showItems(); } private function onErrorHandler(hug1:Event=null):void { //MethodID:5324, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 73 trace("SearchPanel.onErrorHandler:", hug1); this.isSearch = false; this.waitPanel.hide(); this.isEnd = true; if(this.searchInfo.items.length == 0){ this.statusText.text = "Pyx|p yq{p y qpu~yy { y{r} ury"; }else{ this.onChangeItemIndexHandler(null); } this.showItems(); } private function onChangeItemIndexHandler(hug1:MouseEvent):void { //MethodID:5325, LocalCount= 5 , MaxScope= 1, MaxStack= 3, CodeLength= 165 var hug2:uint = 0; if((hug1 == null) || (hug1.currentTarget == this.prevButton)){ if(this.itemIndex > 0){ this.itemIndex -= this.frames.length; if(this.itemIndex < 0) this.itemIndex = 0; this.showItems(false); } }else{ this.itemIndex += this.frames.length; hug2 = this.searchInfo.items.length; if(this.itemIndex > hug2) this.itemIndex = hug2; if(this.itemIndex == hug2){ this.pageIndex++; this.search(this.pageIndex); } this.showItems(); } } private function showItems(hug1:Boolean=true):void { //MethodID:5326, LocalCount= 8 , MaxScope= 1, MaxStack= 12, CodeLength= 566 var hug2:uint = 0; var hug3:Number = NaN; var hug4:SearchFrame = null; var hug5:int = 0; if(this.itemIndex >= this.searchInfo.items.length){ for each(hug4 in this.frames){ hug4.visible = false; } if(this.isSearch) this.waitPanel.show(); this.statusText.visible = !this.isSearch; hug2 = 0; }else{ if(this.waitPanel.visible) this.waitPanel.hide(); this.statusText.visible = true; hug2 = (this.searchInfo.items.length - this.itemIndex); if(this.frames.length < hug2){ hug2 = this.frames.length; }else{ hug5 = (this.frames.length - 1); while(hug5 >= hug2){ this.frames[hug5].visible = false; hug5--; } } hug5 = 0; while(hug5 < hug2){ this.frames[hug5].setData(this.searchInfo.items[this.itemIndex + hug5]); this.frames[hug5].visible = true; hug5++; } } this.prevButton.visible = (this.itemIndex > 0); this.nextButton.visible = (!this.isSearch && (((this.itemIndex + this.frames.length) < this.searchInfo.items.length) || !this.isEnd)); if(hug2 > 0){ hug3 = (hug5 * 85); this.statusText.y = (hug3 - 5); hug3 = (this.statusText.y + this.statusText.height); }else{ hug3 = MIN_HEIGHT; this.statusText.y = (Math.round((hug3 - this.statusText.height) / 2) - 5); } if(hug3 != this.$height){ this.nextButton.y = Math.round((hug3 - this.prevButton.height) / 2); this.prevButton.y = Math.round((hug3 - this.prevButton.height) / 2); this.$height = hug3; dispatchEvent(new Event(EVENT_BACKGROUND_REPAINT)); } if(hug2 > 0) TransitionManager.start(this.animPanel, {type:Wipe, direction:Transition.IN, duration:0.35, easing:None.easeNone, startPoint:(hug1 ? 4 : 6)}); } override public function set visible(hug1:Boolean):void { //MethodID:5327, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 20 super.visible = hug1; if(hug1) onPaint(); } private function updateFrames(hug1:Boolean=false):void { //MethodID:5328, LocalCount= 5 , MaxScope= 1, MaxStack= 13, CodeLength= 280 var hug3:int = 0; var hug4:SearchFrame = null; var hug2:int = Math.floor((_height - 15) / 85); if(hug2 <= 0) hug2 = 1; if(hug2 != this.frames.length){ this.pageIndex = ((this.searchInfo.items.length > 0) ? Math.floor((this.searchInfo.items.length - 1) / hug2) : 0); if(this.frames.length < hug2){ hug3 = this.frames.length; while(hug3 < hug2){ hug4 = new SearchFrame(); hug4.visible = false; this.frames.push(this.animPanel.addChild(hug4)); hug4.params({x:45, w:(_width - 90), y:(85 * hug3), right:true, wContainer:_width, hContainer:_height}); hug3++; } }else{ hug3 = (this.frames.length - 1); while(hug3 >= hug2){ hug4 = this.frames.pop(); hug4.clear(); this.animPanel.removeChild(hug4); hug3--; } } if(!hug1) this.showItems(); } } override protected function onUpdate(hug1:Number, hug2:Number):void { //MethodID:5329, LocalCount= 6 , MaxScope= 1, MaxStack= 5, CodeLength= 124 var hug3:SearchFrame = null; if(!visible) return; this.updateFrames(); for each(hug3 in this.frames){ hug3.onResize(hug1, hug2); } this.nextButton.x = (hug1 - this.nextButton.width); this.waitPanel.x = Math.round(hug1 / 2); this.statusText.width = Math.round(hug1 - (this.statusText.x * 2)); } } } //script535 package Components.EndScreen{ import Components.Component import Components.Player import EndScreen.AboutIcons.CommentsIcon import EndScreen.AboutIcons.DateIcon import EndScreen.AboutIcons.DurationIcon import EndScreen.AboutIcons.EditIcon import EndScreen.AboutIcons.RatingIcon import EndScreen.AboutIcons.SubscribeIcon import EndScreen.AboutIcons.ToFriendsIcon import EndScreen.AboutIcons.WeightIcon import flash.display.Bitmap import flash.display.Sprite import flash.events.Event import flash.events.IOErrorEvent import flash.events.SecurityErrorEvent import flash.events.TextEvent import flash.geom.Rectangle import flash.net.URLLoader import flash.net.URLRequest import flash.text.StyleSheet import flash.text.TextField import flash.text.TextFieldAutoSize import flash.text.TextFormat import ru.rutube.managers.configuration.data.MetaInfo //class(instance)_index:533 public class AboutPanel extends Component { //static constructor public static function AboutPanel$cinit() { //MethodID:5331, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function AboutPanel():void { //MethodID:5332, LocalCount= 8 , MaxScope= 1, MaxStack= 12, CodeLength= 738 var hug4:Object = null; var hug5:TextField = null; this.titleText = new TextField(); this.icoPanel = new Sprite(); this.descText = new TextField(); super(); size(200, 120, false, 0, 120); var hug1:StyleSheet = new StyleSheet(); hug1.setStyle(".title", {color:"#FDFDFD", fontSize:13, fontWeight:"bold"}); hug1.setStyle(".author", {color:"#C0DB4C"}); hug1.setStyle(".style1", {color:"#73AED6"}); hug1.setStyle("a", {textDecoration:"underline"}); addChild(this.titleText); this.titleText.defaultTextFormat = new TextFormat("_sans", 12, 0xD0CFCF); this.titleText.multiline = true; this.titleText.selectable = false; this.titleText.styleSheet = hug1; this.titleText.height = 20; addChild(this.icoPanel); this.icoPanel.y = 65; this.icons = [{title:"Ptwy", ico:ToFriendsIcon}, {title:"K}}u~pyy: ", ico:CommentsIcon}, {title:"Opry {}}u~pyy", ico:EditIcon}, {title:"Ptyp ~p |y{y prp", ico:SubscribeIcon}, {title:"Quzy~s prp: ", ico:RatingIcon}, {title:"Bu: ", ico:WeightIcon}, {title:"V~}upw: ", ico:DurationIcon}, {title:"Dpp: ", ico:DateIcon}]; var hug2:int = 0; var hug3:Boolean = true; for each(hug4 in this.icons){ hug4.img = this.icoPanel.addChild(new Bitmap(new hug4.ico(0, 0))); hug4.img.y = (hug2 * 16); hug5 = new TextField(); this.icoPanel.addChild(hug5); hug4.tf = hug5; hug5.selectable = false; hug5.autoSize = TextFieldAutoSize.LEFT; hug5.y = (hug4.img.y - 3); if(hug3){ hug5.x = 21; hug5.styleSheet = hug1; hug5.htmlText = ("" + hug4.title + ""); }else{ hug4.img.x = 230; hug5.x = (hug4.img.x + 21); hug5.defaultTextFormat = this.titleText.defaultTextFormat; hug5.text = (hug4.title + "-"); } hug2++; if(hug2 >= 4){ hug2 = 0; hug3 = false; } } this.icons[0].tf.addEventListener(TextEvent.LINK, this.onLinkHandler); this.icons[3].tf.addEventListener(TextEvent.LINK, this.onLinkHandler); addChild(this.descText); this.descText.multiline = true; this.descText.wordWrap = true; this.descText.selectable = false; this.descText.defaultTextFormat = new TextFormat("_sans", 11, 0xD0CFCF); this.descText.y = (this.icoPanel.y + this.icoPanel.height + 10); this.descText.height = 10; } //variables/etc. private var titleText:TextField; //slotID:0 private var icoPanel:Sprite; //slotID:0 private var author:String = null; //slotID:0 private var subscribeURL:String = null; //slotID:0 private var descText:TextField; //slotID:0 private var destStr:String = ""; //slotID:0 private var addFriendURL:String = null; //slotID:0 private var icons:Array = null; //slotID:0 public function setData(hug1:MetaInfo):void { //MethodID:5333, LocalCount= 10 , MaxScope= 1, MaxStack= 5, CodeLength= 736 var hug2:String = hug1.title; this.author = hug1.author; var hug3:String = hug1.urlContent; var hug4:Boolean = (hug3.length > 0); var hug5:String = hug1.viewerProfileUrl; if(hug5.length > 0) hug2 += ("
Dx prp"); this.titleText.htmlText = hug2; this.titleText.height = (this.titleText.textHeight + 7); this.icoPanel.y = (this.titleText.y + this.titleText.height + 8); var hug6:String = ("http://rutube.ru/login.html?redirect=" + hug3); this.addFriendURL = null; var hug7:String = ""; if(hug1.isRegistered){ hug7 = hug1.authorId.toString(); if(hug7.length > 0) this.addFriendURL = ("http://rutube.ru/journal/friends/add.html?id=" + hug7 + "&mode=ajax"); } this.icons[0].tf.htmlText = (("") + this.icons[0].title + ""); this.icons[1].tf.htmlText = ((("") + this.icons[1].title) + hug1.commentsCount.toString() + ""); var hug8:String = (hug1.isRegistered ? (hug4 ? (hug3 + "#comment_replaybottom") : null) : hug6); this.icons[2].tf.htmlText = (("") + this.icons[2].title + ""); this.subscribeURL = ((hug7.length > 0) ? ("http://rutube.ru/journal/profile.html?rm=subsc_add_user&id=" + hug7 + "&mode=ajax") : null); this.icons[3].tf.htmlText = (("") + this.icons[3].title + ""); var hug9:int = 4; while(hug9 < 8){ this.icons[hug9].tf.text = this.icons[hug9].title; hug9++; } this.icons[4].tf.text += hug1.authorRaiting; this.icons[5].tf.text += (int(hug1.contentSize / 1024).toString() + " Kb"); this.icons[6].tf.text += hug1.contentDuration; this.icons[7].tf.text += hug1.recordDate; this.descText.y = (this.icoPanel.y + this.icoPanel.height + 7); this.destStr = hug1.authorComment; this.updateLayoutDescText(); } private function onLinkHandler(hug1:TextEvent):void { //MethodID:5334, LocalCount= 4 , MaxScope= 5, MaxStack= 3, CodeLength= 287 internal var event:TextEvent; //slotID:1 internal var url:String; //slotID:2 internal var listener:Function; //slotID:3 internal var urlLoader:URLLoader; //slotID:4 listener = null; urlLoader = null; event = hug1; url = null; switch(event.text){ case "addFriend": url = this.addFriendURL; listener = this.onCompleteRequestAddFriendHandler; break; case "subscribe": url = this.subscribeURL; listener = this.onCompleteRequestSubscribeHandler; break; default: break; } if(url == null){ Player.alert("Duzryu ~u t~"); }else{ urlLoader = new URLLoader(); urlLoader.addEventListener(Event.COMPLETE, listener); urlLoader.addEventListener(IOErrorEvent.IO_ERROR, this.onErrorRequestHandler); urlLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.onErrorRequestHandler); try{ urlLoader.load(new URLRequest(url)); } catch(error:SecurityError){ onErrorRequestHandler(null); } } } private function onCompleteRequestAddFriendHandler(hug1:Event):void { //MethodID:5335, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 70 Player.alert(((URLLoader(hug1.target).data == "OK") ? ((this.author.length > 0) ? this.author : "@r") + " tqpr|u~ r y{ rpy txuz") : "Duzryu {|~u~ uru}"); } private function onCompleteRequestSubscribeHandler(hug1:Event):void { //MethodID:5336, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 71 Player.alert("Pyxrutu~p ty{p ~p |y{y " + ((URLLoader(hug1.target).data == "OK") ? ((this.author.length > 0) ? this.author : "prp")) : "Duzryu {|~u~ uru}"); } private function onErrorRequestHandler(hug1:Event):void { //MethodID:5337, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 24 trace("AboutPanel.onErrorRequestHandler:", hug1); Player.alert("Bx~y{|p yq{p y r|~u~yy xpp"); } private function updateLayoutDescText():void { //MethodID:5338, LocalCount= 3 , MaxScope= 5, MaxStack= 5, CodeLength= 465 internal var _h:Number; //slotID:1 internal var lineIndex:int; //slotID:2 internal var lineOffset:int; //slotID:3 internal var lineLength:int; //slotID:4 internal var shortStr:String; //slotID:5 internal var rect:Rectangle; //slotID:6 lineIndex = 0; lineOffset = 0; lineLength = 0; shortStr = null; rect = null; this.descText.width = _width; this.descText.htmlText = this.destStr; _h = (_height - this.descText.y - 15); this.descText.visible = (_h > 10); if(!this.descText.visible) return; if(this.descText.textHeight <= _h){ this.descText.height = (this.descText.textHeight + 7); }else{ this.descText.height = (_h + 5); lineIndex = this.descText.getLineIndexAtPoint(5, (this.descText.height - 10)); if(lineIndex != (-1)){ try{ lineOffset = this.descText.getLineOffset(lineIndex); if(lineIndex > 0){ rect = this.descText.getCharBoundaries(lineOffset); if((rect.y + rect.height) >= (this.descText.height - 2)){ lineIndex--; lineOffset = this.descText.getLineOffset(lineIndex); } } lineLength = this.descText.getLineLength(lineIndex); shortStr = this.descText.text.substr(0, (lineOffset + lineLength - 4)); if(lineLength > 4) shortStr += (((this.descText.text.charAt(lineOffset + lineLength - 4) == " ") ? " " : "") + "..."); this.descText.htmlText = shortStr; this.descText.height = (this.descText.textHeight + 7); } catch(error:RangeError){ trace("AboutPanel.updateLayoutDescText: " + error); } } } } override protected function onUpdate(hug1:Number, hug2:Number):void { //MethodID:5339, LocalCount= 6 , MaxScope= 1, MaxStack= 4, CodeLength= 82 this.titleText.width = (hug1 - 15); var hug3:Boolean = (hug1 >= 380); var hug4:int = 4; while(hug4 < 8){ var hug5:Boolean = hug3; this.icons[hug4].img.visible = hug5; this.icons[hug4].tf.visible = hug5; hug4++; } this.updateLayoutDescText(); } } } //script536 package actioplayer{ import actioplayer.integrate.SWFAdapter import actioplayer.integrate.VideoPlayerAdapter import actioplayer.integrate.VideoPlayerController import actioplayer.localize.LocaleChangeEvent import actioplayer.localize.Localizer import actioplayer.model.Metadata import actioplayer.transport.LoadActiomlCommand import actioplayer.transport.LoadMetadataCommand import actioplayer.transport.Statistics import actioplayer.view.Screen import actioplayer.view.skin.Skinner import flash.display.Sprite import flash.geom.Rectangle //class(instance)_index:534 public class ActioPlayer extends Sprite { //static constructor public static function ActioPlayer$cinit() { //MethodID:5341, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 12 ID = "rutube"; } //static variables/etc. public static const ID:String = "rutube"; //slotID:1 //constructor public function ActioPlayer(hug1:VideoPlayerAdapter, hug2:String, hug3:Boolean=false) { //MethodID:5342, LocalCount= 4 , MaxScope= 1, MaxStack= 6, CodeLength= 192 this.version = new Version(); this._pointersSwitchAlign = new Rectangle(5, 0, 0, 5); this._historyToolbarAlign = new Rectangle(10, 5); this._promoAlign = new Rectangle(0, 0, 5, 5); super(); if(!hug1) return; this.adapter = hug1; this.expectingAvsBeforePlay = hug3; this.skinner = new Skinner(); this.localizer = new Localizer(this); this.history = new History(this); this.scenarios = new Scenarios(this); this.statistics = new Statistics("http://services.actio.tv/stats/stats.php", this); this.swfcont = new SWFController(this); this.screen = new Screen(this); addChild(this.screen); this.controller = new VideoPlayerController(this); this.setMetadataUrl(hug2); } //variables/etc. public var adapter:VideoPlayerAdapter; //slotID:0 public var controller:VideoPlayerController; //slotID:0 public var screen:Screen; //slotID:0 public var data:Metadata; //slotID:0 public var history:History; //slotID:0 public var scenarios:Scenarios; //slotID:0 public var skinner:Skinner; //slotID:0 public var localizer:Localizer; //slotID:0 public var version:Version; //slotID:0 public var statistics:Statistics; //slotID:0 public var swfcont:SWFController; //slotID:0 public var currentMetadataUrl:String; //slotID:0 public var expectingAvsBeforePlay:Boolean; //slotID:0 private var _pointersSwitchAlign:Rectangle; //slotID:0 private var _historyToolbarAlign:Rectangle; //slotID:0 private var _promoAlign:Rectangle; //slotID:0 private var _language:String = "en-US"; //slotID:0 public var contentLinkRestriction:String = "services.actio.tv"; //slotID:0 public function set language(hug1:String):void { //MethodID:5343, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 52 this._language = hug1; if(!this._language || (this._language == "")) this._language = "en-US"; this.localizer.dispatchEvent(new LocaleChangeEvent()); } public function get language():String { //MethodID:5344, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 23 return this._language.split("-")[0].toLowerCase(); } public function set mute(hug1:Boolean):void { //MethodID:5345, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 34 this.swfcont.relay(hug1 ? SWFAdapter.MUTE : SWFAdapter.UNMUTE); } public function set volume(hug1:Number):void { //MethodID:5346, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 23 this.swfcont.relay(SWFAdapter.VOLUME, String(hug1)); } public function setMetadataUrl(hug1:String=null):void { //MethodID:5347, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 85 if(hug1 == this.currentMetadataUrl) return; this.reset(); if(hug1){ this.currentMetadataUrl = hug1; if(hug1.substr(hug1.lastIndexOf(".") + 1).toLowerCase() != "avs"){ new LoadActiomlCommand(hug1, this).execute(); }else{ new LoadMetadataCommand(hug1, this).execute(); } } } public function reset():void { //MethodID:5348, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 48 this.controller.stopMonitoring(); this.history.clear(); this.scenarios.resetRunningScenario(); this.screen.reset(); this.swfcont.reset(); this.currentMetadataUrl = null; } public function set historyToolbarVisible(hug1:Boolean):void { //MethodID:5349, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 11 this.screen.historyToolbarVisible = hug1; } public function set pointersSwitchVisible(hug1:Boolean):void { //MethodID:5350, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 11 this.screen.pointersSwitchVisible = hug1; } public function set pointersSwitchIsOn(hug1:Boolean):void { //MethodID:5351, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 11 this.screen.pointersSwitchSelected = hug1; } public function set pointersSwitchAlign(hug1:Rectangle):void { //MethodID:5352, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 29 if((hug1 != null) && (hug1 != this._pointersSwitchAlign)) this._pointersSwitchAlign = hug1; } public function get pointersSwitchAlign():Rectangle { //MethodID:5353, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._pointersSwitchAlign; } public function set promoAlign(hug1:Rectangle):void { //MethodID:5354, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 29 if((hug1 != null) && (hug1 != this._promoAlign)) this._promoAlign = hug1; } public function get promoAlign():Rectangle { //MethodID:5355, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._promoAlign; } public function set historyToolbarAlign(hug1:Rectangle):void { //MethodID:5356, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 29 if((hug1 != null) && (hug1 != this._historyToolbarAlign)) this._historyToolbarAlign = hug1; } public function get historyToolbarAlign():Rectangle { //MethodID:5357, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._historyToolbarAlign; } } } //script537 package actioplayer.integrate{ import flash.events.EventDispatcher import flash.geom.Rectangle //class(instance)_index:535 public class VideoPlayerAdapter extends EventDispatcher { //static constructor public static function VideoPlayerAdapter$cinit() { //MethodID:5359, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function VideoPlayerAdapter() { //MethodID:5360, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 super(); } //variables/etc. public function get time():Number { //MethodID:5361, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 5 return 0; } public function get screenRect():Rectangle { //MethodID:5362, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 8 return new Rectangle(); } public function get bytesLoaded():Number { //MethodID:5363, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 5 return 0; } public function get bytesTotal():Number { //MethodID:5364, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 5 return 0; } public function get metadata():Object { //MethodID:5365, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 4 return null; } public function get hasStreaming():Boolean { //MethodID:5366, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 4 return true; } public function get mute():Boolean { //MethodID:5367, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 4 return false; } public function get volume():Number { //MethodID:5368, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 5 return 1; } public function set pointersEnabled(hug1:Boolean):void { //MethodID:5369, LocalCount= 2 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } public function play(hug1:String=null):void { //MethodID:5370, LocalCount= 2 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } public function stop():void { //MethodID:5371, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } public function pause():void { //MethodID:5372, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } public function resume():void { //MethodID:5373, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } public function seek(hug1:Number):void { //MethodID:5374, LocalCount= 2 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } public function set mute(hug1:Boolean):void { //MethodID:5375, LocalCount= 2 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } public function setPlaybackEnabled(hug1:Boolean):void { //MethodID:5376, LocalCount= 2 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } } } //script538 package ru.rutube.actio{ import actioplayer.integrate.VideoPlayerAdapter import flash.events.Event import flash.geom.Rectangle import ru.rutube.event.ControlPanelEvent import ru.rutube.event.EventManager import ru.rutube.managers.playback.controller.StreamController //class(instance)_index:536 public class StreamActioAdapter extends VideoPlayerAdapter { //static constructor public static function StreamActioAdapter$cinit() { //MethodID:5378, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function StreamActioAdapter(hug1:StreamController) { //MethodID:5379, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 11 super(); this.streamController = hug1; } //variables/etc. private var resuming:Boolean = false; //slotID:0 public var _screenRect:Rectangle = null; //slotID:0 private var _seek:Number = -1.0; //slotID:0 public var streamController:StreamController = null; //slotID:0 override public function get bytesTotal():Number { //MethodID:5380, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 22 if(this.streamController != null) return this.streamController.bytesTotal; return 0; } override public function get bytesLoaded():Number { //MethodID:5381, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 22 if(this.streamController != null) return this.streamController.bytesLoaded; return 0; } override public function get hasStreaming():Boolean { //MethodID:5382, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 4 return true; } override public function get time():Number { //MethodID:5383, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 22 if(this.streamController != null) return this.streamController.time; return 0; } override public function get metadata():Object { //MethodID:5384, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 23 if(this.streamController != null) return this.streamController.getMetaData(); return 0; } override public function get screenRect():Rectangle { //MethodID:5385, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 26 if(this._screenRect != null) return this._screenRect.clone(); return new Rectangle(); } public function set screenRect(hug1:Rectangle):void { //MethodID:5386, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 18 if(hug1 != null) this._screenRect = hug1.clone(); } override public function play(hug1:String=null):void { //MethodID:5387, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 41 if((hug1 != null) && (this.streamController != null)){ this.streamController.setBalancedUrl(hug1); this.streamController.play(); } } override public function stop():void { //MethodID:5388, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 22 EventManager.instance.dispatchEvent(new Event(ControlPanelEvent.EVENT_STOP)); } override public function pause():void { //MethodID:5389, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 22 EventManager.instance.dispatchEvent(new Event(ControlPanelEvent.EVENT_PAUSE)); } override public function resume():void { //MethodID:5390, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 22 EventManager.instance.dispatchEvent(new Event(ControlPanelEvent.EVENT_PLAY)); } override public function seek(hug1:Number):void { //MethodID:5391, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 21 if(this.streamController != null) this.streamController.seek(hug1); } private function listenerSeekComplete(hug1:Event):void { //MethodID:5392, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 22 EventManager.instance.dispatchEvent(new Event(ControlPanelEvent.EVENT_PLAY)); } } } //script539 package com.google.ads.instream.wrappers{ import flash.system.ApplicationDomain import flash.utils.Dictionary import flash.utils.describeType import flash.utils.getQualifiedClassName //class(instance)_index:537 public class Wrappers extends Object { //static constructor public static function Wrappers$cinit() { //MethodID:5394, LocalCount= 1 , MaxScope= 1, MaxStack= 27, CodeLength= 275 INTERFACE_IMPLEMENTS_NUM_OF_INTERFACES = {}; WRAPPED_CLASSES = {AdEvent:AdEventWrapper, AdErrorEvent:AdErrorEventWrapper, AdLoadedEvent:AdLoadedEventWrapper, AdsLoadedEvent:AdsLoadedEventWrapper, AdSizeChangedEvent:AdSizeChangedEventWrapper, FlashAdCustomEvent:FlashAdCustomEventWrapper, MediaSelectionSettings:MediaSelectionSettingsWrapper}; WRAPPED_INTERFACES = {Ad:AdWrapper, AdError:AdErrorWrapper, AdsManager:AdsManagerWrapper, CustomContentAd:CustomContentAdWrapper, DoubleClickStudioFlashAsset:DoubleClickStudioFlashAssetWrapper, FlashAd:FlashAdWrapper, FlashAdsManager:FlashAdsManagerWrapper, FlashAsset:FlashAssetWrapper, VastCustomClick:VastCustomClickWrapper, VastVideoAd:VastVideoAdWrapper, VastWrapper:VastWrapperWrapper, VideoAd:VideoAdWrapper, VideoAdsManager:VideoAdsManagerWrapper}; LOCAL_TO_REMOTE_CLASSES = {AdSlot:adSlotRemoteInstanceFactory, AdsRequest:defaultRemoteInstanceFactory, PlayListRequest:defaultRemoteInstanceFactory}; API_NAMESPACE = "com.google.ads.instream.api"; WRAPPED_CLASSES["PlayListEvent"] = PlayListEventWrapper; WRAPPED_CLASSES["PlayListErrorEvent"] = PlayListErrorEventWrapper; WRAPPED_CLASSES["PlayListLoadedEvent"] = PlayListLoadedEventWrapper; WRAPPED_INTERFACES["AdRule"] = AdRuleWrapper; WRAPPED_INTERFACES["AdRuleAdBreak"] = AdRuleAdBreakWrapper; WRAPPED_INTERFACES["PlayList"] = PlayListWrapper; WRAPPED_INTERFACES["PlayListContent"] = PlayListContentWrapper; WRAPPED_INTERFACES["PlayListManager"] = PlayListManagerWrapper; } //static variables/etc. private static var remoteApplicationDomainProxyValue:Object; //slotID:1 private static var remoteAppDomainProxyCreateInstanceArgumentsCount:int;//slotID:2 private static const INTERFACE_IMPLEMENTS_NUM_OF_INTERFACES:Object;//slotID:3 private static const WRAPPED_CLASSES:Object; //slotID:4 private static const WRAPPED_INTERFACES:Object; //slotID:5 private static const LOCAL_TO_REMOTE_CLASSES:Object; //slotID:6 private static const API_NAMESPACE:String = "com.google.ads.instream.api";//slotID:7 public static function unwrappedRemoteToLocal(hug1:Dictionary, hug2:Object, hug3:Object=null):Object { //dispID:3, MethodID:5395, LocalCount= 4 , MaxScope= 1, MaxStack= 4, CodeLength= 20 return remoteToLocal(hug1, remoteApplicationDomainProxy.wrapRemoteObject(hug2), hug3); } public static function remoteToLocal(hug1:Dictionary, hug2:Object, hug3:Object=null):Object { //dispID:4, MethodID:5396, LocalCount= 12 , MaxScope= 1, MaxStack= 5, CodeLength= 245 var hug4:XML = null; var hug5:String = null; var hug6:Object = null; var hug7:Class = null; var hug8:Object = null; var hug9:Object = null; if(hug2 == null) return null; if(!hug1[hug2]){ hug4 = (isProxyObject(hug2) ? remoteDescribeType(hug2) : describeType(hug2)); hug5 = getTypeName(hug2); hug6 = getWrapperType(hug4, hug5); if(hug6 != null){ hug1[hug2] = new hug6(hug2, hug3); }else{ hug7 = (getLocalDefinition(getQualifiedClassName(hug2)) as Class); if(hug7 === Array){ hug8 = new hug7(); for each(hug9 in hug2){ hug8.push(remoteToLocal(hug1, hug9, hug3)); } hug1[hug2] = hug8; }else{ hug1[hug2] = hug2; } } } return hug1[hug2]; } private static function isWrappableRemoteInstance(hug1:Object):Boolean { //dispID:5, MethodID:5397, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 27 if(hug1){ if(hug1 is Array) return (hug1.length > 0); return true; } return false; } public static function set remoteApplicationDomainProxy(hug1:Object):void { //dispID:6, MethodID:5398, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 10 remoteApplicationDomainProxyValue = hug1; } public static function get remoteApplicationDomainProxy():Object { //dispID:7, MethodID:5399, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 return remoteApplicationDomainProxyValue; } public static function localToRemote(hug1:Object):Object { //dispID:8, MethodID:5400, LocalCount= 5 , MaxScope= 1, MaxStack= 3, CodeLength= 135 var hug3:Function = null; var hug4:Object = null; var hug2:String = getTypeName(hug1); if(LOCAL_TO_REMOTE_CLASSES[hug2] != null){ hug3 = getRemoteInstanceFactoryForType(hug2, hug1); if(countProxyCreateInstanceArguments() == 2){ hug4 = remoteApplicationDomainProxy.createInstance((API_NAMESPACE + "." + hug2), hug3); }else if(countProxyCreateInstanceArguments() == 1){ hug4 = remoteApplicationDomainProxy.createInstance(API_NAMESPACE + "." + hug2); } Wrappers.copy(hug1, hug4); return hug4; }else{ return hug1; } } private static function countProxyCreateInstanceArguments():int { //dispID:9, MethodID:5401, LocalCount= 7 , MaxScope= 3, MaxStack= 4, CodeLength= 129 internal var remoteApplicationDomainProxyInstanceXml:XML; //slotID:1 remoteApplicationDomainProxyInstanceXml = null; if(remoteAppDomainProxyCreateInstanceArgumentsCount == 0){ remoteApplicationDomainProxyInstanceXml = describeType(remoteApplicationDomainProxy); remoteAppDomainProxyCreateInstanceArgumentsCount = remoteApplicationDomainProxyInstanceXml..method.(@name == "createInstance").parameter.length(); } return remoteAppDomainProxyCreateInstanceArgumentsCount; } private static function getRemoteInstanceFactoryForType(hug1:String, hug2:Object):Function { //dispID:10, MethodID:5403, LocalCount= 4 , MaxScope= 2, MaxStack= 3, CodeLength= 50 internal var typeName:String; //slotID:1 internal var localInstance:Object; //slotID:2 internal var factory:Object; //slotID:3 typeName = hug1; localInstance = hug2; factory = (LOCAL_TO_REMOTE_CLASSES[typeName] as Function); if(factory != null){ return function(hug1:Object):Object{ //MethodID:5402, LocalCount= 2 , MaxScope= 0, MaxStack= 3, CodeLength= 12 return factory(hug1, localInstance); }; } return null; } private static function getTypeName(hug1:Object):String { //dispID:11, MethodID:5404, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 21 var hug2:String = getQualifiedClassNameHelper(hug1); return getTypeNameFromFullyQualifiedName(hug2); } private static function getQualifiedClassNameHelper(hug1:*):String { //dispID:12, MethodID:5405, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 31 var hug2:String = getQualifiedClassName(hug1); if(hug2 == "com.google.ads.loader::ProxyObject") return remoteApplicationDomainProxy.getQualifiedClassNameOfProxyObject(hug1); return hug2; } private static function getTypeNameFromFullyQualifiedName(hug1:String):String { //dispID:13, MethodID:5406, LocalCount= 4 , MaxScope= 1, MaxStack= 2, CodeLength= 48 var hug2:Array = hug1.split("::"); var hug3:String = null; if(hug2.length == 2){ hug3 = hug2[1]; }else{ hug3 = hug2[0]; } return hug3; } private static function remoteDescribeType(hug1:Object):XML { //dispID:14, MethodID:5407, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 11 return remoteApplicationDomainProxy.describeTypeOfProxyObject(hug1); } private static function isProxyObject(hug1:Object):Boolean { //dispID:15, MethodID:5408, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 11 return remoteApplicationDomainProxy.isProxyObject(hug1); } private static function getWrapperType(hug1:XML, hug2:String):Object { //dispID:16, MethodID:5409, LocalCount= 4 , MaxScope= 1, MaxStack= 2, CodeLength= 31 var hug3:Object = getWrapperTypeByClass(hug2); if(!hug3) hug3 = getWrapperTypeByInterface(hug1); return hug3; } private static function getWrapperTypeByClass(hug1:String):Object { //dispID:17, MethodID:5410, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 10 return WRAPPED_CLASSES[hug1]; } private static function filterByNamespace(hug1:XML, hug2:String):Boolean { //dispID:18, MethodID:5411, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 15 return (hug1.@type.indexOf(hug2) == 0); } private static function getWrapperTypeByInterface(hug1:XML):Object { //dispID:19, MethodID:5412, LocalCount= 14 , MaxScope= 1, MaxStack= 3, CodeLength= 252 var hug4:XML = null; var hug5:Object = null; var hug6:uint = 0; var hug7:String = null; var hug8:String = null; var hug9:String = null; var hug10:Object = null; var hug11:uint = 0; var hug2:Array = []; var hug3:XMLList = getApiInterfaces(hug1); for each(hug4 in hug3){ hug8 = getTypeNameFromFullyQualifiedName(hug4); if(WRAPPED_INTERFACES[hug8]) hug2.push(hug8); } hug5 = null; hug6 = 0; for each(hug7 in hug2){ hug9 = (API_NAMESPACE + "." + hug7); hug10 = getLocalDefinition(hug9); hug11 = getImplementedInterfacesCount(hug10); if(!hug5 || (hug11 > hug6)){ hug5 = hug10; hug6 = hug11; } } if(hug5) return WRAPPED_INTERFACES[getTypeName(hug5)]; return null; } private static function getApiInterfaces(hug1:Object):XMLList { //dispID:20, MethodID:5413, LocalCount= 8 , MaxScope= 3, MaxStack= 3, CodeLength= 102 internal var interfacesSource:Object; //slotID:1 interfacesSource = hug1; return interfacesSource.implementsInterface.(filterByNamespace(valueOf(), API_NAMESPACE)).@type; } private static function getImplementedInterfacesCount(hug1:Object):uint { //dispID:21, MethodID:5414, LocalCount= 4 , MaxScope= 1, MaxStack= 3, CodeLength= 66 var hug2:XML = null; var hug3:XMLList = null; if(!INTERFACE_IMPLEMENTS_NUM_OF_INTERFACES[hug1]){ hug2 = describeType(hug1); hug3 = getApiInterfaces(hug2.factory); INTERFACE_IMPLEMENTS_NUM_OF_INTERFACES[hug1] = hug3.length(); } return INTERFACE_IMPLEMENTS_NUM_OF_INTERFACES[hug1]; } public static function getLocalDefinition(hug1:String):Object { //dispID:22, MethodID:5415, LocalCount= 4 , MaxScope= 5, MaxStack= 3, CodeLength= 75 internal var fullyQualifiedName:String; //slotID:1 internal var applicationDomain:ApplicationDomain; //slotID:2 fullyQualifiedName = hug1; applicationDomain = ApplicationDomain.currentDomain; if(applicationDomain.hasDefinition(fullyQualifiedName)){ try{ return applicationDomain.getDefinition(fullyQualifiedName); } catch(error:Error){ } } return null; } public static function copy(hug1:Object, hug2:Object):void { //dispID:23, MethodID:5416, LocalCount= 6 , MaxScope= 1, MaxStack= 5, CodeLength= 61 var hug3:String = null; for each(hug3 in getInstanceProperties(hug1)){ hug2[hug3] = localToRemote(hug1[hug3]); } } private static function getRemoteInstanceForWrapperLookup(hug1:Object):Object { //dispID:24, MethodID:5417, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 43 var hug2:Object = hug1; if(hug1 is Array){ if(hug1.length > 0){ hug2 = hug1[0]; }else{ hug2 = null; } } return hug2; } private static function getInstanceProperties(hug1:Object):Array { //dispID:25, MethodID:5418, LocalCount= 10 , MaxScope= 3, MaxStack= 3, CodeLength= 229 internal var instance:Object; //slotID:1 internal var typeXml:XML; //slotID:2 internal var propertyNames:Array; //slotID:3 internal var node:XML; //slotID:4 node = null; instance = hug1; typeXml = describeType(instance); propertyNames = []; for each(node in typeXml..variable){ propertyNames.push(node.@name); } var hug3:int = 0; var hug4:* = typeXml..accessor.(@access == "readwrite"); for each(node in hug4){ propertyNames.push(node.@name); } return propertyNames; } private static function adSlotRemoteInstanceFactory(hug1:Object, hug2:Object):Object { //dispID:26, MethodID:5419, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 14 return new hug1(hug2.width, hug2.height); } private static function defaultRemoteInstanceFactory(hug1:Object, hug2:Object):Object { //dispID:27, MethodID:5420, LocalCount= 3 , MaxScope= 1, MaxStack= 1, CodeLength= 6 return new hug1(); } //constructor public function Wrappers() { //MethodID:5421, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 super(); } } } //script540 package com.google.ads.instream.api{ //class(instance)_index:538 public interface Ad { //static constructor public static function Ad$cinit() { //MethodID:5423, LocalCount= 1 , MaxScope= 0, MaxStack= 0, CodeLength= 1 } //variables/etc. function get type():String; //MethodID:5424, dispID:0 function get id():String; //MethodID:5425, dispID:0 function get traffickingParameters():Object; //MethodID:5426, dispID:0 function get surveyUrl():String; //MethodID:5427, dispID:0 function getCompanionAdUrl(hug1:String, hug2:String=null):String; //MethodID:5428, dispID:0 //constructor public function Ad(); //MethodID:5429, dispID:0 } } //script541 package com.google.ads.instream.api{ //class(instance)_index:539 public class VideoAdBandwidth extends Object { //static constructor public static function VideoAdBandwidth$cinit() { //MethodID:5431, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 40 LOW = "low"; MEDIUM = "medium"; HIGH = "high"; DEFAULT = this.LOW; } //static variables/etc. public static const LOW:String = "low"; //slotID:1 public static const MEDIUM:String = "medium"; //slotID:2 public static const HIGH:String = "high"; //slotID:3 public static var DEFAULT:String = "low"; //slotID:4 //constructor public function VideoAdBandwidth() { //MethodID:5432, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 super(); } } } //script542 package com.google.ads.instream.api{ //class(instance)_index:540 public class VideoMimeTypes extends Object { //static constructor public static function VideoMimeTypes$cinit() { //MethodID:5434, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 37 FLV = "video/x-flv"; MP4 = "video/x-mp4"; DEFAULT_MIMETYPES = [this.FLV, this.MP4]; } //static variables/etc. public static const FLV:String = "video/x-flv"; //slotID:1 public static const MP4:String = "video/x-mp4"; //slotID:2 public static var DEFAULT_MIMETYPES:Array; //slotID:3 //constructor public function VideoMimeTypes() { //MethodID:5435, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 super(); } } } //script543 package com.google.ads.instream.api{ //class(instance)_index:541 public class VideoDeliveryTypes extends Object { //static constructor public static function VideoDeliveryTypes$cinit() { //MethodID:5437, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 31 STREAMING = "streaming"; PROGRESSIVE = "progressive"; DEFAULT = this.PROGRESSIVE; } //static variables/etc. public static const STREAMING:String = "streaming"; //slotID:1 public static const PROGRESSIVE:String = "progressive"; //slotID:2 public static var DEFAULT:String = "progressive"; //slotID:3 //constructor public function VideoDeliveryTypes() { //MethodID:5438, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 super(); } } } //script544 package com.google.ads.instream.api{ import flash.utils.Dictionary //class(instance)_index:542 public interface FlashAd implements Ad { //static constructor public static function FlashAd$cinit() { //MethodID:5440, LocalCount= 1 , MaxScope= 0, MaxStack= 0, CodeLength= 1 } //variables/etc. function get asset():FlashAsset; //MethodID:5441, dispID:0 function reportEvents():void; //MethodID:5442, dispID:0 function reportCustomKeysAndValues(hug1:Dictionary):void; //MethodID:5443, dispID:0 function enableManualEventsReporting():void; //MethodID:5444, dispID:0 //constructor public function FlashAd(); //MethodID:5445, dispID:0 } } //script545 //skip components :com.google.analytics.debug //as filename :_Style.as //script546 package org.osmf.media.pluginClasses{ //class(instance)_index:544 public class PluginLoadingState extends Object { //static constructor public static function PluginLoadingState$cinit() { //MethodID:5453, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 27 LOADING = this; LOADED = this; } //static variables/etc. public static const LOADING:PluginLoadingState; //slotID:1 public static const LOADED:PluginLoadingState; //slotID:2 //constructor public function PluginLoadingState(hug1:String) { //MethodID:5454, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 11 super(); this._state = hug1; } //variables/etc. private var _state:String; //slotID:0 public function get state():String { //MethodID:5455, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._state; } } } //script547 package org.osmf.media.pluginClasses{ import flash.display.Loader import org.osmf.events.MediaError import org.osmf.events.MediaErrorCodes import org.osmf.events.MediaErrorEvent import org.osmf.media.MediaFactory import org.osmf.media.MediaFactoryItem import org.osmf.media.PluginInfo import org.osmf.traits.LoadState import org.osmf.traits.LoadTrait import org.osmf.traits.LoaderBase import org.osmf.utils.Version //class(instance)_index:545 public class PluginLoader extends LoaderBase { //static constructor public static function PluginLoader$cinit() { //MethodID:5457, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 21 FRAMEWORK_VERSION_PROPERTY_NAME = "frameworkVersion"; IS_FRAMEWORK_VERSION_SUPPORTED_PROPERTY_NAME = "isFrameworkVersionSupported"; } //static variables/etc. private static const FRAMEWORK_VERSION_PROPERTY_NAME:String = "frameworkVersion";//slotID:1 private static const IS_FRAMEWORK_VERSION_SUPPORTED_PROPERTY_NAME:String = "isFrameworkVersionSupported";//slotID:2 //constructor public function PluginLoader(hug1:MediaFactory, hug2:String) { //MethodID:5458, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 16 super(); this.mediaFactory = hug1; this.minimumSupportedFrameworkVersion = hug2; } //variables/etc. private var mediaFactory:MediaFactory; //slotID:0 private var minimumSupportedFrameworkVersion:String; //slotID:0 protected function unloadFromPluginInfo(hug1:PluginInfo):void { //MethodID:5459, LocalCount= 5 , MaxScope= 1, MaxStack= 2, CodeLength= 85 var hug2:int = 0; var hug3:MediaFactoryItem = null; var hug4:MediaFactoryItem = null; if(hug1 != null){ hug2 = 0; while(hug2 < hug1.numMediaFactoryItems){ hug3 = hug1.getMediaFactoryItemAt(hug2); hug4 = this.mediaFactory.getItemById(hug3.id); if(hug4 != null) this.mediaFactory.removeItem(hug4); hug2++; } } } protected function loadFromPluginInfo(hug1:LoadTrait, hug2:PluginInfo, hug3:Loader=null):void { //MethodID:5460, LocalCount= 6 , MaxScope= 5, MaxStack= 7, CodeLength= 442 internal var loadTrait:LoadTrait; //slotID:1 internal var pluginInfo:PluginInfo; //slotID:2 internal var loader:Loader = null; //slotID:3 internal var invalidImplementation:Boolean; //slotID:4 internal var passedMediaFactory:MediaFactory; //slotID:5 internal var i:int; //slotID:6 internal var pluginLoadTrait:PluginLoadTrait; //slotID:7 internal var item:MediaFactoryItem; //slotID:8 passedMediaFactory = null; i = 0; pluginLoadTrait = null; item = null; loadTrait = hug1; pluginInfo = hug2; loader = hug3; invalidImplementation = false; if(pluginInfo != null){ if(this.isPluginCompatible(pluginInfo)){ try{ passedMediaFactory = (loadTrait.resource.getMetadataValue(PluginInfo.PLUGIN_MEDIAFACTORY_NAMESPACE) as MediaFactory); if(passedMediaFactory == null) loadTrait.resource.addMetadataValue(PluginInfo.PLUGIN_MEDIAFACTORY_NAMESPACE, this.mediaFactory); pluginInfo.initializePlugin(loadTrait.resource); i = 0; while(i < pluginInfo.numMediaFactoryItems){ item = pluginInfo.getMediaFactoryItemAt(i); if(item == null) throw new RangeError(); this.mediaFactory.addItem(item); i++; } pluginLoadTrait = (loadTrait as PluginLoadTrait); pluginLoadTrait.pluginInfo = pluginInfo; pluginLoadTrait.loader = loader; updateLoadTrait(pluginLoadTrait, LoadState.READY); } catch(error:RangeError){ invalidImplementation = true; } }else{ updateLoadTrait(loadTrait, LoadState.LOAD_ERROR); loadTrait.dispatchEvent(new MediaErrorEvent(MediaErrorEvent.MEDIA_ERROR, false, false, new MediaError(MediaErrorCodes.PLUGIN_VERSION_INVALID))); } }else{ invalidImplementation = true; } if(invalidImplementation){ updateLoadTrait(loadTrait, LoadState.LOAD_ERROR); loadTrait.dispatchEvent(new MediaErrorEvent(MediaErrorEvent.MEDIA_ERROR, false, false, new MediaError(MediaErrorCodes.PLUGIN_IMPLEMENTATION_INVALID))); } } protected function isPluginCompatible(hug1:Object):Boolean { //MethodID:5461, LocalCount= 4 , MaxScope= 5, MaxStack= 4, CodeLength= 177 internal var pluginInfo:Object; //slotID:1 internal var isCompatible:Boolean; //slotID:2 internal var version:String; //slotID:3 internal var isSupported:Boolean; //slotID:4 internal var versionSupportedFunction:Function; //slotID:5 versionSupportedFunction = null; pluginInfo = hug1; isCompatible = false; version = (pluginInfo.hasOwnProperty(FRAMEWORK_VERSION_PROPERTY_NAME) ? pluginInfo[FRAMEWORK_VERSION_PROPERTY_NAME] : null); isSupported = this.isPluginVersionSupported(version); if(isSupported){ versionSupportedFunction = (pluginInfo.hasOwnProperty(IS_FRAMEWORK_VERSION_SUPPORTED_PROPERTY_NAME) ? (pluginInfo[IS_FRAMEWORK_VERSION_SUPPORTED_PROPERTY_NAME] as Function) : null); if(versionSupportedFunction != null){ try{ isCompatible = versionSupportedFunction(Version.version); } catch(error:Error){ } } } return isCompatible; } private function isPluginVersionSupported(hug1:String):Boolean { //MethodID:5462, LocalCount= 4 , MaxScope= 1, MaxStack= 2, CodeLength= 89 if((hug1 == null) || (hug1.length == 0)) return false; var hug2:Object = VersionUtils.parseVersionString(this.minimumSupportedFrameworkVersion); var hug3:Object = VersionUtils.parseVersionString(hug1); return ((hug3.major > hug2.major) || ((hug3.major == hug2.major) && (hug3.minor >= hug2.minor))); } } } //script548 package org.osmf.media.pluginClasses{ import org.osmf.media.MediaFactory import org.osmf.media.MediaResourceBase import org.osmf.media.PluginInfo import org.osmf.media.PluginInfoResource import org.osmf.traits.LoadState import org.osmf.traits.LoadTrait //class(instance)_index:546 public class StaticPluginLoader extends PluginLoader { //static constructor public static function StaticPluginLoader$cinit() { //MethodID:5464, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function StaticPluginLoader(hug1:MediaFactory, hug2:String) { //MethodID:5465, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 8 super(hug1, hug2); } //variables/etc. override public function canHandleResource(hug1:MediaResourceBase):Boolean { //MethodID:5466, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 return (hug1 is PluginInfoResource); } override protected function executeLoad(hug1:LoadTrait):void { //MethodID:5467, LocalCount= 4 , MaxScope= 1, MaxStack= 3, CodeLength= 46 updateLoadTrait(hug1, LoadState.LOADING); var hug2:PluginInfoResource = (hug1.resource as PluginInfoResource); var hug3:PluginInfo = hug2.pluginInfo; loadFromPluginInfo(hug1, hug3); } override protected function executeUnload(hug1:LoadTrait):void { //MethodID:5468, LocalCount= 4 , MaxScope= 1, MaxStack= 3, CodeLength= 56 var hug2:PluginLoadTrait = (hug1 as PluginLoadTrait); var hug3:PluginInfo = hug2.pluginInfo; updateLoadTrait(hug1, LoadState.UNLOADING); unloadFromPluginInfo(hug3); updateLoadTrait(hug1, LoadState.UNINITIALIZED); } } } //script549 package org.osmf.media.pluginClasses{ import flash.display.DisplayObject import org.osmf.elements.SWFLoader import org.osmf.elements.loaderClasses.LoaderLoadTrait import org.osmf.events.LoaderEvent import org.osmf.events.MediaErrorEvent import org.osmf.media.MediaFactory import org.osmf.media.MediaResourceBase import org.osmf.media.PluginInfo import org.osmf.traits.LoadState import org.osmf.traits.LoadTrait //class(instance)_index:547 public class DynamicPluginLoader extends PluginLoader { //static constructor public static function DynamicPluginLoader$cinit() { //MethodID:5470, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 12 PLUGININFO_PROPERTY_NAME = "pluginInfo"; } //static variables/etc. private static const PLUGININFO_PROPERTY_NAME:String = "pluginInfo";//slotID:1 //constructor public function DynamicPluginLoader(hug1:MediaFactory, hug2:String) { //MethodID:5471, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 8 super(hug1, hug2); } //variables/etc. override public function canHandleResource(hug1:MediaResourceBase):Boolean { //MethodID:5472, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 15 return new SWFLoader().canHandleResource(hug1); } override protected function executeLoad(hug1:LoadTrait):void { //MethodID:5475, LocalCount= 3 , MaxScope= 2, MaxStack= 4, CodeLength= 176 internal var loadTrait:LoadTrait; //slotID:1 internal var swfLoader:SWFLoader; //slotID:2 internal var loaderLoadTrait:LoaderLoadTrait; //slotID:3 internal var onSWFLoaderStateChange:Function; //slotID:4 internal var onLoadError:Function; //slotID:5 swfLoader = null; loaderLoadTrait = null; onSWFLoaderStateChange = null; onLoadError = null; loadTrait = hug1; onSWFLoaderStateChange = function(hug1:LoaderEvent):void{ //MethodID:5473, LocalCount= 4 , MaxScope= 0, MaxStack= 4, CodeLength= 148 var hug2:DisplayObject = null; var hug3:PluginInfo = null; if(hug1.newState == LoadState.READY){ swfLoader.removeEventListener(LoaderEvent.LOAD_STATE_CHANGE, onSWFLoaderStateChange); loaderLoadTrait.removeEventListener(MediaErrorEvent.MEDIA_ERROR, onLoadError); hug2 = loaderLoadTrait.loader.content; hug3 = (hug2[PLUGININFO_PROPERTY_NAME] as PluginInfo); loadFromPluginInfo(loadTrait, hug3, loaderLoadTrait.loader); }else if(hug1.newState == LoadState.LOAD_ERROR){ swfLoader.removeEventListener(LoaderEvent.LOAD_STATE_CHANGE, onSWFLoaderStateChange); updateLoadTrait(loadTrait, hug1.newState); } }; onLoadError = function(hug1:MediaErrorEvent):void{ //MethodID:5474, LocalCount= 2 , MaxScope= 0, MaxStack= 3, CodeLength= 29 loaderLoadTrait.removeEventListener(MediaErrorEvent.MEDIA_ERROR, onLoadError); loadTrait.dispatchEvent(hug1.clone()); }; updateLoadTrait(loadTrait, LoadState.LOADING); swfLoader = new SWFLoader(true); swfLoader.validateLoadedContentFunction = this.validateLoadedContent; swfLoader.addEventListener(LoaderEvent.LOAD_STATE_CHANGE, onSWFLoaderStateChange); loaderLoadTrait = new LoaderLoadTrait(swfLoader, loadTrait.resource); loaderLoadTrait.addEventListener(MediaErrorEvent.MEDIA_ERROR, onLoadError); swfLoader.load(loaderLoadTrait); } override protected function executeUnload(hug1:LoadTrait):void { //MethodID:5476, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 59 updateLoadTrait(hug1, LoadState.UNLOADING); var hug2:PluginLoadTrait = (hug1 as PluginLoadTrait); unloadFromPluginInfo(hug2.pluginInfo); hug2.loader.unloadAndStop(); updateLoadTrait(hug1, LoadState.UNINITIALIZED); } private function validateLoadedContent(hug1:DisplayObject):Boolean { //MethodID:5477, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 54 var hug2:Object = (hug1.hasOwnProperty(PLUGININFO_PROPERTY_NAME) ? hug1[PLUGININFO_PROPERTY_NAME] : null); return ((hug2 != null) ? isPluginCompatible(hug2) : false); } } } //script550 package org.osmf.media.pluginClasses{ import org.osmf.media.LoadableElementBase import org.osmf.media.MediaResourceBase import org.osmf.traits.LoadTrait import org.osmf.traits.LoaderBase //class(instance)_index:548 public class PluginElement extends LoadableElementBase { //static constructor public static function PluginElement$cinit() { //MethodID:5479, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function PluginElement(hug1:PluginLoader, hug2:MediaResourceBase=null) { //MethodID:5480, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 8 super(hug2, hug1); } //variables/etc. override protected function createLoadTrait(hug1:MediaResourceBase, hug2:LoaderBase):LoadTrait { //MethodID:5481, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 12 return new PluginLoadTrait(hug2, hug1); } } } //script551 package org.osmf.media.pluginClasses{ import flash.display.Loader import org.osmf.media.MediaResourceBase import org.osmf.media.PluginInfo import org.osmf.traits.LoadTrait import org.osmf.traits.LoaderBase //class(instance)_index:549 public class PluginLoadTrait extends LoadTrait { //static constructor public static function PluginLoadTrait$cinit() { //MethodID:5483, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function PluginLoadTrait(hug1:LoaderBase, hug2:MediaResourceBase) { //MethodID:5484, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 8 super(hug1, hug2); } //variables/etc. private var _pluginInfo:PluginInfo; //slotID:0 private var _loader:Loader; //slotID:0 public function get pluginInfo():PluginInfo { //MethodID:5485, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._pluginInfo; } public function set pluginInfo(hug1:PluginInfo):void { //MethodID:5486, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this._pluginInfo = hug1; } public function get loader():Loader { //MethodID:5487, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._loader; } public function set loader(hug1:Loader):void { //MethodID:5488, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this._loader = hug1; } } } //script552 package org.osmf.media.pluginClasses{ import org.osmf.media.MediaElement //class(instance)_index:550 public class PluginEntry extends Object { //static constructor public static function PluginEntry$cinit() { //MethodID:5490, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function PluginEntry(hug1:MediaElement, hug2:PluginLoadingState) { //MethodID:5491, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 16 super(); this._pluginElement = hug1; this._state = hug2; } //variables/etc. private var _pluginElement:MediaElement; //slotID:0 private var _state:PluginLoadingState; //slotID:0 public function get pluginElement():MediaElement { //MethodID:5492, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._pluginElement; } public function get state():PluginLoadingState { //MethodID:5493, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._state; } public function set state(hug1:PluginLoadingState):void { //MethodID:5494, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this._state = hug1; } } } //script553 package org.osmf.events{ import flash.events.Event import flash.net.NetConnection import org.osmf.media.URLResource //class(instance)_index:551 public class NetConnectionFactoryEvent extends Event { //static constructor public static function NetConnectionFactoryEvent$cinit() { //MethodID:5496, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 21 CREATION_COMPLETE = "creationComplete"; CREATION_ERROR = "creationError"; } //static variables/etc. public static const CREATION_COMPLETE:String = "creationComplete";//slotID:1 public static const CREATION_ERROR:String = "creationError"; //slotID:2 //constructor public function NetConnectionFactoryEvent(hug1:String, hug2:Boolean=false, hug3:Boolean=false, hug4:NetConnection=null, hug5:URLResource=null, hug6:MediaError=null) { //MethodID:5497, LocalCount= 7 , MaxScope= 1, MaxStack= 4, CodeLength= 27 super(hug1, hug2, hug3); this._netConnection = hug4; this._resource = hug5; this._mediaError = hug6; } //variables/etc. private var _mediaError:MediaError; //slotID:0 private var _resource:URLResource; //slotID:0 private var _netConnection:NetConnection; //slotID:0 public function get netConnection():NetConnection { //MethodID:5498, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._netConnection; } public function get resource():URLResource { //MethodID:5499, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._resource; } public function get mediaError():MediaError { //MethodID:5500, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._mediaError; } override public function clone():Event { //MethodID:5501, LocalCount= 1 , MaxScope= 1, MaxStack= 7, CodeLength= 31 return new NetConnectionFactoryEvent(type, bubbles, cancelable, this._netConnection, this._resource, this._mediaError); } } } //script554 package org.osmf.media{ //class(instance)_index:552 public final class MediaType extends Object { //static constructor public static function MediaType$cinit() { //MethodID:5503, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 39 VIDEO = "video"; AUDIO = "audio"; IMAGE = "image"; SWF = "swf"; } //static variables/etc. public static const VIDEO:String = "video"; //slotID:1 public static const AUDIO:String = "audio"; //slotID:2 public static const IMAGE:String = "image"; //slotID:3 public static const SWF:String = "swf"; //slotID:4 //constructor public function MediaType() { //MethodID:5504, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 super(); } } } //script555 package org.osmf.utils{ //class(instance)_index:553 public class URL extends Object { //static constructor public static function URL$cinit() { //MethodID:5506, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function URL(hug1:String) { //MethodID:5507, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 85 super(); this._rawUrl = hug1; this._protocol = ""; this._userInfo = ""; this._host = ""; this._port = ""; this._path = ""; this._query = ""; this._fragment = ""; if((this._rawUrl != null) && (this._rawUrl.length > 0)) this.parseUrl(); } //variables/etc. private var _path:String; //slotID:0 private var _rawUrl:String; //slotID:0 private var _host:String; //slotID:0 private var _query:String; //slotID:0 private var _port:String; //slotID:0 private var _fragment:String; //slotID:0 private var _protocol:String; //slotID:0 private var _userInfo:String; //slotID:0 public function get rawUrl():String { //MethodID:5508, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._rawUrl; } public function get protocol():String { //MethodID:5509, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._protocol; } public function set protocol(hug1:String):void { //MethodID:5510, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 40 if(hug1 != null){ this._protocol = hug1.replace(new RegExp(":\/?\/?$"), ""); this._protocol = this._protocol.toLowerCase(); } } public function get userInfo():String { //MethodID:5511, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._userInfo; } public function set userInfo(hug1:String):void { //MethodID:5512, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 28 if(hug1 != null) this._userInfo = hug1.replace(new RegExp("@$"), ""); } public function get host():String { //MethodID:5513, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._host; } public function set host(hug1:String):void { //MethodID:5514, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this._host = hug1; } public function get port():String { //MethodID:5515, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._port; } public function set port(hug1:String):void { //MethodID:5516, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 28 if(hug1 != null) this._port = hug1.replace(new RegExp("(:)"), ""); } public function get path():String { //MethodID:5517, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._path; } public function set path(hug1:String):void { //MethodID:5518, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 28 if(hug1 != null) this._path = hug1.replace(new RegExp("^\/"), ""); } public function get query():String { //MethodID:5519, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._query; } public function set query(hug1:String):void { //MethodID:5520, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 28 if(hug1 != null) this._query = hug1.replace(new RegExp("^\?"), ""); } public function get fragment():String { //MethodID:5521, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._fragment; } public function set fragment(hug1:String):void { //MethodID:5522, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 28 if(hug1 != null) this._fragment = hug1.replace(new RegExp("^#"), ""); } public function toString():String { //MethodID:5523, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._rawUrl; } public function getParamValue(hug1:String):String { //MethodID:5524, LocalCount= 5 , MaxScope= 1, MaxStack= 3, CodeLength= 73 if(this._query == null) return ""; var hug2:RegExp = new RegExp(("[/?&]*" + hug1 + "=([^&#]*)"), "i"); var hug3:Array = this._query.match(hug2); var hug4:String = ((hug3 == null) ? "" : hug3[1]); return hug4; } public function get absolute():Boolean { //MethodID:5525, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 11 return (this.protocol != ""); } public function get extension():String { //MethodID:5526, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 38 var hug1:int = this.path.lastIndexOf("."); if(hug1 != (-1)) return this.path.substr(hug1 + 1); return ""; } private function parseUrl():void { //MethodID:5527, LocalCount= 7 , MaxScope= 1, MaxStack= 3, CodeLength= 333 var hug1:RegExp = null; var hug2:Array = null; var hug3:String = null; var hug4:RegExp = null; var hug5:Array = null; var hug6:String = null; if((this._rawUrl == null) || (this._rawUrl.length == 0)) return; if((this._rawUrl.search(new RegExp(":\/")) == (-1)) && (this._rawUrl.indexOf(":") != (this._rawUrl.length - 1))){ this.path = this._rawUrl; }else{ hug1 = new RegExp("^(rtmp|rtmp[tse]|rtmp\bte\b)(:\/[^\/])", "i"); hug2 = this._rawUrl.match(hug1); hug3 = this._rawUrl; if(hug2 != null) hug3 = this._rawUrl.replace(new RegExp(":\/"), "://localhost/"); hug4 = new RegExp("^([a-z+\w\+\.\-]+:\/?\/?)?([^\/?#]*)?(\/[^?#]*)?(\?[^#]*)?(\#.*)?", "i"); hug5 = hug3.match(hug4); if(hug5 != null){ this.protocol = hug5[1]; hug6 = hug5[2]; this.path = hug5[3]; this.query = hug5[4]; this.fragment = hug5[5]; hug4 = new RegExp("^([!-~]+@)?([^\/?#:]*)(:[\d]*)?", "i"); hug5 = hug6.match(hug4); if(hug5 != null){ this.userInfo = hug5[1]; this.host = hug5[2]; this.port = hug5[3]; } } } } } } //script556 package org.osmf.net{ import __AS3__.vec.Vector import flash.utils.ByteArray import org.osmf.media.URLResource //class(instance)_index:554 public class StreamingURLResource extends URLResource { //static constructor public static function StreamingURLResource$cinit() { //MethodID:5529, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function StreamingURLResource(hug1:String, hug2:String=null, hug3:Number=Number.NaN, hug4:Number=Number.NaN, hug5:Vector.=null, hug6:Boolean=false, hug7:ByteArray=null, hug8:String=null, hug9:String=null) { //MethodID:5530, LocalCount= 10 , MaxScope= 1, MaxStack= 3, CodeLength= 67 this._streamType = (hug2 || StreamType.RECORDED); this._clipStartTime = hug3; this._clipEndTime = hug4; this._urlIncludesFMSApplicationInstance = hug6; this._drmContentData = hug7; this._connectionArguments = hug5; this._rtmfpGroupspec = hug8; this._rtmfpStreamName = hug9; super(hug1); } //variables/etc. private var _drmContentData:ByteArray; //slotID:0 private var _rtmfpStreamName:String; //slotID:0 private var _streamType:String; //slotID:0 private var _urlIncludesFMSApplicationInstance:Boolean = false; //slotID:0 private var _clipEndTime:Number; //slotID:0 private var _clipStartTime:Number; //slotID:0 private var _connectionArguments:Vector.; //slotID:0 private var _rtmfpGroupspec:String; //slotID:0 public function get streamType():String { //MethodID:5531, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._streamType; } public function set streamType(hug1:String):void { //MethodID:5532, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this._streamType = hug1; } public function get clipStartTime():Number { //MethodID:5533, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._clipStartTime; } public function set clipStartTime(hug1:Number):void { //MethodID:5534, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this._clipStartTime = hug1; } public function get clipEndTime():Number { //MethodID:5535, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._clipEndTime; } public function set clipEndTime(hug1:Number):void { //MethodID:5536, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this._clipEndTime = hug1; } public function get connectionArguments():Vector. { //MethodID:5537, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._connectionArguments; } public function set connectionArguments(hug1:Vector.):void { //MethodID:5538, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this._connectionArguments = hug1; } public function get drmContentData():ByteArray { //MethodID:5539, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._drmContentData; } public function set drmContentData(hug1:ByteArray):void { //MethodID:5540, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this._drmContentData = hug1; } public function get urlIncludesFMSApplicationInstance():Boolean { //MethodID:5541, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._urlIncludesFMSApplicationInstance; } public function set urlIncludesFMSApplicationInstance(hug1:Boolean):void { //MethodID:5542, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this._urlIncludesFMSApplicationInstance = hug1; } public function get rtmfpGroupspec():String { //MethodID:5543, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._rtmfpGroupspec; } public function set rtmfpGroupspec(hug1:String):void { //MethodID:5544, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this._rtmfpGroupspec = hug1; } public function get rtmfpStreamName():String { //MethodID:5545, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._rtmfpStreamName; } public function set rtmfpStreamName(hug1:String):void { //MethodID:5546, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this._rtmfpStreamName = hug1; } } } //script557 package org.osmf.net{ import __AS3__.vec.Vector import org.osmf.utils.OSMFStrings //class(instance)_index:555 public class DynamicStreamingResource extends StreamingURLResource { //static constructor public static function DynamicStreamingResource$cinit() { //MethodID:5548, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function DynamicStreamingResource(hug1:String, hug2:String=null) { //MethodID:5549, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 14 super(hug1, hug2); this._initialIndex = 0; } //variables/etc. private var _streamItems:Vector.; //slotID:0 private var _initialIndex:int; //slotID:0 public function get host():String { //MethodID:5550, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 return url; } public function get streamItems():Vector. { //MethodID:5551, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 30 if(this._streamItems == null) this._streamItems = new Vector.(); return this._streamItems; } public function set streamItems(hug1:Vector.):void { //MethodID:5552, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 23 this._streamItems = hug1; if(hug1 != null) hug1.sort(this.compareStreamItems); } public function get initialIndex():int { //MethodID:5553, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._initialIndex; } public function set initialIndex(hug1:int):void { //MethodID:5554, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 54 if((this._streamItems == null) || (hug1 >= this._streamItems.length)) throw new RangeError(OSMFStrings.getString(OSMFStrings.INVALID_PARAM)); this._initialIndex = hug1; } internal function indexFromName(hug1:String):int { //MethodID:5555, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 81 var hug2:int = 0; while(hug2 < this._streamItems.length){ if((this._streamItems[hug2].streamName.indexOf(hug1) == 0) || (this._streamItems[hug2].streamName.indexOf("mp4:" + hug1) == 0)) return hug2; hug2++; } return -1; } private function compareStreamItems(hug1:DynamicStreamingItem, hug2:DynamicStreamingItem):Number { //MethodID:5556, LocalCount= 4 , MaxScope= 1, MaxStack= 2, CodeLength= 44 var hug3:Number = -1; if(hug1.bitrate == hug2.bitrate){ hug3 = 0; }else if(hug1.bitrate > hug2.bitrate){ hug3 = 1; } return hug3; } } } //script558 package org.osmf.net{ import __AS3__.vec.Vector import flash.net.NetConnection import flash.utils.Dictionary import org.osmf.events.NetConnectionFactoryEvent import org.osmf.media.URLResource import org.osmf.utils.URL //class(instance)_index:556 public class NetConnectionFactory extends NetConnectionFactoryBase { //static constructor public static function NetConnectionFactory$cinit() { //MethodID:5558, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 119 DEFAULT_PORTS = "1935,443,80"; DEFAULT_PROTOCOLS_FOR_RTMP = "rtmp,rtmps,rtmpt"; DEFAULT_PROTOCOLS_FOR_RTMPE = "rtmpe,rtmpte"; PROTOCOL_RTMP = "rtmp"; PROTOCOL_RTMPS = "rtmps"; PROTOCOL_RTMPT = "rtmpt"; PROTOCOL_RTMPE = "rtmpe"; PROTOCOL_RTMPTE = "rtmpte"; PROTOCOL_HTTP = "http"; PROTOCOL_HTTPS = "https"; PROTOCOL_FILE = "file"; PROTOCOL_EMPTY = ""; MP3_EXTENSION = ".mp3"; } //static variables/etc. private static const DEFAULT_PORTS:String = "1935,443,80"; //slotID:1 private static const DEFAULT_PROTOCOLS_FOR_RTMP:String = "rtmp,rtmps,rtmpt";//slotID:2 private static const DEFAULT_PROTOCOLS_FOR_RTMPE:String = "rtmpe,rtmpte";//slotID:3 private static const PROTOCOL_RTMP:String = "rtmp"; //slotID:4 private static const PROTOCOL_RTMPS:String = "rtmps"; //slotID:5 private static const PROTOCOL_RTMPT:String = "rtmpt"; //slotID:6 private static const PROTOCOL_RTMPE:String = "rtmpe"; //slotID:7 private static const PROTOCOL_RTMPTE:String = "rtmpte"; //slotID:8 private static const PROTOCOL_HTTP:String = "http"; //slotID:9 private static const PROTOCOL_HTTPS:String = "https"; //slotID:10 private static const PROTOCOL_FILE:String = "file"; //slotID:11 private static const PROTOCOL_EMPTY:String = ""; //slotID:12 private static const MP3_EXTENSION:String = ".mp3"; //slotID:13 //constructor public function NetConnectionFactory(hug1:Boolean=true) { //MethodID:5559, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 11 super(); this.shareNetConnections = hug1; } //variables/etc. private var keyDictionary:Dictionary; //slotID:0 private var negotiator:NetNegotiator; //slotID:0 private var pendingDictionary:Dictionary; //slotID:0 private var shareNetConnections:Boolean; //slotID:0 private var connectionDictionary:Dictionary; //slotID:0 override public function create(hug1:URLResource):void { //MethodID:5562, LocalCount= 5 , MaxScope= 2, MaxStack= 7, CodeLength= 542 internal var resource:URLResource; //slotID:1 internal var key:String; //slotID:2 internal var sharedConnection:SharedConnection; //slotID:3 internal var connectionsUnderway:Vector.; //slotID:4 internal var pendingConnections:Vector.; //slotID:5 internal var urlIncludesFMSApplicationInstance:Boolean; //slotID:6 internal var netConnectionURLs:Vector.; //slotID:7 internal var netConnections:Vector.; //slotID:8 internal var j:int; //slotID:9 internal var negotiator:NetNegotiator; //slotID:10 internal var onConnected:Function; //slotID:11 internal var onConnectionFailed:Function; //slotID:12 key = null; pendingConnections = null; urlIncludesFMSApplicationInstance = false; netConnectionURLs = null; netConnections = null; j = 0; negotiator = null; onConnected = null; onConnectionFailed = null; resource = hug1; key = this.createNetConnectionKey(resource); if(this.connectionDictionary == null){ this.connectionDictionary = new Dictionary(); this.keyDictionary = new Dictionary(); this.pendingDictionary = new Dictionary(); } sharedConnection = (this.connectionDictionary[key] as SharedConnection); connectionsUnderway = (this.pendingDictionary[key] as Vector.); if((sharedConnection != null) && this.shareNetConnections){ sharedConnection.count++; dispatchEvent(new NetConnectionFactoryEvent(NetConnectionFactoryEvent.CREATION_COMPLETE, false, false, sharedConnection.netConnection, resource)); }else if(connectionsUnderway != null){ connectionsUnderway.push(resource); }else{ onConnected = function(hug1:NetConnectionFactoryEvent):void{ //MethodID:5560, LocalCount= 11 , MaxScope= 0, MaxStack= 7, CodeLength= 310 var hug5:NetConnectionFactoryEvent = null; var hug6:URLResource = null; var hug7:SharedConnection = null; var hug8:SharedConnection = null; negotiator.removeEventListener(NetConnectionFactoryEvent.CREATION_COMPLETE, onConnected); negotiator.removeEventListener(NetConnectionFactoryEvent.CREATION_ERROR, onConnectionFailed); var hug2:Vector. = new Vector.(); var hug3:Vector. = pendingDictionary[key]; var hug4:Number = 0; while(hug4 < hug3.length){ hug6 = (hug3[hug4] as URLResource); if(shareNetConnections){ hug7 = (connectionDictionary[key] as SharedConnection); if(hug7 != null){ hug7.count++; }else{ hug8 = new SharedConnection(); hug8.count = 1; hug8.netConnection = hug1.netConnection; connectionDictionary[key] = hug8; keyDictionary[hug8.netConnection] = key; } } hug2.push(new NetConnectionFactoryEvent(NetConnectionFactoryEvent.CREATION_COMPLETE, false, false, hug1.netConnection, hug6)); hug4++; } delete pendingDictionary[key]; for each(hug5 in hug2){ dispatchEvent(hug5); } }; onConnectionFailed = function(hug1:NetConnectionFactoryEvent):void{ //MethodID:5561, LocalCount= 6 , MaxScope= 0, MaxStack= 8, CodeLength= 120 var hug3:URLResource = null; negotiator.removeEventListener(NetConnectionFactoryEvent.CREATION_COMPLETE, onConnected); negotiator.removeEventListener(NetConnectionFactoryEvent.CREATION_ERROR, onConnectionFailed); var hug2:Vector. = pendingDictionary[key]; for each(hug3 in hug2){ dispatchEvent(new NetConnectionFactoryEvent(NetConnectionFactoryEvent.CREATION_ERROR, false, false, null, hug3, hug1.mediaError)); } delete pendingDictionary[key]; }; pendingConnections = new Vector.(); pendingConnections.push(resource); this.pendingDictionary[key] = pendingConnections; urlIncludesFMSApplicationInstance = ((resource is StreamingURLResource) ? StreamingURLResource(resource).urlIncludesFMSApplicationInstance : false); netConnectionURLs = this.createNetConnectionURLs(resource.url, urlIncludesFMSApplicationInstance); netConnections = new Vector.(); j = 0; while(j < netConnectionURLs.length){ netConnections.push(this.createNetConnection()); j++; } negotiator = new NetNegotiator(); negotiator.addEventListener(NetConnectionFactoryEvent.CREATION_COMPLETE, onConnected); negotiator.addEventListener(NetConnectionFactoryEvent.CREATION_ERROR, onConnectionFailed); negotiator.createNetConnection(resource, netConnectionURLs, netConnections); } } override public function closeNetConnection(hug1:NetConnection):void { //MethodID:5563, LocalCount= 6 , MaxScope= 1, MaxStack= 2, CodeLength= 118 var hug2:String = null; var hug3:SharedConnection = null; if(this.shareNetConnections){ hug2 = (this.keyDictionary[hug1] as String); if(hug2 != null){ hug3 = (this.connectionDictionary[hug2] as SharedConnection); hug3.count--; if(hug3.count == 0){ hug1.close(); delete this.connectionDictionary[hug2]; delete this.keyDictionary[hug1]; } } }else{ super.closeNetConnection(hug1); } } protected function createNetConnectionKey(hug1:URLResource):String { //MethodID:5564, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 42 var hug2:FMSURL = new FMSURL(hug1.url); return (hug2.protocol + hug2.host + hug2.port + hug2.appName + hug2.instanceName); } protected function createNetConnection():NetConnection { //MethodID:5565, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 10 return new NetConnection(); } protected function createNetConnectionURLs(hug1:String, hug2:Boolean=false):Vector. { //MethodID:5566, LocalCount= 8 , MaxScope= 1, MaxStack= 5, CodeLength= 83 var hug5:PortProtocol = null; var hug3:Vector. = new Vector.(); var hug4:Vector. = this.buildPortProtocolSequence(hug1); for each(hug5 in hug4){ hug3.push(this.buildConnectionAddress(hug1, hug2, hug5)); } return hug3; } private function buildPortProtocolSequence(hug1:String):Vector. { //MethodID:5567, LocalCount= 12 , MaxScope= 1, MaxStack= 3, CodeLength= 343 var hug9:int = 0; var hug10:PortProtocol = null; var hug2:Vector. = new Vector.(); var hug3:URL = new URL(hug1); var hug4:String = ((hug3.port == "") ? DEFAULT_PORTS : hug3.port); var hug5:String = ""; switch(hug3.protocol){ case PROTOCOL_RTMP: hug5 = PROTOCOL_RTMP; break; case PROTOCOL_RTMPE: hug5 = DEFAULT_PROTOCOLS_FOR_RTMPE; break; case PROTOCOL_RTMPS: case PROTOCOL_RTMPT: case PROTOCOL_RTMPTE: hug5 = hug3.protocol; break; default: break; } var hug6:Array = hug4.split(","); var hug7:Array = hug5.split(","); var hug8:int = 0; while(hug8 < hug7.length){ hug9 = 0; while(hug9 < hug6.length){ hug10 = new PortProtocol(); hug10.protocol = hug7[hug8]; hug10.port = hug6[hug9]; hug2.push(hug10); hug9++; } hug8++; } return hug2; } private function buildConnectionAddress(hug1:String, hug2:Boolean, hug3:PortProtocol):String { //MethodID:5568, LocalCount= 6 , MaxScope= 1, MaxStack= 3, CodeLength= 113 var hug4:FMSURL = new FMSURL(hug1, hug2); var hug5:String = ((hug3.protocol + "://" + hug4.host + ":" + hug3.port + "/" + hug4.appName) + (hug4.useInstance ? ("/" + hug4.instanceName) : "")); if((hug4.query != null) && (hug4.query != "")){ } return (hug5 + "/"); } } } import flash.net.NetConnection //class(instance)_index:557 //private class SharedConnection extends Object { //static constructor public static function SharedConnection$cinit() { //MethodID:5569, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function SharedConnection() { //MethodID:5570, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 super(); } //variables/etc. public var netConnection:NetConnection; //slotID:0 public var count:Number; //slotID:0 } //script559 package org.osmf.media{ import __AS3__.vec.Vector //class(instance)_index:558 public class MediaTypeUtil extends Object { //static constructor public static function MediaTypeUtil$cinit() { //MethodID:5572, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 27 METADATA_MATCH_FOUND = 0; METADATA_CONFLICTS_FOUND = 1; METADATA_MATCH_UNKNOWN = 2; } //static variables/etc. public static const METADATA_MATCH_FOUND:int = 0; //slotID:1 public static const METADATA_CONFLICTS_FOUND:int = 1; //slotID:2 public static const METADATA_MATCH_UNKNOWN:int = 2; //slotID:3 public static function checkMetadataMatchWithResource(hug1:MediaResourceBase, hug2:Vector., hug3:Vector.):int { //dispID:3, MethodID:5573, LocalCount= 6 , MaxScope= 1, MaxStack= 5, CodeLength= 54 var hug4:String = (hug1 ? hug1.mediaType : null); var hug5:String = (hug1 ? hug1.mimeType : null); return checkMetadataMatch(hug4, hug5, hug2, hug3); } public static function checkMetadataMatch(hug1:String, hug2:String, hug3:Vector., hug4:Vector.):int { //dispID:4, MethodID:5574, LocalCount= 5 , MaxScope= 1, MaxStack= 3, CodeLength= 129 if(hug1 != null){ if(hug2 != null){ return ((matchType(hug1, hug3) && matchType(hug2, hug4)) ? METADATA_MATCH_FOUND : METADATA_CONFLICTS_FOUND); }else{ return (matchType(hug1, hug3) ? METADATA_MATCH_FOUND : METADATA_CONFLICTS_FOUND); } }else if(hug2 != null){ return (matchType(hug2, hug4) ? METADATA_MATCH_FOUND : METADATA_CONFLICTS_FOUND); } return METADATA_MATCH_UNKNOWN; } private static function matchType(hug1:String, hug2:Vector.):Boolean { //dispID:5, MethodID:5575, LocalCount= 4 , MaxScope= 1, MaxStack= 3, CodeLength= 35 var hug3:int = 0; while(hug3 < hug2.length){ if(hug1 == hug2[hug3]) return true; hug3++; } return false; } //constructor public function MediaTypeUtil() { //MethodID:5576, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 super(); } } } //script560 package org.osmf.net{ import flash.events.NetStatusEvent import flash.net.NetStream import org.osmf.traits.DynamicStreamTrait import org.osmf.utils.OSMFStrings //class(instance)_index:559 public class NetStreamDynamicStreamTrait extends DynamicStreamTrait { //static constructor public static function NetStreamDynamicStreamTrait$cinit() { //MethodID:5578, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function NetStreamDynamicStreamTrait(hug1:NetStream, hug2:NetStreamSwitchManagerBase, hug3:DynamicStreamingResource) { //MethodID:5579, LocalCount= 4 , MaxScope= 1, MaxStack= 4, CodeLength= 75 super(hug2.autoSwitch, hug2.currentIndex, hug3.streamItems.length); this.netStream = hug1; this.switchManager = hug2; this.dsResource = hug3; hug1.addEventListener(NetStatusEvent.NET_STATUS, this.onNetStatus); NetClient(hug1.client).addHandler(NetStreamCodes.ON_PLAY_STATUS, this.onPlayStatus); } //variables/etc. private var inSetSwitching:Boolean; //slotID:0 private var dsResource:DynamicStreamingResource; //slotID:0 private var switchManager:NetStreamSwitchManagerBase; //slotID:0 private var indexToSwitchTo:int; //slotID:0 private var netStream:NetStream; //slotID:0 override public function dispose():void { //MethodID:5580, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 13 this.netStream = null; this.switchManager = null; } override public function getBitrateForIndex(hug1:int):Number { //MethodID:5581, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 58 if((hug1 > (numDynamicStreams - 1)) || (hug1 < 0)) throw new RangeError(OSMFStrings.getString(OSMFStrings.STREAMSWITCH_INVALID_INDEX)); return this.dsResource.streamItems[hug1].bitrate; } override protected function switchingChangeStart(hug1:Boolean, hug2:int):void { //MethodID:5582, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 25 if(hug1 && !this.inSetSwitching) this.indexToSwitchTo = hug2; } override protected function switchingChangeEnd(hug1:int):void { //MethodID:5583, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 40 super.switchingChangeEnd(hug1); if(switching && !this.inSetSwitching) this.switchManager.switchTo(this.indexToSwitchTo); } override protected function autoSwitchChangeStart(hug1:Boolean):void { //MethodID:5584, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 11 this.switchManager.autoSwitch = hug1; } override protected function maxAllowedIndexChangeStart(hug1:int):void { //MethodID:5585, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 11 this.switchManager.maxAllowedIndex = hug1; } private function onNetStatus(hug1:NetStatusEvent):void { //MethodID:5586, LocalCount= 3 , MaxScope= 1, MaxStack= 4, CodeLength= 136 switch(hug1.info.code){ case NetStreamCodes.NETSTREAM_PLAY_TRANSITION: this.inSetSwitching = true; setSwitching(true, this.dsResource.indexFromName(hug1.info.details)); this.inSetSwitching = false; break; case NetStreamCodes.NETSTREAM_PLAY_FAILED: setSwitching(false, currentIndex); break; default: break; } } private function onPlayStatus(hug1:Object):void { //MethodID:5587, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 79 switch(hug1.code){ case NetStreamCodes.NETSTREAM_PLAY_TRANSITION_COMPLETE: setSwitching(false, this.switchManager.currentIndex); break; default: break; } } } } //script561 package org.osmf.metadata{ //class(instance)_index:560 public class TimelineMarker extends Object { //static constructor public static function TimelineMarker$cinit() { //MethodID:5589, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function TimelineMarker(hug1:Number, hug2:Number=Number.NaN) { //MethodID:5590, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 16 super(); this._time = hug1; this._duration = hug2; } //variables/etc. private var _duration:Number; //slotID:0 private var _time:Number; //slotID:0 public function get time():Number { //MethodID:5591, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._time; } public function get duration():Number { //MethodID:5592, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._duration; } } } //script562 package org.osmf.metadata{ //class(instance)_index:561 public class CuePoint extends TimelineMarker { //static constructor public static function CuePoint$cinit() { //MethodID:5594, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 21 EMBEDDED_CUEPOINTS_NAMESPACE = "http://www.osmf.org/timeline/embeddedCuePoints/1.0"; DYNAMIC_CUEPOINTS_NAMESPACE = "http://www.osmf.org/timeline/dynamicCuePoints/1.0"; } //static variables/etc. public static const EMBEDDED_CUEPOINTS_NAMESPACE:String = "http://www.osmf.org/timeline/embeddedCuePoints/1.0";//slotID:1 public static const DYNAMIC_CUEPOINTS_NAMESPACE:String = "http://www.osmf.org/timeline/dynamicCuePoints/1.0";//slotID:2 //constructor public function CuePoint(hug1:String, hug2:Number, hug3:String, hug4:Object, hug5:Number=Number.NaN) { //MethodID:5595, LocalCount= 6 , MaxScope= 1, MaxStack= 3, CodeLength= 25 super(hug2, hug5); this._type = hug1; this._name = hug3; this._parameters = hug4; } //variables/etc. private var _type:String; //slotID:0 private var _parameters:Object; //slotID:0 private var _name:String; //slotID:0 public function get type():String { //MethodID:5596, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._type; } public function get name():String { //MethodID:5597, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._name; } public function get parameters():Object { //MethodID:5598, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._parameters; } } } //script563 package org.osmf.net{ import flash.events.NetStatusEvent import flash.net.NetStream import org.osmf.traits.BufferTrait //class(instance)_index:562 public class NetStreamBufferTrait extends BufferTrait { //static constructor public static function NetStreamBufferTrait$cinit() { //MethodID:5600, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function NetStreamBufferTrait(hug1:NetStream) { //MethodID:5601, LocalCount= 2 , MaxScope= 1, MaxStack= 6, CodeLength= 39 super(); this.netStream = hug1; bufferTime = hug1.bufferTime; hug1.addEventListener(NetStatusEvent.NET_STATUS, this.onNetStatus, false, 0, true); } //variables/etc. private var netStream:NetStream; //slotID:0 override public function get bufferLength():Number { //MethodID:5602, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 10 return this.netStream.bufferLength; } override protected function bufferTimeChangeStart(hug1:Number):void { //MethodID:5603, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 11 this.netStream.bufferTime = hug1; } private function onNetStatus(hug1:NetStatusEvent):void { //MethodID:5604, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 182 switch(hug1.info.code){ case NetStreamCodes.NETSTREAM_PLAY_START: case NetStreamCodes.NETSTREAM_BUFFER_EMPTY: bufferTime = this.netStream.bufferTime; setBuffering(true); if(this.netStream.bufferTime == 0) setBuffering(false); break; case NetStreamCodes.NETSTREAM_BUFFER_FLUSH: case NetStreamCodes.NETSTREAM_BUFFER_FULL: setBuffering(false); break; default: break; } } } } //script564 package org.osmf.net{ import flash.media.SoundTransform import flash.net.NetStream import org.osmf.traits.AudioTrait //class(instance)_index:563 public class NetStreamAudioTrait extends AudioTrait { //static constructor public static function NetStreamAudioTrait$cinit() { //MethodID:5606, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function NetStreamAudioTrait(hug1:NetStream) { //MethodID:5607, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 11 super(); this.netStream = hug1; } //variables/etc. private var netStream:NetStream; //slotID:0 override protected function volumeChangeStart(hug1:Number):void { //MethodID:5608, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 42 var hug2:SoundTransform = this.netStream.soundTransform; hug2.volume = (muted ? 0 : hug1); this.netStream.soundTransform = hug2; } override protected function mutedChangeStart(hug1:Boolean):void { //MethodID:5609, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 42 var hug2:SoundTransform = this.netStream.soundTransform; hug2.volume = (hug1 ? 0 : volume); this.netStream.soundTransform = hug2; } override protected function panChangeStart(hug1:Number):void { //MethodID:5610, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 27 var hug2:SoundTransform = this.netStream.soundTransform; hug2.pan = hug1; this.netStream.soundTransform = hug2; } } } //script565 package org.osmf.media{ import org.osmf.traits.MediaTraitBase import org.osmf.utils.OSMFStrings //class(instance)_index:564 public class DefaultTraitResolver extends MediaTraitResolver { //static constructor public static function DefaultTraitResolver$cinit() { //MethodID:5612, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function DefaultTraitResolver(hug1:String, hug2:MediaTraitBase) { //MethodID:5613, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 77 super(hug1); if(hug2 == null) throw new ArgumentError(OSMFStrings.getString(OSMFStrings.NULL_PARAM)); if(hug2.traitType != hug1) throw new ArgumentError(OSMFStrings.getString(OSMFStrings.INVALID_PARAM)); this.defaultTrait = hug2; setResolvedTrait(hug2); } //variables/etc. private var defaultTrait:MediaTraitBase; //slotID:0 private var trait:MediaTraitBase; //slotID:0 override protected function processAddTrait(hug1:MediaTraitBase):void { //MethodID:5614, LocalCount= 3 , MaxScope= 1, MaxStack= 4, CodeLength= 33 if(this.trait == null){ setResolvedTrait(this.trait = hug1); }else{ } } override protected function processRemoveTrait(hug1:MediaTraitBase):MediaTraitBase { //MethodID:5615, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 51 var hug2:MediaTraitBase = null; if(hug1 && (hug1 == this.trait)){ hug2 = this.trait; this.trait = null; setResolvedTrait(this.defaultTrait); } return hug2; } } } //script566 package org.osmf.net{ import flash.events.NetStatusEvent import flash.net.NetStream import flash.net.NetStreamPlayOptions import flash.net.NetStreamPlayTransitions import org.osmf.events.MediaError import org.osmf.events.MediaErrorCodes import org.osmf.events.MediaErrorEvent import org.osmf.media.MediaResourceBase import org.osmf.media.URLResource import org.osmf.traits.PlayState import org.osmf.traits.PlayTrait import org.osmf.utils.OSMFStrings //class(instance)_index:565 public class NetStreamPlayTrait extends PlayTrait { //static constructor public static function NetStreamPlayTrait$cinit() { //MethodID:5617, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 12 NETCONNECTION_FAILURE_ERROR_CODE = 2154; } //static variables/etc. private static const NETCONNECTION_FAILURE_ERROR_CODE:int = 2154;//slotID:1 //constructor public function NetStreamPlayTrait(hug1:NetStream, hug2:MediaResourceBase, hug3:Boolean) { //MethodID:5618, LocalCount= 5 , MaxScope= 1, MaxStack= 6, CodeLength= 140 super(); if(hug1 == null) throw new ArgumentError(OSMFStrings.getString(OSMFStrings.NULL_PARAM)); this.netStream = hug1; this.urlResource = (hug2 as URLResource); this.reconnectStreams = hug3; var hug4:StreamingURLResource = (hug2 as StreamingURLResource); if((hug4 != null) && (hug4.streamType == StreamType.LIVE)) setCanPause(false); hug1.addEventListener(NetStatusEvent.NET_STATUS, this.onNetStatus, false, 1, true); NetClient(hug1.client).addHandler(NetStreamCodes.ON_PLAY_STATUS, this.onPlayStatus, 1); } //variables/etc. private var streamStarted:Boolean; //slotID:0 private var netStream:NetStream; //slotID:0 private var reconnectStreams:Boolean; //slotID:0 private var urlResource:URLResource; //slotID:0 override protected function playStateChangeStart(hug1:String):void { //MethodID:5619, LocalCount= 11 , MaxScope= 1, MaxStack= 4, CodeLength= 431 var hug2:Object = null; var hug3:StreamingURLResource = null; var hug4:Boolean = false; var hug5:String = null; var hug6:Number = NaN; var hug7:Number = NaN; var hug8:DynamicStreamingResource = null; var hug9:NetStreamPlayOptions = null; var hug10:StreamingURLResource = null; if(hug1 == PlayState.PLAYING){ if(this.streamStarted){ this.netStream.resume(); }else if(this.urlResource != null){ hug3 = (this.urlResource as StreamingURLResource); hug4 = (hug3 ? hug3.urlIncludesFMSApplicationInstance : false); hug5 = NetStreamUtils.getStreamNameFromURL(this.urlResource.url, hug4); hug2 = NetStreamUtils.getPlayArgsForResource(this.urlResource); hug6 = hug2.start; hug7 = hug2.len; hug8 = (this.urlResource as DynamicStreamingResource); if(hug8 != null){ hug9 = new NetStreamPlayOptions(); hug9.start = hug6; hug9.len = hug7; hug9.streamName = hug8.streamItems[hug8.initialIndex].streamName; hug9.transition = NetStreamPlayTransitions.RESET; this.doPlay2(hug9); }else if(this.reconnectStreams && (hug3 != null) && NetStreamUtils.isRTMPStream(hug3.url)){ hug9 = new NetStreamPlayOptions(); hug9.start = hug6; hug9.len = hug7; hug9.transition = NetStreamPlayTransitions.RESET; hug9.streamName = hug5; this.doPlay2(hug9); }else{ hug10 = (this.urlResource as StreamingURLResource); if((hug10 != null) && (hug10.rtmfpGroupspec != null) && (hug10.rtmfpGroupspec.length > 0)){ this.doPlay(hug10.rtmfpStreamName, hug6, hug7); }else{ this.doPlay(hug5, hug6, hug7); } } } }else{ this.netStream.pause(); } } private function onNetStatus(hug1:NetStatusEvent):void { //MethodID:5620, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 222 switch(hug1.info.code){ case NetStreamCodes.NETSTREAM_PLAY_FAILED: case NetStreamCodes.NETSTREAM_PLAY_FILESTRUCTUREINVALID: case NetStreamCodes.NETSTREAM_PLAY_STREAMNOTFOUND: case NetStreamCodes.NETSTREAM_PLAY_NOSUPPORTEDTRACKFOUND: case NetStreamCodes.NETSTREAM_FAILED: this.netStream.pause(); this.streamStarted = false; break; case NetStreamCodes.NETSTREAM_PLAY_STOP: if((this.urlResource != null) && (NetStreamUtils.isStreamingResource(this.urlResource) == false)) stop(); break; default: break; } } private function onPlayStatus(hug1:Object):void { //MethodID:5621, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 71 switch(hug1.code){ case NetStreamCodes.NETSTREAM_PLAY_COMPLETE: stop(); break; default: break; } } private function doPlay(... rest):void { //MethodID:5622, LocalCount= 4 , MaxScope= 5, MaxStack= 7, CodeLength= 165 public var args:Array; //slotID:1 internal var args:Object = rest; try{ if((args[0] != null) && (args[0].indexOf("http://") == 0)){ this.netStream.play(args[0]); }else{ this.netStream.play(args[0]); } this.streamStarted = true; } catch(error:Error){ streamStarted = false; stop(); dispatchEvent(new MediaErrorEvent(MediaErrorEvent.MEDIA_ERROR, false, false, new MediaError(MediaErrorCodes.NETSTREAM_PLAY_FAILED))); } } private function doPlay2(hug1:NetStreamPlayOptions):void { //MethodID:5623, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 17 this.netStream.play2(hug1); this.streamStarted = true; } } } //script567 package org.osmf.net{ import flash.events.NetStatusEvent import flash.net.NetStream import org.osmf.media.MediaResourceBase import org.osmf.traits.TimeTrait //class(instance)_index:566 public class NetStreamTimeTrait extends TimeTrait { //static constructor public static function NetStreamTimeTrait$cinit() { //MethodID:5625, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function NetStreamTimeTrait(hug1:NetStream, hug2:MediaResourceBase, hug3:Number=Number.NaN) { //MethodID:5626, LocalCount= 5 , MaxScope= 1, MaxStack= 6, CodeLength= 171 super(); this.netStream = hug1; NetClient(hug1.client).addHandler(NetStreamCodes.ON_META_DATA, this.onMetaData); NetClient(hug1.client).addHandler(NetStreamCodes.ON_PLAY_STATUS, this.onPlayStatus); hug1.addEventListener(NetStatusEvent.NET_STATUS, this.onNetStatus, false, 0, true); this.resource = hug2; if(isNaN(hug3) == false) setDuration(hug3); var hug4:StreamingURLResource = (hug2 as StreamingURLResource); if((hug4 != null) && (hug4.rtmfpGroupspec != null) && (hug4.rtmfpGroupspec.length > 0)){ this.multicast = true; setDuration(Number.MAX_VALUE); } } //variables/etc. private var durationOffset:Number = 0.0; //slotID:0 private var audioDelay:Number = 0.0; //slotID:0 private var multicast:Boolean = false; //slotID:0 private var resource:MediaResourceBase; //slotID:0 private var netStream:NetStream; //slotID:0 override public function get currentTime():Number { //MethodID:5627, LocalCount= 1 , MaxScope= 1, MaxStack= 4, CodeLength= 68 if(this.multicast) return 0; if(this.durationOffset == (duration - this.netStream.time - this.audioDelay)) return (this.netStream.time - this.audioDelay + this.durationOffset); return (this.netStream.time - this.audioDelay); } private function onMetaData(hug1:Object):void { //MethodID:5628, LocalCount= 5 , MaxScope= 1, MaxStack= 4, CodeLength= 113 var hug2:Object = NetStreamUtils.getPlayArgsForResource(this.resource); this.audioDelay = (hug1.hasOwnProperty("audiodelay") ? hug1.audiodelay : 0); var hug3:Number = Math.max(0, hug2.start); var hug4:Number = hug2.len; if(hug4 == NetStreamUtils.PLAY_LEN_ARG_ALL) hug4 = Number.MAX_VALUE; setDuration(Math.min((hug1.duration - this.audioDelay - hug3), hug4)); } private function onPlayStatus(hug1:Object):void { //MethodID:5629, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 65 switch(hug1.code){ case NetStreamCodes.NETSTREAM_PLAY_COMPLETE: this.signalComplete(); default: break; } } private function onNetStatus(hug1:NetStatusEvent):void { //MethodID:5630, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 118 switch(hug1.info.code){ case NetStreamCodes.NETSTREAM_PLAY_STOP: if(NetStreamUtils.isStreamingResource(this.resource) == false) this.signalComplete(); break; case NetStreamCodes.NETSTREAM_PLAY_UNPUBLISH_NOTIFY: this.signalComplete(); break; default: break; } } override protected function signalComplete():void { //MethodID:5631, LocalCount= 1 , MaxScope= 1, MaxStack= 4, CodeLength= 47 if((this.netStream.time - this.audioDelay) != duration) this.durationOffset = (duration - this.netStream.time - this.audioDelay); super.signalComplete(); } } } //script568 package org.osmf.net{ import flash.display.DisplayObject import flash.events.Event import flash.media.Video import flash.net.NetStream import org.osmf.traits.DisplayObjectTrait //class(instance)_index:567 public class NetStreamDisplayObjectTrait extends DisplayObjectTrait { //static constructor public static function NetStreamDisplayObjectTrait$cinit() { //MethodID:5633, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function NetStreamDisplayObjectTrait(hug1:NetStream, hug2:DisplayObject, hug3:Number=0.0, hug4:Number=0.0) { //MethodID:5634, LocalCount= 5 , MaxScope= 1, MaxStack= 4, CodeLength= 63 super(hug2, hug3, hug4); this.netStream = hug1; NetClient(hug1.client).addHandler(NetStreamCodes.ON_META_DATA, this.onMetaData); if(hug2 is Video) hug2.addEventListener(Event.ADDED_TO_STAGE, this.onStage); } //variables/etc. private var netStream:NetStream; //slotID:0 private function onStage(hug1:Event):void { //MethodID:5635, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 35 displayObject.removeEventListener(Event.ADDED_TO_STAGE, this.onStage); displayObject.addEventListener(Event.ENTER_FRAME, this.onFrame); } private function onFrame(hug1:Event):void { //MethodID:5636, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 140 if((Video(displayObject).videoWidth != 0) && (Video(displayObject).videoHeight != 0)){ if((Video(displayObject).videoWidth != mediaWidth) && (Video(displayObject).videoHeight != mediaHeight)) this.newMediaSize(Video(displayObject).videoWidth, Video(displayObject).videoHeight); displayObject.removeEventListener(Event.ENTER_FRAME, this.onFrame); } } private function onMetaData(hug1:Object):void { //MethodID:5637, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 80 if((!isNaN(hug1.width) && !isNaN(hug1.height)) && ((hug1.width != mediaWidth) || (hug1.height != mediaHeight))) this.newMediaSize(hug1.width, hug1.height); } private function newMediaSize(hug1:Number, hug2:Number):void { //MethodID:5638, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 54 if((displayObject.width == 0) && (displayObject.height == 0)){ displayObject.width = hug1; displayObject.height = hug2; } setMediaSize(hug1, hug2); } } } //script569 package org.osmf.net{ import flash.events.NetStatusEvent import flash.events.TimerEvent import flash.net.NetStream import flash.utils.Timer import org.osmf.traits.LoadTrait import org.osmf.traits.SeekTrait import org.osmf.traits.TimeTrait //class(instance)_index:568 public class NetStreamSeekTrait extends SeekTrait { //static constructor public static function NetStreamSeekTrait$cinit() { //MethodID:5640, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function NetStreamSeekTrait(hug1:TimeTrait, hug2:LoadTrait, hug3:NetStream) { //MethodID:5641, LocalCount= 4 , MaxScope= 1, MaxStack= 6, CodeLength= 113 super(hug1); this.netStream = hug3; this.loadTrait = hug2; NetClient(hug3.client).addHandler(NetStreamCodes.ON_META_DATA, this.onMetaData); hug3.addEventListener(NetStatusEvent.NET_STATUS, this.onNetStatus); this.seekBugTimer = new Timer(10, 100); this.seekBugTimer.addEventListener(TimerEvent.TIMER, this.onSeekBugTimer, false, 0, true); this.seekBugTimer.addEventListener(TimerEvent.TIMER_COMPLETE, this.onSeekBugTimerDone, false, 0, true); } //variables/etc. private var previousTime:Number; //slotID:0 private var expectedTime:Number; //slotID:0 private var loadTrait:LoadTrait; //slotID:0 private var seekBugTimer:Timer; //slotID:0 private var suppressSeekNotifyEvent:Boolean = false; //slotID:0 private var audioDelay:Number = 0.0; //slotID:0 private var netStream:NetStream; //slotID:0 override public function canSeekTo(hug1:Number):Boolean { //MethodID:5642, LocalCount= 4 , MaxScope= 1, MaxStack= 4, CodeLength= 90 var hug3:Number = NaN; var hug2:Boolean = super.canSeekTo(hug1); if(hug2 && !isNaN(this.loadTrait.bytesTotal) && (this.loadTrait.bytesTotal > 0)){ hug3 = (timeTrait.duration * Number(this.loadTrait.bytesLoaded / this.loadTrait.bytesTotal)); hug2 = (hug1 <= hug3); } return hug2; } override protected function seekingChangeStart(hug1:Boolean, hug2:Number):void { //MethodID:5643, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 73 if(hug1){ this.suppressSeekNotifyEvent = false; this.previousTime = (this.netStream.time - this.audioDelay); this.expectedTime = hug2; this.netStream.seek(hug2 + this.audioDelay); if(this.previousTime == this.expectedTime){ this.seekBugTimer.start(); this.suppressSeekNotifyEvent = true; } } } private function onMetaData(hug1:Object):void { //MethodID:5644, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 31 this.audioDelay = (hug1.hasOwnProperty("audiodelay") ? hug1.audiodelay : 0); } private function onNetStatus(hug1:NetStatusEvent):void { //MethodID:5645, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 262 switch(hug1.info.code){ case NetStreamCodes.NETSTREAM_SEEK_NOTIFY: this.runSeekBugTimer(); break; case NetStreamCodes.NETSTREAM_SEEK_INVALIDTIME: case NetStreamCodes.NETSTREAM_SEEK_FAILED: setSeeking(false, this.previousTime); break; case NetStreamCodes.NETSTREAM_PLAY_START: case NetStreamCodes.NETSTREAM_PLAY_RESET: case NetStreamCodes.NETSTREAM_PAUSE_NOTIFY: case NetStreamCodes.NETSTREAM_PLAY_STOP: case NetStreamCodes.NETSTREAM_UNPAUSE_NOTIFY: if(seeking && (this.seekBugTimer.running == false)) this.runSeekBugTimer(); break; default: break; } } private function runSeekBugTimer():void { //MethodID:5646, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 29 if(this.suppressSeekNotifyEvent == false){ this.seekBugTimer.start(); }else{ this.suppressSeekNotifyEvent = false; } } private function onSeekBugTimer(hug1:TimerEvent):void { //MethodID:5647, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 46 if((this.previousTime != (this.netStream.time - this.audioDelay)) || (this.previousTime == this.expectedTime)) this.onSeekBugTimerDone(null); } private function onSeekBugTimerDone(hug1:TimerEvent):void { //MethodID:5648, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 23 this.seekBugTimer.reset(); setSeeking(false, this.expectedTime); } } } //script570 package org.osmf.net{ //class(instance)_index:569 public final class StreamType extends Object { //static constructor public static function StreamType$cinit() { //MethodID:5650, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 39 LIVE = "live"; RECORDED = "recorded"; LIVE_OR_RECORDED = "liveOrRecorded"; DVR = "dvr"; } //static variables/etc. public static const LIVE:String = "live"; //slotID:1 public static const RECORDED:String = "recorded"; //slotID:2 public static const LIVE_OR_RECORDED:String = "liveOrRecorded"; //slotID:3 public static const DVR:String = "dvr"; //slotID:4 //constructor public function StreamType() { //MethodID:5651, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 super(); } } } //script571 package org.osmf.metadata{ import __AS3__.vec.Vector import flash.events.TimerEvent import flash.utils.Dictionary import flash.utils.Timer import org.osmf.events.MediaElementEvent import org.osmf.events.MetadataEvent import org.osmf.events.PlayEvent import org.osmf.events.SeekEvent import org.osmf.events.TimelineMetadataEvent import org.osmf.media.MediaElement import org.osmf.traits.MediaTraitType import org.osmf.traits.PlayState import org.osmf.traits.PlayTrait import org.osmf.traits.SeekTrait import org.osmf.traits.TimeTrait import org.osmf.utils.OSMFStrings //class(instance)_index:570 public class TimelineMetadata extends Metadata { //static constructor public static function TimelineMetadata$cinit() { //MethodID:5653, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 19 CHECK_INTERVAL = 100; TOLERANCE = 0.25; } //static variables/etc. private static const CHECK_INTERVAL:Number = 100.0; //slotID:1 private static const TOLERANCE:Number = 0.25; //slotID:2 //constructor public function TimelineMetadata(hug1:MediaElement) { //MethodID:5654, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 183 super(); if(hug1 == null) throw new ArgumentError(OSMFStrings.getString(OSMFStrings.NULL_PARAM)); this.media = hug1; this._enabled = true; this.intervalTimer = new Timer(CHECK_INTERVAL); this.intervalTimer.addEventListener(TimerEvent.TIMER, this.onIntervalTimer); this.timeTrait = (hug1.getTrait(MediaTraitType.TIME) as TimeTrait); this.seekTrait = (hug1.getTrait(MediaTraitType.SEEK) as SeekTrait); this.setupTraitEventListener(MediaTraitType.SEEK); this.playTrait = (hug1.getTrait(MediaTraitType.PLAY) as PlayTrait); this.setupTraitEventListener(MediaTraitType.PLAY); hug1.addEventListener(MediaElementEvent.TRAIT_ADD, this.onTraitAdd); hug1.addEventListener(MediaElementEvent.TRAIT_REMOVE, this.onTraitRemove); } //variables/etc. private var intervalTimer:Timer; //slotID:0 private var restartTimer:Boolean; //slotID:0 private var durationTimers:Dictionary; //slotID:0 private var lastFiredTemporalMetadataIndex:int; //slotID:0 private var temporalKeyCollection:Vector.; //slotID:0 private var timeTrait:TimeTrait; //slotID:0 private var media:MediaElement; //slotID:0 private var temporalValueCollection:Vector.; //slotID:0 private var _enabled:Boolean; //slotID:0 private var playTrait:PlayTrait; //slotID:0 private var seekTrait:SeekTrait; //slotID:0 public function get numMarkers():int { //MethodID:5655, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 25 return (this.temporalValueCollection ? this.temporalValueCollection.length : 0); } public function getMarkerAt(hug1:int):TimelineMarker { //MethodID:5656, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 49 if((hug1 >= 0) && (this.temporalValueCollection != null) && (hug1 < this.temporalValueCollection.length)) return this.temporalValueCollection[hug1]; return null; } public function addMarker(hug1:TimelineMarker):void { //MethodID:5657, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 43 if(hug1 == null) throw new ArgumentError(OSMFStrings.getString(OSMFStrings.INVALID_PARAM)); this.addValue(("" + hug1.time), hug1); } public function removeMarker(hug1:TimelineMarker):TimelineMarker { //MethodID:5658, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 42 if(hug1 == null) throw new ArgumentError(OSMFStrings.getString(OSMFStrings.INVALID_PARAM)); return this.removeValue("" + hug1.time); } override public function addValue(hug1:String, hug2:Object):void { //MethodID:5659, LocalCount= 6 , MaxScope= 1, MaxStack= 7, CodeLength= 344 var hug5:int = 0; var hug3:Number = new Number(hug1); var hug4:TimelineMarker = (hug2 as TimelineMarker); if((hug1 == null) || isNaN(hug3) || (hug3 < 0) || (hug4 == null)) throw new ArgumentError(OSMFStrings.getString(OSMFStrings.INVALID_PARAM)); if(this.temporalValueCollection == null){ this.temporalKeyCollection = new Vector.(); this.temporalKeyCollection.push(hug3); this.temporalValueCollection = new Vector.(); this.temporalValueCollection.push(hug2); }else{ hug5 = this.findTemporalMetadata(0, (this.temporalValueCollection.length - 1), hug3); if(hug5 < 0){ hug5 *= (-1); this.temporalKeyCollection.splice(hug5, 0, hug3); this.temporalValueCollection.splice(hug5, 0, hug4); }else if((hug5 == 0) && (hug3 != this.temporalKeyCollection[0])){ this.temporalKeyCollection.splice(hug5, 0, hug3); this.temporalValueCollection.splice(hug5, 0, hug4); }else{ this.temporalKeyCollection[hug5] = hug3; this.temporalValueCollection[hug5] = hug4; } } this.enabled = true; dispatchEvent(new MetadataEvent(MetadataEvent.VALUE_ADD, false, false, hug1, hug4)); dispatchEvent(new TimelineMetadataEvent(TimelineMetadataEvent.MARKER_ADD, false, false, hug4)); } override public function removeValue(hug1:String):* { //MethodID:5660, LocalCount= 5 , MaxScope= 1, MaxStack= 7, CodeLength= 165 if(hug1 == null) throw new ArgumentError(OSMFStrings.getString(OSMFStrings.NULL_PARAM)); var hug2:Number = new Number(hug1); var hug3:* = null; var hug4:int = (this.temporalValueCollection ? this.findTemporalMetadata(0, (this.temporalValueCollection.length - 1), hug2) : (-1)); if(hug4 >= 0){ this.temporalKeyCollection.splice(hug4, 1); hug3 = this.temporalValueCollection.splice(hug4, 1)[0]; dispatchEvent(new MetadataEvent(MetadataEvent.VALUE_REMOVE, false, false, hug1, hug3)); dispatchEvent(new TimelineMetadataEvent(TimelineMetadataEvent.MARKER_REMOVE, false, false, (hug3 as TimelineMarker))); } return hug3; } override public function getValue(hug1:String):* { //MethodID:5661, LocalCount= 5 , MaxScope= 1, MaxStack= 3, CodeLength= 105 var hug3:int = 0; var hug4:Number = NaN; if(hug1 == null) throw new ArgumentError(OSMFStrings.getString(OSMFStrings.NULL_PARAM)); var hug2:Number = new Number(hug1); if(!isNaN(hug2)){ hug3 = 0; while(hug3 < this.temporalKeyCollection.length){ hug4 = this.temporalKeyCollection[hug3]; if(hug4 == hug2) return this.temporalValueCollection[hug3]; hug3++; } } return null; } public function get enabled():Boolean { //MethodID:5662, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._enabled; } public function set enabled(hug1:Boolean):void { //MethodID:5663, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 14 this._enabled = hug1; this.reset(hug1); } private function startTimer(hug1:Boolean=true):void { //MethodID:5664, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 135 if(!hug1){ this.intervalTimer.stop(); }else if((this.timeTrait != null) && (this.temporalValueCollection != null) && (this.temporalValueCollection.length > 0) && this.restartTimer && this.enabled && !this.intervalTimer.running){ if((this.playTrait != null) && (this.playTrait.playState == PlayState.PLAYING)) this.intervalTimer.start(); } } private function reset(hug1:Boolean):void { //MethodID:5665, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 42 this.lastFiredTemporalMetadataIndex = -1; this.restartTimer = true; this.intervalTimer.reset(); this.intervalTimer.delay = CHECK_INTERVAL; if(hug1) this.startTimer(); } private function checkForTemporalMetadata():void { //MethodID:5666, LocalCount= 3 , MaxScope= 1, MaxStack= 4, CodeLength= 106 var hug1:Number = this.timeTrait.currentTime; var hug2:int = this.findTemporalMetadata((this.lastFiredTemporalMetadataIndex + 1), (this.temporalValueCollection.length - 1), hug1); if(hug2 <= 0){ hug2 *= (-1); hug2 = ((hug2 > 0) ? (hug2 - 1) : 0); } if(!this.checkTemporalMetadata(hug2, hug1) && ((hug2 + 1) < this.temporalValueCollection.length)) this.checkTemporalMetadata((hug2 + 1), hug1); } private function setupTraitEventListener(hug1:String, hug2:Boolean=true):void { //MethodID:5667, LocalCount= 4 , MaxScope= 1, MaxStack= 5, CodeLength= 245 var hug3:PlayEvent = null; if(hug2){ if((hug1 == MediaTraitType.SEEK) && (this.seekTrait != null)){ this.seekTrait.addEventListener(SeekEvent.SEEKING_CHANGE, this.onSeekingChange); }else if((hug1 == MediaTraitType.PLAY) && (this.playTrait != null)){ this.playTrait.addEventListener(PlayEvent.PLAY_STATE_CHANGE, this.onPlayStateChange); if(this.playTrait.playState == PlayState.PLAYING){ hug3 = new PlayEvent(PlayEvent.PLAY_STATE_CHANGE, false, false, PlayState.PLAYING); this.onPlayStateChange(hug3); } } }else if((hug1 == MediaTraitType.SEEK) && (this.seekTrait != null)){ this.seekTrait.removeEventListener(SeekEvent.SEEKING_CHANGE, this.onSeekingChange); }else if((hug1 == MediaTraitType.PLAY) && (this.playTrait != null)){ this.playTrait.removeEventListener(PlayEvent.PLAY_STATE_CHANGE, this.onPlayStateChange); } } private function onSeekingChange(hug1:SeekEvent):void { //MethodID:5668, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 17 if(hug1.seeking) this.reset(true); } private function onPlayStateChange(hug1:PlayEvent):void { //MethodID:5669, LocalCount= 5 , MaxScope= 1, MaxStack= 2, CodeLength= 133 var hug2:Timer = null; if(hug1.playState == PlayState.PLAYING){ if(this.durationTimers != null){ for each(hug2 in this.durationTimers){ hug2.start(); } } this.startTimer(); }else{ if(this.durationTimers != null){ for each(hug2 in this.durationTimers){ hug2.stop(); } } this.startTimer(false); } } private function findTemporalMetadata(hug1:int, hug2:int, hug3:Number):int { //MethodID:5670, LocalCount= 5 , MaxScope= 1, MaxStack= 4, CodeLength= 79 var hug4:int = 0; if(hug1 <= hug2){ hug4 = ((hug1 + hug2) / 2); if(hug3 == this.temporalKeyCollection[hug4]) return hug4; if(hug3 < this.temporalKeyCollection[hug4]) return this.findTemporalMetadata(hug1, (hug4 - 1), hug3); return this.findTemporalMetadata((hug4 + 1), hug2, hug3); } return -hug1; } private function dispatchTemporalEvents(hug1:int):void { //MethodID:5672, LocalCount= 3 , MaxScope= 2, MaxStack= 6, CodeLength= 203 internal var index:int; //slotID:1 internal var marker:TimelineMarker; //slotID:2 internal var timer:Timer; //slotID:3 internal var endTime:Number; //slotID:4 internal var onDurationTimer:Function; //slotID:5 marker = null; timer = null; endTime = NaN; onDurationTimer = null; index = hug1; marker = this.temporalValueCollection[index]; dispatchEvent(new TimelineMetadataEvent(TimelineMetadataEvent.MARKER_TIME_REACHED, false, false, marker)); if(marker.duration > 0){ onDurationTimer = function(hug1:TimerEvent):void{ //MethodID:5671, LocalCount= 2 , MaxScope= 0, MaxStack= 6, CodeLength= 75 if(timeTrait && (timeTrait.currentTime >= endTime)){ timer.removeEventListener(TimerEvent.TIMER, onDurationTimer); delete durationTimers[marker]; dispatchEvent(new TimelineMetadataEvent(TimelineMetadataEvent.MARKER_DURATION_REACHED, false, false, marker)); } }; timer = new Timer(CHECK_INTERVAL); endTime = (marker.time + marker.duration); if(this.durationTimers == null) this.durationTimers = new Dictionary(); this.durationTimers[marker] = timer; timer.addEventListener(TimerEvent.TIMER, onDurationTimer); timer.start(); } } private function checkTemporalMetadata(hug1:int, hug2:Number):Boolean { //MethodID:5673, LocalCount= 7 , MaxScope= 1, MaxStack= 3, CodeLength= 293 var hug4:Number = NaN; var hug5:Number = NaN; var hug6:Number = NaN; if(!this.temporalValueCollection || !this.temporalValueCollection.length) return false; var hug3:Boolean = false; if((this.temporalValueCollection[hug1].time >= (hug2 - TOLERANCE)) && (this.temporalValueCollection[hug1].time <= (hug2 + TOLERANCE)) && (hug1 != this.lastFiredTemporalMetadataIndex)){ this.lastFiredTemporalMetadataIndex = hug1; this.dispatchTemporalEvents(hug1); hug4 = this.temporalKeyCollection[hug1]; hug5 = this.calcNextTime(hug1); hug6 = (((hug5 - hug4) * 1000) / 4); hug6 = ((hug6 > CHECK_INTERVAL) ? hug6 : CHECK_INTERVAL); if(hug4 == hug5){ this.startTimer(false); this.restartTimer = false; }else if(hug6 != this.intervalTimer.delay){ this.intervalTimer.reset(); this.intervalTimer.delay = hug6; this.startTimer(); } hug3 = true; }else if((this.intervalTimer.delay != CHECK_INTERVAL) && ((hug2 + (this.intervalTimer.delay / 1000)) > this.calcNextTime(hug1))){ this.intervalTimer.reset(); this.intervalTimer.delay = CHECK_INTERVAL; this.startTimer(); } return hug3; } private function calcNextTime(hug1:int):Number { //MethodID:5674, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 47 return this.temporalValueCollection[((hug1 + 1) < this.temporalKeyCollection.length) ? (hug1 + 1) : (this.temporalKeyCollection.length - 1)].time; } private function onIntervalTimer(hug1:TimerEvent):void { //MethodID:5675, LocalCount= 2 , MaxScope= 1, MaxStack= 1, CodeLength= 8 this.checkForTemporalMetadata(); } private function onTraitAdd(hug1:MediaElementEvent):void { //MethodID:5676, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 194 switch(hug1.traitType){ case MediaTraitType.TIME: this.timeTrait = (this.media.getTrait(MediaTraitType.TIME) as TimeTrait); this.startTimer(); break; case MediaTraitType.SEEK: this.seekTrait = (this.media.getTrait(MediaTraitType.SEEK) as SeekTrait); break; case MediaTraitType.PLAY: this.playTrait = (this.media.getTrait(MediaTraitType.PLAY) as PlayTrait); break; default: break; } this.setupTraitEventListener(hug1.traitType); } private function onTraitRemove(hug1:MediaElementEvent):void { //MethodID:5677, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 161 this.setupTraitEventListener(hug1.traitType, false); switch(hug1.traitType){ case MediaTraitType.TIME: this.timeTrait = null; if(this.media.hasOwnProperty("numChildren") == false) this.startTimer(false); break; case MediaTraitType.SEEK: this.seekTrait = null; break; case MediaTraitType.PLAY: this.playTrait = null; break; default: break; } } } } //script572 package org.osmf.net{ import org.osmf.traits.TimeTrait //class(instance)_index:571 public class ModifiableTimeTrait extends TimeTrait { //static constructor public static function ModifiableTimeTrait$cinit() { //MethodID:5679, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function ModifiableTimeTrait(hug1:Number=Number.NaN) { //MethodID:5680, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 7 super(hug1); } //variables/etc. public function set duration(hug1:Number):void { //MethodID:5681, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 9 super.setDuration(hug1); } } } //script573 package org.osmf.elements.loaderClasses{ import flash.display.DisplayObject import flash.display.Loader import flash.display.LoaderInfo import flash.events.Event import flash.events.IOErrorEvent import flash.events.SecurityErrorEvent import flash.geom.Rectangle import flash.net.URLRequest import flash.system.ApplicationDomain import flash.system.LoaderContext import flash.system.SecurityDomain import org.osmf.events.MediaError import org.osmf.events.MediaErrorCodes import org.osmf.events.MediaErrorEvent import org.osmf.media.MediaElement import org.osmf.media.URLResource import org.osmf.traits.DisplayObjectTrait import org.osmf.traits.LoadState import org.osmf.traits.LoadTrait //class(instance)_index:572 public class LoaderUtils extends Object { //static constructor public static function LoaderUtils$cinit() { //MethodID:5683, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 12 SWF_MIME_TYPE = "application/x-shockwave-flash"; } //static variables/etc. private static const SWF_MIME_TYPE:String = "application/x-shockwave-flash";//slotID:1 public static function createDisplayObjectTrait(hug1:Loader, hug2:MediaElement):DisplayObjectTrait { //dispID:3, MethodID:5684, LocalCount= 7 , MaxScope= 1, MaxStack= 6, CodeLength= 80 var hug3:DisplayObject = null; var hug4:Number = 0; var hug5:Number = 0; var hug6:LoaderInfo = hug1.contentLoaderInfo; hug3 = hug1; hug3.scrollRect = new Rectangle(0, 0, hug6.width, hug6.height); hug4 = hug6.width; hug5 = hug6.height; return new DisplayObjectTrait(hug3, hug4, hug5); } public static function loadLoadTrait(hug1:LoadTrait, hug2:Function, hug3:Boolean, hug4:Boolean, hug5:Function=null):void { //dispID:4, MethodID:5689, LocalCount= 8 , MaxScope= 7, MaxStack= 4, CodeLength= 392 internal var loadTrait:LoadTrait; //slotID:1 internal var updateLoadTraitFunction:Function; //slotID:2 internal var useCurrentSecurityDomain:Boolean; //slotID:3 internal var checkPolicyFile:Boolean; //slotID:4 internal var validateLoadedContentFunction:Function = null; //slotID:5 internal var loaderLoadTrait:LoaderLoadTrait; //slotID:6 internal var loader:Loader; //slotID:7 internal var context:LoaderContext; //slotID:8 internal var urlReq:URLRequest; //slotID:9 internal var toggleLoaderListeners:Function; //slotID:10 internal var onLoadComplete:Function; //slotID:11 internal var onIOError:Function; //slotID:12 internal var onSecurityError:Function; //slotID:13 loader = null; onLoadComplete = null; onIOError = null; onSecurityError = null; loadTrait = hug1; updateLoadTraitFunction = hug2; useCurrentSecurityDomain = hug3; checkPolicyFile = hug4; validateLoadedContentFunction = hug5; toggleLoaderListeners = function(hug1:Loader, hug2:Boolean):void{ //MethodID:5685, LocalCount= 3 , MaxScope= 0, MaxStack= 3, CodeLength= 106 if(hug2){ hug1.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete); hug1.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onIOError); hug1.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurityError); }else{ hug1.contentLoaderInfo.removeEventListener(Event.COMPLETE, onLoadComplete); hug1.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, onIOError); hug1.contentLoaderInfo.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurityError); } }; onLoadComplete = function(hug1:Event):void{ //MethodID:5686, LocalCount= 3 , MaxScope= 0, MaxStack= 7, CodeLength= 166 var hug2:Boolean = false; toggleLoaderListeners(loader, false); if(validateLoadedContentFunction != null){ hug2 = validateLoadedContentFunction(loader.content); if(hug2){ loader.unloadAndStop(); loader = null; loadLoadTrait(loadTrait, updateLoadTraitFunction, useCurrentSecurityDomain, false, null); }else{ loader.unloadAndStop(); loader = null; updateLoadTraitFunction(loadTrait, LoadState.LOAD_ERROR); loadTrait.dispatchEvent(new MediaErrorEvent(MediaErrorEvent.MEDIA_ERROR, false, false, new MediaError(MediaErrorCodes.IO_ERROR))); } }else{ updateLoadTraitFunction(loadTrait, LoadState.READY); } }; onIOError = function(hug1:IOErrorEvent, hug2:String=null):void{ //MethodID:5687, LocalCount= 3 , MaxScope= 0, MaxStack= 8, CodeLength= 88 toggleLoaderListeners(loader, false); loader = null; updateLoadTraitFunction(loadTrait, LoadState.LOAD_ERROR); loadTrait.dispatchEvent(new MediaErrorEvent(MediaErrorEvent.MEDIA_ERROR, false, false, new MediaError(MediaErrorCodes.IO_ERROR, (hug1 ? hug1.text : hug2)))); }; onSecurityError = function(hug1:SecurityErrorEvent, hug2:String=null):void{ //MethodID:5688, LocalCount= 3 , MaxScope= 0, MaxStack= 8, CodeLength= 88 toggleLoaderListeners(loader, false); loader = null; updateLoadTraitFunction(loadTrait, LoadState.LOAD_ERROR); loadTrait.dispatchEvent(new MediaErrorEvent(MediaErrorEvent.MEDIA_ERROR, false, false, new MediaError(MediaErrorCodes.SECURITY_ERROR, (hug1 ? hug1.text : hug2)))); }; loaderLoadTrait = (loadTrait as LoaderLoadTrait); loader = new Loader(); loaderLoadTrait.loader = loader; updateLoadTraitFunction(loadTrait, LoadState.LOADING); context = new LoaderContext(); urlReq = new URLRequest((loadTrait.resource as URLResource).url.toString()); context.checkPolicyFile = checkPolicyFile; if(useCurrentSecurityDomain && (urlReq.url.search(new RegExp("^file:\/", "i")) == (-1))) context.securityDomain = SecurityDomain.currentDomain; if(validateLoadedContentFunction != null) context.applicationDomain = new ApplicationDomain(); toggleLoaderListeners(loader, true); try{ loader.load(urlReq, context); } catch(ioError:IOError){ onIOError(null, ioError.message); } catch(securityError:SecurityError){ onSecurityError(null, securityError.message); } } public static function unloadLoadTrait(hug1:LoadTrait, hug2:Function):void { //dispID:5, MethodID:5690, LocalCount= 4 , MaxScope= 1, MaxStack= 4, CodeLength= 44 var hug3:LoaderLoadTrait = (hug1 as LoaderLoadTrait); hug2(hug1, LoadState.UNLOADING); hug3.loader.unloadAndStop(); hug2(hug1, LoadState.UNINITIALIZED); } //constructor public function LoaderUtils() { //MethodID:5691, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 super(); } } } //script574 package org.osmf.elements.loaderClasses{ import flash.display.Loader import flash.events.ProgressEvent import org.osmf.media.MediaResourceBase import org.osmf.traits.LoadState import org.osmf.traits.LoadTrait import org.osmf.traits.LoaderBase //class(instance)_index:573 public class LoaderLoadTrait extends LoadTrait { //static constructor public static function LoaderLoadTrait$cinit() { //MethodID:5693, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function LoaderLoadTrait(hug1:LoaderBase, hug2:MediaResourceBase) { //MethodID:5694, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 8 super(hug1, hug2); } //variables/etc. private var _loader:Loader; //slotID:0 public function get loader():Loader { //MethodID:5695, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._loader; } public function set loader(hug1:Loader):void { //MethodID:5696, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this._loader = hug1; } override protected function loadStateChangeStart(hug1:String):void { //MethodID:5697, LocalCount= 2 , MaxScope= 1, MaxStack= 6, CodeLength= 135 if(hug1 == LoadState.LOADING){ this.loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, this.onContentLoadProgress, false, 0, true); }else if(hug1 == LoadState.READY){ setBytesTotal(this.loader.contentLoaderInfo.bytesTotal); setBytesLoaded(this.loader.contentLoaderInfo.bytesLoaded); this.loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, this.onContentLoadProgress, false, 0, true); }else if(hug1 == LoadState.UNINITIALIZED){ setBytesLoaded(0); } } private function onContentLoadProgress(hug1:ProgressEvent):void { //MethodID:5698, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 25 setBytesTotal(hug1.bytesTotal); setBytesLoaded(hug1.bytesLoaded); } } } //script575 package org.osmf.net{ //class(instance)_index:574 public class SwitchingRuleBase extends Object { //static constructor public static function SwitchingRuleBase$cinit() { //MethodID:5700, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function SwitchingRuleBase(hug1:NetStreamMetricsBase) { //MethodID:5701, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 11 super(); this._metrics = hug1; } //variables/etc. private var _metrics:NetStreamMetricsBase; //slotID:0 public function getNewIndex():int { //MethodID:5702, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 5 return -1; } protected function get metrics():NetStreamMetricsBase { //MethodID:5703, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._metrics; } } } //script576 package org.osmf.net.rtmpstreaming{ import flash.events.NetStatusEvent import org.osmf.net.NetStreamCodes import org.osmf.net.SwitchingRuleBase //class(instance)_index:575 public class InsufficientBufferRule extends SwitchingRuleBase { //static constructor public static function InsufficientBufferRule$cinit() { //MethodID:5705, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function InsufficientBufferRule(hug1:RTMPNetStreamMetrics, hug2:Number=2.0) { //MethodID:5706, LocalCount= 3 , MaxScope= 1, MaxStack= 6, CodeLength= 38 super(hug1); this._panic = false; this.minBufferLength = hug2; hug1.netStream.addEventListener(NetStatusEvent.NET_STATUS, this.monitorNetStatus, false, 0, true); } //variables/etc. private var minBufferLength:Number; //slotID:0 private var _moreDetail:String; //slotID:0 private var _panic:Boolean; //slotID:0 override public function getNewIndex():int { //MethodID:5707, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 67 var hug1:int = -1; if(this._panic || ((this.rtmpMetrics.netStream.bufferLength < this.minBufferLength) && (this.rtmpMetrics.netStream.bufferLength > this.rtmpMetrics.netStream.bufferTime))) hug1 = 0; return hug1; } private function monitorNetStatus(hug1:NetStatusEvent):void { //MethodID:5708, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 169 switch(hug1.info.code){ case NetStreamCodes.NETSTREAM_BUFFER_FULL: this._panic = false; break; case NetStreamCodes.NETSTREAM_BUFFER_EMPTY: if(Math.round(this.rtmpMetrics.netStream.time) != 0){ this._panic = true; this._moreDetail = "Buffer was empty"; } break; case NetStreamCodes.NETSTREAM_PLAY_INSUFFICIENTBW: this._panic = true; this._moreDetail = "Stream had insufficient bandwidth"; break; default: break; } } private function get rtmpMetrics():RTMPNetStreamMetrics { //MethodID:5709, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 10 return (metrics as RTMPNetStreamMetrics); } } } //script577 package org.osmf.net.rtmpstreaming{ import org.osmf.net.SwitchingRuleBase //class(instance)_index:576 public class InsufficientBandwidthRule extends SwitchingRuleBase { //static constructor public static function InsufficientBandwidthRule$cinit() { //MethodID:5711, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function InsufficientBandwidthRule(hug1:RTMPNetStreamMetrics, hug2:Number=1.15) { //MethodID:5712, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 12 super(hug1); this.bitrateMultiplier = hug2; } //variables/etc. private var bitrateMultiplier:Number; //slotID:0 override public function getNewIndex():int { //MethodID:5713, LocalCount= 4 , MaxScope= 1, MaxStack= 3, CodeLength= 119 var hug2:String = null; var hug3:int = 0; var hug1:int = -1; if(this.rtmpMetrics.averageMaxBytesPerSecond != 0){ hug3 = this.rtmpMetrics.currentIndex; while(hug3 >= 0){ if(((this.rtmpMetrics.averageMaxBytesPerSecond * 8) / 1024) > (this.rtmpMetrics.resource.streamItems[hug3].bitrate * this.bitrateMultiplier)){ hug1 = hug3; break; } hug3--; } hug1 = ((hug1 == this.rtmpMetrics.currentIndex) ? (-1) : hug1); } return hug1; } private function get rtmpMetrics():RTMPNetStreamMetrics { //MethodID:5714, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 10 return (metrics as RTMPNetStreamMetrics); } } } //script578 package org.osmf.net.rtmpstreaming{ import flash.utils.getTimer import org.osmf.net.NetStreamMetricsBase import org.osmf.net.SwitchingRuleBase //class(instance)_index:577 public class DroppedFramesRule extends SwitchingRuleBase { //static constructor public static function DroppedFramesRule$cinit() { //MethodID:5716, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 13 LOCK_INTERVAL = 30000; } //static variables/etc. private static const LOCK_INTERVAL:Number = 30000.0; //slotID:1 //constructor public function DroppedFramesRule(hug1:NetStreamMetricsBase, hug2:int=10, hug3:int=20, hug4:int=24) { //MethodID:5717, LocalCount= 5 , MaxScope= 1, MaxStack= 2, CodeLength= 38 super(hug1); this.downSwitchByOne = hug2; this.downSwitchByTwo = hug3; this.downSwitchToZero = hug4; this.lastLockTime = 0; this.lockLevel = int.MAX_VALUE; } //variables/etc. private var downSwitchByOne:int; //slotID:0 private var lastLockTime:Number; //slotID:0 private var lockLevel:Number; //slotID:0 private var downSwitchToZero:int; //slotID:0 private var downSwitchByTwo:int; //slotID:0 override public function getNewIndex():int { //MethodID:5718, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 274 var hug2:String = null; var hug1:int = -1; if(metrics.averageDroppedFPS > this.downSwitchToZero){ hug1 = 0; hug2 = ("Average droppedFPS of " + Math.round(metrics.averageDroppedFPS) + " > " + this.downSwitchToZero); }else if(metrics.averageDroppedFPS > this.downSwitchByTwo){ hug1 = (((metrics.currentIndex - 2) < 0) ? 0 : (metrics.currentIndex - 2)); hug2 = ("Average droppedFPS of " + Math.round(metrics.averageDroppedFPS) + " > " + this.downSwitchByTwo); }else if(metrics.averageDroppedFPS > this.downSwitchByOne){ hug1 = (((metrics.currentIndex - 1) < 0) ? 0 : (metrics.currentIndex - 1)); hug2 = ("Average droppedFPS of " + Math.round(metrics.averageDroppedFPS) + " > " + this.downSwitchByOne); } if((hug1 != (-1)) && (hug1 < metrics.currentIndex)) this.lockIndex(hug1); if((hug1 == (-1)) && this.isLocked(metrics.currentIndex)) hug1 = metrics.currentIndex; return hug1; } private function lockIndex(hug1:int):void { //MethodID:5719, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 29 if(!this.isLocked(hug1)){ this.lockLevel = hug1; this.lastLockTime = getTimer(); } } private function isLocked(hug1:int):Boolean { //MethodID:5720, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 31 return ((hug1 >= this.lockLevel) && ((getTimer() - this.lastLockTime) < LOCK_INTERVAL)); } } } //script579 package org.osmf.net{ import __AS3__.vec.Vector import flash.errors.IllegalOperationError import flash.events.NetStatusEvent import flash.events.TimerEvent import flash.net.NetConnection import flash.net.NetStream import flash.net.NetStreamPlayOptions import flash.net.NetStreamPlayTransitions import flash.utils.Dictionary import flash.utils.Timer import flash.utils.getTimer import org.osmf.utils.OSMFStrings //class(instance)_index:578 public class NetStreamSwitchManager extends NetStreamSwitchManagerBase { //static constructor public static function NetStreamSwitchManager$cinit() { //MethodID:5722, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 38 RULE_CHECK_INTERVAL = 500; DEFAULT_MAX_UP_SWITCHES_PER_STREAM_ITEM = 3; DEFAULT_WAIT_DURATION_AFTER_DOWN_SWITCH = 30000; DEFAULT_CLEAR_FAILED_COUNTS_INTERVAL = 0x493E0; } //static variables/etc. private static const RULE_CHECK_INTERVAL:Number = 500.0; //slotID:1 private static const DEFAULT_MAX_UP_SWITCHES_PER_STREAM_ITEM:int = 3;//slotID:2 private static const DEFAULT_WAIT_DURATION_AFTER_DOWN_SWITCH:int = 30000;//slotID:3 private static const DEFAULT_CLEAR_FAILED_COUNTS_INTERVAL:Number = 0x493E0;//slotID:4 //constructor public function NetStreamSwitchManager(hug1:NetConnection, hug2:NetStream, hug3:DynamicStreamingResource, hug4:NetStreamMetricsBase, hug5:Vector.) { //MethodID:5723, LocalCount= 6 , MaxScope= 1, MaxStack= 6, CodeLength= 204 super(); this.connection = hug1; this.netStream = hug2; this.dsResource = hug3; this.metrics = hug4; this.switchingRules = (hug5 || new Vector.()); this._currentIndex = Math.max(0, Math.min(this.maxAllowedIndex, this.dsResource.initialIndex)); this.checkRulesTimer = new Timer(RULE_CHECK_INTERVAL); this.checkRulesTimer.addEventListener(TimerEvent.TIMER, this.checkRules); this.failedDSI = new Dictionary(); this._bandwidthLimit = (((1.4 * hug3.streamItems[hug3.streamItems.length - 1].bitrate) * 1000) / 8); hug2.addEventListener(NetStatusEvent.NET_STATUS, this.onNetStatus); NetClient(hug2.client).addHandler(NetStreamCodes.ON_PLAY_STATUS, this.onPlayStatus, int.MAX_VALUE); } //variables/etc. private var metrics:NetStreamMetricsBase; //slotID:0 private var dsResource:DynamicStreamingResource; //slotID:0 private var clearFailedCountsTimer:Timer; //slotID:0 private var connection:NetConnection; //slotID:0 private var lastTransitionIndex:int = -1; //slotID:0 private var _bandwidthLimit:Number = 0.0; //slotID:0 private var switchingRules:Vector.; //slotID:0 private var failedDSI:Dictionary; //slotID:0 private var actualIndex:int = -1; //slotID:0 private var oldStreamName:String; //slotID:0 private var switching:Boolean; //slotID:0 private var checkRulesTimer:Timer; //slotID:0 private var _currentIndex:int; //slotID:0 private var dsiFailedCounts:Vector.; //slotID:0 private var netStream:NetStream; //slotID:0 override public function set autoSwitch(hug1:Boolean):void { //MethodID:5724, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 35 super.autoSwitch = hug1; if(autoSwitch){ this.checkRulesTimer.start(); }else{ this.checkRulesTimer.stop(); } } override public function get currentIndex():uint { //MethodID:5725, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._currentIndex; } override public function get maxAllowedIndex():int { //MethodID:5726, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 37 var hug1:int = (this.dsResource.streamItems.length - 1); return ((hug1 < super.maxAllowedIndex) ? hug1 : super.maxAllowedIndex); } override public function set maxAllowedIndex(hug1:int):void { //MethodID:5727, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 52 if(hug1 > this.dsResource.streamItems.length) throw new RangeError(OSMFStrings.getString(OSMFStrings.STREAMSWITCH_INVALID_INDEX)); super.maxAllowedIndex = hug1; this.metrics.maxAllowedIndex = hug1; } override public function switchTo(hug1:int):void { //MethodID:5728, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 97 if(!autoSwitch){ if((hug1 < 0) || (hug1 > this.maxAllowedIndex)) throw new RangeError(OSMFStrings.getString(OSMFStrings.STREAMSWITCH_INVALID_INDEX)); if(this.actualIndex == (-1)) this.prepareForSwitching(); this.executeSwitch(hug1); }else{ throw new IllegalOperationError(OSMFStrings.getString(OSMFStrings.STREAMSWITCH_STREAM_NOT_IN_MANUAL_MODE)); } } protected function canAutoSwitchNow(hug1:int):Boolean { //MethodID:5729, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 70 var hug2:int = 0; if(this.dsiFailedCounts[hug1] >= 1){ hug2 = getTimer(); if((hug2 - this.failedDSI[hug1]) < DEFAULT_WAIT_DURATION_AFTER_DOWN_SWITCH) return false; }else if(this.dsiFailedCounts[hug1] > DEFAULT_MAX_UP_SWITCHES_PER_STREAM_ITEM){ return false; } return true; } protected function get bandwidthLimit():Number { //MethodID:5730, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._bandwidthLimit; } protected function set bandwidthLimit(hug1:Number):void { //MethodID:5731, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this._bandwidthLimit = hug1; } private function executeSwitch(hug1:int):void { //MethodID:5732, LocalCount= 5 , MaxScope= 1, MaxStack= 5, CodeLength= 217 var hug2:NetStreamPlayOptions = new NetStreamPlayOptions(); var hug3:Object = NetStreamUtils.getPlayArgsForResource(this.dsResource); hug2.start = hug3.start; hug2.len = hug3.len; hug2.streamName = this.dsResource.streamItems[hug1].streamName; var hug4:String = this.oldStreamName; if((hug4 != null) && (hug4.indexOf("?") >= 0)){ hug2.oldStreamName = hug4.substr(0, hug4.indexOf("?")); }else{ hug2.oldStreamName = this.oldStreamName; } hug2.transition = NetStreamPlayTransitions.SWITCH; this.switching = true; this.netStream.play2(hug2); this.oldStreamName = this.dsResource.streamItems[hug1].streamName; if((hug1 < this.actualIndex) && autoSwitch){ this.incrementDSIFailedCount(this.actualIndex); this.failedDSI[this.actualIndex] = getTimer(); } } private function checkRules(hug1:TimerEvent):void { //MethodID:5733, LocalCount= 5 , MaxScope= 1, MaxStack= 3, CodeLength= 224 var hug4:int = 0; if((this.switchingRules == null) || this.switching) return; var hug2:int = int.MAX_VALUE; var hug3:int = 0; while(hug3 < this.switchingRules.length){ hug4 = this.switchingRules[hug3].getNewIndex(); if((hug4 != (-1)) && (hug4 < hug2)) hug2 = hug4; hug3++; } if((hug2 != (-1)) && (hug2 != int.MAX_VALUE) && (hug2 != this.actualIndex)) hug2 = Math.min(hug2, this.maxAllowedIndex); if((hug2 != (-1)) && (hug2 != int.MAX_VALUE) && (hug2 != this.actualIndex) && !this.switching && (hug2 <= this.maxAllowedIndex) && this.canAutoSwitchNow(hug2)) this.executeSwitch(hug2); } private function onNetStatus(hug1:NetStatusEvent):void { //MethodID:5734, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 296 switch(hug1.info.code){ case NetStreamCodes.NETSTREAM_PLAY_START: if(this.actualIndex == (-1)){ this.prepareForSwitching(); }else if(autoSwitch && (this.checkRulesTimer.running == false)){ this.checkRulesTimer.start(); } break; case NetStreamCodes.NETSTREAM_PLAY_TRANSITION: this.switching = false; this.actualIndex = this.dsResource.indexFromName(hug1.info.details); this.metrics.currentIndex = this.actualIndex; this.lastTransitionIndex = this.actualIndex; break; case NetStreamCodes.NETSTREAM_PLAY_FAILED: this.switching = false; break; case NetStreamCodes.NETSTREAM_SEEK_NOTIFY: this.switching = false; if(this.lastTransitionIndex >= 0) this._currentIndex = this.lastTransitionIndex; break; case NetStreamCodes.NETSTREAM_PLAY_STOP: this.checkRulesTimer.stop(); break; default: break; } } private function onPlayStatus(hug1:Object):void { //MethodID:5735, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 88 switch(hug1.code){ case NetStreamCodes.NETSTREAM_PLAY_TRANSITION_COMPLETE: if(this.lastTransitionIndex >= 0){ this._currentIndex = this.lastTransitionIndex; this.lastTransitionIndex = -1; } break; default: break; } } private function prepareForSwitching():void { //MethodID:5736, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 122 this.initDSIFailedCounts(); this.metrics.resource = this.dsResource; this.actualIndex = 0; this.lastTransitionIndex = -1; if((this.dsResource.initialIndex >= 0) && (this.dsResource.initialIndex < this.dsResource.streamItems.length)) this.actualIndex = this.dsResource.initialIndex; if(autoSwitch) this.checkRulesTimer.start(); this.setThrottleLimits(this.dsResource.streamItems.length - 1); this.metrics.currentIndex = this.actualIndex; } private function initDSIFailedCounts():void { //MethodID:5737, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 74 if(this.dsiFailedCounts != null){ this.dsiFailedCounts.length = 0; this.dsiFailedCounts = null; } this.dsiFailedCounts = new Vector.(); var hug1:int = 0; while(hug1 < this.dsResource.streamItems.length){ this.dsiFailedCounts.push(0); hug1++; } } private function incrementDSIFailedCount(hug1:int):void { //MethodID:5738, LocalCount= 5 , MaxScope= 1, MaxStack= 8, CodeLength= 96 this.dsiFailedCounts[hug1]++; if(this.dsiFailedCounts[hug1] > DEFAULT_MAX_UP_SWITCHES_PER_STREAM_ITEM){ if(this.clearFailedCountsTimer == null){ this.clearFailedCountsTimer = new Timer(DEFAULT_CLEAR_FAILED_COUNTS_INTERVAL, 1); this.clearFailedCountsTimer.addEventListener(TimerEvent.TIMER, this.clearFailedCounts); } this.clearFailedCountsTimer.start(); } } private function clearFailedCounts(hug1:TimerEvent):void { //MethodID:5739, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 30 this.clearFailedCountsTimer.removeEventListener(TimerEvent.TIMER, this.clearFailedCounts); this.clearFailedCountsTimer = null; this.initDSIFailedCounts(); } private function setThrottleLimits(hug1:int):void { //MethodID:5740, LocalCount= 2 , MaxScope= 1, MaxStack= 5, CodeLength= 23 this.connection.call("setBandwidthLimit", null, this._bandwidthLimit, this._bandwidthLimit); } } } //script580 package org.osmf.net{ import flash.events.EventDispatcher import flash.events.NetStatusEvent import flash.events.TimerEvent import flash.net.NetStream import flash.utils.Timer //class(instance)_index:579 public class NetStreamMetricsBase extends EventDispatcher { //static constructor public static function NetStreamMetricsBase$cinit() { //MethodID:5742, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 19 DEFAULT_UPDATE_INTERVAL = 100; DEFAULT_AVG_FRAMERATE_SAMPLE_SIZE = 50; } //static variables/etc. private static const DEFAULT_UPDATE_INTERVAL:Number = 100.0; //slotID:1 private static const DEFAULT_AVG_FRAMERATE_SAMPLE_SIZE:Number = 50.0;//slotID:2 //constructor public function NetStreamMetricsBase(hug1:NetStream) { //MethodID:5743, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 89 super(); this._netStream = hug1; this._droppedFPS = 0; this._lastFrameDropCounter = 0; this._lastFrameDropValue = 0; this._maxFPS = 0; this._averageDroppedFPSArray = new Array(); this._timer = new Timer(DEFAULT_UPDATE_INTERVAL); this._timer.addEventListener(TimerEvent.TIMER, this.onTimerEvent); hug1.addEventListener(NetStatusEvent.NET_STATUS, this.onNetStatusEvent); } //variables/etc. private var _timer:Timer; //slotID:0 private var _averageDroppedFPS:Number; //slotID:0 private var _maxFPS:Number; //slotID:0 private var _maxAllowedIndex:int; //slotID:0 private var _averageDroppedFPSArray:Array; //slotID:0 private var _droppedFPS:Number; //slotID:0 private var _resource:DynamicStreamingResource; //slotID:0 private var _lastFrameDropValue:Number; //slotID:0 private var _lastFrameDropCounter:Number; //slotID:0 private var _currentIndex:int; //slotID:0 private var _netStream:NetStream; //slotID:0 public function get resource():DynamicStreamingResource { //MethodID:5744, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._resource; } public function set resource(hug1:DynamicStreamingResource):void { //MethodID:5745, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 33 this._resource = hug1; this._maxAllowedIndex = ((hug1 != null) ? (hug1.streamItems.length - 1) : 0); } public function get netStream():NetStream { //MethodID:5746, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._netStream; } public function get currentIndex():int { //MethodID:5747, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._currentIndex; } public function set currentIndex(hug1:int):void { //MethodID:5748, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this._currentIndex = hug1; } public function get maxAllowedIndex():int { //MethodID:5749, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._maxAllowedIndex; } public function set maxAllowedIndex(hug1:int):void { //MethodID:5750, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this._maxAllowedIndex = hug1; } public function get updateInterval():Number { //MethodID:5751, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 10 return this._timer.delay; } public function set updateInterval(hug1:Number):void { //MethodID:5752, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 26 this._timer.delay = hug1; if(hug1 <= 0) this._timer.stop(); } public function get maxFPS():Number { //MethodID:5753, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._maxFPS; } public function get droppedFPS():Number { //MethodID:5754, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._droppedFPS; } public function get averageDroppedFPS():Number { //MethodID:5755, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._averageDroppedFPS; } protected function calculateMetrics():void { //MethodID:5756, LocalCount= 3 , MaxScope= 5, MaxStack= 4, CodeLength= 316 internal var totalDroppedFrameRate:Number; //slotID:1 internal var f:uint; //slotID:2 totalDroppedFrameRate = NaN; f = 0; try{ this._maxFPS = ((this.netStream.currentFPS > this._maxFPS) ? this.netStream.currentFPS : this._maxFPS); if((this._timer.currentCount - this._lastFrameDropCounter) > (1000 / this._timer.delay)){ this._droppedFPS = ((this.netStream.info.droppedFrames - this._lastFrameDropValue) / (((this._timer.currentCount - this._lastFrameDropCounter) * this._timer.delay) / 1000)); this._lastFrameDropCounter = this._timer.currentCount; this._lastFrameDropValue = this.netStream.info.droppedFrames; } this._averageDroppedFPSArray.unshift(this._droppedFPS); if(this._averageDroppedFPSArray.length > DEFAULT_AVG_FRAMERATE_SAMPLE_SIZE) this._averageDroppedFPSArray.pop(); totalDroppedFrameRate = 0; f = 0; while(f < this._averageDroppedFPSArray.length){ totalDroppedFrameRate += this._averageDroppedFPSArray[f]; f += 1; } this._averageDroppedFPS = ((this._averageDroppedFPSArray.length < DEFAULT_AVG_FRAMERATE_SAMPLE_SIZE) ? 0 : (totalDroppedFrameRate / this._averageDroppedFPSArray.length)); } catch(error:Error){ throw error; } } private function onNetStatusEvent(hug1:NetStatusEvent):void { //MethodID:5757, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 133 switch(hug1.info.code){ case NetStreamCodes.NETSTREAM_PLAY_START: if(!this._timer.running && (this.updateInterval > 0)) this._timer.start(); break; case NetStreamCodes.NETSTREAM_PLAY_STOP: this._timer.stop(); break; default: break; } } private function onTimerEvent(hug1:TimerEvent):void { //MethodID:5758, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 38 if(isNaN(this.netStream.time)){ this._timer.stop(); }else{ this.calculateMetrics(); } } } } //script581 package org.osmf.net.rtmpstreaming{ import flash.net.NetStream import org.osmf.net.NetStreamMetricsBase import org.osmf.net.StreamType //class(instance)_index:580 public class RTMPNetStreamMetrics extends NetStreamMetricsBase { //static constructor public static function RTMPNetStreamMetrics$cinit() { //MethodID:5760, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 11 DEFAULT_AVG_MAX_BYTES_SAMPLE_SIZE = 50; } //static variables/etc. private static const DEFAULT_AVG_MAX_BYTES_SAMPLE_SIZE:Number = 50.0;//slotID:1 //constructor public function RTMPNetStreamMetrics(hug1:NetStream) { //MethodID:5761, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 16 super(hug1); this._averageMaxBytesPerSecondArray = new Array(); } //variables/etc. private var _averageMaxBytesPerSecond:Number; //slotID:0 private var _averageMaxBytesPerSecondArray:Array; //slotID:0 public function get averageMaxBytesPerSecond():Number { //MethodID:5762, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._averageMaxBytesPerSecond; } override protected function calculateMetrics():void { //MethodID:5763, LocalCount= 3 , MaxScope= 5, MaxStack= 4, CodeLength= 282 internal var maxBytesPerSecond:Number; //slotID:1 internal var totalMaxBytesPerSecond:Number; //slotID:2 internal var peakMaxBytesPerSecond:Number; //slotID:3 internal var b:uint; //slotID:4 maxBytesPerSecond = NaN; totalMaxBytesPerSecond = NaN; peakMaxBytesPerSecond = NaN; b = 0; super.calculateMetrics(); try{ maxBytesPerSecond = netStream.info.maxBytesPerSecond; this._averageMaxBytesPerSecondArray.unshift(maxBytesPerSecond); if(this._averageMaxBytesPerSecondArray.length > DEFAULT_AVG_MAX_BYTES_SAMPLE_SIZE) this._averageMaxBytesPerSecondArray.pop(); totalMaxBytesPerSecond = 0; peakMaxBytesPerSecond = 0; b = 0; while(b < this._averageMaxBytesPerSecondArray.length){ totalMaxBytesPerSecond += this._averageMaxBytesPerSecondArray[b]; peakMaxBytesPerSecond = ((this._averageMaxBytesPerSecondArray[b] > peakMaxBytesPerSecond) ? this._averageMaxBytesPerSecondArray[b] : peakMaxBytesPerSecond); b += 1; } this._averageMaxBytesPerSecond = ((this._averageMaxBytesPerSecondArray.length < DEFAULT_AVG_MAX_BYTES_SAMPLE_SIZE) ? 0 : (this.isLive ? peakMaxBytesPerSecond : (totalMaxBytesPerSecond / this._averageMaxBytesPerSecondArray.length))); } catch(error:Error){ throw error; } } private function get isLive():Boolean { //MethodID:5764, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 26 return (resource && (resource.streamType == StreamType.LIVE)); } } } //script582 package org.osmf.net.rtmpstreaming{ import org.osmf.net.SwitchingRuleBase //class(instance)_index:581 public class SufficientBandwidthRule extends SwitchingRuleBase { //static constructor public static function SufficientBandwidthRule$cinit() { //MethodID:5766, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 19 BANDWIDTH_SAFETY_MULTIPLE = 1.15; MIN_DROPPED_FPS = 2; } //static variables/etc. private static const BANDWIDTH_SAFETY_MULTIPLE:Number = 1.15; //slotID:1 private static const MIN_DROPPED_FPS:int = 2; //slotID:2 //constructor public function SufficientBandwidthRule(hug1:RTMPNetStreamMetrics) { //MethodID:5767, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 7 super(hug1); } //variables/etc. override public function getNewIndex():int { //MethodID:5768, LocalCount= 4 , MaxScope= 1, MaxStack= 3, CodeLength= 174 var hug2:String = null; var hug3:int = 0; var hug1:int = -1; if(this.rtmpMetrics.averageMaxBytesPerSecond != 0){ hug3 = (this.rtmpMetrics.resource.streamItems.length - 1); while(hug3 >= 0){ if(((this.rtmpMetrics.averageMaxBytesPerSecond * 8) / 1024) > (this.rtmpMetrics.resource.streamItems[hug3].bitrate * BANDWIDTH_SAFETY_MULTIPLE)){ hug1 = hug3; break; } hug3--; } if(hug1 > this.rtmpMetrics.currentIndex){ hug1 = (((this.rtmpMetrics.droppedFPS < MIN_DROPPED_FPS) && (this.rtmpMetrics.netStream.bufferLength > this.rtmpMetrics.netStream.bufferTime)) ? hug1 : (-1)); }else{ hug1 = -1; } } return hug1; } private function get rtmpMetrics():RTMPNetStreamMetrics { //MethodID:5769, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 10 return (metrics as RTMPNetStreamMetrics); } } } //script583 package org.osmf.net.dvr{ import flash.errors.IllegalOperationError import flash.events.NetStatusEvent import flash.events.TimerEvent import flash.net.NetConnection import flash.net.NetStream import flash.utils.Timer import org.osmf.events.TimeEvent import org.osmf.media.MediaResourceBase import org.osmf.traits.TimeTrait import org.osmf.utils.OSMFStrings //class(instance)_index:582 public class DVRCastTimeTrait extends TimeTrait { //static constructor public static function DVRCastTimeTrait$cinit() { //MethodID:5771, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function DVRCastTimeTrait(hug1:NetConnection, hug2:NetStream, hug3:MediaResourceBase) { //MethodID:5772, LocalCount= 4 , MaxScope= 1, MaxStack= 3, CodeLength= 145 super(NaN); if((hug1 == null) || (hug2 == null)) throw new IllegalOperationError(OSMFStrings.getString(OSMFStrings.NULL_PARAM)); this.stream = hug2; hug2.addEventListener(NetStatusEvent.NET_STATUS, this.onNetStatus); this.durationUpdateTimer = new Timer(DVRCastConstants.LOCAL_DURATION_UPDATE_INTERVAL); this.durationUpdateTimer.addEventListener(TimerEvent.TIMER, this.onDurationUpdateTimer); this.durationUpdateTimer.start(); this.streamInfo = (hug3.getMetadataValue(DVRCastConstants.STREAM_INFO_KEY) as DVRCastStreamInfo); this.recordingInfo = (hug3.getMetadataValue(DVRCastConstants.RECORDING_INFO_KEY) as DVRCastRecordingInfo); } //variables/etc. private var stream:NetStream; //slotID:0 private var durationUpdateTimer:Timer; //slotID:0 private var streamInfo:DVRCastStreamInfo; //slotID:0 private var oldDuration:Number; //slotID:0 private var recordingInfo:DVRCastRecordingInfo; //slotID:0 override public function get duration():Number { //MethodID:5773, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 114 var hug1:Number = NaN; if(this.streamInfo.isRecording){ hug1 = ((this.recordingInfo.startDuration - this.recordingInfo.startOffset) + ((new Date().time - this.recordingInfo.startTime.time) / 1000)); }else{ hug1 = (this.streamInfo.currentLength - this.recordingInfo.startOffset); } hug1 = (isNaN(hug1) ? NaN : Math.max(0, hug1)); return hug1; } override public function get currentTime():Number { //MethodID:5774, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 10 return this.stream.time; } private function onDurationUpdateTimer(hug1:TimerEvent):void { //MethodID:5775, LocalCount= 3 , MaxScope= 1, MaxStack= 6, CodeLength= 46 var hug2:Number = this.duration; if(hug2 != this.oldDuration){ this.oldDuration = hug2; dispatchEvent(new TimeEvent(TimeEvent.DURATION_CHANGE, false, false, hug2)); } } private function onNetStatus(hug1:NetStatusEvent):void { //MethodID:5776, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 40 if(hug1.info.code == "NetStream.Play.Stop"){ if(this.durationUpdateTimer) this.durationUpdateTimer.stop(); signalComplete(); } } } } //script584 package org.osmf.net.dvr{ import __AS3__.vec.Vector import flash.events.Event import flash.net.NetConnection import flash.net.Responder import flash.utils.Dictionary import org.osmf.events.MediaError import org.osmf.events.MediaErrorCodes import org.osmf.events.NetConnectionFactoryEvent import org.osmf.media.URLResource import org.osmf.net.DynamicStreamingResource import org.osmf.net.NetConnectionFactory import org.osmf.net.NetConnectionFactoryBase import org.osmf.net.NetStreamUtils import org.osmf.net.StreamingURLResource //class(instance)_index:583 public class DVRCastNetConnectionFactory extends NetConnectionFactoryBase { //static constructor public static function DVRCastNetConnectionFactory$cinit() { //MethodID:5778, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function DVRCastNetConnectionFactory(hug1:NetConnectionFactoryBase=null) { //MethodID:5779, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 77 this.subscribedStreams = new Dictionary(); this.innerFactory = (hug1 || new NetConnectionFactory()); this.innerFactory.addEventListener(NetConnectionFactoryEvent.CREATION_COMPLETE, this.onCreationComplete); this.innerFactory.addEventListener(NetConnectionFactoryEvent.CREATION_ERROR, this.onCreationError); super(); } //variables/etc. private var subscribedStreams:Dictionary; //slotID:0 private var innerFactory:NetConnectionFactoryBase; //slotID:0 override public function create(hug1:URLResource):void { //MethodID:5780, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 12 this.innerFactory.create(hug1); } override public function closeNetConnection(hug1:NetConnection):void { //MethodID:5781, LocalCount= 3 , MaxScope= 1, MaxStack= 4, CodeLength= 50 var hug2:String = this.subscribedStreams[hug1]; if(hug2 != null){ hug1.call(DVRCastConstants.RPC_UNSUBSCRIBE, null, hug2); delete this.subscribedStreams[hug1]; } this.innerFactory.closeNetConnection(hug1); } private function onCreationComplete(hug1:NetConnectionFactoryEvent):void { //MethodID:5785, LocalCount= 3 , MaxScope= 2, MaxStack= 5, CodeLength= 446 internal var event:NetConnectionFactoryEvent; //slotID:1 internal var urlResource:URLResource; //slotID:2 internal var netConnection:NetConnection; //slotID:3 internal var streamNames:Vector.; //slotID:4 internal var totalRpcSubscribeInvocation:int; //slotID:5 internal var streamingResource:StreamingURLResource; //slotID:6 internal var urlIncludesFMSApplicationInstance:Boolean; //slotID:7 internal var dynamicResource:DynamicStreamingResource; //slotID:8 internal var responder:Responder; //slotID:9 internal var onStreamSubscriptionResult:Function; //slotID:10 internal var onStreamInfoRetrieverComplete:Function; //slotID:11 internal var onServerCallError:Function; //slotID:12 internal var items:Vector.; //slotID:13 internal var i:int; //slotID:14 urlResource = null; netConnection = null; streamNames = null; totalRpcSubscribeInvocation = 0; streamingResource = null; onStreamSubscriptionResult = null; onStreamInfoRetrieverComplete = null; onServerCallError = null; items = null; i = 0; event = hug1; onStreamSubscriptionResult = function(hug1:Object):void{ //MethodID:5782, LocalCount= 5 , MaxScope= 0, MaxStack= 4, CodeLength= 76 var hug2:DVRCastStreamInfoRetriever = null; totalRpcSubscribeInvocation--; if(totalRpcSubscribeInvocation <= 0){ hug2 = new DVRCastStreamInfoRetriever(netConnection, streamNames[0]); hug2.addEventListener(Event.COMPLETE, onStreamInfoRetrieverComplete); hug2.retrieve(); } }; onStreamInfoRetrieverComplete = function(hug1:Event):void{ //MethodID:5783, LocalCount= 6 , MaxScope= 0, MaxStack= 9, CodeLength= 319 var hug3:DVRCastRecordingInfo = null; var hug2:DVRCastStreamInfoRetriever = (hug1.target as DVRCastStreamInfoRetriever); removeEventListener(NetConnectionFactoryEvent.CREATION_COMPLETE, onCreationComplete); if(hug2.streamInfo != null){ if(hug2.streamInfo.offline == true){ dispatchEvent(new NetConnectionFactoryEvent(NetConnectionFactoryEvent.CREATION_ERROR, false, false, netConnection, urlResource, new MediaError(MediaErrorCodes.DVRCAST_CONTENT_OFFLINE))); i = 0; while(i < streamNames.length){ netConnection.call(DVRCastConstants.RPC_UNSUBSCRIBE, null, streamNames[i]); i++; } netConnection = null; }else{ hug3 = new DVRCastRecordingInfo(); hug3.startDuration = hug2.streamInfo.currentLength; hug3.startOffset = calculateOffset(hug2.streamInfo); hug3.startTime = new Date(); streamingResource.addMetadataValue(DVRCastConstants.STREAM_INFO_KEY, hug2.streamInfo); streamingResource.addMetadataValue(DVRCastConstants.RECORDING_INFO_KEY, hug3); subscribedStreams[netConnection] = streamNames[0]; dispatchEvent(new NetConnectionFactoryEvent(NetConnectionFactoryEvent.CREATION_COMPLETE, false, false, netConnection, urlResource)); } }else{ onServerCallError(hug2.error); } }; onServerCallError = function(hug1:Object):void{ //MethodID:5784, LocalCount= 2 , MaxScope= 0, MaxStack= 10, CodeLength= 58 dispatchEvent(new NetConnectionFactoryEvent(NetConnectionFactoryEvent.CREATION_ERROR, false, false, netConnection, urlResource, new MediaError(MediaErrorCodes.DVRCAST_SUBSCRIBE_FAILED, (hug1 ? hug1.message : "")))); }; urlResource = (event.resource as URLResource); netConnection = event.netConnection; streamNames = new Vector.(); totalRpcSubscribeInvocation = 0; event.stopImmediatePropagation(); streamingResource = (urlResource as StreamingURLResource); urlIncludesFMSApplicationInstance = (streamingResource ? streamingResource.urlIncludesFMSApplicationInstance : false); dynamicResource = (streamingResource as DynamicStreamingResource); if(dynamicResource != null){ items = dynamicResource.streamItems; totalRpcSubscribeInvocation = items.length; i = 0; while(i < items.length){ streamNames.push(items[i].streamName); i++; } }else{ totalRpcSubscribeInvocation = 1; streamNames.push(NetStreamUtils.getStreamNameFromURL(urlResource.url, urlIncludesFMSApplicationInstance)); } responder = new TestableResponder(onStreamSubscriptionResult, onServerCallError); i = 0; while(i < streamNames.length){ event.netConnection.call(DVRCastConstants.RPC_SUBSCRIBE, responder, streamNames[i]); i++; } } private function onCreationError(hug1:NetConnectionFactoryEvent):void { //MethodID:5786, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 15 dispatchEvent(hug1.clone()); } private function calculateOffset(hug1:DVRCastStreamInfo):Number { //MethodID:5787, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 22 return DVRUtils.calculateOffset(hug1.beginOffset, hug1.endOffset, hug1.currentLength); } } } //script585 package org.osmf.net.dvr{ import flash.net.NetConnection import flash.net.NetStream import flash.net.NetStreamPlayOptions import org.osmf.media.MediaResourceBase //class(instance)_index:584 public class DVRCastNetStream extends NetStream { //static constructor public static function DVRCastNetStream$cinit() { //MethodID:5789, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function DVRCastNetStream(hug1:NetConnection, hug2:MediaResourceBase) { //MethodID:5790, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 26 super(hug1); this.recordingInfo = (hug2.getMetadataValue(DVRCastConstants.RECORDING_INFO_KEY) as DVRCastRecordingInfo); } //variables/etc. private var recordingInfo:DVRCastRecordingInfo; //slotID:0 override public function play(... rest):void { //MethodID:5791, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 23 super.play(rest[0], this.recordingInfo.startOffset, -1); } override public function play2(hug1:NetStreamPlayOptions):void { //MethodID:5792, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 31 if(hug1){ hug1.start = this.recordingInfo.startOffset; hug1.len = -1; } super.play2(hug1); } } } //script586 package org.osmf.net.dvr{ import flash.errors.IllegalOperationError import flash.events.Event import flash.events.TimerEvent import flash.net.NetConnection import flash.net.NetStream import flash.utils.Timer import org.osmf.events.MediaError import org.osmf.events.MediaErrorCodes import org.osmf.events.MediaErrorEvent import org.osmf.media.MediaResourceBase import org.osmf.traits.DVRTrait import org.osmf.utils.OSMFStrings //class(instance)_index:585 public class DVRCastDVRTrait extends DVRTrait { //static constructor public static function DVRCastDVRTrait$cinit() { //MethodID:5794, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function DVRCastDVRTrait(hug1:NetConnection, hug2:NetStream, hug3:MediaResourceBase) { //MethodID:5795, LocalCount= 4 , MaxScope= 1, MaxStack= 4, CodeLength= 182 if((hug1 != null) && (hug2 != null)){ this.stream = hug2; this.streamInfo = (hug3.getMetadataValue(DVRCastConstants.STREAM_INFO_KEY) as DVRCastStreamInfo); this.recordingInfo = (hug3.getMetadataValue(DVRCastConstants.RECORDING_INFO_KEY) as DVRCastRecordingInfo); this.streamInfoRetriever = new DVRCastStreamInfoRetriever(hug1, this.streamInfo.streamName); this.streamInfoRetriever.addEventListener(Event.COMPLETE, this.onStreamInfoRetrieverComplete); this.streamInfoUpdateTimer = new Timer(DVRCastConstants.STREAM_INFO_UPDATE_DELAY); this.streamInfoUpdateTimer.addEventListener(TimerEvent.TIMER, this.onStreamInfoUpdateTimer); this.streamInfoUpdateTimer.start(); super(this.streamInfo.isRecording); this.updateProperties(); }else{ throw new IllegalOperationError(OSMFStrings.getString(OSMFStrings.NULL_PARAM)); } } //variables/etc. private var stream:NetStream; //slotID:0 private var connection:NetConnection; //slotID:0 private var streamInfoRetriever:DVRCastStreamInfoRetriever; //slotID:0 private var streamInfo:DVRCastStreamInfo; //slotID:0 private var streamInfoUpdateTimer:Timer; //slotID:0 private var offset:Number; //slotID:0 private var recordingInfo:DVRCastRecordingInfo; //slotID:0 override protected function isRecordingChangeStart(hug1:Boolean):void { //MethodID:5796, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 36 if(hug1){ this.recordingInfo.startDuration = this.streamInfo.currentLength; this.recordingInfo.startTime = new Date(); } } private function updateProperties():void { //MethodID:5797, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 17 setIsRecording(this.streamInfo.isRecording); } private function onStreamInfoUpdateTimer(hug1:TimerEvent):void { //MethodID:5798, LocalCount= 2 , MaxScope= 1, MaxStack= 1, CodeLength= 11 this.streamInfoRetriever.retrieve(); } private function onStreamInfoRetrieverComplete(hug1:Event):void { //MethodID:5799, LocalCount= 2 , MaxScope= 1, MaxStack= 7, CodeLength= 74 if(this.streamInfoRetriever.streamInfo != null){ this.streamInfo.readFromDVRCastStreamInfo(this.streamInfoRetriever.streamInfo); this.updateProperties(); }else{ dispatchEvent(new MediaErrorEvent(MediaErrorEvent.MEDIA_ERROR, false, false, new MediaError(MediaErrorCodes.DVRCAST_STREAM_INFO_RETRIEVAL_FAILED))); } } } } //script587 package org.osmf.elements.proxyClasses{ import org.osmf.events.LoadEvent import org.osmf.media.MediaElement import org.osmf.media.MediaResourceBase import org.osmf.traits.LoadTrait import org.osmf.traits.LoaderBase //class(instance)_index:586 public class LoadFromDocumentLoadTrait extends LoadTrait { //static constructor public static function LoadFromDocumentLoadTrait$cinit() { //MethodID:5801, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function LoadFromDocumentLoadTrait(hug1:LoaderBase, hug2:MediaResourceBase) { //MethodID:5802, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 8 super(hug1, hug2); } //variables/etc. private var _mediaElement:MediaElement; //slotID:0 override protected function loadStateChangeEnd():void { //MethodID:5803, LocalCount= 1 , MaxScope= 1, MaxStack= 6, CodeLength= 28 dispatchEvent(new LoadEvent(LoadEvent.LOAD_STATE_CHANGE, false, false, loadState)); } public function set mediaElement(hug1:MediaElement):void { //MethodID:5804, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this._mediaElement = hug1; } public function get mediaElement():MediaElement { //MethodID:5805, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._mediaElement; } } } //script588 package org.osmf.elements.audioClasses{ import flash.events.Event import flash.events.ProgressEvent import flash.media.Sound import org.osmf.events.LoadEvent import org.osmf.media.MediaResourceBase import org.osmf.traits.LoadState import org.osmf.traits.LoadTrait import org.osmf.traits.LoaderBase //class(instance)_index:587 public class SoundLoadTrait extends LoadTrait { //static constructor public static function SoundLoadTrait$cinit() { //MethodID:5807, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function SoundLoadTrait(hug1:LoaderBase, hug2:MediaResourceBase) { //MethodID:5808, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 8 super(hug1, hug2); } //variables/etc. private var lastBytesTotal:Number; //slotID:0 private var _sound:Sound; //slotID:0 public function get sound():Sound { //MethodID:5809, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._sound; } public function set sound(hug1:Sound):void { //MethodID:5810, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this._sound = hug1; } override protected function loadStateChangeStart(hug1:String):void { //MethodID:5811, LocalCount= 2 , MaxScope= 1, MaxStack= 6, CodeLength= 85 if(hug1 == LoadState.READY){ if(this._sound != null){ this._sound.addEventListener(Event.OPEN, this.bytesTotalCheckingHandler, false, 0, true); this._sound.addEventListener(ProgressEvent.PROGRESS, this.bytesTotalCheckingHandler, false, 0, true); } }else if(hug1 == LoadState.UNINITIALIZED){ this._sound = null; } } override public function get bytesLoaded():Number { //MethodID:5812, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 27 return (this._sound ? this._sound.bytesLoaded : NaN); } override public function get bytesTotal():Number { //MethodID:5813, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 27 return (this._sound ? this._sound.bytesTotal : NaN); } private function bytesTotalCheckingHandler(hug1:Event):void { //MethodID:5814, LocalCount= 3 , MaxScope= 1, MaxStack= 6, CodeLength= 69 var hug2:LoadEvent = null; if(this.lastBytesTotal != this._sound.bytesTotal){ hug2 = new LoadEvent(LoadEvent.BYTES_TOTAL_CHANGE, false, false, null, this._sound.bytesTotal); this.lastBytesTotal = this._sound.bytesTotal; dispatchEvent(hug2); } } } } //script589 package org.osmf.elements.audioClasses{ import flash.events.Event import flash.events.ProgressEvent import org.osmf.traits.TimeTrait //class(instance)_index:588 public class AudioTimeTrait extends TimeTrait { //static constructor public static function AudioTimeTrait$cinit() { //MethodID:5816, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function AudioTimeTrait(hug1:SoundAdapter) { //MethodID:5817, LocalCount= 2 , MaxScope= 1, MaxStack= 6, CodeLength= 66 super(); this.soundAdapter = hug1; hug1.addEventListener(ProgressEvent.PROGRESS, this.onDownloadProgress, false, 0, true); hug1.addEventListener(SoundAdapter.DOWNLOAD_COMPLETE, this.onDownloadComplete, false, 0, true); hug1.addEventListener(Event.COMPLETE, this.onPlaybackComplete, false, 0, true); } //variables/etc. private var soundAdapter:SoundAdapter; //slotID:0 override public function get currentTime():Number { //MethodID:5818, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 10 return this.soundAdapter.currentTime; } private function onDownloadProgress(hug1:Event):void { //MethodID:5819, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 69 if(!isNaN(this.soundAdapter.estimatedDuration) && (this.soundAdapter.estimatedDuration > 0)){ this.soundAdapter.removeEventListener(ProgressEvent.PROGRESS, this.onDownloadProgress); setDuration(this.soundAdapter.estimatedDuration); } } private function onDownloadComplete(hug1:Event):void { //MethodID:5820, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 17 setDuration(this.soundAdapter.estimatedDuration); } private function onPlaybackComplete(hug1:Event):void { //MethodID:5821, LocalCount= 2 , MaxScope= 1, MaxStack= 1, CodeLength= 10 signalComplete(); } } } //script590 package org.osmf.elements.audioClasses{ import org.osmf.traits.SeekTrait import org.osmf.traits.TimeTrait //class(instance)_index:589 public class AudioSeekTrait extends SeekTrait { //static constructor public static function AudioSeekTrait$cinit() { //MethodID:5823, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function AudioSeekTrait(hug1:TimeTrait, hug2:SoundAdapter) { //MethodID:5824, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 12 super(hug1); this.soundAdapter = hug2; } //variables/etc. private var soundAdapter:SoundAdapter; //slotID:0 override protected function seekingChangeStart(hug1:Boolean, hug2:Number):void { //MethodID:5825, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 17 if(hug1) this.soundAdapter.seek(hug2); } override protected function seekingChangeEnd(hug1:Number):void { //MethodID:5826, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 26 super.seekingChangeEnd(hug1); if(seeking == true) setSeeking(false, hug1); } } } //script591 package org.osmf.elements.audioClasses{ import flash.media.SoundTransform import org.osmf.traits.AudioTrait //class(instance)_index:590 public class AudioAudioTrait extends AudioTrait { //static constructor public static function AudioAudioTrait$cinit() { //MethodID:5828, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function AudioAudioTrait(hug1:SoundAdapter) { //MethodID:5829, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 31 super(); this.soundAdapter = hug1; hug1.soundTransform.volume = volume; hug1.soundTransform.pan = pan; } //variables/etc. private var soundAdapter:SoundAdapter; //slotID:0 override protected function volumeChangeStart(hug1:Number):void { //MethodID:5830, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 42 var hug2:SoundTransform = this.soundAdapter.soundTransform; hug2.volume = (muted ? 0 : hug1); this.soundAdapter.soundTransform = hug2; } override protected function mutedChangeStart(hug1:Boolean):void { //MethodID:5831, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 42 var hug2:SoundTransform = this.soundAdapter.soundTransform; hug2.volume = (hug1 ? 0 : volume); this.soundAdapter.soundTransform = hug2; } override protected function panChangeStart(hug1:Number):void { //MethodID:5832, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 27 var hug2:SoundTransform = this.soundAdapter.soundTransform; hug2.pan = hug1; this.soundAdapter.soundTransform = hug2; } } } //script592 package org.osmf.elements.audioClasses{ import flash.events.Event import flash.events.EventDispatcher import flash.events.IOErrorEvent import flash.events.ProgressEvent import flash.media.Sound import flash.media.SoundChannel import flash.media.SoundTransform import org.osmf.events.MediaError import org.osmf.events.MediaErrorCodes import org.osmf.events.MediaErrorEvent import org.osmf.media.MediaElement //class(instance)_index:591 public class SoundAdapter extends EventDispatcher { //static constructor public static function SoundAdapter$cinit() { //MethodID:5834, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 12 DOWNLOAD_COMPLETE = "downloadComplete"; } //static variables/etc. public static const DOWNLOAD_COMPLETE:String = "downloadComplete";//slotID:1 //constructor public function SoundAdapter(hug1:MediaElement, hug2:Sound) { //MethodID:5835, LocalCount= 3 , MaxScope= 1, MaxStack= 6, CodeLength= 81 super(); this.owner = hug1; this.sound = hug2; this._soundTransform = new SoundTransform(); hug2.addEventListener(Event.COMPLETE, this.onDownloadComplete, false, 0, true); hug2.addEventListener(ProgressEvent.PROGRESS, this.onProgress, false, 0, true); hug2.addEventListener(IOErrorEvent.IO_ERROR, this.onIOError, false, 0, true); } //variables/etc. private var channel:SoundChannel; //slotID:0 private var sound:Sound; //slotID:0 private var lastStartTime:Number = 0.0; //slotID:0 private var playing:Boolean = false; //slotID:0 private var owner:MediaElement; //slotID:0 private var _soundTransform:SoundTransform; //slotID:0 public function get currentTime():Number { //MethodID:5836, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 37 return ((this.channel != null) ? (this.channel.position / 1000) : (this.lastStartTime / 1000)); } public function get estimatedDuration():Number { //MethodID:5837, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 30 return (this.sound.length / ((1000 * this.sound.bytesLoaded) / this.sound.bytesTotal)); } public function get soundTransform():SoundTransform { //MethodID:5838, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._soundTransform; } public function set soundTransform(hug1:SoundTransform):void { //MethodID:5839, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 25 this._soundTransform = hug1; if(this.channel != null) this.channel.soundTransform = hug1; } public function play(hug1:Number=-1.0):Boolean { //MethodID:5840, LocalCount= 4 , MaxScope= 5, MaxStack= 7, CodeLength= 180 internal var time:Number = -1.0; //slotID:1 internal var success:Boolean; //slotID:2 time = hug1; success = false; if(this.channel == null){ try{ this.channel = this.sound.play((time != (-1)) ? time : this.lastStartTime); } catch(error:ArgumentError){ channel = null; } if(this.channel != null){ this.playing = true; this.channel.soundTransform = this._soundTransform; this.channel.addEventListener(Event.SOUND_COMPLETE, this.onSoundComplete); success = true; }else{ this.owner.dispatchEvent(new MediaErrorEvent(MediaErrorEvent.MEDIA_ERROR, false, false, new MediaError(MediaErrorCodes.SOUND_PLAY_FAILED))); } } return success; } public function pause():void { //MethodID:5841, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 33 if(this.channel != null){ this.lastStartTime = this.channel.position; this.clearChannel(); this.playing = false; } } public function stop():void { //MethodID:5842, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 28 if(this.channel != null){ this.lastStartTime = 0; this.clearChannel(); this.playing = false; } } public function seek(hug1:Number):void { //MethodID:5843, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 44 var hug2:Boolean = this.playing; if(this.channel != null) this.clearChannel(); this.play(hug1 * 1000); if(hug2 == false) this.pause(); } private function clearChannel():void { //MethodID:5844, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 42 if(this.channel != null){ this.channel.removeEventListener(Event.SOUND_COMPLETE, this.onSoundComplete); this.channel.stop(); this.channel = null; } } private function onSoundComplete(hug1:Event):void { //MethodID:5845, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 41 this.lastStartTime = this.channel.position; this.clearChannel(); this.playing = false; dispatchEvent(new Event(Event.COMPLETE)); } private function onDownloadComplete(hug1:Event):void { //MethodID:5846, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 18 dispatchEvent(new Event(DOWNLOAD_COMPLETE)); } private function onProgress(hug1:ProgressEvent):void { //MethodID:5847, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 15 dispatchEvent(hug1.clone()); } private function onIOError(hug1:IOErrorEvent):void { //MethodID:5848, LocalCount= 2 , MaxScope= 1, MaxStack= 7, CodeLength= 39 this.owner.dispatchEvent(new MediaErrorEvent(MediaErrorEvent.MEDIA_ERROR, false, false, new MediaError(MediaErrorCodes.IO_ERROR))); } } } //script593 package org.osmf.elements.audioClasses{ import flash.events.Event import org.osmf.traits.PlayState import org.osmf.traits.PlayTrait //class(instance)_index:592 public class AudioPlayTrait extends PlayTrait { //static constructor public static function AudioPlayTrait$cinit() { //MethodID:5850, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function AudioPlayTrait(hug1:SoundAdapter) { //MethodID:5851, LocalCount= 2 , MaxScope= 1, MaxStack= 6, CodeLength= 29 super(); this.soundAdapter = hug1; hug1.addEventListener(Event.COMPLETE, this.onPlaybackComplete, false, 1, true); } //variables/etc. private var soundAdapter:SoundAdapter; //slotID:0 private var lastPlayFailed:Boolean = false; //slotID:0 override protected function playStateChangeStart(hug1:String):void { //MethodID:5852, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 73 if(hug1 == PlayState.PLAYING){ this.lastPlayFailed = !this.soundAdapter.play(); }else if(hug1 == PlayState.PAUSED){ this.soundAdapter.pause(); }else if(hug1 == PlayState.STOPPED){ this.soundAdapter.stop(); } } override protected function playStateChangeEnd():void { //MethodID:5853, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 32 if(this.lastPlayFailed){ stop(); this.lastPlayFailed = false; }else{ super.playStateChangeEnd(); } } private function onPlaybackComplete(hug1:Event):void { //MethodID:5854, LocalCount= 2 , MaxScope= 1, MaxStack= 1, CodeLength= 10 stop(); } } } //script594 package org.osmf.elements.f4mClasses{ import __AS3__.vec.Vector import org.osmf.net.httpstreaming.dvr.DVRInfo //class(instance)_index:593 public class Manifest extends Object { //static constructor public static function Manifest$cinit() { //MethodID:5856, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function Manifest() { //MethodID:5857, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 48 this.bootstrapInfos = new Vector.(); this.drmAdditionalHeaders = new Vector.(); this.media = new Vector.(); super(); } //variables/etc. public var drmAdditionalHeaders:Vector.; //slotID:0 public var mimeType:String; //slotID:0 public var startTime:Date; //slotID:0 public var urlIncludesFMSApplicationInstance:Boolean = false; //slotID:0 public var duration:Number; //slotID:0 public var deliveryType:String; //slotID:0 public var streamType:String; //slotID:0 public var id:String; //slotID:0 public var media:Vector.; //slotID:0 public var baseURL:String; //slotID:0 public var dvrInfo:DVRInfo = null; //slotID:0 public var bootstrapInfos:Vector.; //slotID:0 } } //script595 package org.osmf.elements.f4mClasses{ import flash.utils.ByteArray //class(instance)_index:594 public class DRMAdditionalHeader extends Object { //static constructor public static function DRMAdditionalHeader$cinit() { //MethodID:5859, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function DRMAdditionalHeader() { //MethodID:5860, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 super(); } //variables/etc. public var data:ByteArray; //slotID:0 public var id:String; //slotID:0 public var url:String; //slotID:0 } } //script596 package org.osmf.elements.f4mClasses{ import __AS3__.vec.Vector import flash.utils.ByteArray import org.osmf.media.MediaResourceBase import org.osmf.media.MediaType import org.osmf.media.URLResource import org.osmf.metadata.Metadata import org.osmf.metadata.MetadataNamespaces import org.osmf.net.DynamicStreamingItem import org.osmf.net.DynamicStreamingResource import org.osmf.net.NetStreamUtils import org.osmf.net.StreamType import org.osmf.net.StreamingURLResource import org.osmf.net.httpstreaming.dvr.DVRInfo import org.osmf.utils.OSMFStrings import org.osmf.utils.URL //class(instance)_index:595 public class ManifestParser extends Object { //static constructor public static function ManifestParser$cinit() { //MethodID:5862, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //static variables/etc. internal static const xmlns:* = "http://ns.adobe.com/f4m/1.0"; //slotID:1 //variables/etc. public function parse(hug1:String, hug2:String=null):Manifest { //MethodID:5863, LocalCount= 16 , MaxScope= 1, MaxStack= 5, CodeLength= 853 var hug7:XML = null; var hug8:Boolean = false; var hug9:Boolean = false; var hug10:XML = null; var hug11:XML = null; var hug12:XML = null; var hug13:Media = null; var hug3:Manifest = new Manifest(); var hug4:Boolean = false; var hug5:XML = new XML(hug1); if(hug5.id.length() > 0) hug3.id = hug5.id.text(); if(hug5.duration.length() > 0) hug3.duration = hug5.duration.text(); if(hug5.startTime.length() > 0) hug3.startTime = DateUtil.parseW3CDTF(hug5.startTime.text()); if(hug5.mimeType.length() > 0) hug3.mimeType = hug5.mimeType.text(); if(hug5.streamType.length() > 0) hug3.streamType = hug5.streamType.text(); if(hug5.deliveryType.length() > 0) hug3.deliveryType = hug5.deliveryType.text(); if(hug5.baseURL.length() > 0) hug3.baseURL = hug5.baseURL.text(); if(hug5.urlIncludesFMSApplicationInstance.length() > 0) hug3.urlIncludesFMSApplicationInstance = (hug5.urlIncludesFMSApplicationInstance.text() == "true"); var hug6:String = ((hug3.baseURL != null) ? hug3.baseURL : hug2); for each(hug7 in hug5.dvrInfo){ this.parseDVRInfo(hug7, hug6, hug3); break; } hug8 = false; hug9 = false; for each(hug10 in hug5.media){ hug13 = this.parseMedia(hug10, hug6); if((((hug13.rtmfpGroupspec != null) && (hug13.rtmfpGroupspec.length > 0)) && ((hug13.rtmfpStreamName == null) || (hug13.rtmfpStreamName.length <= 0))) || (((hug13.rtmfpStreamName != null) && (hug13.rtmfpStreamName.length > 0)) && ((hug13.rtmfpGroupspec == null) || (hug13.rtmfpGroupspec.length <= 0)))) hug9 = true; if((hug13.rtmfpGroupspec != null) && (hug13.rtmfpGroupspec.length > 0)) hug4 = true; hug3.media.push(hug13); hug8 = (hug8 || isNaN(hug13.bitrate)); } if(hug9) throw new ArgumentError(OSMFStrings.getString(OSMFStrings.MULTICAST_PARAMETER_INVALID)); if((hug3.media.length > 1) && hug4) throw new ArgumentError(OSMFStrings.getString(OSMFStrings.MULTICAST_NOT_SUPPORT_MBR)); if(hug4) hug3.streamType = StreamType.LIVE; if((hug3.media.length > 1) && hug8) throw new ArgumentError(OSMFStrings.getString(OSMFStrings.F4M_PARSE_BITRATE_MISSING)); for each(hug11 in hug5.drmAdditionalHeader){ this.parseDRMAdditionalHeader(hug11, hug3.media, hug6, hug3); } for each(hug12 in hug5.bootstrapInfo){ this.parseBootstrapInfo(hug12, hug3.media, hug6, hug3); } this.generateRTMPBaseURL(hug3); return hug3; } private function parseMedia(hug1:XML, hug2:String):Media { //MethodID:5864, LocalCount= 5 , MaxScope= 5, MaxStack= 3, CodeLength= 664 internal var value:XML; //slotID:1 internal var baseUrl:String; //slotID:2 internal var decoder:Base64Decoder; //slotID:3 internal var media:Media; //slotID:4 internal var data:ByteArray; //slotID:5 internal var header:String; //slotID:6 internal var metaInfo:Object; //slotID:7 decoder = null; data = null; header = null; metaInfo = null; value = hug1; baseUrl = hug2; media = new Media(); if(value.attribute("url").length() > 0){ media.url = value.@url; }else{ throw new ArgumentError(OSMFStrings.getString(OSMFStrings.F4M_PARSE_MEDIA_URL_MISSING)); } if(value.attribute("bitrate").length() > 0) media.bitrate = value.@bitrate; if(value.attribute("drmAdditionalHeaderId").length() > 0) media.drmAdditionalHeader.id = value.@drmAdditionalHeaderId; if(value.attribute("bootstrapInfoId").length() > 0){ media.bootstrapInfo = new BootstrapInfo(); media.bootstrapInfo.id = value.@bootstrapInfoId; } if(value.attribute("height").length() > 0) media.height = value.@height; if(value.attribute("width").length() > 0) media.width = value.@width; if(value.attribute("rtmfpGroupspec").length() > 0) media.rtmfpGroupspec = value.@rtmfpGroupspec; if(value.attribute("rtmfpStreamName").length() > 0) media.rtmfpStreamName = value.@rtmfpStreamName; if(value.moov.length() > 0){ decoder = new Base64Decoder(); decoder.decode(value.moov.text()); media.moov = decoder.drain(); } if(value.metadata.length() > 0){ decoder = new Base64Decoder(); decoder.decode(value.metadata.text()); data = decoder.drain(); data.position = 0; data.objectEncoding = 0; try{ header = (data.readObject() as String); metaInfo = data.readObject(); media.metadata = metaInfo; } catch(e:Error){ } } if(value.xmpMetadata.length() > 0){ decoder = new Base64Decoder(); decoder.decode(value.xmpMetadata.text()); media.xmp = decoder.drain(); } return media; } private function parseDVRInfo(hug1:XML, hug2:String, hug3:Manifest):void { //MethodID:5865, LocalCount= 8 , MaxScope= 1, MaxStack= 5, CodeLength= 272 var hug5:String = null; var hug6:Number = NaN; var hug7:String = null; var hug4:DVRInfo = new DVRInfo(); if(hug1.attribute("id").length() > 0) hug4.id = hug1.@id; if(hug1.attribute("url").length() > 0){ hug5 = hug1.@url; if(!this.isAbsoluteURL(hug5)) hug5 = (hug2 + "/" + hug5); hug4.url = hug5; } if(hug1.attribute("beginOffset").length() > 0) hug4.beginOffset = Math.max(0, parseInt(hug1.@beginOffset)); if(hug1.attribute("endOffset").length() > 0){ hug6 = new Number(hug1.@endOffset); if((hug6 > 0) && (hug6 < 1)){ hug4.endOffset = 1; }else{ hug4.endOffset = Math.max(0, hug6); } } if(hug1.attribute("offline").length() > 0){ hug7 = hug1.@offline; hug4.offline = (hug7.toLowerCase() == "true"); } hug3.dvrInfo = hug4; } private function parseDRMAdditionalHeader(hug1:XML, hug2:Vector., hug3:String, hug4:Manifest):void { //MethodID:5866, LocalCount= 12 , MaxScope= 1, MaxStack= 2, CodeLength= 226 var hug6:Media = null; var hug8:String = null; var hug9:Base64Decoder = null; var hug5:String = null; var hug7:DRMAdditionalHeader = new DRMAdditionalHeader(); if(hug1.attribute("id").length() > 0) hug7.id = hug1.@id; if(hug1.attribute("url").length() > 0){ hug5 = hug1.@url; if(!this.isAbsoluteURL(hug5)) hug5 = (hug3 + "/" + hug5); hug7.url = hug5; }else{ hug8 = hug1.text(); hug9 = new Base64Decoder(); hug9.decode(hug8); hug7.data = hug9.drain(); } hug4.drmAdditionalHeaders.push(hug7); for each(hug6 in hug2){ if(hug6.drmAdditionalHeader.id == hug7.id) hug6.drmAdditionalHeader = hug7; } } private function parseBootstrapInfo(hug1:XML, hug2:Vector., hug3:String, hug4:Manifest):void { //MethodID:5867, LocalCount= 12 , MaxScope= 1, MaxStack= 3, CodeLength= 299 var hug5:Media = null; var hug8:String = null; var hug9:Base64Decoder = null; var hug6:String = null; var hug7:BootstrapInfo = new BootstrapInfo(); if(hug1.attribute("profile").length() > 0){ hug7.profile = hug1.@profile; }else{ throw new ArgumentError(OSMFStrings.getString(OSMFStrings.F4M_PARSE_PROFILE_MISSING)); } if(hug1.attribute("id").length() > 0) hug7.id = hug1.@id; if(hug1.attribute("url").length() > 0){ hug6 = hug1.@url; if(!this.isAbsoluteURL(hug6) && (hug3 != null)) hug6 = (hug3 + "/" + hug6); hug7.url = hug6; }else{ hug8 = hug1.text(); hug9 = new Base64Decoder(); hug9.decode(hug8); hug7.data = hug9.drain(); } for each(hug5 in hug2){ if(hug5.bootstrapInfo == null){ hug5.bootstrapInfo = hug7; }else if(hug5.bootstrapInfo.id == hug7.id){ hug5.bootstrapInfo = hug7; } } } private function generateRTMPBaseURL(hug1:Manifest):void { //MethodID:5868, LocalCount= 5 , MaxScope= 1, MaxStack= 2, CodeLength= 78 var hug2:Media = null; if(hug1.baseURL == null){ for each(hug2 in hug1.media){ if(NetStreamUtils.isRTMPStream(hug2.url)){ hug1.baseURL = hug2.url; break; } } } } public function createResource(hug1:Manifest, hug2:URLResource):MediaResourceBase { //MethodID:5869, LocalCount= 22 , MaxScope= 1, MaxStack= 5, CodeLength= 1559 var hug5:StreamingURLResource = null; var hug6:Media = null; var hug7:Vector. = null; var hug8:String = null; var hug9:String = null; var hug14:String = null; var hug15:String = null; var hug16:DynamicStreamingResource = null; var hug17:Vector. = null; var hug18:String = null; var hug19:DynamicStreamingItem = null; var hug3:Metadata = null; var hug4:Metadata = null; var hug10:URL = new URL(hug2.url); var hug11:String = ("/" + hug10.path); hug11 = hug11.substr(0, hug11.lastIndexOf("/")); var hug12:String = ((hug10.protocol + "://" + hug10.host) + ((hug10.port != "") ? (":" + hug10.port) : "") + hug11); if(hug1.media.length == 1){ hug6 = (hug1.media[0] as Media); hug8 = hug6.url; hug14 = null; if(this.isAbsoluteURL(hug8)){ hug14 = hug6.url.substr(0, hug6.url.lastIndexOf("/")); }else if(hug1.baseURL != null){ hug14 = hug1.baseURL; }else{ hug14 = hug12; } if(this.isAbsoluteURL(hug8)){ hug5 = new StreamingURLResource(hug8, hug1.streamType); }else if(hug1.baseURL != null){ hug5 = new StreamingURLResource((hug1.baseURL + "/" + hug8), this.streamType(hug1)); }else{ hug5 = new StreamingURLResource((hug12 + "/" + hug8), this.streamType(hug1)); } hug5.urlIncludesFMSApplicationInstance = hug1.urlIncludesFMSApplicationInstance; if(hug6.bootstrapInfo != null){ hug7 = new Vector.(); hug7.push(hug14); hug9 = hug6.bootstrapInfo.url; if((hug6.bootstrapInfo.url != null) && (this.isAbsoluteURL(hug6.bootstrapInfo.url) == false)){ hug9 = (hug12 + "/" + hug9); hug6.bootstrapInfo.url = hug9; } hug4 = new Metadata(); hug4.addValue(MetadataNamespaces.HTTP_STREAMING_BOOTSTRAP_KEY, hug6.bootstrapInfo); if(hug7.length > 0) hug4.addValue(MetadataNamespaces.HTTP_STREAMING_SERVER_BASE_URLS_KEY, hug7); } if(hug6.metadata != null){ if(hug4 == null) hug4 = new Metadata(); hug4.addValue(MetadataNamespaces.HTTP_STREAMING_STREAM_METADATA_KEY, hug6.metadata); } if(hug6.xmp != null){ if(hug4 == null) hug4 = new Metadata(); hug4.addValue(MetadataNamespaces.HTTP_STREAMING_XMP_METADATA_KEY, hug6.xmp); } if(hug6.drmAdditionalHeader != null){ hug3 = new Metadata(); if((Media(hug1.media[0]).drmAdditionalHeader != null) && (Media(hug1.media[0]).drmAdditionalHeader.data != null)){ hug3.addValue(MetadataNamespaces.DRM_ADDITIONAL_HEADER_KEY, Media(hug1.media[0]).drmAdditionalHeader.data); hug5.drmContentData = this.extractDRMMetadata(Media(hug1.media[0]).drmAdditionalHeader.data); } } if(hug4 != null) hug5.addMetadataValue(MetadataNamespaces.HTTP_STREAMING_METADATA, hug4); if(hug3 != null) hug5.addMetadataValue(MetadataNamespaces.DRM_METADATA, hug3); hug5.rtmfpGroupspec = hug6.rtmfpGroupspec; hug5.rtmfpStreamName = hug6.rtmfpStreamName; }else if(hug1.media.length > 1){ hug15 = ((hug1.baseURL != null) ? hug1.baseURL : hug12); hug7 = new Vector.(); hug7.push(hug15); hug16 = new DynamicStreamingResource(hug15, this.streamType(hug1)); hug16.urlIncludesFMSApplicationInstance = hug1.urlIncludesFMSApplicationInstance; hug17 = new Vector.(); if(NetStreamUtils.isRTMPStream(hug15) == false){ hug4 = new Metadata(); hug16.addMetadataValue(MetadataNamespaces.HTTP_STREAMING_METADATA, hug4); hug4.addValue(MetadataNamespaces.HTTP_STREAMING_SERVER_BASE_URLS_KEY, hug7); } for each(hug6 in hug1.media){ if(this.isAbsoluteURL(hug6.url)){ hug18 = NetStreamUtils.getStreamNameFromURL(hug6.url); }else{ hug18 = hug6.url; } hug19 = new DynamicStreamingItem(hug18, hug6.bitrate, hug6.width, hug6.height); hug17.push(hug19); if(hug6.drmAdditionalHeader != null){ if(hug16.getMetadataValue(MetadataNamespaces.DRM_METADATA) == null){ hug3 = new Metadata(); hug16.addMetadataValue(MetadataNamespaces.DRM_METADATA, hug3); } if((hug6.drmAdditionalHeader != null) && (hug6.drmAdditionalHeader.data != null)){ hug3.addValue(hug19.streamName, this.extractDRMMetadata(hug6.drmAdditionalHeader.data)); hug3.addValue((MetadataNamespaces.DRM_ADDITIONAL_HEADER_KEY + hug19.streamName), hug6.drmAdditionalHeader.data); } } if(hug6.bootstrapInfo != null){ hug9 = (hug6.bootstrapInfo.url ? hug6.bootstrapInfo.url : null); if((hug6.bootstrapInfo.url != null) && (this.isAbsoluteURL(hug6.bootstrapInfo.url) == false)){ hug9 = (hug12 + "/" + hug9); hug6.bootstrapInfo.url = hug9; } hug4.addValue((MetadataNamespaces.HTTP_STREAMING_BOOTSTRAP_KEY + hug19.streamName), hug6.bootstrapInfo); } if(hug6.metadata != null) hug4.addValue((MetadataNamespaces.HTTP_STREAMING_STREAM_METADATA_KEY + hug19.streamName), hug6.metadata); if(hug6.xmp != null) hug4.addValue((MetadataNamespaces.HTTP_STREAMING_XMP_METADATA_KEY + hug19.streamName), hug6.xmp); } hug16.streamItems = hug17; hug5 = hug16; }else if(hug1.baseURL == null){ throw new ArgumentError(OSMFStrings.getString(OSMFStrings.F4M_PARSE_MEDIA_URL_MISSING)); } if(hug1.mimeType != null){ hug5.mediaType = MediaType.VIDEO; hug5.mimeType = hug1.mimeType; } var hug13:StreamingURLResource = (hug2 as StreamingURLResource); if(hug13 != null){ hug5.clipStartTime = hug13.clipStartTime; hug5.clipEndTime = hug13.clipEndTime; } hug5.addMetadataValue(MetadataNamespaces.DERIVED_RESOURCE_METADATA, hug2); this.addDVRInfo(hug1, hug5); return hug5; } private function isAbsoluteURL(hug1:String):Boolean { //MethodID:5870, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 19 var hug2:URL = new URL(hug1); return hug2.absolute; } private function extractDRMMetadata(hug1:ByteArray):ByteArray { //MethodID:5871, LocalCount= 4 , MaxScope= 5, MaxStack= 3, CodeLength= 277 internal var data:ByteArray; //slotID:1 internal var metadata:ByteArray; //slotID:2 internal var header:Object; //slotID:3 internal var encryption:Object; //slotID:4 internal var enc:Object; //slotID:5 internal var params:Object; //slotID:6 internal var keyInfo:Object; //slotID:7 internal var fmrmsMetadata:Object; //slotID:8 internal var drmMetadata:String; //slotID:9 internal var decoder:Base64Decoder; //slotID:10 header = null; encryption = null; enc = null; params = null; keyInfo = null; fmrmsMetadata = null; drmMetadata = null; decoder = null; data = hug1; metadata = null; data.position = 0; data.objectEncoding = 0; try{ header = data.readObject(); encryption = data.readObject(); enc = encryption["Encryption"]; params = enc["Params"]; keyInfo = params["KeyInfo"]; fmrmsMetadata = keyInfo["FMRMS_METADATA"]; drmMetadata = (fmrmsMetadata["Metadata"] as String); decoder = new Base64Decoder(); decoder.decode(drmMetadata); metadata = decoder.drain(); } catch(e:Error){ metadata = null; } return metadata; } private function addDVRInfo(hug1:Manifest, hug2:StreamingURLResource):void { //MethodID:5872, LocalCount= 4 , MaxScope= 1, MaxStack= 3, CodeLength= 108 if(hug1.dvrInfo == null) return; var hug3:Metadata = new Metadata(); hug3.addValue(MetadataNamespaces.HTTP_STREAMING_DVR_BEGIN_OFFSET_KEY, hug1.dvrInfo.beginOffset); hug3.addValue(MetadataNamespaces.HTTP_STREAMING_DVR_END_OFFSET_KEY, hug1.dvrInfo.endOffset); hug3.addValue(MetadataNamespaces.HTTP_STREAMING_DVR_OFFLINE_KEY, hug1.dvrInfo.offline); hug3.addValue(MetadataNamespaces.HTTP_STREAMING_DVR_ID_KEY, hug1.dvrInfo.id); hug2.addMetadataValue(MetadataNamespaces.DVR_METADATA, hug3); } private function streamType(hug1:Manifest):String { //MethodID:5873, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 47 return (((hug1.streamType == StreamType.LIVE) && (hug1.dvrInfo != null)) ? StreamType.DVR : hug1.streamType); } //constructor public function ManifestParser() { //MethodID:5874, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 super(); } } } //script597 package org.osmf.net.httpstreaming{ import __AS3__.vec.Vector import flash.utils.ByteArray import org.osmf.elements.f4mClasses.BootstrapInfo import org.osmf.media.URLResource import org.osmf.metadata.Metadata import org.osmf.metadata.MetadataNamespaces import org.osmf.net.DynamicStreamingItem import org.osmf.net.DynamicStreamingResource import org.osmf.net.httpstreaming.dvr.DVRInfo import org.osmf.net.httpstreaming.f4f.HTTPStreamingF4FIndexInfo import org.osmf.net.httpstreaming.f4f.HTTPStreamingF4FStreamInfo //class(instance)_index:596 public class HTTPStreamingUtils extends Object { //static constructor public static function HTTPStreamingUtils$cinit() { //MethodID:5876, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //static variables/etc. public static function createHTTPStreamingMetadata(hug1:String, hug2:ByteArray, hug3:Vector.):Metadata { //dispID:3, MethodID:5877, LocalCount= 6 , MaxScope= 1, MaxStack= 3, CodeLength= 110 var hug4:Metadata = new Metadata(); var hug5:BootstrapInfo = new BootstrapInfo(); if((hug1 != null) && (hug1.length > 0)) hug5.url = hug1; hug5.data = hug2; hug4.addValue(MetadataNamespaces.HTTP_STREAMING_BOOTSTRAP_KEY, hug5); if((hug3 != null) && (hug3.length > 0)) hug4.addValue(MetadataNamespaces.HTTP_STREAMING_SERVER_BASE_URLS_KEY, hug3); return hug4; } public static function createF4FIndexInfo(hug1:URLResource):HTTPStreamingF4FIndexInfo { //dispID:4, MethodID:5878, LocalCount= 8 , MaxScope= 1, MaxStack= 4, CodeLength= 175 var hug5:Vector. = null; var hug6:Vector. = null; var hug7:DVRInfo = null; var hug2:HTTPStreamingF4FIndexInfo = null; var hug3:Metadata = (hug1.getMetadataValue(MetadataNamespaces.HTTP_STREAMING_METADATA) as Metadata); var hug4:Metadata = (hug1.getMetadataValue(MetadataNamespaces.DVR_METADATA) as Metadata); if(hug3 != null){ hug5 = (hug3.getValue(MetadataNamespaces.HTTP_STREAMING_SERVER_BASE_URLS_KEY) as Vector.); hug6 = generateStreamInfos(hug1); hug7 = generateDVRInfo(hug4); hug2 = new HTTPStreamingF4FIndexInfo((((hug5 != null) && (hug5.length > 0)) ? hug5[0] : null), hug6, hug7); } return hug2; } public static function normalizeURL(hug1:String):String { //dispID:5, MethodID:5879, LocalCount= 8 , MaxScope= 1, MaxStack= 3, CodeLength= 212 var hug4:String = null; var hug7:int = 0; var hug2:String = ""; var hug3:String = ""; if(hug1.indexOf("http://") == 0){ hug3 = "http://"; }else if(hug1.indexOf("https://") == 0){ hug3 = "https://"; } if(hug3.length > 0){ hug4 = hug1.substr(hug3.length); }else{ hug4 = hug1; } var hug5:Array = hug4.split("/"); var hug6:int = hug5.indexOf(".."); while(hug6 >= 0){ hug5.splice((hug6 - 1), 2); hug6 = hug5.indexOf(".."); } hug2 = hug3; if(hug5.length > 0){ hug7 = 0; while(hug7 < hug5.length){ if(hug7 != 0) hug2 += "/"; hug2 += (hug5[hug7] as String); hug7++; } } return hug2; } private static function generateDVRInfo(hug1:Metadata):DVRInfo { //dispID:6, MethodID:5880, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 184 if(hug1 == null) return null; var hug2:DVRInfo = new DVRInfo(); hug2.id = ""; hug2.beginOffset = NaN; hug2.endOffset = NaN; hug2.offline = false; if(hug1.getValue(MetadataNamespaces.HTTP_STREAMING_DVR_ID_KEY) != null) hug2.id = (hug1.getValue(MetadataNamespaces.HTTP_STREAMING_DVR_ID_KEY) as String); if(hug1.getValue(MetadataNamespaces.HTTP_STREAMING_DVR_BEGIN_OFFSET_KEY) != null) hug2.beginOffset = (hug1.getValue(MetadataNamespaces.HTTP_STREAMING_DVR_BEGIN_OFFSET_KEY) as uint); if(hug1.getValue(MetadataNamespaces.HTTP_STREAMING_DVR_END_OFFSET_KEY) != null) hug2.endOffset = (hug1.getValue(MetadataNamespaces.HTTP_STREAMING_DVR_END_OFFSET_KEY) as uint); if(hug1.getValue(MetadataNamespaces.HTTP_STREAMING_DVR_OFFLINE_KEY) != null) hug2.offline = (hug1.getValue(MetadataNamespaces.HTTP_STREAMING_DVR_OFFLINE_KEY) as Boolean); return hug2; } private static function generateStreamInfos(hug1:URLResource):Vector. { //dispID:7, MethodID:5881, LocalCount= 14 , MaxScope= 1, MaxStack= 8, CodeLength= 439 var hug8:Object = null; var hug9:ByteArray = null; var hug10:DynamicStreamingItem = null; var hug11:String = null; var hug2:Vector. = new Vector.(); var hug3:Metadata = (hug1.getMetadataValue(MetadataNamespaces.DRM_METADATA) as Metadata); var hug4:Metadata = (hug1.getMetadataValue(MetadataNamespaces.HTTP_STREAMING_METADATA) as Metadata); var hug5:ByteArray = null; var hug6:BootstrapInfo = null; var hug7:DynamicStreamingResource = (hug1 as DynamicStreamingResource); if(hug7 != null){ for each(hug10 in hug7.streamItems){ hug5 = null; hug6 = null; hug8 = null; hug9 = null; if(hug3 != null) hug5 = (hug3.getValue(MetadataNamespaces.DRM_ADDITIONAL_HEADER_KEY + hug10.streamName) as ByteArray); if(hug4 != null){ hug6 = (hug4.getValue(MetadataNamespaces.HTTP_STREAMING_BOOTSTRAP_KEY + hug10.streamName) as BootstrapInfo); hug8 = hug4.getValue(MetadataNamespaces.HTTP_STREAMING_STREAM_METADATA_KEY + hug10.streamName); hug9 = (hug4.getValue(MetadataNamespaces.HTTP_STREAMING_XMP_METADATA_KEY + hug10.streamName) as ByteArray); } hug2.push(new HTTPStreamingF4FStreamInfo(hug6, hug10.streamName, hug10.bitrate, hug5, hug8, hug9)); } }else{ if(hug3 != null) hug5 = (hug3.getValue(MetadataNamespaces.DRM_ADDITIONAL_HEADER_KEY) as ByteArray); if(hug4 != null){ hug6 = (hug4.getValue(MetadataNamespaces.HTTP_STREAMING_BOOTSTRAP_KEY) as BootstrapInfo); hug8 = hug4.getValue(MetadataNamespaces.HTTP_STREAMING_STREAM_METADATA_KEY); hug9 = (hug4.getValue(MetadataNamespaces.HTTP_STREAMING_XMP_METADATA_KEY) as ByteArray); } hug11 = hug1.url; hug2.push(new HTTPStreamingF4FStreamInfo(hug6, hug11, NaN, hug5, hug8, hug9)); } return hug2; } //constructor public function HTTPStreamingUtils() { //MethodID:5882, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 super(); } } } //script598 package org.osmf.elements.compositeClasses{ //class(instance)_index:597 public final class CompositionMode extends Object { //static constructor public static function CompositionMode$cinit() { //MethodID:5884, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 21 PARALLEL = "parallel"; SERIAL = "serial"; } //static variables/etc. public static const PARALLEL:String = "parallel"; //slotID:1 public static const SERIAL:String = "serial"; //slotID:2 //constructor public function CompositionMode() { //MethodID:5885, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 super(); } } } //script599 package Data{ //class(instance)_index:598 public class TSearchInfo extends Object { //static constructor public static function TSearchInfo$cinit() { //MethodID:5887, LocalCount= 1 , MaxScope= 1, MaxStack= 23, CodeLength= 163 declaration = {query:SourceData.STRING, sort:SourceData.STRING, count:SourceData.UINT, page:SourceData.UINT, page_count:SourceData.UINT}; declarationItem = {name:SourceData.STRING, preview:SourceData.STRING, duration:SourceData.NUMBER, date:SourceData.STRING, description:SourceData.STRING, rating:SourceData.NUMBER, hits:SourceData.NUMBER, comments:SourceData.NUMBER, author:SourceData.STRING, view_count:SourceData.INT, page_link:SourceData.STRING}; } //static variables/etc. private static var declaration:Object; //slotID:1 private static var declarationItem:Object; //slotID:2 //constructor public function TSearchInfo():void { //MethodID:5888, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 17 this.items = []; super(); this.clear(); } //variables/etc. public var items:Array; //slotID:0 public var query:String = ""; //slotID:0 public var page:uint = 0; //slotID:0 public var count:uint = 0; //slotID:0 public var sort:String = ""; //slotID:0 public var page_count:uint = 0; //slotID:0 public function clear():void { //MethodID:5889, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 46 var hug1:uint = this.items.length; var hug2:int = 0; while(hug2 < hug1){ this.items[hug2].clear(); hug2++; } this.load(null); } public function load(hug1:XML, hug2:Boolean=true):int { //MethodID:5890, LocalCount= 10 , MaxScope= 1, MaxStack= 4, CodeLength= 210 var hug4:XMLList = null; var hug5:uint = 0; var hug6:XML = null; var hug7:TSearchItem = null; SourceData.parameters(hug1, declaration, this); if(hug2) this.items.length = 0; var hug3:uint = 0; if(hug1){ hug4 = hug1.child("videoset"); if(hug4.length() > 0){ hug4 = hug4[0].child("video"); hug5 = this.items.length; hug6 = null; hug7 = null; for each(hug6 in hug4){ hug7 = new TSearchItem(); SourceData.parameters(hug6, declarationItem, hug7); hug7.init(); this.items.push(hug7); } hug3 = (this.items.length - hug5); } } return hug3; } } } //script600 package ru.rutube.managers.advertisement.visual.controller{ import Components.AdView import Components.ParamEvent import flash.display.AVM1Movie import flash.display.Loader import flash.display.MovieClip import flash.events.Event import flash.events.IOErrorEvent import flash.events.TimerEvent import flash.net.URLRequest import flash.net.navigateToURL import flash.system.LoaderContext import flash.system.Security import flash.utils.Timer import ru.rutube.event.EventManager import ru.rutube.managers.advertisement.AdvertisementType import ru.rutube.managers.advertisement.AdvertisementViewManager import ru.rutube.managers.advertisement.event.AdvertisementControllerEvent import ru.rutube.managers.advertisement.event.AdvertisementEvent import ru.rutube.managers.advertisement.event.AdvertisementModelEvent import ru.rutube.managers.advertisement.model.Advertisement import ru.rutube.managers.advertisement.model.adriver.AdvertisementAdRiver import ru.rutube.managers.advertisement.model.adriver.AdvertisementAdRiverXml import ru.rutube.managers.advertisement.model.adriver.AdvertisementRutubeXml import ru.rutube.managers.balancer.BalancerEvent import ru.rutube.managers.playback.controller.StreamController import ru.rutube.managers.playback.controller.StreamControllerEvent import ru.rutube.managers.playback.controller.StreamControllerManager import ru.rutube.managers.reporter.Reporter import ru.rutube.managers.statistic.comscore.ComScoreStatistic //class(instance)_index:599 public class AdvertisementControllerMain extends AdvertisementController { //static constructor public static function AdvertisementControllerMain$cinit() { //MethodID:5892, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function AdvertisementControllerMain() { //MethodID:5893, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 95 super(AdvertisementType.ADV_ADRIVER); this.timerPlaying = new Timer(6000, 1); this.timerPlaying.addEventListener(TimerEvent.TIMER_COMPLETE, this.listenerTimerPlayingComplete); this.timerLoading = new Timer(10000, 1); this.timerLoading.addEventListener(TimerEvent.TIMER_COMPLETE, this.listenerLoadingFailed); var hug1:StreamController = StreamControllerManager.instance.getController(StreamController.CONTROLLER_ADVERTISE_STREAM); } //variables/etc. protected var reportParams:String = ""; //slotID:0 protected var bannerLoader:Loader = null; //slotID:0 protected var timerPlaying:Timer = null; //slotID:0 protected var timerLoading:Timer = null; //slotID:0 public function setIsCanceled(hug1:Boolean):void { //MethodID:5894, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 10 isCanceled = hug1; } override public function set advertisement(hug1:Advertisement):void { //MethodID:5895, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 16 super.advertisement = hug1; if(!advModel) return; } override public function reset():void { //MethodID:5896, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 8 super.reset(); } override public function show():void { //MethodID:5897, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 116 isCanceled = false; if(!advModel) return; if(!advModel.isLoaded){ if(!advModel.load()) this.hide(AdvertisementControllerEvent.ADV_CONTROLLER_ERROR); return; }else{ this.onFullLoaded(new AdvertisementModelEvent(AdvertisementModelEvent.ADVERTISEMENT_ADRIVER_FULL_LOADED, advModel.adType)); } var hug1:AdView = (AdvertisementViewManager.instance.getView(advModel.adType) as AdView); if(hug1.visible) hug1.visible = false; } override public function hide(hug1:String="ADV_CONTROLLER_HIDE"):void { //MethodID:5898, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 155 if(isCanceled) return; isCanceled = true; if(this.timerLoading.running) this.timerLoading.reset(); if(this.timerPlaying.running) this.timerPlaying.reset(); if(!advModel) return; var hug2:AdView = (AdvertisementViewManager.instance.getView(advModel.adType) as AdView); hug2.hide(); this.unload(); if((advModel != null) && (advModel.adType == AdvertisementType.AD_PAUSE)) advModel.clear(); if(hug1 != null) EventManager.instance.dispatchEvent(new Event(hug1)); } override public function get advertisementCurrentTime():Number { //MethodID:5899, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 24 var hug1:StreamController = StreamControllerManager.instance.getController(StreamController.CONTROLLER_ADVERTISE_STREAM); return hug1.time; } override public function get advertisementFullTime():Number { //MethodID:5900, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 64 var hug1:StreamController = StreamControllerManager.instance.getController(StreamController.CONTROLLER_ADVERTISE_STREAM); if(this.advertisementAdRiver.adRutube.duration > 0) return this.advertisementAdRiver.adRutube.duration; if(hug1.duration > 0) return hug1.duration; return 0; } protected function buildUrl(hug1:String):String { //MethodID:5901, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 94 var hug2:Array = []; if(fileHash.length > 0) hug2.push("hash=" + fileHash); hug2.push("bt=" + this.advertisementAdRiver.adRutube.bannerTypeAsText); if(hug2.length > 0){ if(hug1.indexOf("?") == (-1)) hug1 += "?"; hug1 += hug2.join("&"); } return hug1; } protected function unload():void { //MethodID:5902, LocalCount= 3 , MaxScope= 5, MaxStack= 4, CodeLength= 246 internal var streamController:StreamController; //slotID:1 internal var adView:AdView; //slotID:2 streamController = StreamControllerManager.instance.getController(StreamController.CONTROLLER_ADVERTISE_STREAM); streamController.stop(); adView = (AdvertisementViewManager.instance.getView(advModel.adType) as AdView); adView.setBanner(null); if(this.bannerLoader != null){ this.bannerLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE, this.listenerBannerLoadComplete, false); this.bannerLoader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, this.listenerBannerLoadError, false); try{ if(this.bannerLoader.contentLoaderInfo.bytesLoaded == this.bannerLoader.contentLoaderInfo.bytesTotal){ if(this.bannerLoader.content){ if(this.bannerLoader.content is MovieClip) (this.bannerLoader.content as MovieClip).stop(); } this.bannerLoader.unload(); }else if(this.bannerLoader.contentLoaderInfo.bytesLoaded > 0){ this.bannerLoader.close(); } } catch(err:Error){ } } this.bannerLoader = null; } protected function get advertisementAdRiver():AdvertisementAdRiver { //MethodID:5903, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 9 return (advModel as AdvertisementAdRiver); } override protected function listenerError(hug1:AdvertisementModelEvent):void { //MethodID:5904, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 70 if(!hug1 || !advModel) return; if(hug1.adType != advModel.adType) return; var hug2:AdView = (AdvertisementViewManager.instance.getView(advModel.adType) as AdView); hug2.hide(); super.listenerError(hug1); } public function onMetaDataReceived(hug1:StreamControllerEvent):void { //MethodID:5905, LocalCount= 4 , MaxScope= 1, MaxStack= 3, CodeLength= 218 if(hug1.controllerType != StreamController.CONTROLLER_ADVERTISE_STREAM) return; var hug2:StreamController = StreamControllerManager.instance.getController(StreamController.CONTROLLER_ADVERTISE_STREAM); if(!hug2.session) return; if(hug2.videoWidth > 0) this.advertisementAdRiver.adRutube.widthBanner = hug2.videoWidth; if(hug2.videoHeight > 0) this.advertisementAdRiver.adRutube.heightBanner = hug2.videoHeight; if(this.advertisementAdRiver.adRutube.showVolumePanel && !hug2.isSoundAvalible) this.advertisementAdRiver.adRutube.showVolumePanel = false; if(hug2.session) hug2.resume(); if(this.timerLoading.running){ this.timerLoading.stop(); this.timerLoading.reset(); } var hug3:AdView = (AdvertisementViewManager.instance.getView(advModel.adType) as AdView); hug3.volume = hug2.volume; hug3.updateView(AdView.VIEW_VIDEO_METADATA_RECEIVED, this.advertisementAdRiver.adRutube); } public function onCurrentTimeChange(hug1:StreamControllerEvent):void { //MethodID:5906, LocalCount= 4 , MaxScope= 1, MaxStack= 3, CodeLength= 111 var hug3:AdView = null; if(hug1.controllerType != StreamController.CONTROLLER_ADVERTISE_STREAM) return; var hug2:StreamController = StreamControllerManager.instance.getController(StreamController.CONTROLLER_ADVERTISE_STREAM); if(hug2.duration > 0){ hug3 = (AdvertisementViewManager.instance.getView(advModel.adType) as AdView); hug3.onUpdateProgressBar(hug2.time / hug2.duration); if(!hug3.visible && !isCanceled) hug3.visible = true; } } public function onMediaComplete(hug1:StreamControllerEvent):void { //MethodID:5907, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 68 if(hug1.controllerType != StreamController.CONTROLLER_ADVERTISE_STREAM) return; Reporter.instance.send(this.reportParams + "&ve=-1"); var hug2:StreamController = StreamControllerManager.instance.getController(StreamController.CONTROLLER_ADVERTISE_STREAM); hug2.stop(); this.hide(AdvertisementControllerEvent.ADV_CONTROLLER_FINISH); } public function onAdvertisementClick(hug1:Event):void { //MethodID:5908, LocalCount= 4 , MaxScope= 5, MaxStack= 3, CodeLength= 185 internal var event:Event; //slotID:1 internal var adView:AdView; //slotID:2 event = hug1; adView = (AdvertisementViewManager.instance.getView(advModel.adType) as AdView); if(this.advertisementAdRiver.adRutube.isVideoContent) Reporter.instance.send((this.reportParams + "&adc=") + (adView.isUrlPanel ? "1" : "2")); if(this.advertisementAdRiver.adRiver.clickURL.length > 0){ try{ navigateToURL(new URLRequest(this.advertisementAdRiver.adRiver.clickURL), "_blank"); } catch(error:Error){ trace("AdView.onClickBannerHandler: " + error); } } this.hide(AdvertisementControllerEvent.ADV_CONTROLLER_CLICK); } public function onAdvertisementClose(hug1:Event):void { //MethodID:5909, LocalCount= 4 , MaxScope= 1, MaxStack= 4, CodeLength= 138 var hug2:StreamController = null; var hug3:Number = NaN; if(this.advertisementAdRiver.adRutube.isVideoContent){ hug2 = StreamControllerManager.instance.getController(StreamController.CONTROLLER_ADVERTISE_STREAM); hug3 = hug2.time; if(!isNaN(hug3)) Reporter.instance.send((this.reportParams + "&ve=") + Math.round(hug3)); } if(hug1 != null){ this.advertisementAdRiver.adRiver.fireEvent(AdvertisementAdRiverXml.EVENT_SKIP_ADVERTISEMENT); }else{ this.advertisementAdRiver.adRiver.fireEvent(AdvertisementAdRiverXml.EVENT_COMPLETE_ADVERTISEMENT); } this.hide(AdvertisementControllerEvent.ADV_CONTROLLER_CLOSE); } public function onFullLoaded(hug1:AdvertisementModelEvent):void { //MethodID:5910, LocalCount= 4 , MaxScope= 1, MaxStack= 9, CodeLength= 633 if(isCanceled) return; if(!advModel) return; if(hug1.adType != advModel.adType) return; if(!advModel.isLoaded){ this.hide(); return; } fireCounters(this.advertisementAdRiver.adRutube.pixelUrls); this.advertisementAdRiver.adRiver.fireEvent(0); if((this.advertisementAdRiver.adRutube.duration == 0) && !this.advertisementAdRiver.adRutube.isVideoContent){ this.hide(); return; } this.timerPlaying.reset(); this.advertisementAdRiver.adRutube.bannerUrl = this.buildUrl(this.advertisementAdRiver.adRutube.bannerUrl); this.reportParams = ("bt=" + this.advertisementAdRiver.adRutube.bannerTypeAsText); var hug2:AdView = (AdvertisementViewManager.instance.getView(advModel.adType) as AdView); hug2.showUrlPanel = (this.advertisementAdRiver.adRiver.clickURL.length > 0); if(hug2.showUrlPanel) hug2.showUrlPanel = this.advertisementAdRiver.adRutube.isShowLinkPanel; hug2.clearBanners(); hug2.updateView(AdView.VIEW_INIT_COMPLETE, this.advertisementAdRiver.adRutube); hug2.setInteraction(this.advertisementAdRiver.adRutube.isInteractive); AdvertisementViewManager.instance.show(advModel.adType); var hug3:StreamController = StreamControllerManager.instance.getController(StreamController.CONTROLLER_ADVERTISE_STREAM); if(!this.advertisementAdRiver.adRutube.isVideoContent){ if(this.advertisementAdRiver.adRutube.duration > 0) this.timerPlaying.delay = (this.advertisementAdRiver.adRutube.duration * 1000); if((advModel.adType == AdvertisementType.AD_PRE_ROLL) || (advModel.adType == AdvertisementType.AD_POST_ROLL)){ if(Boolean(this.advertisementAdRiver.adRiver.clickURL)){ if(advModel.adType != AdvertisementType.AD_BLIND) EventManager.instance.dispatchEvent(new ParamEvent(AdvertisementControllerEvent.EVENT_SHOW_FLVBANNER, {urlThumbnail:this.advertisementAdRiver.adRutube.urlThumbnail, urlClick:this.advertisementAdRiver.adRiver.clickURL, report:this.reportParams})); } } }else{ hug3.mediaContainer = hug2.getMediaContainer(); this.reportParams += ("&adn=" + StreamController.getFileHash(this.advertisementAdRiver.adRutube.bannerUrl)); this.advertisementAdRiver.adRutube.showVolumePanel = true; if(Boolean(this.advertisementAdRiver.adRiver.clickURL)){ if(advModel.adType != AdvertisementType.AD_BLIND) EventManager.instance.dispatchEvent(new ParamEvent(AdvertisementControllerEvent.EVENT_SHOW_FLVBANNER, {urlThumbnail:this.advertisementAdRiver.adRutube.urlThumbnail, urlClick:this.advertisementAdRiver.adRiver.clickURL, report:this.reportParams})); } } this.initLoading(); } protected function initLoading():void { //MethodID:5911, LocalCount= 6 , MaxScope= 1, MaxStack= 6, CodeLength= 357 var hug3:Array = null; var hug4:String = null; var hug1:StreamController = StreamControllerManager.instance.getController(StreamController.CONTROLLER_ADVERTISE_STREAM); var hug2:AdView = (AdvertisementViewManager.instance.getView(advModel.adType) as AdView); if(this.advertisementAdRiver.adRutube.isVideoContent){ hug1.clear(); hug1.preBalancedUrl = this.advertisementAdRiver.adRutube.bannerUrl; hug2.volume = hug1.volume; hug2.updateView(AdView.VIEW_PREPARE_VIEW_VIDEO, this.advertisementAdRiver.adRutube); }else{ if(this.bannerLoader == null){ this.bannerLoader = new Loader(); this.bannerLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, this.listenerBannerLoadComplete, false, 0, true); this.bannerLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, this.listenerBannerLoadError, false, 0, true); } this.advertisementAdRiver.adRutube.bannerType = AdvertisementRutubeXml.BANNER_IMG; if(AdvertisementRutubeXml.BANNER_IMG){ hug3 = this.advertisementAdRiver.adRutube.bannerUrl.split("/"); hug4 = ((hug3[0] + "//") + hug3[2] + "/crossdomain.xml"); Security.loadPolicyFile(hug4); this.bannerLoader.load(new URLRequest(this.advertisementAdRiver.adRutube.bannerUrl), new LoaderContext(true)); }else{ this.bannerLoader.load(new URLRequest(this.advertisementAdRiver.adRutube.bannerUrl)); } this.timerLoading.reset(); this.timerLoading.start(); EventManager.instance.dispatchEvent(new AdvertisementControllerEvent(AdvertisementControllerEvent.EVENT_SHOW_BANNER)); } } public function onBalancerError(hug1:BalancerEvent):void { //MethodID:5912, LocalCount= 2 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } protected function listenerTimerPlayingComplete(hug1:TimerEvent):void { //MethodID:5913, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 9 this.onAdvertisementClose(null); } private function listenerLoadingFailed(hug1:TimerEvent):void { //MethodID:5914, LocalCount= 2 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } public function onReceiveBalancedUrl(hug1:StreamControllerEvent):void { //MethodID:5915, LocalCount= 4 , MaxScope= 1, MaxStack= 3, CodeLength= 155 if(hug1.controllerType != StreamController.CONTROLLER_ADVERTISE_STREAM) return; var hug2:StreamController = StreamControllerManager.instance.getController(StreamController.CONTROLLER_ADVERTISE_STREAM); hug2.play(); Reporter.instance.send(this.reportParams + "&beg=" + referrer); ComScoreStatistic.instance.fireTag(ComScoreStatistic.ADVERTISEMENT); this.timerLoading.reset(); this.timerLoading.start(); var hug3:AdView = (AdvertisementViewManager.instance.getView(advModel.adType) as AdView); hug3.updateView(AdView.VIEW_VIDEO_BALANCER_RECEIVED_URL, this.advertisementAdRiver.adRutube); if(!hug3.visible) hug3.visible = true; isCanceled = false; } protected function listenerBannerLoadComplete(hug1:Event):void { //MethodID:5916, LocalCount= 3 , MaxScope= 1, MaxStack= 4, CodeLength= 339 this.timerLoading.stop(); this.timerLoading.reset(); if(this.bannerLoader.content is AVM1Movie){ this.hide(AdvertisementControllerEvent.ADV_CONTROLLER_ERROR); return; } if(this.bannerLoader.contentLoaderInfo.width > 10){ this.advertisementAdRiver.adRutube.widthBanner = this.bannerLoader.contentLoaderInfo.width; }else if(this.bannerLoader.contentLoaderInfo.width != 1){ this.advertisementAdRiver.adRutube.widthBanner = 640; } if(this.bannerLoader.contentLoaderInfo.height > 10){ this.advertisementAdRiver.adRutube.heightBanner = this.bannerLoader.contentLoaderInfo.height; }else if(this.bannerLoader.contentLoaderInfo.height != 1){ this.advertisementAdRiver.adRutube.heightBanner = 480; } var hug2:AdView = (AdvertisementViewManager.instance.getView(advModel.adType) as AdView); hug2.setBanner(this.bannerLoader.content); hug2.updateView(AdView.VIEW_BANNER_LOADED, this.advertisementAdRiver.adRutube); ComScoreStatistic.instance.fireTag(ComScoreStatistic.ADVERTISEMENT); if(this.advertisementAdRiver.adRutube.duration > 0){ this.timerPlaying.reset(); this.timerPlaying.start(); EventManager.instance.dispatchEvent(new AdvertisementControllerEvent(AdvertisementControllerEvent.ADV_CONTROLLER_SHOW)); EventManager.instance.dispatchEvent(new AdvertisementEvent(AdvertisementEvent.ADVERTISEMENT_BEGIN_SHOW, adType)); }else{ this.hide(); } } protected function listenerBannerLoadError(hug1:IOErrorEvent):void { //MethodID:5917, LocalCount= 2 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } } } //script601 package ru.rutube.managers.advertisement.visual.controller{ import Components.AdView import com.eyewonder.instream.events.UIFControlEvent import com.eyewonder.instream.events.UIFEvent import com.eyewonder.instream.events.UIFTrackEvent import flash.display.MovieClip import flash.events.Event import flash.events.TimerEvent import ru.rutube.event.ControlPanelEvent import ru.rutube.event.EventManager import ru.rutube.event.InternalEvent import ru.rutube.managers.advertisement.AdvertisementViewManager import ru.rutube.managers.advertisement.event.AdvertisementControllerEvent import ru.rutube.managers.advertisement.event.AdvertisementModelEvent import ru.rutube.managers.advertisement.model.adriver.AdvertisementAdRiverXml import ru.rutube.managers.advertisement.model.adriver.InstreamFrameworkRutube import ru.rutube.managers.playback.controller.StreamController import ru.rutube.managers.playback.controller.StreamControllerEvent import ru.rutube.managers.playback.controller.StreamControllerManager import ru.rutube.managers.reporter.Reporter import ru.rutube.managers.statistic.comscore.ComScoreStatistic //class(instance)_index:600 public class AdvertisementControllerSmartClip extends AdvertisementControllerMain { //static constructor public static function AdvertisementControllerSmartClip$cinit() { //MethodID:5919, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function AdvertisementControllerSmartClip() { //MethodID:5920, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 71 super(); if(this.timerPlaying.hasEventListener(TimerEvent.TIMER_COMPLETE)) timerPlaying.removeEventListener(TimerEvent.TIMER_COMPLETE, listenerTimerPlayingComplete); timerPlaying.addEventListener(TimerEvent.TIMER, this.listenerTimerPlaying); timerPlaying.delay = 1000; timerPlaying.repeatCount = 0; } //variables/etc. private var timePlaying:int = 0; //slotID:0 private var mc:MovieClip = null; //slotID:0 private var smartClip:InstreamFrameworkRutube; //slotID:0 private function initSmartClip():void { //MethodID:5921, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 149 if(!this.smartClip){ this.mc = new MovieClip(); this.smartClip = new InstreamFrameworkRutube(this.mc); this.smartClip.addEventListener(UIFEvent.CONTROL_EVENT, this.listenerSmartClipControl); this.smartClip.addEventListener(UIFEvent.ERROR_EVENT, this.listenerSmartClipError); this.smartClip.addEventListener(UIFEvent.TRACK_EVENT, this.listenerTrackEvent); this.onResize(null); EventManager.instance.addEventListener(InternalEvent.STAGE, this.onResize); EventManager.instance.addEventListener(ControlPanelEvent.EVENT_CHANGE_VOLUME, this.onChangeVolume); EventManager.instance.addEventListener(ControlPanelEvent.EVENT_MUTE, this.onChangeVolume); } } private function onResize(hug1:InternalEvent):void { //MethodID:5922, LocalCount= 3 , MaxScope= 1, MaxStack= 7, CodeLength= 120 var hug2:AdView = null; if(this.smartClip){ hug2 = (AdvertisementViewManager.instance.getView(advModel.adType) as AdView); this.smartClip.config.width = hug2._width; this.smartClip.config.height = hug2._height; if(this.smartClip._adIsPlaying) this.smartClip.resizeNotify(); trace(" smartClip onResize ", this.smartClip._adIsPlaying, hug2._width, hug2._height, hug2.width, hug2.height); } } private function listenerTimerPlaying(hug1:Event):void { //MethodID:5923, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 14 this.timePlaying += 1; } private function onChangeVolume(hug1:Event):void { //MethodID:5924, LocalCount= 3 , MaxScope= 1, MaxStack= 4, CodeLength= 83 var hug2:StreamController = StreamControllerManager.instance.getController(StreamController.CONTROLLER_ADVERTISE_STREAM); if(hug2 && this.smartClip){ this.smartClip.audioVolume = (hug2.volume * 100); hug2 = null; this.smartClip.dispatchEvent(new UIFEvent(UIFControlEvent.AD_VOLUME_CHANGED, this.smartClip.audioVolume)); } } private function listenerSmartClipControl(hug1:UIFEvent):void { //MethodID:5925, LocalCount= 4 , MaxScope= 1, MaxStack= 3, CodeLength= 514 var hug2:AdView = (AdvertisementViewManager.instance.getView(advModel.adType) as AdView); switch(hug1.info.type){ case UIFControlEvent.HIDE_CONTROLS: break; case UIFControlEvent.ON_REMINDER_OVERRIDE: break; case UIFControlEvent.ON_END_AD: if(!isCanceled) this.onAdvertisementClose(null); break; case UIFControlEvent.ON_AD_LOAD_COMPLETE: if(this.smartClip._adTagInstreamType != "fixedroll") this.listenerSmartClipError(null); break; case UIFControlEvent.ON_START_PLAY_AD: timerPlaying.start(); ComScoreStatistic.instance.fireTag(ComScoreStatistic.ADVERTISEMENT); hug2.updateView(AdView.VIEW_SMARTCLIP, advertisementAdRiver.adRutube); hug2.setInteraction(true); this.onChangeVolume(null); this.onResize(null); EventManager.instance.dispatchEvent(new AdvertisementControllerEvent(AdvertisementControllerEvent.ADV_CONTROLLER_SHOW)); break; case UIFControlEvent.ON_START_REQUEST_AD: case UIFControlEvent.ON_START_LINEAR: case UIFControlEvent.ON_START_LINEAR_INTERACTIVE: case UIFControlEvent.ON_START_OVERLAY: case UIFControlEvent.ON_REMINDER_DETECTED: case UIFControlEvent.ON_RESIZE_NOTIFY: case UIFControlEvent.CONTENT_VID_PAUSE: case UIFControlEvent.CONTENT_VID_PLAY: case UIFControlEvent.CONTENT_VID_STOP: case UIFControlEvent.AD_VOLUME_CHANGED: break; default: break; } hug2 = null; } private function listenerTrackEvent(hug1:UIFEvent):void { //MethodID:5926, LocalCount= 4 , MaxScope= 1, MaxStack= 3, CodeLength= 292 var hug2:AdView = (AdvertisementViewManager.instance.getView(advModel.adType) as AdView); switch(hug1.info.type){ case UIFTrackEvent.TRACK_INTERACTION: break; case UIFTrackEvent.TRACK_GO_INTERACTIVE: hug2.updateView(AdView.VIEW_SMARTCLIP_INTERACTION, advertisementAdRiver.adRutube); break; case UIFTrackEvent.TRACK_LEAVE_INTERACTIVE: hug2.updateView(AdView.VIEW_SMARTCLIP, advertisementAdRiver.adRutube); break; case UIFTrackEvent.TRACK_MUTE: break; case UIFTrackEvent.TRACK_CLICKTHRU: this.onAdvertisementClick(null); break; case UIFTrackEvent.TRACK_CLOSE: break; case UIFTrackEvent.TRACK_END_OF_VIDEO: this.onMediaComplete(null); break; default: break; } hug2 = null; } private function listenerSmartClipError(hug1:UIFEvent):void { //MethodID:5927, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 14 this.hide(AdvertisementControllerEvent.ADV_CONTROLLER_ERROR); } override public function hide(hug1:String="ADV_CONTROLLER_HIDE"):void { //MethodID:5928, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 44 if(isCanceled) return; super.hide(hug1); if(this.smartClip){ if(this.smartClip._adIsPlaying) this.smartClip.endAd(); } } override public function onMediaComplete(hug1:StreamControllerEvent):void { //MethodID:5929, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 46 Reporter.instance.send(reportParams + "&ve=-1"); advertisementAdRiver.adRiver.fireEvent(AdvertisementAdRiverXml.EVENT_COMPLETE_ADVERTISEMENT); this.hide(AdvertisementControllerEvent.ADV_CONTROLLER_FINISH); } override public function onAdvertisementClick(hug1:Event):void { //MethodID:5930, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 89 var hug2:AdView = (AdvertisementViewManager.instance.getView(advModel.adType) as AdView); if(advertisementAdRiver.adRutube.isVideoContent) Reporter.instance.send((reportParams + "&adc=") + (hug2.isUrlPanel ? "1" : "2")); this.hide(AdvertisementControllerEvent.ADV_CONTROLLER_CLICK); } override public function onAdvertisementClose(hug1:Event):void { //MethodID:5931, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 64 if(advertisementAdRiver.adRutube.isVideoContent) Reporter.instance.send(reportParams + "&ve=" + this.timePlaying); advertisementAdRiver.adRiver.fireEvent(AdvertisementAdRiverXml.EVENT_SKIP_ADVERTISEMENT); this.hide(AdvertisementControllerEvent.ADV_CONTROLLER_CLOSE); } override public function onFullLoaded(hug1:AdvertisementModelEvent):void { //MethodID:5932, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 207 if(isCanceled) return; if(!advModel) return; if(hug1.adType != advModel.adType) return; if(!advModel.isLoaded){ this.hide(); return; } fireCounters(advertisementAdRiver.adRutube.pixelUrls); advertisementAdRiver.adRiver.fireEvent(0); timerPlaying.reset(); reportParams = ("bt=" + advertisementAdRiver.adRutube.bannerTypeAsText); this.initSmartClip(); var hug2:AdView = (AdvertisementViewManager.instance.getView(advModel.adType) as AdView); hug2.clearBanners(); hug2.updateView(AdView.VIEW_INIT_COMPLETE, advertisementAdRiver.adRutube); hug2.showUrlPanel = false; this.smartClip.loadAdURL(advertisementAdRiver.adRutube.bannerUrl); AdvertisementViewManager.instance.show(advModel.adType); hug2.setBanner(this.mc); hug2 = null; } override protected function unload():void { //MethodID:5933, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 33 var hug1:AdView = (AdvertisementViewManager.instance.getView(advModel.adType) as AdView); hug1.setBanner(null); } override public function get advertisementCurrentTime():Number { //MethodID:5934, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 5 return 0; } override public function get advertisementFullTime():Number { //MethodID:5935, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 5 return 0; } } } //script602 package Components{ import Components.Volume.VolumeButton import fl.transitions.TweenEvent import flash.display.DisplayObject import flash.display.Graphics import flash.display.MovieClip import flash.display.Shape import flash.display.Sprite import flash.display.StageDisplayState import flash.events.Event import flash.events.EventDispatcher import flash.events.MouseEvent import flash.geom.Point import flash.text.TextField import flash.text.TextFieldAutoSize import flash.text.TextFormat import org.osmf.containers.MediaContainer import ru.rutube.event.EventManager import ru.rutube.managers.advertisement.model.adriver.AdriverSpecialFormats import ru.rutube.managers.advertisement.model.adriver.AdvertisementRutubeXml import ru.rutube.managers.preloader.PreloaderManager //class(instance)_index:601 public class AdView extends Component { //static constructor public static function AdView$cinit() { //MethodID:5937, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 93 VIEW_NONE = 0; VIEW_INIT_LOAD = 1; VIEW_INIT_COMPLETE = 2; VIEW_PREPARE_VIEW_VIDEO = 3; VIEW_VIDEO_METADATA_RECEIVED = 4; VIEW_VIDEO_BALANCER_RECEIVED_URL = 5; VIEW_BANNER_LOADED = 6; VIEW_SMARTCLIP = 7; VIEW_SMARTCLIP_INTERACTION = 8; EVENT_ADVERTISE_CLOSE = "EVENT_ADVERTISE_CLOSE"; EVENT_ADVERTISE_CLICK = "EVENT_ADVERTISE_CLICK"; } //static variables/etc. public static const VIEW_NONE:int = 0; //slotID:1 public static const VIEW_INIT_LOAD:int = 1; //slotID:2 public static const VIEW_INIT_COMPLETE:int = 2; //slotID:3 public static const VIEW_PREPARE_VIEW_VIDEO:int = 3; //slotID:4 public static const VIEW_VIDEO_METADATA_RECEIVED:int = 4; //slotID:5 public static const VIEW_VIDEO_BALANCER_RECEIVED_URL:int = 5; //slotID:6 public static const VIEW_BANNER_LOADED:int = 6; //slotID:7 public static const VIEW_SMARTCLIP:int = 7; //slotID:8 public static const VIEW_SMARTCLIP_INTERACTION:int = 8; //slotID:9 public static const EVENT_ADVERTISE_CLOSE:String = "EVENT_ADVERTISE_CLOSE";//slotID:10 public static const EVENT_ADVERTISE_CLICK:String = "EVENT_ADVERTISE_CLICK";//slotID:11 //constructor public function AdView(hug1:EventDispatcher=null) { //MethodID:5938, LocalCount= 2 , MaxScope= 1, MaxStack= 6, CodeLength= 172 this.bannerPanelMask = new Sprite(); this.urlPanel = new Sprite(); super(hug1); size(400, 300, false, 205, 100); this.topPanel = new Sprite(); this.titleText = new TextField(); this.closeButton = new AdViewCloseButton(); this.volumeButton = new VolumeButton(EventManager.instance); this.bannerPanel = new Sprite(); this.bannerMask = new Sprite(); this.mediaContainer = new MediaContainer(); this.bannerPanelMask = new Sprite(); this.urlPanel = new Sprite(); this.progressBar = new Shape(); this.timePlay = 0; this.prepareView(); } //variables/etc. private var curtainObj:Object = null; //slotID:0 private var timePlay:Number = 0.0; //slotID:0 private var titleText:TextField = null; //slotID:0 private var progressBar:Shape = null; //slotID:0 private var banner:DisplayObject = null; //slotID:0 private var topPanel:Sprite = null; //slotID:0 private var bannerMask:Sprite = null; //slotID:0 private var _isUrlPanel:Boolean = false; //slotID:0 private var bannerPanel:Sprite = null; //slotID:0 private var bannerPanelMask:Sprite; //slotID:0 private var closeButton:AdViewCloseButton = null; //slotID:0 private var urlPanel:Sprite; //slotID:0 private var _advertiseModel:AdvertisementRutubeXml = null; //slotID:0 private var volumeButton:VolumeButton = null; //slotID:0 public var showUrlPanel:Boolean = false; //slotID:0 private var mediaContainer:MediaContainer = null; //slotID:0 public function getMediaContainer():MediaContainer { //MethodID:5939, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this.mediaContainer; } public function set advertiseModel(hug1:AdvertisementRutubeXml):void { //MethodID:5940, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this._advertiseModel = hug1; } public function clearBanners():void { //MethodID:5941, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 9 this.setBanner(null); } public function setBanner(hug1:DisplayObject):void { //MethodID:5942, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 101 if(this.banner != null){ if(this.bannerPanel.contains(this.banner)) this.bannerPanel.removeChild(this.banner); } this.banner = hug1; if(this.banner != null){ this.bannerPanel.addChildAt(this.banner, 0); this.banner.mask = this.bannerMask; if(this.banner is MovieClip) (this.banner as MovieClip).stop(); } } public function get isUrlPanel():Boolean { //MethodID:5943, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._isUrlPanel; } public function get volume():Number { //MethodID:5944, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 10 return this.volumeButton.level; } public function set volume(hug1:Number):void { //MethodID:5945, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 11 this.volumeButton.level = hug1; } override public function release():void { //MethodID:5946, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } public function hide():void { //MethodID:5947, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 28 PreloaderManager.instance.hide(); this.urlPanel.visible = false; visible = false; } public function setInteraction(hug1:Boolean):void { //MethodID:5948, LocalCount= 2 , MaxScope= 1, MaxStack= 6, CodeLength= 141 this.bannerPanel.mouseChildren = hug1; this.bannerPanel.buttonMode = !hug1; if(!hug1){ if(!this.bannerPanel.hasEventListener(MouseEvent.CLICK)){ this.bannerPanel.addEventListener(MouseEvent.CLICK, this.onClickBannerHandler, false, 0, true); this.urlPanel.addEventListener(MouseEvent.CLICK, this.onClickBannerHandler, false, 0, true); } }else if(this.bannerPanel.hasEventListener(MouseEvent.CLICK)){ this.bannerPanel.removeEventListener(MouseEvent.CLICK, this.onClickBannerHandler, false); this.urlPanel.removeEventListener(MouseEvent.CLICK, this.onClickBannerHandler, false); } } private function prepareView():void { //MethodID:5949, LocalCount= 3 , MaxScope= 1, MaxStack= 11, CodeLength= 532 addEventListener(MouseEvent.ROLL_OVER, this.onRollBannerHandler); addEventListener(MouseEvent.ROLL_OUT, this.onRollBannerHandler); this.titleText.selectable = false; this.titleText.defaultTextFormat = new TextFormat("Tahoma", 10, 0x8C8C8C); this.titleText.text = "Qu{|p}p"; this.titleText.x = 1; this.titleText.y = -3; this.topPanel.addChild(this.titleText); this.topPanel.addChild(this.closeButton); this.closeButton.hint = "xp{"; this.closeButton.buttonMode = true; this.closeButton.params({x:(_width - 13), y:2, left:false, right:true, wContainer:_width}); this.closeButton.addEventListener(MouseEvent.CLICK, this.onClickCloseHandler, false, 0, true); this.bannerPanel.mask = this.bannerPanelMask; this.bannerPanel.mouseEnabled = true; this.setInteraction(true); this.bannerPanel.addChild(this.bannerMask); this.bannerPanel.addChild(this.mediaContainer); this.topPanel.addChild(this.progressBar); addChild(this.bannerPanel); addChild(this.bannerPanelMask); var hug2:Boolean = false; this.progressBar.visible = hug2; this.mediaContainer.visible = hug2; this.progressBar.y = 11; var hug1:TextField = new TextField(); hug1.selectable = false; hug1.autoSize = TextFieldAutoSize.CENTER; hug1.defaultTextFormat = new TextFormat("Arial", 12, 0xFFFFFF, true, false, true); hug1.text = "Puuzy ~p pz u{|p}tpu|"; var hug2:Boolean = true; this.urlPanel.useHandCursor = hug2; this.urlPanel.mouseChildren = hug2; this.urlPanel.mouseEnabled = hug2; this.urlPanel.graphics.beginFill(0x3D3D3D, 0.9); this.urlPanel.graphics.drawRoundRect(0, 0, (hug1.width + 18), 29, 8); hug1.x = Math.round((this.urlPanel.width - hug1.width) / 2); hug1.y = (Math.round((this.urlPanel.height - hug1.height) / 2) - 1); this.urlPanel.visible = false; this.urlPanel.addChild(hug1); addChild(this.urlPanel); addChild(this.topPanel); addChild(this.volumeButton); } private function onFinishCurtainTweenHandler(hug1:TweenEvent):void { //MethodID:5950, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 166 visible = false; if(this.curtainObj != null){ if(this.curtainObj.tween1.isPlaying) this.curtainObj.tween1.stop(); if(this.curtainObj.tween2 && this.curtainObj.tween2.isPlaying) this.curtainObj.tween2.stop(); this.curtainObj.tween3.removeEventListener(TweenEvent.MOTION_FINISH, this.onFinishCurtainTweenHandler); removeChild(this.curtainObj.bitmap1); removeChild(this.curtainObj.bitmap2); this.curtainObj.bitmap1.bitmapData.dispose(); this.curtainObj.bitmap2.bitmapData.dispose(); this.curtainObj = null; } } public function onUpdateProgressBar(hug1:Number=0.0):void { //MethodID:5951, LocalCount= 4 , MaxScope= 1, MaxStack= 6, CodeLength= 108 if(hug1 > 0) this.timePlay = hug1; if(!this.progressBar.visible) return; var hug2:Number = _width; var hug3:Graphics = this.progressBar.graphics; hug3.clear(); hug3.beginFill(0xCDCDCD); hug3.drawRect(0, 0, hug2, 1); hug3.endFill(); hug3.beginFill(0x6C6E6C); hug3.drawRect(0, 0, Math.round(hug2 * this.timePlay), 1); hug3.endFill(); } public function updateView(hug1:int=0, hug2:AdvertisementRutubeXml=null):void { //MethodID:5952, LocalCount= 4 , MaxScope= 1, MaxStack= 4, CodeLength= 665 if(!this._advertiseModel) this.advertiseModel = hug2; if(!hug2) return; var hug3:int = hug1; switch(hug3){ case VIEW_INIT_LOAD: var hug3:Boolean = false; this.progressBar.visible = hug3; this.mediaContainer.visible = hug3; var hug3:Boolean = false; this.bannerPanel.visible = hug3; this.topPanel.visible = hug3; this.closeButton.visible = false; this.volumeButton.visible = false; this.volumeButton.mouseEnabled = true; this.urlPanel.visible = false; this.titleText.visible = true; break; case VIEW_INIT_COMPLETE: PreloaderManager.instance.show(); this.bannerPanel.mouseEnabled = true; this.closeButton.visible = !hug2.hideCloseButton; break; case VIEW_PREPARE_VIEW_VIDEO: this.progressBar.visible = !hug2.hideProgressFLV; break; case VIEW_VIDEO_BALANCER_RECEIVED_URL: case VIEW_VIDEO_METADATA_RECEIVED: PreloaderManager.instance.hide(); this.volumeButton.visible = hug2.showVolumePanel; this.topPanel.visible = !hug2.hideBackgroundPanel; var hug3:Boolean = true; this.mediaContainer.visible = hug3; this.bannerPanel.visible = hug3; visible = true; onPaint(); break; case VIEW_BANNER_LOADED: PreloaderManager.instance.hide(); this.bannerPanel.visible = true; this.topPanel.visible = !hug2.hideBackgroundPanel; this.volumeButton.visible = hug2.showVolumePanel; visible = true; onPaint(); if(this.banner is MovieClip) (this.banner as MovieClip).gotoAndPlay(0); break; case VIEW_SMARTCLIP: PreloaderManager.instance.hide(); this.progressBar.visible = false; this.bannerPanel.mouseEnabled = true; this.bannerPanel.visible = true; this.banner.visible = true; this.topPanel.visible = !hug2.hideBackgroundPanel; this.volumeButton.visible = hug2.showVolumePanel; this.closeButton.visible = !hug2.hideCloseButton; visible = true; onPaint(); break; case VIEW_SMARTCLIP_INTERACTION: PreloaderManager.instance.hide(); this.progressBar.visible = false; this.bannerPanel.mouseEnabled = true; this.bannerPanel.visible = true; this.banner.visible = true; this.topPanel.visible = false; this.volumeButton.visible = false; this.closeButton.visible = false; visible = true; onPaint(); break; default: break; } } private function onClickCloseHandler(hug1:MouseEvent):void { //MethodID:5953, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 18 dispatchEvent(new Event(EVENT_ADVERTISE_CLOSE)); } private function onClickBannerHandler(hug1:MouseEvent):void { //MethodID:5954, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 119 this._isUrlPanel = ((hug1.target == this.urlPanel) || ((hug1.localX >= this.urlPanel.x) && (hug1.localX <= (this.urlPanel.x + this.urlPanel.width)) && (hug1.localY >= this.urlPanel.y) && (hug1.localY <= (this.urlPanel.y + this.urlPanel.height)))); dispatchEvent(new Event(EVENT_ADVERTISE_CLICK)); } private function onRollBannerHandler(hug1:MouseEvent):void { //MethodID:5955, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 28 if(this.showUrlPanel) this.urlPanel.visible = (hug1.type == MouseEvent.ROLL_OVER); } private function getPositionBanner(hug1:Number, hug2:Number, hug3:Number, hug4:Number):Point { //MethodID:5956, LocalCount= 9 , MaxScope= 1, MaxStack= 4, CodeLength= 327 var hug6:String = null; var hug7:String = null; var hug5:Point = new Point(); if(this._advertiseModel.windowMode && (stage.displayState == StageDisplayState.FULL_SCREEN)){ hug6 = this._advertiseModel.wndfsHAlign; hug7 = this._advertiseModel.wndfsVAlign; }else{ hug6 = this._advertiseModel.wndHAlign; hug7 = this._advertiseModel.wndVAlign; } var hug8:String = hug6; switch(hug8){ case "left": hug5.x = 0; break; case "right": hug5.x = (hug3 - hug1); break; default: hug5.x = Math.round((hug3 - hug1) / 2); break; } hug8 = hug7; switch(hug8){ case "top": hug5.y = 0; break; case "bottom": hug5.y = (hug4 - hug2); break; default: hug5.y = Math.round((hug4 - hug2) / 2); break; } return hug5; } override protected function onUpdate(hug1:Number, hug2:Number):void { //MethodID:5957, LocalCount= 13 , MaxScope= 1, MaxStack= 6, CodeLength= 1254 var hug7:Number = NaN; var hug8:Number = NaN; var hug9:Number = NaN; var hug10:Number = NaN; var hug11:Graphics = null; trace("onUpdate(" + hug1 + ", " + hug2 + ")"); graphics.clear(); if(!this._advertiseModel) return; if(this._advertiseModel.windowMode || !this._advertiseModel.hideBackgroundPanel){ graphics.beginFill(0, 0.6); graphics.drawRect(0, 0, hug1, hug2); } this.urlPanel.x = Math.round((hug1 - this.urlPanel.width) / 2); this.urlPanel.y = (hug2 - 20 - this.urlPanel.height); var hug3:Boolean = (!this._advertiseModel.windowMode && !this._advertiseModel.hideBackgroundPanel && (!this._advertiseModel.specialFormat == AdriverSpecialFormats.ASF_SMARTCLIP)); this.bannerPanel.y = 0; hug2 -= this.bannerPanel.y; var hug4:Number = hug1; var hug5:Number = hug2; if(this._advertiseModel.windowMode){ if(hug4 > this._advertiseModel.widthBanner) hug4 = this._advertiseModel.widthBanner; if(hug5 > this._advertiseModel.heightBanner) hug5 = this._advertiseModel.heightBanner; } var hug6:Point = new Point(); this.mediaContainer.width = hug4; this.mediaContainer.height = hug5; if(!this.banner){ hug6 = this.getPositionBanner(hug4, hug5, hug1, hug2); this.mediaContainer.x = hug6.x; this.mediaContainer.y = hug6.y; if(this.progressBar.visible) this.onUpdateProgressBar(); }else if(this._advertiseModel.specialFormat == AdriverSpecialFormats.ASF_SMARTCLIP){ this.bannerPanel.x = 0; this.bannerPanel.y = 0; this.mediaContainer.width = hug1; this.mediaContainer.height = hug2; this.mediaContainer.x = 0; this.mediaContainer.y = 0; if(this.progressBar.visible) this.onUpdateProgressBar(); if(this.banner){ this.banner.x = 0; this.banner.y = 0; } this.bannerMask.x = 0; this.bannerMask.y = 0; this.bannerMask.graphics.clear(); this.bannerMask.graphics.beginFill(0xFFFF00, 0); this.bannerMask.graphics.drawRect(0, 0, hug1, hug2); }else{ hug7 = (this._advertiseModel.widthBanner / this._advertiseModel.heightBanner); hug8 = (hug4 / hug5); hug9 = hug4; hug10 = hug5; if(hug7 > hug8){ hug10 = Math.round(hug9 / hug7); }else{ hug9 = Math.round(hug10 * hug7); } if(!this._advertiseModel.insideStretch){ if(hug9 < hug4){ hug9 = Math.round(hug4); hug10 = Math.round(hug9 / hug7); }else if(hug10 < hug5){ hug10 = Math.round(hug5); hug9 = Math.round(hug10 * hug7); } } hug4 = hug9; hug5 = hug10; this.banner.scaleX = (hug9 / this._advertiseModel.widthBanner); this.banner.scaleY = (hug10 / this._advertiseModel.heightBanner); hug6 = this.getPositionBanner(hug9, hug10, hug1, hug2); this.banner.y = hug6.y; this.banner.x = hug6.x; this.bannerMask.x = hug6.x; if(hug6.y < 0){ hug10 += hug6.y; this.bannerMask.y = 0; }else{ this.bannerMask.y = hug6.y; } this.bannerMask.graphics.clear(); this.bannerMask.graphics.beginFill(0xFFFF00, 0); this.bannerMask.graphics.drawRect(0, 0, hug9, hug10); } this.bannerPanelMask.graphics.clear(); this.bannerPanelMask.graphics.beginFill(0); this.bannerPanelMask.graphics.drawRect(0, (hug3 ? 12 : this.bannerPanel.y), hug1, (hug2 - (hug3 ? 12 : 0))); if(!this._advertiseModel.hideBackgroundPanel){ if(!this._advertiseModel.windowMode){ var hug12:int = 0; hug6.y = hug12; hug6.x = hug12; hug4 = hug1; hug5 = hug2; }else{ if(hug6.y < 0){ hug5 += hug6.y; hug6.y = 0; } if(hug6.x < 0){ hug6.x = 0; if(hug4 > hug1) hug4 = hug1; } } hug5 += this.bannerPanel.y; this.topPanel.x = hug6.x; this.topPanel.y = hug6.y; graphics.clear(); graphics.beginFill(0); graphics.drawRect(0, 0, hug4, hug5); graphics.endFill(); hug11 = this.topPanel.graphics; hug11.clear(); hug11.beginFill(0xCECECE); hug11.drawRect(0, 0, hug4, 12); hug11.endFill(); this.closeButton.onResize(null, hug4, hug5); } if(this.volumeButton.visible){ this.volumeButton.x = (hug1 - 28); this.volumeButton.y = (hug2 - 28); } } } } //script603 package ru.rutube.managers.advertisement.visual.controller{ import Components.AdView import flash.display.Loader import flash.events.Event import flash.events.IOErrorEvent import flash.net.URLRequest import flash.net.URLVariables import org.osmf.media.MediaType import ru.rutube.event.EventManager import ru.rutube.managers.advertisement.AdvertisementViewManager import ru.rutube.managers.advertisement.event.AdvertisementControllerEvent import ru.rutube.managers.advertisement.event.AdvertisementModelEvent import ru.rutube.managers.advertisement.model.Advertisement import ru.rutube.managers.playback.controller.StreamController import ru.rutube.managers.playback.controller.StreamControllerEvent import ru.rutube.managers.playback.controller.StreamControllerManager import ru.rutube.managers.reporter.Reporter //class(instance)_index:602 public class AdvertisementControllerMediaMind extends AdvertisementControllerMain { //static constructor public static function AdvertisementControllerMediaMind$cinit() { //MethodID:5959, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function AdvertisementControllerMediaMind() { //MethodID:5960, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 super(); } //variables/etc. override public function onFullLoaded(hug1:AdvertisementModelEvent):void { //MethodID:5961, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 116 super.onFullLoaded(hug1); if(isCanceled || !advModel || (hug1.adType != advModel.adType) || !advModel.isLoaded) return; if((advertisementAdRiver.adRutube.duration == 0) && !advertisementAdRiver.adRutube.isVideoContent) return; Reporter.instance.sendURL(this.buildMMUrl(advertisementAdRiver.adRutube.MMStartLink)); } override public function onMediaComplete(hug1:StreamControllerEvent):void { //MethodID:5962, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 33 Reporter.instance.sendURL(this.buildMMUrl(advertisementAdRiver.adRutube.MMEndedLink)); super.onMediaComplete(hug1); } override public function onAdvertisementClose(hug1:Event):void { //MethodID:5963, LocalCount= 4 , MaxScope= 1, MaxStack= 6, CodeLength= 99 var hug2:StreamController = null; var hug3:Number = NaN; if(advertisementAdRiver.adRutube.isVideoContent){ hug2 = StreamControllerManager.instance.getController(StreamController.CONTROLLER_ADVERTISE_STREAM); hug3 = hug2.time; if(!isNaN(hug3)) Reporter.instance.sendURL(this.buildMMUrl(advertisementAdRiver.adRutube.MMStopDurationLink, Math.round(hug3 / 1000))); } super.onAdvertisementClose(hug1); } override public function set advertisement(hug1:Advertisement):void { //MethodID:5964, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 super.advertisement = hug1; } override protected function buildUrl(hug1:String):String { //MethodID:5965, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 9 return this.buildMMUrl(hug1); } override protected function initLoading():void { //MethodID:5966, LocalCount= 4 , MaxScope= 1, MaxStack= 6, CodeLength= 289 var hug3:* = undefined; var hug1:StreamController = StreamControllerManager.instance.getController(StreamController.CONTROLLER_ADVERTISE_STREAM); var hug2:AdView = (AdvertisementViewManager.instance.getView(advModel.adType) as AdView); if(advertisementAdRiver.adRutube.isVideoContent){ hug1.clear(); hug3 = this.getMediaTypeFromURL(advertisementAdRiver.adRutube.bannerUrl); if(hug3 == ""){ EventManager.instance.dispatchEvent(new AdvertisementControllerEvent(AdvertisementControllerEvent.ADV_CONTROLLER_ERROR)); return; } hug1.setMediaParams(MediaType.VIDEO, "video/x-flv"); hug1.preBalancedUrl = advertisementAdRiver.adRutube.bannerUrl; hug2.volume = hug1.volume; hug2.updateView(AdView.VIEW_PREPARE_VIEW_VIDEO, advertisementAdRiver.adRutube); }else{ if(bannerLoader == null){ bannerLoader = new Loader(); bannerLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, listenerBannerLoadComplete, false, 0, true); bannerLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, listenerBannerLoadError, false, 0, true); } bannerLoader.load(new URLRequest(advertisementAdRiver.adRutube.bannerUrl)); timerLoading.reset(); timerLoading.start(); EventManager.instance.dispatchEvent(new AdvertisementControllerEvent(AdvertisementControllerEvent.EVENT_SHOW_BANNER)); } } private function buildMMUrl(hug1:String, hug2:Number=0.0):String { //MethodID:5967, LocalCount= 3 , MaxScope= 1, MaxStack= 5, CodeLength= 46 hug1 = hug1.replace("[Duration]", hug2); hug1 = hug1.replace("[timestamp]", Math.round(new Date().time / 1000)); return hug1; } private function getMediaTypeFromURL(hug1:String):String { //MethodID:5968, LocalCount= 5 , MaxScope= 1, MaxStack= 2, CodeLength= 117 var hug2:String = ""; var hug3:URLVariables = new URLVariables(hug1); if(hug3.hasOwnProperty("vt")){ switch(hug3.vt){ case "FLV8": case "FLV7": hug2 = MediaType.VIDEO; break; default: break; } } return hug2; } } } //script604 package org.osmf.metadata{ import __AS3__.vec.Vector //class(instance)_index:603 public class NullMetadataSynthesizer extends MetadataSynthesizer { //static constructor public static function NullMetadataSynthesizer$cinit() { //MethodID:5970, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function NullMetadataSynthesizer() { //MethodID:5971, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 super(); } //variables/etc. override public function synthesize(hug1:String, hug2:Metadata, hug3:Vector., hug4:String, hug5:Metadata):Metadata { //MethodID:5972, LocalCount= 6 , MaxScope= 1, MaxStack= 1, CodeLength= 4 return null; } } } //script605 //skip components :com.adobe.images //as filename :BitString.as //script606 package org.osmf.net{ import __AS3__.vec.Vector import org.osmf.utils.URL //class(instance)_index:605 public class FMSURL extends URL { //static constructor public static function FMSURL$cinit() { //MethodID:5977, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 81 APPNAME_START_INDEX = 0; INSTANCENAME_START_INDEX = 2; STREAMNAME_START_INDEX = 4; DEFAULT_INSTANCE_NAME = "_definst_"; MP4_STREAM = "mp4"; MP3_STREAM = "mp3"; ID3_STREAM = "id3"; QUERY_STRING_STREAM = "streamName"; QUERY_STRING_STREAMTYPE = "streamType"; } //static variables/etc. private static const APPNAME_START_INDEX:uint = 0; //slotID:1 private static const INSTANCENAME_START_INDEX:uint = 2; //slotID:2 private static const STREAMNAME_START_INDEX:uint = 4; //slotID:3 private static const DEFAULT_INSTANCE_NAME:String = "_definst_";//slotID:4 public static const MP4_STREAM:String = "mp4"; //slotID:5 public static const MP3_STREAM:String = "mp3"; //slotID:6 public static const ID3_STREAM:String = "id3"; //slotID:7 public static const QUERY_STRING_STREAM:String = "streamName"; //slotID:8 public static const QUERY_STRING_STREAMTYPE:String = "streamType";//slotID:9 //constructor public function FMSURL(hug1:String, hug2:Boolean=false) { //MethodID:5978, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 46 super(hug1); this._useInstance = hug2; this._appName = ""; this._instanceName = ""; this._streamName = ""; this._fileFormat = ""; this.parsePath(); this.parseQuery(); } //variables/etc. private var _streamName:String; //slotID:0 private var _origins:Vector.; //slotID:0 private var _fileFormat:String; //slotID:0 private var _appName:String; //slotID:0 private var _edges:Vector.; //slotID:0 private var _useInstance:Boolean; //slotID:0 private var _instanceName:String; //slotID:0 public function get useInstance():Boolean { //MethodID:5979, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._useInstance; } public function get appName():String { //MethodID:5980, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._appName; } public function get instanceName():String { //MethodID:5981, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._instanceName; } public function get streamName():String { //MethodID:5982, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._streamName; } public function get fileFormat():String { //MethodID:5983, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._fileFormat; } public function get edges():Vector. { //MethodID:5984, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._edges; } public function get origins():Vector. { //MethodID:5985, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._origins; } private function parsePath():void { //MethodID:5986, LocalCount= 10 , MaxScope= 1, MaxStack= 5, CodeLength= 575 var hug7:RegExp = null; var hug8:uint = 0; var hug9:int = 0; if((path == null) || (path.length == 0)){ this._streamName = getParamValue(QUERY_STRING_STREAM); this._fileFormat = getParamValue(QUERY_STRING_STREAMTYPE); return; } var hug1:RegExp = new RegExp("(\/)"); var hug2:Array = path.split(hug1); if(hug2 != null){ this._appName = hug2[APPNAME_START_INDEX]; this._instanceName = ""; this._streamName = ""; hug7 = new RegExp(("^.*/" + DEFAULT_INSTANCE_NAME), "i"); if(path.search(hug7) > (-1)) this._useInstance = true; hug8 = STREAMNAME_START_INDEX; if(this._useInstance){ this._instanceName = hug2[INSTANCENAME_START_INDEX]; }else{ hug8 = INSTANCENAME_START_INDEX; } hug9 = hug8; while(hug9 < hug2.length){ this._streamName += hug2[hug9]; hug9++; } if((this._streamName == null) || (this._streamName == "")) this._streamName = getParamValue(QUERY_STRING_STREAM); if(this._streamName.search(new RegExp("^mp4:", "i")) > (-1)){ this._fileFormat = MP4_STREAM; }else if(this._streamName.search(new RegExp("^mp3:", "i")) > (-1)){ this._fileFormat = MP3_STREAM; }else if(this._streamName.search(new RegExp("^id3:", "i")) > (-1)){ this._fileFormat = ID3_STREAM; } if((this._fileFormat == null) || (this._fileFormat == "")) this._fileFormat = getParamValue(QUERY_STRING_STREAMTYPE); } var hug3:int = this._streamName.indexOf("/mp4:"); var hug4:int = this._streamName.indexOf("/mp3:"); var hug5:int = this._streamName.indexOf("/id3:"); var hug6:int = -1; if(hug3 > 0){ hug6 = hug3; }else if(hug4 > 0){ hug6 = hug4; }else if(hug5 > 0){ hug6 = hug5; } if(this.useInstance && (hug6 > 0)){ this._instanceName += "/"; this._instanceName += this._streamName.substr(0, hug6); this._streamName = this.streamName.substr(hug6 + 1); } } private function parseQuery():void { //MethodID:5987, LocalCount= 15 , MaxScope= 1, MaxStack= 4, CodeLength= 687 var hug12:int = 0; var hug13:int = 0; var hug14:FMSURL = null; if((query == null) || (query.length == 0) || (query.search(new RegExp(":\/")) == (-1))) return; var hug1:Array = query.split("?"); var hug2:int = 0; while(hug2 < hug1.length){ hug12 = hug1[hug2].toString().search(new RegExp(":\/")); if(hug12 == (-1)) hug1.splice(hug2, 1); hug2++; } var hug3:Boolean = false; var hug4:int = 0; if(hug1.length >= 2){ hug3 = true; hug4 = (hug1.length - 1); } var hug5:String = ""; var hug6:String = ""; var hug7:int = 0; var hug8:int = 0; var hug9:int = 0; var hug10:int = 0; var hug11:int = 0; while(hug11 < hug1.length){ hug13 = hug1[hug11].toString().search(new RegExp(":\/")); hug9 = (hug13 + 2); if(hug1[hug11].charAt(hug9) == "/") hug9++; hug7 = hug1[hug11].indexOf(":", hug9); hug8 = hug1[hug11].indexOf("/", hug9); if((hug8 < 0) && (hug7 < 0)){ hug5 = hug1[hug11].slice(hug9); }else if((hug7 >= 0) && (hug7 < hug8)){ hug10 = hug7; hug5 = hug1[hug11].slice(hug9, hug10); hug9 = (hug10 + 1); hug10 = hug8; hug6 = hug1[hug11].slice(hug9, hug10); }else if(hug1[hug11].indexOf("://") != (-1)){ hug10 = hug8; hug5 = hug1[hug11].slice(hug9, hug10); }else{ hug10 = hug1[hug11].indexOf("/"); hug5 = "localhost"; } if(hug11 == hug4){ if(this._origins == null) this._origins = new Vector.(); this._origins.push(new FMSHost(hug5, hug6)); hug14 = new FMSURL(hug1[hug11], this._useInstance); if(this._appName == "") this._appName = hug14.appName; if(this._useInstance && (this._instanceName == "")) this._instanceName = hug14.instanceName; if(this._streamName == "") this._streamName = hug14.streamName; }else if((hug1[hug11] != query) && hug3){ if(this._edges == null) this._edges = new Vector.(); this._edges.push(new FMSHost(hug5, hug6)); } hug11++; } } } } //script607 package Components.Forms{ import Components.Component import flash.events.Event import flash.events.EventDispatcher import flash.events.MouseEvent //class(instance)_index:606 public class TabsPanel extends Component { //static constructor public static function TabsPanel$cinit() { //MethodID:5989, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 12 EVENT_CHANGE_TAB = "changeTab"; } //static variables/etc. public static const EVENT_CHANGE_TAB:String = "changeTab"; //slotID:1 //constructor public function TabsPanel(hug1:EventDispatcher=null):void { //MethodID:5990, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 13 this.list = []; super(hug1); } //variables/etc. private var _index:uint = 0; //slotID:0 private var list:Array; //slotID:0 public function addTab(hug1:String):void { //MethodID:5991, LocalCount= 3 , MaxScope= 1, MaxStack= 5, CodeLength= 71 var hug2:Tab = new Tab(this.list.length, hug1, (this._index == this.list.length)); this.list.push(addChild(hug2)); hug2.addEventListener(MouseEvent.CLICK, this.onClickTab); onPaint(); } public function addTabs(hug1:Array):void { //MethodID:5992, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 35 var hug2:uint = 0; while(hug2 < hug1.length){ this.addTab(hug1[hug2]); hug2++; } } public function deleteTab(hug1:uint):void { //MethodID:5993, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 111 if(hug1 >= this.list.length) return; removeChild(this.list[hug1]); this.list.splice(hug1, 1); if((this._index != 0) && (this.list.length > 0)){ this._index = 0; this.list[0].actived = true; dispatcher.dispatchEvent(new Event(EVENT_CHANGE_TAB)); } onPaint(); } public function clear():void { //MethodID:5994, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 58 var hug1:uint = 0; while(hug1 < this.list.length){ removeChild(this.list[hug1]); hug1++; } this.list.length = 0; this._index = 0; } public function set index(hug1:uint):void { //MethodID:5995, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 73 if((hug1 >= 0) && (hug1 < this.list.length)){ this.list[this._index].actived = false; this.list[hug1].actived = true; this._index = hug1; dispatcher.dispatchEvent(new Event(EVENT_CHANGE_TAB)); } } public function get index():uint { //MethodID:5996, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._index; } public function tabsLength():int { //MethodID:5997, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 10 return this.list.length; } private function onClickTab(hug1:MouseEvent):void { //MethodID:5998, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 19 hug1.stopPropagation(); this.index = hug1.target.index; } override protected function onUpdate(hug1:Number, hug2:Number):void { //MethodID:5999, LocalCount= 5 , MaxScope= 1, MaxStack= 3, CodeLength= 68 var hug3:Number = 0; var hug4:uint = 0; while(hug4 < this.list.length){ this.list[hug4].x = hug3; hug3 += (this.list[hug4].width + 3); hug4++; } } } } //script608 package Components.Window{ import Components.Button import Components.Player import Components.SkinManager import Components.Forms.Button import Components.Forms.ClipboardButton import Components.Forms.InputText import Components.Forms.Memo import Components.Forms.TabsPanel import Components.Forms.TitleText import flash.display.BitmapData import flash.display.DisplayObject import flash.display.Graphics import flash.display.Loader import flash.display.Shape import flash.display.Sprite import flash.events.Event import flash.events.EventDispatcher import flash.events.IOErrorEvent import flash.events.MouseEvent import flash.events.SecurityErrorEvent import flash.net.URLLoader import flash.net.URLRequest import flash.net.URLVariables import flash.system.System import flash.text.TextField //class(instance)_index:607 public class MarkEditWindow extends WindowDispatcher { //static constructor public static function MarkEditWindow$cinit() { //MethodID:6001, LocalCount= 1 , MaxScope= 1, MaxStack= 4, CodeLength= 54 defaultAvatarData = new DefaultAvatarData(80, 80); MAIL_URL = "http://rutube.ru/tracks/send_for_friend.html"; CAPTCHA_URL = "http://rutube.ru/img/code.jpg"; HORIZONTAL_SPACING = 25; authorAvatarData = defaultAvatarData; } //static variables/etc. public static var defaultAvatarData:DefaultAvatarData; //slotID:1 private static const MAIL_URL:String = "http://rutube.ru/tracks/send_for_friend.html";//slotID:2 private static const CAPTCHA_URL:String = "http://rutube.ru/img/code.jpg";//slotID:3 private static const HORIZONTAL_SPACING:uint = 25; //slotID:4 private static var authorAvatarData:BitmapData; //slotID:5 public static function drawContour(hug1:Graphics, hug2:Number, hug3:Number, hug4:Number, hug5:Number, hug6:Number=6.0, hug7:uint=6):void { //dispID:3, MethodID:6002, LocalCount= 8 , MaxScope= 1, MaxStack= 6, CodeLength= 246 if(!isNaN(hug6)) hug5 -= 7; hug4 += hug2; hug5 += hug3; hug1.moveTo(hug2, (hug3 + hug7)); hug1.curveTo(hug2, hug3, (hug2 + hug7), hug3); hug1.lineTo((hug4 - hug7), hug3); hug1.curveTo(hug4, hug3, hug4, (hug3 + hug7)); hug1.lineTo(hug4, (hug5 - hug7)); hug1.curveTo(hug4, hug5, (hug4 - hug7), hug5); if(!isNaN(hug6)){ if(hug6 < hug7){ hug6 = hug7; }else if(hug6 > (hug4 - hug7 + 10)){ hug6 = (hug4 - hug7 + 10); } hug6 += hug2; hug1.lineTo((hug6 + 10), hug5); hug1.lineTo((hug6 + 5), (hug5 + 6.8)); hug1.lineTo(hug6, hug5); } hug1.lineTo((hug2 + hug7), hug5); hug1.curveTo(hug2, hug5, hug2, (hug5 - hug7)); hug1.lineTo(hug2, (hug3 + hug7)); } //constructor public function MarkEditWindow(hug1:String, hug2:EventDispatcher=null):void { //MethodID:6003, LocalCount= 7 , MaxScope= 1, MaxStack= 17, CodeLength= 1637 this.titleText = new TitleText("Bytu-xp{|pt{p", 13, true); this.tabsPanel = new TabsPanel(); this.shape = new Shape(); this.closeButton = new Button(SkinManager.getSkin("CloseButtonSkin")); this.codeTab = new Sprite(); this.linkText = new InputText("", 0); this.linkCopyButton = new ClipboardButton(); this.codeText = new InputText(); this.ljcodeText = new InputText(); this.licodeText = new InputText(); this.embedCopyButton = new ClipboardButton(); this.ljCopyButton = new ClipboardButton(); this.liCopyButton = new ClipboardButton(); this.mailTab = new Sprite(); this.mailLabel = new TitleText("E-mail |pu|"); this.mailText = new InputText(); this.msgLabel = new TitleText("Su{ qu~y:"); this.msgText = new Memo("", 2048); this.captcha = new Loader(); this.captchaLabel1 = new TitleText("Brutyu {t"); this.captchaLabel2 = new TitleText("tp:"); this.captchaText = new InputText("", 5); this.sendButton = new Button("Opry"); this.tabs = [this.codeTab, this.mailTab]; super(hug1, hug2); size(350, 261, false, 265, 261, 350, 261); addChild(this.titleText); this.titleText.x = 10; this.titleText.y = 6; addChild(this.tabsPanel); this.tabsPanel.x = 10; this.tabsPanel.y = 31; this.tabsPanel.addTabs(["R|{p y {t", "Opry ts!"]); this.tabsPanel.addEventListener(TabsPanel.EVENT_CHANGE_TAB, this.onChangeTab); addChild(this.shape); this.shape.x = 10; this.shape.y = 56; addChild(this.codeTab); addChild(this.mailTab); this.mailTab.visible = false; var hug6:int = 19; this.mailTab.x = hug6; this.codeTab.x = hug6; var hug6:int = 64; this.mailTab.y = hug6; this.codeTab.y = hug6; var hug3:uint = 34; var hug4:uint = 8; var hug5:DisplayObject = this.codeTab.addChild(new TitleText("R|{p:")); hug5.x = -3; hug5.y = hug4; this.linkText.editable = false; this.codeTab.addChild(this.linkText); this.linkText.x = 63; this.codeTab.addChild(this.linkCopyButton); this.linkCopyButton.y = (--hug5.y); this.linkText.y = hug5.y; this.linkText.addEventListener(MouseEvent.CLICK, this.listenerTextFieldClick); this.linkCopyButton.addEventListener(MouseEvent.CLICK, this.onClickClipboard); var hug6:Boolean = false; this.licodeText.editable = hug6; this.ljcodeText.editable = hug6; this.codeText.editable = hug6; var hug6:int = 63; this.licodeText.x = hug6; this.ljcodeText.x = hug6; this.codeText.x = hug6; hug5 = this.codeTab.addChild(new TitleText("Kt:")); hug5.x = -3; hug5.y = (hug4 + hug3); this.codeTab.addChild(this.codeText); this.codeTab.addChild(this.embedCopyButton); this.embedCopyButton.y = (--hug5.y); this.codeText.y = hug5.y; this.codeText.addEventListener(MouseEvent.CLICK, this.listenerTextFieldClick); this.embedCopyButton.addEventListener(MouseEvent.CLICK, this.onClickClipboard); hug5 = this.codeTab.addChild(new TitleText("D| GG:")); hug5.x = -3; hug5.y = (hug4 + (hug3 * 2)); this.codeTab.addChild(this.ljcodeText); this.codeTab.addChild(this.ljCopyButton); this.ljCopyButton.addEventListener(MouseEvent.CLICK, this.onClickClipboard); this.ljCopyButton.y = (--hug5.y); this.ljcodeText.y = hug5.y; this.ljcodeText.addEventListener(MouseEvent.CLICK, this.listenerTextFieldClick); hug5 = this.codeTab.addChild(new TitleText("D| Ly.Q:")); hug5.x = -3; hug5.y = (hug4 + (hug3 * 3)); this.codeTab.addChild(this.licodeText); this.codeTab.addChild(this.liCopyButton); this.liCopyButton.addEventListener(MouseEvent.CLICK, this.onClickClipboard); this.liCopyButton.y = (--hug5.y); this.licodeText.y = hug5.y; this.licodeText.addEventListener(MouseEvent.CLICK, this.listenerTextFieldClick); this.mailTab.addChild(this.mailLabel); this.mailLabel.y = 8; this.mailTab.addChild(this.mailText); this.mailText.x = (this.mailLabel.width + 8); this.mailText.y = 7; this.mailTab.addChild(this.msgLabel); this.msgLabel.y = (this.mailText.y + this.mailText.height + 6); this.mailTab.addChild(this.msgText); this.msgText.y = (this.msgLabel.y + this.msgLabel.height + 4); this.mailTab.addChild(this.captcha); this.captcha.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, trace); this.captcha.contentLoaderInfo.addEventListener(Event.COMPLETE, this.onCompleteLoadHandler); this.mailTab.addChild(this.captchaLabel1); this.mailTab.addChild(this.captchaLabel2); this.captchaLabel2.x = (this.captcha.x + 86); var hug6:int = 120; this.captchaLabel2.y = hug6; this.captchaLabel1.y = hug6; this.mailTab.addChild(this.captchaText); this.captchaText.x = (this.captchaLabel2.x + Math.round(this.captchaLabel2.width) + 8); this.captchaText.y = 120; this.captcha.x = 0; this.captcha.y = (this.captchaLabel1.y + this.captchaLabel1.height + 2); this.mailTab.addChild(this.sendButton); this.sendButton.params({x:(_width - 119 + this.mailTab.x), y:(_height - 42 + this.mailTab.y), left:false, right:true, top:false, bottom:true, wContainer:_width, hContainer:_height}); this.sendButton.mouseEnabled = false; this.sendButton.addEventListener(MouseEvent.CLICK, this.onSendHandler); addChild(this.closeButton); this.closeButton.params({x:(_width - 27), y:9, left:false, right:true}); this.closeButton.addEventListener(MouseEvent.CLICK, this.onClickClose); } //variables/etc. private var captcha:Loader; //slotID:0 private var mailText:InputText; //slotID:0 private var shape:Shape; //slotID:0 private var titleText:TitleText; //slotID:0 private var tabsPanel:TabsPanel; //slotID:0 private var linkCopyButton:ClipboardButton; //slotID:0 private var ljCopyButton:ClipboardButton; //slotID:0 private var licodeText:InputText; //slotID:0 private var ljcodeText:InputText; //slotID:0 private var codeText:InputText; //slotID:0 private var embedCopyButton:ClipboardButton; //slotID:0 private var linkText:InputText; //slotID:0 public var time:Number = 0.0; //slotID:0 private var msgText:Memo; //slotID:0 private var closeButton:Button; //slotID:0 private var captchaText:InputText; //slotID:0 private var captchaLabel1:TitleText; //slotID:0 private var captchaLabel2:TitleText; //slotID:0 private var sendButton:Button; //slotID:0 private var mailTab:Sprite; //slotID:0 private var positionArrow:uint = 20; //slotID:0 private var liCopyButton:ClipboardButton; //slotID:0 private var codeTab:Sprite; //slotID:0 private var msgLabel:TitleText; //slotID:0 private var isCaptcha:Boolean = false; //slotID:0 private var mailLabel:TitleText; //slotID:0 private var tabs:Array; //slotID:0 public function updateData(hug1:String, hug2:String, hug3:String, hug4:String):void { //MethodID:6004, LocalCount= 5 , MaxScope= 1, MaxStack= 2, CodeLength= 36 this.linkText.text = hug1; this.codeText.text = hug2; this.ljcodeText.text = hug3; this.licodeText.text = hug4; } public function setPosition(hug1:uint, hug2:uint):void { //MethodID:6005, LocalCount= 4 , MaxScope= 1, MaxStack= 3, CodeLength= 83 var hug3:Number = Math.round((hug2 - _width) / 2); if(hug1 < (hug3 + HORIZONTAL_SPACING)){ hug3 = (hug1 - HORIZONTAL_SPACING); }else if(hug1 > (hug3 + _width - HORIZONTAL_SPACING)){ hug3 = (hug1 - _width + HORIZONTAL_SPACING); } this.positionArrow = (hug1 - hug3 - 5); x = hug3; } public function allowSendInvite(hug1:Boolean):void { //MethodID:6006, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 36 if(hug1){ }else if(this.tabsPanel.tabsLength() > 1){ this.tabsPanel.deleteTab(1); } } private function onChangeTab(hug1:Event):void { //MethodID:6007, LocalCount= 3 , MaxScope= 1, MaxStack= 4, CodeLength= 92 var hug2:Boolean = false; this.mailTab.visible = hug2; this.codeTab.visible = hug2; if(hug1.target.index < this.tabs.length){ this.tabs[hug1.target.index].visible = true; if(this.mailTab.visible && !this.isCaptcha){ this.isCaptcha = true; this.updateCaptcha(); } } } private function updateCaptcha():void { //MethodID:6008, LocalCount= 3 , MaxScope= 5, MaxStack= 3, CodeLength= 43 try{ this.captcha.load(new URLRequest(CAPTCHA_URL)); } catch(error:Error){ } } private function listenerTextFieldClick(hug1:MouseEvent):void { //MethodID:6009, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 33 var hug2:TextField = (hug1.target as TextField); if(!hug2) return; hug2.setSelection(0, hug2.text.length); } private function onCompleteLoadHandler(hug1:Event):void { //MethodID:6010, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 11 this.sendButton.mouseEnabled = true; } private function onClickClose(hug1:MouseEvent):void { //MethodID:6011, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 10 visible = false; } private function onClickClipboard(hug1:MouseEvent):void { //MethodID:6012, LocalCount= 4 , MaxScope= 1, MaxStack= 2, CodeLength= 200 var hug2:String = ""; switch(hug1.currentTarget){ case this.linkCopyButton: hug2 = this.linkText.text; break; case this.embedCopyButton: hug2 = this.codeText.text; break; case this.ljCopyButton: hug2 = this.ljcodeText.text; break; case this.liCopyButton: hug2 = this.licodeText.text; break; default: break; } if(hug2){ System.setClipboard(hug2); Player.alert("{yrp~ r qu q}u~p"); visible = false; } } private function onSendHandler(hug1:MouseEvent):void { //MethodID:6013, LocalCount= 4 , MaxScope= 5, MaxStack= 3, CodeLength= 420 internal var event:MouseEvent; //slotID:1 internal var urlLoader:URLLoader; //slotID:2 internal var request:URLRequest; //slotID:3 internal var variables:URLVariables; //slotID:4 event = hug1; if((this.mailText.text.length == 0) || (this.msgText.text.length == 0) || (this.captchaText.text.length == 0) || (this.mailText.text.length == 0)){ Player.alert("Hp|~yu ru |"); return; } if(this.mailText.text.search(new RegExp("[^@]+@[^@]+\.[^@^\.]+")) < 0){ this.mailText.textField.borderColor = 0x990000; this.mailText.textField.border = true; return; } if(this.mailText.textField.border){ this.mailText.textField.borderColor = 0; this.mailText.textField.border = false; } this.sendButton.mouseEnabled = false; urlLoader = new URLLoader(); urlLoader.addEventListener(Event.COMPLETE, this.onCompleteSendHandler); urlLoader.addEventListener(IOErrorEvent.IO_ERROR, this.onErrorLoadHandler); urlLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.onErrorLoadHandler); request = new URLRequest(MAIL_URL); variables = new URLVariables(); variables.addr = this.mailText.text; variables.text = this.msgText.text; variables.word = this.captchaText.text; variables.url = this.linkText.text; request.data = variables; try{ urlLoader.load(request); } catch(error:Error){ } this.mailText.text = ""; this.msgText.text = ""; this.captchaText.text = ""; this.linkText.text = ""; } private function onCompleteSendHandler(hug1:Event):void { //MethodID:6014, LocalCount= 4 , MaxScope= 1, MaxStack= 2, CodeLength= 199 var hug2:String = (hug1.target as URLLoader).data; if(hug2 != "image"){ this.captchaText.text = ""; this.updateCaptcha(); }else{ this.sendButton.mouseEnabled = true; } var hug3:String = hug2; switch(hug3){ case "ok": hug2 = "Rqu~yu pr|u~ {pxp~~} ptu"; break; case "image": hug2 = "Nuru~ xptp~ {t"; break; case "not user": hug2 = "Pwp|zp, pryxzu"; break; case "bad user": hug2 = "Bp p{{p~ ~u p{yryrp~ y|y xpqp~u~"; break; default: hug2 = "Pyx|p uru~p yq{p. Rqu~yu NE pr|u~"; break; } Player.alert(hug2); } private function onErrorLoadHandler(hug1:Event):void { //MethodID:6015, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 14 trace("MarkEditWindow.onErrorLoadHandler:", hug1); } override protected function onUpdate(hug1:Number, hug2:Number):void { //MethodID:6016, LocalCount= 4 , MaxScope= 1, MaxStack= 7, CodeLength= 346 graphics.clear(); graphics.lineStyle(1, 0x4E4E4F, 0.42, true); drawContour(graphics, 0, 0, hug1, hug2, this.positionArrow); graphics.lineStyle(1, 0xFFFFFF, 0.8, true); graphics.beginFill(0xE7E7E8, 0.8); drawContour(graphics, 1, 1, (hug1 - 2), (hug2 - 2), this.positionArrow); this.shape.graphics.clear(); this.shape.graphics.beginFill(0xFFFFFF); this.shape.graphics.drawRect(0, 0, (hug1 - 20), (hug2 - 70)); this.closeButton.onResize(null, hug1, hug2); this.sendButton.onResize(null, hug1, hug2); hug1 -= (this.codeTab.x * 2); hug2 -= (this.codeTab.y + 13); var hug3:Number = (hug1 - this.embedCopyButton.width + 4 - this.codeText.x); this.codeText.width = hug3; this.ljcodeText.width = hug3; this.licodeText.width = hug3; this.linkText.width = hug3; var hug3:Number = (hug1 - this.embedCopyButton.width); this.embedCopyButton.x = hug3; this.ljCopyButton.x = hug3; this.liCopyButton.x = hug3; this.linkCopyButton.x = hug3; this.captchaText.width = (hug1 - this.captchaText.x); this.mailText.width = (hug1 - this.mailText.x); this.msgText.width = hug1; } } } //script609 package Components.Window{ import Components.Forms.TitleText import fl.controls.ScrollBar import fl.events.ScrollEvent import flash.display.Bitmap import flash.display.BitmapData import flash.display.GradientType import flash.display.Sprite import flash.events.Event import flash.events.EventDispatcher import flash.events.MouseEvent import flash.events.TimerEvent import flash.geom.Matrix import flash.text.TextField import flash.text.TextFieldAutoSize import flash.text.TextFormat import flash.text.TextFormatAlign import flash.utils.Timer import ru.rutube.event.ControlPanelEvent import ru.rutube.event.EventManager //class(instance)_index:608 public class MarkPreviewWindow extends WindowDispatcher { //static constructor public static function MarkPreviewWindow$cinit() { //MethodID:6018, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function MarkPreviewWindow(hug1:String, hug2:EventDispatcher=null):void { //MethodID:6020, LocalCount= 5 , MaxScope= 2, MaxStack= 8, CodeLength= 641 internal var nameGroup:String = ""; //slotID:1 internal var dispatcherObect:EventDispatcher = null; //slotID:2 nameGroup = hug1; dispatcherObect = hug2; this.avatar = new Bitmap(MarkEditWindow.defaultAvatarData); this.titleText = new TextField(); this.panel = new Sprite(); this.titleText2 = new TitleText("", 13, true); this.bookmarksPanel = new Sprite(); this.scrollPanel = new Sprite(); this.scrollMask = new Sprite(); this.scrollBar = new ScrollBar(); this.tfDefault = new TextFormat("_sans", 10, 0, true); this.tfOnlyText = new TextFormat("_sans", 12, 0, true); this.bookmarksList = []; this.timerHide = new Timer(1500, 1); super(nameGroup, dispatcherObect); size(70, 41, false, 30, 41, 0, 41); mouseChildren = false; this.avatar.width = 21; this.avatar.height = 21; addChild(this.avatar); this.avatar.y = 7; this.tfOnlyText.align = TextFormatAlign.CENTER; this.titleText.selectable = false; addChild(this.titleText); addChild(this.panel); this.panel.x = 10; this.panel.y = -120; this.panel.addChild(this.titleText2); this.titleText2.y = 6; this.panel.addChild(this.scrollMask); this.panel.addChild(this.scrollPanel); var hug4:int = 5; this.scrollPanel.x = hug4; this.scrollMask.x = hug4; this.scrollPanel.mask = this.scrollMask; this.bookmarksPanel.mouseChildren = false; this.bookmarksPanel.buttonMode = true; this.scrollPanel.addChild(this.bookmarksPanel); this.scrollBar.setScrollProperties(3, 0, 1); this.panel.addChild(this.scrollBar); var hug4:int = 36; this.scrollBar.y = hug4; this.scrollPanel.y = hug4; this.scrollMask.y = hug4; this.scrollBar.height = 106; var hug4:Boolean = false; this.scrollBar.visible = hug4; this.panel.visible = hug4; addEventListener(MouseEvent.ROLL_OVER, this.onRollOver); addEventListener(MouseEvent.ROLL_OUT, this.onRollOut); this.timerHide.addEventListener(TimerEvent.TIMER_COMPLETE, this.onTimerHide); this.scrollBar.addEventListener(ScrollEvent.SCROLL, this.onScroll); this.panel.addEventListener(MouseEvent.MOUSE_WHEEL, this.onMouseWhell); this.bookmarksPanel.addEventListener(MouseEvent.CLICK, this.onClickBookmarks); addEventListener(MouseEvent.MOUSE_DOWN, function(hug1:Event):void{ //MethodID:6019, LocalCount= 2 , MaxScope= 0, MaxStack= 1, CodeLength= 6 hug1.stopImmediatePropagation(); }); addEventListener(MouseEvent.CLICK, this.onClickBookmark); } //variables/etc. private var panel:Sprite; //slotID:0 private var scrollBar:ScrollBar; //slotID:0 private var bookmarksPanel:Sprite; //slotID:0 private var tfOnlyText:TextFormat; //slotID:0 public var time:Number = 0.0; //slotID:0 private var scrollMask:Sprite; //slotID:0 public var positionArrow:uint = 10; //slotID:0 private var titleText:TextField; //slotID:0 private var timerHide:Timer; //slotID:0 private var avatar:Bitmap; //slotID:0 private var visibleAvatar:Boolean = true; //slotID:0 private var titleText2:TitleText; //slotID:0 private var tfDefault:TextFormat; //slotID:0 private var scrollPanel:Sprite; //slotID:0 private var bookmarksList:Array; //slotID:0 override public function set visible(hug1:Boolean):void { //MethodID:6021, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 29 super.visible = hug1; if(hug1){ this.timerHide.reset(); this.timerHide.start(); } } public function updateData(hug1:Array):void { //MethodID:6022, LocalCount= 4 , MaxScope= 1, MaxStack= 5, CodeLength= 318 if(!hug1 || !hug1.length) return; var hug2:uint = 0; while(hug2 < this.bookmarksList.length){ if(this.bookmarksList[hug2].avatar) this.bookmarksPanel.removeChild(this.bookmarksList[hug2].avatar); this.bookmarksPanel.removeChild(this.bookmarksList[hug2].titleText); hug2++; } this.bookmarksList.length = 0; hug2 = 0; while(hug2 < hug1.length){ if(!hug1[hug2].hasOwnProperty("hideAvatar")) hug1[hug2].hideAvatar = false; hug2++; } buttonMode = false; this.panel.visible = false; var hug3:Boolean = hug1[0].title; this.avatar.visible = hug3; this.visibleAvatar = hug3; if(!hug1[0].hideAvatar && this.visibleAvatar){ this.avatar.bitmapData = (hug1[0].avatarData ? hug1[0].avatarData : MarkEditWindow.defaultAvatarData); this.avatar.width = 21; this.avatar.height = 21; } this.buildText(this.titleText, hug1[0].time, hug1[0].title); this.titleText.visible = true; } private function buildText(hug1:TextField, hug2:String, hug3:String):void { //MethodID:6023, LocalCount= 5 , MaxScope= 1, MaxStack= 5, CodeLength= 88 var hug4:Boolean = Boolean(hug3); if(hug2 && hug4) hug2 += " "; hug1.defaultTextFormat = (hug3 ? this.tfDefault : this.tfOnlyText); hug1.text = (hug2 + hug3); if(hug4) hug1.setTextFormat(this.tfOnlyText, 0, (hug2.length - 1)); } private function onRollOver(hug1:MouseEvent):void { //MethodID:6024, LocalCount= 2 , MaxScope= 1, MaxStack= 1, CodeLength= 11 this.timerHide.stop(); } private function onRollOut(hug1:MouseEvent):void { //MethodID:6025, LocalCount= 2 , MaxScope= 1, MaxStack= 1, CodeLength= 19 this.timerHide.reset(); this.timerHide.start(); } private function onTimerHide(hug1:TimerEvent):void { //MethodID:6026, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this.visible = false; } private function onScroll(hug1:ScrollEvent):void { //MethodID:6027, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 24 this.bookmarksPanel.y = (Math.round(hug1.position) * (-35)); } private function onMouseWhell(hug1:MouseEvent):void { //MethodID:6028, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 49 if(this.scrollBar.visible) this.scrollBar.scrollPosition += ((hug1.delta > 0) ? (-1) : 1); } private function onClickBookmarks(hug1:MouseEvent):void { //MethodID:6029, LocalCount= 2 , MaxScope= 1, MaxStack= 5, CodeLength= 46 trace("onClickBookmarkS ", Math.floor(hug1.localY / 35)); EventManager.instance.dispatchEvent(new Event(ControlPanelEvent.EVENT_MARK_SHOW_DESC)); } private function onClickBookmark(hug1:Event):void { //MethodID:6030, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 39 if(buttonMode){ trace("onClickBookmark"); EventManager.instance.dispatchEvent(new Event(ControlPanelEvent.EVENT_MARK_SHOW_DESC)); } } override protected function onUpdate(hug1:Number, hug2:Number):void { //MethodID:6031, LocalCount= 14 , MaxScope= 1, MaxStack= 8, CodeLength= 1301 var hug3:uint = 0; var hug4:Number = NaN; var hug5:Number = NaN; var hug6:Number = NaN; var hug7:Number = NaN; var hug8:Number = NaN; var hug9:Number = NaN; var hug10:Number = NaN; var hug11:Number = NaN; var hug12:Matrix = null; var hug13:Number = NaN; graphics.clear(); if(this.bookmarksList.length > 0){ hug5 = hug1; if(hug5 > 350){ hug5 = 350; }else if(hug5 < 265){ hug5 = 265; } hug4 = Math.round((hug1 - hug5) / 2); if(this.positionArrow < (hug4 + 25)){ hug4 = (this.positionArrow - 25); }else if(this.positionArrow > (hug4 + hug5 - 25)){ hug4 = (this.positionArrow - hug5 + 30); } graphics.lineStyle(1, 0x4E4E4F, 0.42, true); MarkEditWindow.drawContour(graphics, hug4, -121, hug5, 162, (this.positionArrow + 5 - hug4)); graphics.lineStyle(1, 0xFFFFFF, 0.8, true); graphics.beginFill(0xE7E7E8, 0.8); MarkEditWindow.drawContour(graphics, (hug4 + 1), -120, (hug5 - 2), 160, (this.positionArrow + 5 - hug4)); this.panel.graphics.clear(); this.panel.graphics.beginFill(0xFFFFFF); this.panel.graphics.drawRect(0, 30, (hug5 - 20), 117); hug5 -= 30; this.panel.x = (hug4 + 10); this.scrollBar.visible = (this.bookmarksList.length > 3); if(this.scrollBar.visible){ this.scrollBar.x = (hug5 - 10); hug5 -= 11; this.scrollBar.maxScrollPosition = (this.bookmarksList.length - 3); } this.bookmarksPanel.graphics.clear(); this.bookmarksPanel.graphics.lineStyle(1, 0x4E4E4F, 0.42, true); hug3 = 0; while(hug3 < this.bookmarksList.length){ MarkEditWindow.drawContour(this.bookmarksPanel.graphics, 0, (hug3 * 35), (hug5 - 1), 35, NaN, 4); hug3++; } this.bookmarksPanel.graphics.lineStyle(1, 0xFFFFFF, 0.8, true); this.bookmarksPanel.graphics.beginFill(0xE7E7E8, 0.8); hug3 = 0; while(hug3 < this.bookmarksList.length){ MarkEditWindow.drawContour(this.bookmarksPanel.graphics, 1, ((hug3 * 35) + 1), (hug5 - 3), 33, NaN, 4); if(this.bookmarksList[hug3].visibleAvatar) this.bookmarksList[hug3].avatar.visible = (hug5 > 100); this.bookmarksList[hug3].titleText.x = ((this.bookmarksList[hug3].visibleAvatar && (hug5 > 100)) ? (this.bookmarksList[hug3].avatar.x + 23) : 4); this.bookmarksList[hug3].titleText.width = ((hug5 - 4) - this.bookmarksList[hug3].titleText.x); hug3++; } this.scrollMask.graphics.clear(); this.scrollMask.graphics.beginFill(0); this.scrollMask.graphics.drawRect(0, 0, hug5, 106); }else{ this.titleText.autoSize = TextFieldAutoSize.LEFT; hug6 = (this.titleText.textWidth + 11); if(this.visibleAvatar) hug6 += 25; if(hug6 > hug1){ hug6 = hug1; }else if(hug6 < 20){ hug6 = 20; } this.titleText.autoSize = TextFieldAutoSize.NONE; this.titleText.width = (hug6 - 8 + (this.visibleAvatar ? 25 : 0)); this.titleText.height = (this.titleText.textHeight + 4); this.titleText.y = (Math.round((hug2 - this.titleText.height) / 2) - 3); hug7 = Math.round((hug6 - 20) / 2); hug8 = hug7; hug9 = hug7; hug10 = 10; if(hug7 > 0){ hug4 = (this.positionArrow - hug7); hug13 = 0; if(hug4 < (-hug10)){ hug13 = Math.abs(hug10 + hug4); }else{ hug4 = (this.positionArrow + hug7); if(hug4 > (hug1 + hug10)) hug13 = -(hug4 - hug1 + hug10); } hug8 -= hug13; hug9 += hug13; } hug11 = (this.positionArrow - hug8 - 10 + hug10); if(this.visibleAvatar) this.avatar.x = (hug11 + 6); this.titleText.x = (this.visibleAvatar ? (this.avatar.x + 23) : (hug11 + 4)); hug1 = (hug8 + hug9 + 20); hug8 += 5; graphics.lineStyle(1, 0x4E4E4F, 0.42, true); MarkEditWindow.drawContour(graphics, hug11, 0, hug1, hug2, hug8); graphics.lineStyle(1, 0xFFFFFF, 0.8, true); hug12 = new Matrix(); hug12.createGradientBox((hug1 - 2), (hug2 - 2), (Math.PI / 2)); graphics.beginGradientFill(GradientType.LINEAR, [0xF3F3F3, 0x939393, 0xB5B5B5, 0xF3F3F3], [1, 1, 1, 1], [0, 127, 176, 255], hug12); MarkEditWindow.drawContour(graphics, (hug11 + 1), 1, (hug1 - 2), (hug2 - 2), hug8); } } } } //script610 package Components.Volume{ import Components.Component import fl.events.InteractionInputType import fl.events.SliderEvent import fl.events.SliderEventClickTarget import flash.events.EventDispatcher import flash.events.MouseEvent import flash.geom.Rectangle import ru.rutube.event.ControlPanelEvent import ru.rutube.event.EventManager import ru.rutube.event.InternalEvent //class(instance)_index:609 public class VolumeSlider extends Component { //static constructor public static function VolumeSlider$cinit() { //MethodID:6033, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function VolumeSlider(hug1:EventDispatcher=null):void { //MethodID:6034, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 36 super(hug1); addEventListener(MouseEvent.MOUSE_DOWN, this.onMouseDownSlider); this.level = 0.5; buttonMode = true; } //variables/etc. public var onFinishChange:Function = null; //slotID:0 private var _level:Number; //slotID:0 public var horizontalMode:Boolean = false; //slotID:0 public var alphaBorder:Number = 0.5; //slotID:0 private var bounds:Rectangle = null; //slotID:0 public var changed:Boolean = false; //slotID:0 public function set level(hug1:Number):void { //MethodID:6035, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 15 this._level = hug1; onPaint(); } public function get level():Number { //MethodID:6036, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._level; } private function onMouseDownSlider(hug1:MouseEvent):void { //MethodID:6037, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 51 hug1.stopPropagation(); this.changed = true; this.bounds = RutubePlayer.instance.getRelativeStageBounds(this); this.onMouseMoveStage(hug1); EventManager.instance.addEventListener(InternalEvent.STAGE, this.listenerStageMouse); } private function listenerStageMouse(hug1:InternalEvent):void { //MethodID:6038, LocalCount= 4 , MaxScope= 1, MaxStack= 2, CodeLength= 128 var hug2:MouseEvent = (hug1.data as MouseEvent); switch(hug2.type){ case MouseEvent.MOUSE_MOVE: this.onMouseMoveStage(hug2); break; case MouseEvent.MOUSE_UP: case MouseEvent.ROLL_OUT: this.onMouseUpStage(hug2); break; default: break; } } private function onMouseMoveStage(hug1:MouseEvent):void { //MethodID:6039, LocalCount= 4 , MaxScope= 1, MaxStack= 6, CodeLength= 211 var hug2:Number = 0; var hug3:Number = 0; if(this.horizontalMode){ hug2 = hug1.stageX; if(hug2 < this.bounds.left){ hug2 = this.bounds.left; }else if(hug2 > this.bounds.right){ hug2 = this.bounds.right; } hug3 = ((this.bounds.right - hug2) / this.bounds.width); }else{ hug2 = hug1.stageY; if(hug2 < this.bounds.top){ hug2 = this.bounds.top; }else if(hug2 > this.bounds.bottom){ hug2 = this.bounds.bottom; } hug3 = ((this.bounds.bottom - hug2) / this.bounds.height); } if(hug3 != this._level){ this.level = hug3; dispatcher.dispatchEvent(new SliderEvent(ControlPanelEvent.EVENT_CHANGE_VOLUME, hug3, SliderEventClickTarget.TRACK, InteractionInputType.MOUSE)); } } private function onMouseUpStage(hug1:MouseEvent):void { //MethodID:6040, LocalCount= 2 , MaxScope= 1, MaxStack= 6, CodeLength= 76 this.changed = false; EventManager.instance.removeEventListener(InternalEvent.STAGE, this.listenerStageMouse); if(this.onFinishChange != null) this.onFinishChange(hug1); dispatcher.dispatchEvent(new SliderEvent(ControlPanelEvent.EVENT_VOLUME, this.level, SliderEventClickTarget.TRACK, InteractionInputType.MOUSE)); } override protected function onUpdate(hug1:Number, hug2:Number):void { //MethodID:6041, LocalCount= 3 , MaxScope= 1, MaxStack= 6, CodeLength= 165 graphics.clear(); graphics.beginFill(0xFFFFFF, this.alphaBorder); graphics.drawRoundRect(0, 0, 7, 67, 7); graphics.beginFill(0x202020); graphics.drawRoundRect(1, 1, 5, 65, 5); hug2 = Math.round(this._level * 65); graphics.beginFill(0x666666); graphics.drawRoundRect(1, (66 - hug2), 5, hug2, 5); graphics.beginFill(0, 0.4); graphics.drawRoundRect(-3, (63 - hug2), 13, 5, 2); graphics.beginFill(0xCBCBCB); graphics.drawRect(-2, (64 - hug2), 11, 3); } } } //script611 package Components.EndScreen{ import Components.Component import Data.TSearchItem import flash.events.MouseEvent import flash.net.URLRequest import flash.net.navigateToURL import flash.text.StyleSheet import flash.text.TextField import flash.text.TextFormat //class(instance)_index:610 public class SearchFrame extends Component { //static constructor public static function SearchFrame$cinit() { //MethodID:6043, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function SearchFrame():void { //MethodID:6044, LocalCount= 2 , MaxScope= 1, MaxStack= 8, CodeLength= 207 this.thumbnail = new Frame(); this.descText = new TextField(); super(); size(100, 70); mouseChildren = false; buttonMode = true; addChild(this.thumbnail); this.thumbnail.borderColor = 0xB0B0B0; addChild(this.descText); this.descText.selectable = false; this.descText.multiline = true; this.descText.wordWrap = true; this.descText.defaultTextFormat = new TextFormat("_sans", 11, 0xFFFFFF); var hug1:StyleSheet = new StyleSheet(); hug1.setStyle(".title", {fontSize:12, fontWeight:"bold", textDecoration:"underline"}); this.descText.styleSheet = hug1; this.descText.x = 90; this.descText.height = 70; addEventListener(MouseEvent.CLICK, this.onClickHandler); } //variables/etc. private var thumbnail:Frame; //slotID:0 private var descText:TextField; //slotID:0 private var url:String = null; //slotID:0 public function setData(hug1:TSearchItem):void { //MethodID:6045, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 60 hug1.assignFrame(this.thumbnail); this.descText.htmlText = ("" + hug1.name + "
" + hug1.description); this.url = hug1.page_link; buttonMode = (this.url.length > 0); } public function clear():void { //MethodID:6046, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 25 this.thumbnail.clear(); this.descText.text = ""; this.url = null; } private function onClickHandler(hug1:MouseEvent):void { //MethodID:6047, LocalCount= 4 , MaxScope= 5, MaxStack= 3, CodeLength= 78 internal var event:MouseEvent; //slotID:1 event = hug1; if(this.url.length > 0){ try{ navigateToURL(new URLRequest(this.url), "_blank"); } catch(error:Error){ trace("SearchFrame.onClickHandler:", error); } } } override protected function onUpdate(hug1:Number, hug2:Number):void { //MethodID:6048, LocalCount= 3 , MaxScope= 1, MaxStack= 5, CodeLength= 49 graphics.clear(); graphics.beginFill(0xFFFFFF, 0); graphics.drawRect(0, 0, hug1, hug2); this.descText.width = (hug1 - this.descText.x); } } } //script612 package actioplayer.view{ import actioplayer.ActioPlayer import actioplayer.model.Action import actioplayer.model.Frame import actioplayer.model.ScreenElement import actioplayer.view.control.HistoryButton import actioplayer.view.control.HistoryToolbar import actioplayer.view.control.LinkTooltip import actioplayer.view.control.Picture import actioplayer.view.control.PictureManager import actioplayer.view.control.Pointers import actioplayer.view.control.Popup import actioplayer.view.control.PopupManager import actioplayer.view.control.Sidebar import actioplayer.view.control.SidebarManager import actioplayer.view.debug.DebugGrid import actioplayer.view.skin.Skinner import flash.display.DisplayObject import flash.display.Loader import flash.display.MovieClip import flash.display.Sprite import flash.events.Event import flash.events.MouseEvent import flash.events.TimerEvent import flash.geom.Point import flash.geom.Rectangle import flash.net.URLRequest import flash.net.navigateToURL import flash.utils.Dictionary import flash.utils.Timer import flash.utils.getTimer import peace.data.Dimensions import peace.graphic.tween.Motion import peace.graphic.tween.Tween import peace.graphic.tween.TweenParameter import peace.gui.controls.tooltip.Tooltips import peace.gui.manage.Cursors import peace.util.ArraysIntersection //class(instance)_index:611 public class Screen extends Sprite { //static constructor public static function Screen$cinit() { //MethodID:6050, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function Screen(hug1:ActioPlayer) { //MethodID:6051, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 133 this.linkareas = new Sprite(); this.markers = new Sprite(); this.intro = new Loader(); this.promo = new Sprite(); this.pointersSwitch = new MovieClip(); this.scaleRatio = new Point(1, 1); this.cachedScreenElements = []; this.cachedAction = new Action(); this._lastMousePoint = new Point(); this.cursor = new Cursor(); this._introTime = new Timer(this.TIME_INTRO); super(); this.player = hug1; this.init(); } //variables/etc. public var player:ActioPlayer; //slotID:0 public var linkareas:Sprite; //slotID:0 public var markers:Sprite; //slotID:0 private var sidebar:SidebarManager; //slotID:0 private var popup:PopupManager; //slotID:0 private var picture:PictureManager; //slotID:0 private var historyToolbar:HistoryToolbar; //slotID:0 private var intro:Loader; //slotID:0 private var promo:Sprite; //slotID:0 private var pointers:Pointers; //slotID:0 public var pointersSwitch:MovieClip; //slotID:0 public var scaleRatio:Point; //slotID:0 public var videoSize:Dimensions; //slotID:0 public var screenRect:Rectangle; //slotID:0 private var tooltip:LinkTooltip; //slotID:0 private var debuggrid:DebugGrid; //slotID:0 private var skinner:Skinner; //slotID:0 private var preloader:DisplayObject; //slotID:0 private var cachedScreenElements:Array; //slotID:0 private var cachedAction:Action; //slotID:0 private var _lastMousePoint:Point; //slotID:0 private var pointersVisible:Boolean = true; //slotID:0 private var cursor:Cursor; //slotID:0 private var _hasIntro:Boolean; //slotID:0 private var _hasPromo:Boolean; //slotID:0 private const TIME_INTRO:int = 2000; //slotID:0 private var _introTime:Timer; //slotID:0 private var _initTimer:int; //slotID:0 private function init():void { //MethodID:6052, LocalCount= 4 , MaxScope= 1, MaxStack= 10, CodeLength= 426 this._hasIntro = this._hasPromo = false; this._initTimer = getTimer(); this.skinner = this.player.skinner; this.addChild(this.linkareas); if(this.debuggrid) this.addChild(this.debuggrid); this.addChild(this.markers); this.pointers = new Pointers(this.player); this.pointers.visible = false; this.addChild(this.pointers); this.pointersSwitch.addChild(new this.skinner.pointersSwitchBg()); this.pointersSwitch.addChild(new this.skinner.pointersSwitchSlider()); this.pointersSwitch.getChildAt(1).x = 34; this.pointersSwitch.buttonMode = true; this.pointersSwitch.addEventListener(MouseEvent.CLICK, this.onPointersSwitchClick, false, 0, true); this.addChild(this.pointersSwitch); var hug1:DisplayObject = new this.skinner.backEnabled(); var hug2:DisplayObject = new this.skinner.forwardEnabled(); this.historyToolbar = new HistoryToolbar(new HistoryButton(true, hug1, hug1, hug1, hug1, new this.skinner.backDisabled()), new HistoryButton(false, hug2, hug2, hug2, hug2, new this.skinner.forwardDisabled()), this.player); this.addChild(this.historyToolbar); this.tooltip = new LinkTooltip(this.player); Tooltips.hideOnClick = false; Tooltips.bind(this, this.tooltip); this.hideTooltip(); this.sidebar = new SidebarManager(this.player); this.popup = new PopupManager(this.player); this.picture = new PictureManager(this.player); addEventListener(MouseEvent.MOUSE_DOWN, this.onMouse, false, 0, true); addEventListener(MouseEvent.MOUSE_MOVE, this.onMouse, false, 0, true); this.pointersSwitchVisible = true; this.pointersSwitchSelected = true; this.setScreenRect(this.player.adapter.screenRect); } public function reset():void { //MethodID:6053, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 29 this.resetSidebar(); this.resetPopup(); this.resetPicture(); this.resetPointers(); this.cachedScreenElements = []; } private function set markersOn(hug1:Boolean):void { //MethodID:6054, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 11 this.markers.visible = false; } private function get markersOn():Boolean { //MethodID:6055, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 10 return this.markers.visible; } private function onPromoClick(hug1:MouseEvent):void { //MethodID:6056, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 21 navigateToURL(new URLRequest("http://actio.tv?ref=player"), "_blank"); } private function onMouse(hug1:MouseEvent):void { //MethodID:6057, LocalCount= 7 , MaxScope= 1, MaxStack= 4, CodeLength= 529 var hug4:Action = null; var hug5:int = 0; var hug6:DisplayObject = null; this._lastMousePoint = new Point(stage.mouseX, stage.mouseY); var hug2:Array = getObjectsUnderPoint(new Point(stage.mouseX, stage.mouseY)); if(hug2.length > 1){ hug5 = 1; while(hug5 < hug2.length){ hug6 = DisplayObject(hug2[hug5]); while(hug6.parent != null){ if((hug6 is Sidebar) || (hug6 is Popup) || (hug6 is Picture) || (hug6 == this.pointersSwitch) || (hug6 == this.historyToolbar) || (hug6 == this.promo) || (hug6 == this.intro)){ Cursors.defaultCursor(); this.hideTooltip(); if(hug1.type == MouseEvent.MOUSE_MOVE) this.checkPauseOnHover(hug4); return; } hug6 = hug6.parent; } hug5++; } } var hug3:Point = new Point(((mouseX - this.linkareas.x) / this.scaleRatio.x), ((mouseY - this.linkareas.y) / this.scaleRatio.y)); hug4 = this.player.controller.getActionByPoint(hug3); if(hug1.type == MouseEvent.MOUSE_MOVE){ this.checkPauseOnHover(hug4); this.checkObjectsOnHover(hug4); } if(hug4){ if(hug1.type == MouseEvent.MOUSE_MOVE) this.showTooltip(hug4); if(hug4.mouseCursorImageUrl){ if(this.cursor.url != hug4.mouseCursorImageUrl) this.cursor.url = hug4.mouseCursorImageUrl; if(Cursors.getCursor() != this.cursor) Cursors.setCursor(this.cursor, stage, hug4.mouseCursorPosition); }else if(Cursors.getCursor() == this.cursor){ Cursors.defaultCursor(); } this.player.controller.doAction(hug4, (hug1.type != MouseEvent.MOUSE_MOVE)); }else{ this.hideTooltip(); if(Cursors.getCursor() == this.cursor) Cursors.defaultCursor(); } this.cachedAction = hug4; } private function checkPauseOnHover(hug1:Action=null):void { //MethodID:6058, LocalCount= 2 , MaxScope= 1, MaxStack= 1, CodeLength= 61 if(this.cachedAction){ if(this.cachedAction.pauseOnHover){ if(hug1){ if(!hug1.pauseOnHover) this.player.controller.resume(); }else{ this.player.controller.resume(); } } } } private function checkObjectsOnHover(hug1:Action=null):void { //MethodID:6059, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 89 if(this.cachedAction){ if(hug1 != this.cachedAction){ if(this.cachedAction.popupOnHover) this.popup.removePopup(this.cachedAction); if(this.cachedAction.sidebarOnHover) this.sidebar.removeSidebar(this.cachedAction); if(this.cachedAction.pictureOnHover) this.picture.removePicture(this.cachedAction); } } } public function setFrame(hug1:Frame):void { //MethodID:6060, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 36 this.redrawLinkareas(); this.redrawScreenElements(hug1); this.redrawPointers(hug1); if(this.debuggrid) this.debuggrid.frame = hug1; } public function hideIntro():void { //MethodID:6061, LocalCount= 1 , MaxScope= 1, MaxStack= 4, CodeLength= 75 if(!this._introTime.currentCount){ if((getTimer() - this._initTimer) > this.TIME_INTRO){ this.finishIntro(); }else{ this._introTime.delay = (this.TIME_INTRO - getTimer() - this._initTimer); this._introTime.start(); } } } public function setScreenRect(hug1:Rectangle):void { //MethodID:6062, LocalCount= 6 , MaxScope= 1, MaxStack= 5, CodeLength= 688 if(hug1.width && hug1.height) this.visible = true; this.screenRect = hug1; this.recalcScaleRatio(); this.markers.x = hug1.x; this.linkareas.x = hug1.x; this.markers.y = hug1.y; this.linkareas.y = hug1.y; var hug2:Rectangle = this.player.pointersSwitchAlign; this.pointersSwitch.x = ((hug2.left != 0) ? (hug1.left + hug2.left) : (hug1.right - hug2.right - this.pointersSwitch.width)); this.pointersSwitch.y = ((hug2.top != 0) ? (hug1.top + hug2.top) : (hug1.bottom - hug2.bottom - this.pointersSwitch.height)); if(this.debuggrid){ this.debuggrid.x = hug1.x; this.debuggrid.y = hug1.y; } this.linkareas.graphics.clear(); this.linkareas.graphics.beginFill(0xFF0000, 0); this.linkareas.graphics.drawRect(0, 0, hug1.width, hug1.height); var hug3:Rectangle = this.player.historyToolbarAlign; this.historyToolbar.x = ((hug3.left != 0) ? (hug1.left + hug3.left) : (hug1.right - hug3.right - this.pointersSwitch.width)); this.historyToolbar.y = ((hug3.top != 0) ? (hug1.top + hug3.top) : (hug1.bottom - hug3.bottom - this.pointersSwitch.height)); var hug4:Rectangle = this.player.promoAlign; this.promo.x = ((hug4.left != 0) ? (hug1.left + hug4.left) : (hug1.right - hug4.right - this.promo.width)); this.promo.y = ((hug4.top != 0) ? (hug1.top + hug4.top) : (hug1.bottom - hug4.bottom - this.promo.height)); if(this.intro.content){ this.intro.content.width = int(hug1.width * 0.6); this.intro.content.scaleY = this.intro.content.scaleX; this.intro.content.x = int(-this.intro.width / 2); this.intro.content.y = int(-this.intro.height / 2); } this.intro.x = int(hug1.x + (hug1.width / 2)); this.intro.y = int((hug1.y + hug1.height) - (hug1.height / 5)); this.sidebar.setBounds(hug1); this.popup.setBounds(hug1); this.picture.setBounds(hug1); this.markersSetBounds(hug1); } private function onIntroLoad(hug1:Event):void { //MethodID:6063, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 147 this._introTime.addEventListener(TimerEvent.TIMER, this.finishIntro); if(this.screenRect){ this.intro.content.width = int(this.screenRect.width * 0.6); this.intro.content.scaleY = this.intro.content.scaleX; } this.intro.content.x = int(-this.intro.width / 2); this.intro.content.y = int(-this.intro.height / 2); MovieClip(this.intro.content).center.gotoAndPlay("show"); } public function finishIntro(hug1:TimerEvent=null):void { //MethodID:6064, LocalCount= 4 , MaxScope= 5, MaxStack= 3, CodeLength= 68 internal var event:TimerEvent = null; //slotID:1 event = hug1; try{ if(this._hasIntro) (this.intro.content as MovieClip).center.gotoAndPlay("hide"); } catch(e:*){ } this._introTime.stop(); } private function markersSetBounds(hug1:Rectangle):void { //MethodID:6065, LocalCount= 4 , MaxScope= 5, MaxStack= 5, CodeLength= 243 internal var rect:Rectangle; //slotID:1 internal var i:uint; //slotID:2 internal var mview:MarkerView; //slotID:3 internal var point:Point; //slotID:4 i = 0; mview = null; point = null; rect = hug1; i = 0; while(i < this.markers.numChildren){ try{ mview = MarkerView(this.markers.getChildAt(i)); point = new Point(((mview.point.x * this.player.controller.currentVideo.cellSize.width * this.scaleRatio.x) + this.screenRect.x), ((mview.point.y * this.player.controller.currentVideo.cellSize.height * this.scaleRatio.y) + this.screenRect.y)); mview.x = point.x; mview.y = point.y; } catch(e:*){ } i += 1; } } public function setVideoSize(hug1:Dimensions):void { //MethodID:6066, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 13 this.videoSize = hug1; this.recalcScaleRatio(); } private function recalcScaleRatio():void { //MethodID:6067, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 103 if(this.screenRect && this.videoSize){ this.scaleRatio.x = (this.screenRect.width / this.videoSize.width); this.scaleRatio.y = (this.screenRect.height / this.videoSize.height); if(this.debuggrid){ this.debuggrid.scaleX = this.scaleRatio.x; this.debuggrid.scaleY = this.scaleRatio.y; } } } private function redrawLinkareas():void { //MethodID:6068, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 18 this.onMouse(new MouseEvent(MouseEvent.MOUSE_MOVE)); } private function redrawScreenElements(hug1:Frame):void { //MethodID:6069, LocalCount= 21 , MaxScope= 1, MaxStack= 4, CodeLength= 1434 var hug2:ArraysIntersection = null; var hug3:Array = null; var hug4:Array = null; var hug5:Dictionary = null; var hug6:Number = NaN; var hug7:int = 0; var hug8:ScreenElement = null; var hug9:MarkerView = null; var hug10:Action = null; var hug11:Point = null; var hug12:Boolean = false; var hug13:int = 0; var hug14:int = 0; var hug15:int = 0; var hug16:int = 0; var hug17:Number = NaN; var hug18:Number = NaN; var hug19:Boolean = false; var hug20:MarkerView = null; if(hug1){ hug2 = new ArraysIntersection(this.cachedScreenElements, hug1.screenElements.items, "actionId"); hug3 = hug2.added; hug4 = hug2.deleted; hug5 = hug2.updated; hug6 = (this.cachedScreenElements.length - hug1.screenElements.items.length); this.cachedScreenElements = hug1.screenElements.items; hug12 = true; hug13 = 0; while(hug13 < hug4.length){ hug8 = ScreenElement(hug4[hug13]); hug10 = (this.player.data.actions.getItem("id", hug8.actionId) as Action); if(hug10 && hug10.popupStatic){ this.popup.removePopup(hug10); hug12 = false; } if(hug10 && hug10.sidebarStatic && this.sidebar && contains(this.sidebar)){ this.sidebar.removeSidebar(hug10); hug12 = false; } if(hug10 && hug10.pictureStatic && this.picture && contains(this.picture)){ this.picture.removePicture(hug10); hug12 = false; } if(hug12 && (this.markers.numChildren > 0)) this.markers.removeChildAt(0); hug12 = true; hug13++; } if(hug6 > 0){ hug17 = (hug6 - hug4.length); if(hug17 > 0){ hug7 = 0; while(hug7 < hug17){ if(this.markers.numChildren > 0) this.markers.removeChildAt(0); hug7++; } } } hug14 = 0; while(hug14 < hug3.length){ hug8 = ScreenElement(hug3[hug14]); if(hug8.actionId < 0) hug12 = false; hug10 = (this.player.data.actions.getItem("id", hug8.actionId) as Action); hug11 = new Point(((hug8.x * this.player.controller.currentVideo.cellSize.width * this.scaleRatio.x) + this.screenRect.x), ((hug8.y * this.player.controller.currentVideo.cellSize.height * this.scaleRatio.y) + this.screenRect.y)); if(hug10 && hug10.popupStatic){ this.openPopup(hug10, hug11); hug12 = false; } if(hug10 && hug10.sidebarStatic){ this.openSidebar(hug10); hug12 = false; } if(hug10 && hug10.pictureStatic){ this.openPicture(hug10, hug11); hug12 = false; } if(hug12){ hug9 = new MarkerView(this.player); this.markers.addChild(hug9); hug9.x = -hug9.width; } hug12 = true; hug14++; } if(hug6 < 0){ hug18 = (Math.abs(hug6) - hug3.length); if(hug18 > 0){ hug7 = 0; while(hug7 < hug18){ hug9 = new MarkerView(this.player); this.markers.addChild(hug9); hug9.x = -hug9.width; hug7++; } } } hug12 = true; hug15 = 0; hug16 = 0; while(hug16 < this.cachedScreenElements.length){ hug8 = ScreenElement(this.cachedScreenElements[hug16]); hug19 = (hug8.actionId < 0); hug10 = (this.player.data.actions.getItem("id", (hug19 ? (-hug8.actionId) : hug8.actionId)) as Action); hug11 = new Point(((hug8.x * this.player.controller.currentVideo.cellSize.width * this.scaleRatio.x) + this.screenRect.x), ((hug8.y * this.player.controller.currentVideo.cellSize.height * this.scaleRatio.y) + this.screenRect.y)); if(hug10 && hug10.popupStatic){ if(hug19 && this.popup.getPopupByAction(hug10)){ this.popup.getPopupByAction(hug10).anchorPoint = hug11; }else{ this.popup.updateInitialPoint(hug10, hug11); } hug12 = false; } if(hug10 && hug10.pictureStatic){ this.picture.updateInitialPoint(hug10, hug11); hug12 = false; } if(hug10 && hug10.sidebarStatic) hug12 = false; if(hug10 && hug12){ hug11 = new Point((hug8.x * this.player.controller.currentVideo.cellSize.width * this.scaleRatio.x), (hug8.y * this.player.controller.currentVideo.cellSize.height * this.scaleRatio.y)); hug20 = MarkerView(this.markers.getChildAt(hug15)); hug20.x = hug11.x; hug20.y = hug11.y; hug20.visible = this.markersOn; hug15++; } hug12 = true; hug16++; } }else{ while(this.markers.numChildren > 0){ this.markers.removeChildAt(0); } this.popup.removeStaticPopups(); this.sidebar.removeStaticSidebars(); this.picture.removeStaticPictures(); this.cachedScreenElements = []; } } public function getInitialPoint(hug1:uint):Point { //MethodID:6070, LocalCount= 8 , MaxScope= 1, MaxStack= 4, CodeLength= 199 var hug2:Object = null; var hug3:Action = null; var hug4:ScreenElement = null; var hug5:Point = null; for each(hug2 in this.cachedScreenElements){ hug4 = ScreenElement(hug2); if(hug1 == hug4.actionId){ hug3 = (this.player.data.actions.getItem("id", hug4.actionId) as Action); hug5 = new Point(((hug4.x * this.player.controller.currentVideo.cellSize.width * this.scaleRatio.x) + this.screenRect.x), ((hug4.y * this.player.controller.currentVideo.cellSize.height * this.scaleRatio.y) + this.screenRect.y)); return hug5; } } return null; } private function redrawPointers(hug1:Frame):void { //MethodID:6071, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 42 if(this.pointersVisible){ this.pointers.visible = this.pointersSwitchSelected; if(this.pointers.visible) this.pointers.redraw(hug1); } } private function showTooltip(hug1:Action):void { //MethodID:6072, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 35 if(!hug1.hideTooltip){ this.tooltip.data = hug1; this.tooltip.visible = true; } this.linkareas.buttonMode = true; } private function hideTooltip():void { //MethodID:6073, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 19 this.tooltip.visible = false; this.linkareas.buttonMode = false; } public function openSidebar(hug1:Action, hug2:Boolean=false):void { //MethodID:6074, LocalCount= 3 , MaxScope= 1, MaxStack= 4, CodeLength= 41 this.sidebar.openSidebar(hug1, hug2, this.screenRect); if(!contains(this.sidebar)) this.addChild(this.sidebar); } public function openPopup(hug1:Action, hug2:Point=null):void { //MethodID:6075, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 37 this.popup.openPopup(hug1, hug2); if(!contains(this.popup)) this.addChild(this.popup); } public function closeActionsOnClick():void { //MethodID:6076, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 27 this.popup.removeOnClickPopups(); this.sidebar.removeOnClickSidebars(); this.picture.removeOnClickPictures(); } public function resetPopup():void { //MethodID:6077, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 11 this.popup.resetPopup(); } public function resetSidebar():void { //MethodID:6078, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 11 this.sidebar.resetSidebar(); } public function resetPicture():void { //MethodID:6079, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 11 this.picture.resetPicture(); } public function resetPointers():void { //MethodID:6080, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 11 this.pointers.resetPointers(); } public function openPicture(hug1:Action, hug2:Point=null):void { //MethodID:6081, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 37 this.picture.openPicture(hug1, hug2); if(!contains(this.picture)) this.addChild(this.picture); } override public function addChild(hug1:DisplayObject):DisplayObject { //MethodID:6082, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 280 super.addChild(hug1); if((this.popup != null) && contains(this.popup)) setChildIndex(this.popup, (numChildren - 1)); if((this.picture != null) && contains(this.picture)){ if((this.popup != null) && contains(this.popup)){ setChildIndex(this.picture, (numChildren - 2)); }else{ setChildIndex(this.picture, (numChildren - 1)); } } if((this.pointersSwitch != null) && contains(this.pointersSwitch)) setChildIndex(this.pointersSwitch, (numChildren - 1)); if((this.promo != null) && contains(this.promo)) setChildIndex(this.promo, (numChildren - 1)); if((this.intro != null) && contains(this.intro)) setChildIndex(this.intro, (numChildren - 1)); return hug1; } public function set waiting(hug1:Boolean):void { //MethodID:6083, LocalCount= 3 , MaxScope= 1, MaxStack= 4, CodeLength= 200 if(hug1){ if(!this.preloader) this.preloader = new this.skinner.screenPreloader(); if(this.screenRect){ this.preloader.x = (this.screenRect.x + ((this.screenRect.width - this.preloader.width) / 2)); this.preloader.y = (this.screenRect.y + ((this.screenRect.height - this.preloader.height) / 2)); } super.addChild(this.preloader); mouseEnabled = mouseChildren = false; }else if(!hug1 && this.preloader && contains(this.preloader)){ removeChild(this.preloader); mouseEnabled = mouseChildren = true; } } public function set debugMode(hug1:Boolean):void { //MethodID:6084, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 206 if(hug1){ if(!this.debuggrid){ this.debuggrid = new DebugGrid(this.player); addChildAt(this.debuggrid, (getChildIndex(this.linkareas) + 1)); if(this.screenRect){ this.debuggrid.x = this.screenRect.x; this.debuggrid.y = this.screenRect.y; this.debuggrid.scaleX = this.scaleRatio.x; this.debuggrid.scaleY = this.scaleRatio.y; } } if(this.player.controller.currentFrame) this.debuggrid.frame = this.player.controller.currentFrame; }else{ if(this.debuggrid && contains(this.debuggrid)) removeChild(this.debuggrid); if(this.debuggrid) this.debuggrid = null; } } public function set historyToolbarVisible(hug1:Boolean):void { //MethodID:6085, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 11 this.historyToolbar.visible = hug1; } public function set pointersSwitchVisible(hug1:Boolean):void { //MethodID:6086, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 37 if(!hug1) hug1 = false; //goto 00015 break LABEL_xxxxx; hug1 = false; this.pointersVisible = hug1; this.pointersSwitch.visible = this.pointersVisible; this.markersOn = hug1; } private function onPointersSwitchClick(hug1:MouseEvent):void { //MethodID:6087, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 50 this.pointersSwitchSelected = !this.pointersSwitchSelected; this.redrawPointers(this.player.controller.currentFrame); this.markersOn = !this.markersOn; this.player.adapter.pointersEnabled = this.pointersSwitchSelected; } public function set pointersSwitchSelected(hug1:Boolean):void { //MethodID:6088, LocalCount= 5 , MaxScope= 1, MaxStack= 5, CodeLength= 102 this.pointersSwitch.selected = hug1; var hug2:DisplayObject = this.pointersSwitch.getChildAt(1); var hug3:Tween = new Tween(); var hug4:Motion = new Motion(hug2, 5); hug4.addParameter(new TweenParameter("x", hug2.x, (hug1 ? 34 : 0))); hug3.addMotion(hug4); hug3.play(); hug2.y = 13; } public function get pointersSwitchSelected():Boolean { //MethodID:6089, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 10 return this.pointersSwitch.selected; } } } //script613 package actioplayer{ //class(instance)_index:612 public class Version extends Object { //static constructor public static function Version$cinit() { //MethodID:6091, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function Version() { //MethodID:6092, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 super(); } //variables/etc. public var value:String = "1.0.1"; //slotID:0 } } //script614 package actioplayer.model{ import peace.util.collection.Hash //class(instance)_index:613 public class Metadata extends Object { //static constructor public static function Metadata$cinit() { //MethodID:6094, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function Metadata() { //MethodID:6095, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 48 this.videos = new Hash("id"); this.actions = new Hash("id"); this.scenarios = new Hash("id"); super(); } //variables/etc. public var firstPlayVideoFileId:uint; //slotID:0 public var videos:Hash; //slotID:0 public var actions:Hash; //slotID:0 public var scenarios:Hash; //slotID:0 } } //script615 package actioplayer.localize{ import flash.events.EventDispatcher import flash.net.URLVariables //class(instance)_index:614 public class Localizer extends EventDispatcher { //static constructor public static function Localizer$cinit() { //MethodID:6097, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function Localizer(hug1:Object) { //MethodID:6098, LocalCount= 4 , MaxScope= 1, MaxStack= 5, CodeLength= 139 this.locEn = Localizer_locEn; this.locRu = Localizer_locRu; this.locale = {}; super(); this._parent = hug1; var hug2:URLVariables = new URLVariables(String(new this.locEn().toString()).replace(new RegExp("\r\n", "gis"), "&")); var hug3:URLVariables = new URLVariables(String(new this.locRu().toString()).replace(new RegExp("\r\n", "gis"), "&")); this.locale["en"] = hug2; this.locale["ru"] = hug3; } //variables/etc. private var _parent:Object; //slotID:0 private var locEn:Class; //slotID:0 private var locRu:Class; //slotID:0 public var locale:Object; //slotID:0 public function loc(hug1:String):String { //MethodID:6099, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 54 if(!hug1) return ""; if(this.locale[this._parent.language].hasOwnProperty(hug1)) return this.locale[this._parent.language][hug1]; return hug1; } } } //script616 package peace.design.command{ import flash.events.Event import flash.events.EventDispatcher //class(instance)_index:615 public class Command extends EventDispatcher { //static constructor public static function Command$cinit() { //MethodID:6101, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 11 cache = []; } //static variables/etc. private static var cache:Array; //slotID:1 //constructor public function Command() { //MethodID:6102, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 super(); } //variables/etc. public var complete:Boolean = false; //slotID:0 public function execute():void { //MethodID:6103, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 30 if(cache.indexOf(this) == (-1)) cache.push(this); this.complete = false; } protected function notifyComplete():void { //MethodID:6104, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 52 dispatchEvent(new Event(Event.COMPLETE)); this.complete = true; var hug1:int = cache.indexOf(this); if(hug1 > (-1)) cache.splice(hug1, 1); } } } //script617 package peace.design.command{ import flash.events.ErrorEvent import flash.events.Event import flash.events.IOErrorEvent import flash.events.SecurityErrorEvent import flash.net.URLLoader import flash.net.URLRequest import peace.util.Logger //class(instance)_index:616 public class NetCommand extends Command { //static constructor public static function NetCommand$cinit() { //MethodID:6106, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function NetCommand(hug1:URLRequest=null) { //MethodID:6107, LocalCount= 2 , MaxScope= 1, MaxStack= 6, CodeLength= 85 this.loader = new URLLoader(); super(); this.loader.addEventListener(Event.COMPLETE, this.onResult, false, 0, true); this.loader.addEventListener(IOErrorEvent.IO_ERROR, this.onFault, false, 0, true); this.loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.onFault, false, 0, true); this.request = hug1; } //variables/etc. public var request:URLRequest; //slotID:0 protected var loader:URLLoader; //slotID:0 override public function execute():void { //MethodID:6108, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 28 super.execute(); if(this.request) this.loader.load(this.request); } protected function onResult(hug1:Event):void { //MethodID:6109, LocalCount= 2 , MaxScope= 1, MaxStack= 1, CodeLength= 10 notifyComplete(); } protected function onFault(hug1:ErrorEvent):void { //MethodID:6110, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 21 Logger.error(hug1.text); notifyComplete(); } } } //script618 package actioplayer.transport{ import actioplayer.ActioPlayer import actioplayer.model.Metadata import actioplayer.model.Scenario import flash.events.Event import flash.net.URLLoaderDataFormat import flash.net.URLRequest import flash.utils.ByteArray import peace.design.command.NetCommand //class(instance)_index:617 public class LoadMetadataCommand extends NetCommand { //static constructor public static function LoadMetadataCommand$cinit() { //MethodID:6112, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function LoadMetadataCommand(hug1:String, hug2:ActioPlayer) { //MethodID:6113, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 29 super(new URLRequest(hug1)); this.player = hug2; loader.dataFormat = URLLoaderDataFormat.BINARY; } //variables/etc. private var player:ActioPlayer; //slotID:0 override protected function onResult(hug1:Event):void { //MethodID:6114, LocalCount= 4 , MaxScope= 5, MaxStack= 4, CodeLength= 225 internal var e:Event; //slotID:1 internal var d:Metadata; //slotID:2 internal var r:MetadataReader; //slotID:3 internal var s:Scenario; //slotID:4 s = null; e = hug1; d = new Metadata(); r = new MetadataReader(this.player); try{ r.read(ByteArray(loader.data), d); } catch(error:Error){ player.reset(); } if(d.scenarios.items.length == 1){ s = d.scenarios.items[0]; if(s.id == (-1)){ new LoadActiomlCommand(s.description, this.player, d).execute(); super.onResult(e); return; } } this.player.data = d; this.player.controller.startMonitoring(); super.onResult(e); } } } //script619 package actioplayer{ import actioplayer.model.Scenario //class(instance)_index:618 public class Scenarios extends Object { //static constructor public static function Scenarios$cinit() { //MethodID:6116, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 11 START_SCENARIO_ID = 1; } //static variables/etc. public static const START_SCENARIO_ID:int = 1; //slotID:1 //constructor public function Scenarios(hug1:ActioPlayer) { //MethodID:6117, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 11 super(); this.player = hug1; } //variables/etc. public var runningScenario:Scenario; //slotID:0 private var player:ActioPlayer; //slotID:0 public function play(hug1:Scenario=null, hug2:int=-1, hug3:Boolean=true):void { //MethodID:6118, LocalCount= 4 , MaxScope= 1, MaxStack= 3, CodeLength= 88 if(!hug1) hug1 = this.runningScenario; if(hug1 != this.runningScenario){ if(this.runningScenario) this.runningScenario.reset(); this.runningScenario = hug1; } if(hug1){ if(hug2 == (-1)) hug2 = hug1.firstFrameIndex; if(hug3) this.player.history.write(hug1, hug2); hug1.play(hug2); } } public function resetRunningScenario():void { //MethodID:6119, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 24 if(this.runningScenario){ this.runningScenario.reset(); this.runningScenario = null; } } } } //script620 package actioplayer{ import actioplayer.integrate.SWFAdapter import actioplayer.model.Action import actioplayer.transport.Statistics import flash.events.TextEvent import peace.util.collection.Hash //class(instance)_index:619 public class SWFController extends Object { //static constructor public static function SWFController$cinit() { //MethodID:6121, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 11 protocol = 1; } //static variables/etc. public static const protocol:Number = 1.0; //slotID:1 //constructor public function SWFController(hug1:ActioPlayer) { //MethodID:6122, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 30 this._hash = new Hash(["id", "c"]); super(); this._player = hug1; } //variables/etc. private var _player:ActioPlayer; //slotID:0 private var _hash:Hash; //slotID:0 private var _c:int = 0; //slotID:0 public function add(hug1:Object):void { //MethodID:6123, LocalCount= 5 , MaxScope= 5, MaxStack= 5, CodeLength= 188 internal var object:Object; //slotID:1 object = hug1; object.c = this._c; object.id = Action(object.action).id; try{ object.swf.init(object.id, this); this._hash.add(object); } catch(e:*){ } this.execute(object, SWFAdapter.VOLUME, String(this._player.adapter.volume)); this.execute(object, (this._player.adapter.mute ? SWFAdapter.MUTE : SWFAdapter.UNMUTE)); this._c++; } public function remove(hug1:Action):void { //MethodID:6124, LocalCount= 6 , MaxScope= 1, MaxStack= 3, CodeLength= 118 var hug2:Object = null; var hug3:Array = this._hash.getItemsBy("id", hug1.id); for each(hug2 in hug3){ if(hug2.swf) this.execute(hug2, SWFAdapter.CLEAR); } for each(hug2 in hug3){ this._hash.remove(hug2); } } public function doCommand(hug1:String, hug2:String, hug3:String):void { //MethodID:6125, LocalCount= 7 , MaxScope= 1, MaxStack= 4, CodeLength= 169 var hug5:TextEvent = null; var hug4:Object = this._hash.getItem("id", hug2); if(hug4){ var hug6:String = hug1; switch(hug6){ case SWFAdapter.STATISTIC: this._player.statistics.send(hug4.action, Statistics.HREF_TYPE, hug3); case SWFAdapter.EXTENDED_LINK: hug5 = new TextEvent(TextEvent.LINK); hug5.text = hug3; if(hug4.container) hug4.container.onLink(hug5); default: break; } } } private function execute(hug1:Object, hug2:String, hug3:String):Boolean { //MethodID:6126, LocalCount= 6 , MaxScope= 5, MaxStack= 3, CodeLength= 83 internal var object:Object; //slotID:1 internal var command:String; //slotID:2 internal var data:String = ""; //slotID:3 internal var success:Boolean; //slotID:4 success = false; object = hug1; command = hug2; data = hug3; try{ object.swf.execute(command, data); success = true; } catch(error:*){ success = false; } return success; } public function relay(hug1:String, hug2:String):void { //MethodID:6127, LocalCount= 6 , MaxScope= 1, MaxStack= 4, CodeLength= 53 var hug3:Object = null; for each(hug3 in this._hash.items){ this.execute(hug3, hug1, hug2); } } public function reset():void { //MethodID:6128, LocalCount= 4 , MaxScope= 1, MaxStack= 3, CodeLength= 54 var hug1:Object = null; for each(hug1 in this._hash){ this.remove(Action(hug1.action)); } } } } //script621 package actioplayer.integrate{ import actioplayer.ActioPlayer import actioplayer.Scenarios import actioplayer.integrate.event.FrameEvent import actioplayer.model.Action import actioplayer.model.Frame import actioplayer.model.Scenario import actioplayer.model.VideoFile import actioplayer.transport.MetadataReader import actioplayer.transport.Statistics import flash.events.Event import flash.events.EventDispatcher import flash.events.TimerEvent import flash.geom.Point import flash.net.URLRequest import flash.net.navigateToURL import flash.net.sendToURL import flash.utils.Timer //class(instance)_index:620 public class VideoPlayerController extends EventDispatcher { //static constructor public static function VideoPlayerController$cinit() { //MethodID:6130, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function VideoPlayerController(hug1:ActioPlayer) { //MethodID:6134, LocalCount= 2 , MaxScope= 1, MaxStack= 6, CodeLength= 69 this.currentFrameMarking = []; this.keyframes = new Keyframes(); super(); this.player = hug1; if(!hug1.screen.stage){ hug1.screen.addEventListener(Event.ADDED_TO_STAGE, this.onScreenAddedToStage, false, 0, true); }else{ this.onScreenAddedToStage(); } } //variables/etc. public var currentVideo:VideoFile; //slotID:0 public var currentFrame:Frame; //slotID:0 public var currentFrameIndex:uint; //slotID:0 public var currentFrameMarking:Array; //slotID:0 public var keyframes:Keyframes; //slotID:0 private var player:ActioPlayer; //slotID:0 private var currentVideoUrl:String; //slotID:0 private var monitor:FpsMonitor; //slotID:0 private var waiting:Boolean = false; //slotID:0 private var waitingForKeyframe:Keyframe; //slotID:0 private var currentFrameTime:Number; //slotID:0 private var _listenPlayback:Boolean; //slotID:0 private var _eventTime:Number; //slotID:0 private var _timer:Timer; //slotID:0 private var _debugMode:Boolean = false; //slotID:0 private function set listenPlayback(hug1:Boolean):void { //MethodID:6131, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 57 if(this._listenPlayback == hug1) return; this._listenPlayback = hug1; this._eventTime = this.player.adapter.time; if(hug1){ this._timer.start(); }else{ this._timer.stop(); } } public function set debugMode(hug1:Boolean):void { //MethodID:6132, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 41 this._debugMode = hug1; if(hug1 && this.currentFrame) this.fillMarkingMatrix(); this.player.screen.debugMode = hug1; } public function get debugMode():Boolean { //MethodID:6133, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._debugMode; } private function onPlaybackMonitor(hug1:TimerEvent):void { //MethodID:6135, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 59 if((this.player.adapter.time > this._eventTime) || (this.player.adapter.time < this._eventTime)){ this.listenPlayback = false; this.player.screen.closeActionsOnClick(); } } private function onMonitor(hug1:Event):void { //MethodID:6136, LocalCount= 5 , MaxScope= 1, MaxStack= 4, CodeLength= 342 var hug3:Scenario = null; var hug4:int = 0; var hug2:Number = this.player.adapter.time; if(this.player.expectingAvsBeforePlay && !this.player.data){ if(hug2 > 0) this.pause(); return; } if(this.waiting){ if(this.waitingForKeyframe.firstBytePosition <= this.player.adapter.bytesLoaded){ this.waiting = false; this.player.screen.waiting = false; this.player.adapter.seek(this.waitingForKeyframe.time); }else if(this.currentFrameTime != hug2){ this.player.adapter.seek(this.currentFrameTime); } return; } this.currentFrameTime = hug2; if(!this.player.scenarios.runningScenario && (this.currentFrameTime > (1 / this.currentVideo.fps))){ this.player.screen.setScreenRect(this.player.adapter.screenRect); hug3 = Scenario(this.player.data.scenarios.getItem("id", Scenarios.START_SCENARIO_ID)); if(hug3) this.player.scenarios.play(hug3, hug3.firstFrameIndex, true); this.player.screen.visible = true; this.player.statistics.startSession(); } if(this.player.scenarios.runningScenario){ hug4 = Math.ceil(this.secondToFrame(this.currentFrameTime, this.currentVideo.fps)); this.gotoFrame(hug4); } } private function onScreenAddedToStage(hug1:Event=null):void { //MethodID:6137, LocalCount= 2 , MaxScope= 1, MaxStack= 6, CodeLength= 129 this.monitor = new FpsMonitor(this.player); this.monitor.addEventListener(TimerEvent.TIMER, this.onMonitor, false, 0, true); if(this.player.expectingAvsBeforePlay && !this.player.data) this.monitor.start(25); this.player.screen.stage.addEventListener(Event.FULLSCREEN, this.onPlayerResize, false, 0, true); this.player.screen.stage.addEventListener(Event.RESIZE, this.onPlayerResize, false, 0, true); } public function startMonitoring():void { //MethodID:6138, LocalCount= 1 , MaxScope= 1, MaxStack= 5, CodeLength= 205 if(this.player.expectingAvsBeforePlay) this.resume(); if(!this.currentVideo && this.player.data) this.currentVideo = VideoFile(this.player.data.videos.getItem("id", 1)); if(this.currentVideo){ this.player.screen.setScreenRect(this.player.adapter.screenRect); this.player.screen.setVideoSize(this.currentVideo.size); this.monitor.stop(); this.monitor.start(this.currentVideo.fps); this._timer = new Timer(1); this._timer.addEventListener(TimerEvent.TIMER, this.onPlaybackMonitor); if(this.waiting){ this.waiting = false; this.player.screen.waiting = false; } }else{ this.stopMonitoring(); } } public function stopMonitoring():void { //MethodID:6139, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 24 if(this.monitor) this.monitor.stop(); this.currentVideo = null; } private function gotoFrame(hug1:int):void { //MethodID:6140, LocalCount= 3 , MaxScope= 1, MaxStack= 5, CodeLength= 118 this.currentFrameIndex = hug1; var hug2:Frame = this.currentVideo.getFrame(hug1); dispatchEvent(new FrameEvent(FrameEvent.FRAME, hug1, this.currentVideoUrl)); if(this.currentFrame && this.currentFrame.equals(hug2)) return; this.currentFrame = hug2; if(this._debugMode) this.fillMarkingMatrix(); this.player.screen.setFrame(hug2); if(hug1) this.player.screen.hideIntro(); } public function doAction(hug1:Action, hug2:Boolean):void { //MethodID:6141, LocalCount= 9 , MaxScope= 1, MaxStack= 4, CodeLength= 856 var hug3:String = null; var hug4:Scenario = null; var hug5:Array = null; var hug6:String = null; var hug7:String = null; var hug8:Action = null; if(hug2 ? hug1.pauseOnClick : hug1.pauseOnHover){ if(hug1.pauseOnClick) this.listenPlayback = true; this.pause(); } if(hug2 && hug1.stopOnClick) this.stop(); if(hug2 ? hug1.sidebarOnClick : hug1.sidebarOnHover){ this.player.screen.openSidebar(hug1, hug1.sidebarOnHover); if(hug2) hug3 = Statistics.SIDEBAR_TYPE; } if(hug2 ? hug1.popupOnClick : hug1.popupOnHover){ this.player.screen.openPopup(hug1); if(hug2) hug3 = Statistics.POPUP_TYPE; } if(hug2 ? hug1.pictureOnClick : hug1.pictureOnHover) this.player.screen.openPicture(hug1); if(hug2){ if(hug1.videoUrl) this.player.adapter.play(hug1.videoUrl); if(hug1.linkType == Action.WEB_LINK){ if(hug1.linkValue.indexOf("://") == (-1)) hug1.linkValue = ("http://" + hug1.linkValue); if(hug1.urlTarget == Action.NONE_TARGET){ sendToURL(new URLRequest(hug1.linkValue)); }else{ navigateToURL(new URLRequest(hug1.linkValue), hug1.urlTarget); } hug3 = Statistics.LINK_TYPE; }else if(hug1.linkType == Action.SCENARIO_LINK){ hug4 = Scenario(this.player.data.scenarios.getItem("id", hug1.linkValue)); if(hug4){ this.player.scenarios.play(hug4, hug4.firstFrameIndex); hug3 = Statistics.VIDEO_TYPE; } }else if(hug1.linkType == Action.FRAME_LINK){ hug4 = this.player.scenarios.runningScenario; if(hug4){ this.player.scenarios.play(hug4, int(hug1.linkValue)); hug3 = Statistics.VIDEO_TYPE; } }else if(hug1.linkType == Action.AVS_LINK){ hug5 = hug1.linkValue.split(";"); hug6 = hug1.linkValue; if(hug5.length > 1){ hug6 = ((hug5[0].substr(hug5[0].lastIndexOf(".") + 1).toLowerCase() == "avs") ? hug5[0] : hug5[1]); hug7 = ((hug5[0].substr(hug5[0].lastIndexOf(".") + 1).toLowerCase() == "avs") ? hug5[1] : hug5[0]); if(hug6.toLowerCase().split("avs").length == 0) hug6 = null; if(hug7.toLowerCase().split("flv").length == 0) hug7 = null; } if(hug6) this.player.setMetadataUrl(hug6); if(hug7) this.player.adapter.play(hug7); }else if(hug1.linkType == Action.ACTION_LINK){ hug8 = Action(this.player.data.actions.getItem("id", hug1.linkValue)); if(hug8) this.doAction(hug8, true); } } if(hug3) this.player.statistics.send(hug1, hug3); } public function getActionByPoint(hug1:Point):Action { //MethodID:6142, LocalCount= 6 , MaxScope= 1, MaxStack= 4, CodeLength= 214 var hug2:int = 0; if(!this.currentFrame || !this.currentVideo) return null; var hug3:Array = new Array(); var hug4:int = (hug1.x / this.currentVideo.cellSize.width); var hug5:int = (hug1.y / this.currentVideo.cellSize.height); if((hug4 >= this.currentVideo.gridSize.width) || (hug5 >= this.currentVideo.gridSize.height) || (hug4 < 0) || (hug5 < 0)) return null; if(this._debugMode){ hug2 = this.currentFrameMarking[hug4][hug5]; }else{ hug2 = MetadataReader.getActionIdByPoint(new Point(hug4, hug5), this.currentFrame); } if(hug2) return Action(this.player.data.actions.getItem("id", hug2)); return null; } public function frameToSecond(hug1:int, hug2:Number):Number { //MethodID:6143, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 6 return (hug1 / hug2); } public function secondToFrame(hug1:Number, hug2:Number):int { //MethodID:6144, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 6 return (hug1 * hug2); } private function onPlayerResize(hug1:Event):void { //MethodID:6145, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 39 this.player.screen.setScreenRect(this.player.adapter.screenRect); this.player.screen.setFrame(this.currentFrame); } private function fillMarkingMatrix():void { //MethodID:6146, LocalCount= 7 , MaxScope= 1, MaxStack= 3, CodeLength= 141 var hug3:Array = null; var hug4:int = 0; var hug1:int = this.currentFrameMarking.length; var hug2:int = this.currentVideo.gridSize.width; if(hug1 < hug2){ hug4 = hug1; while(hug4 < hug2){ this.currentFrameMarking[hug4] = []; hug4++; } }else if(hug1 > hug2){ this.currentFrameMarking.length = hug2; } for each(hug3 in this.currentFrameMarking){ hug3.length = 0; } MetadataReader.readFrameMarking(this.currentFrame, this.currentFrameMarking); } public function play(hug1:String=null):void { //MethodID:6147, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 15 this.player.adapter.play(hug1); } public function stop():void { //MethodID:6148, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 14 this.player.adapter.stop(); } public function pause():void { //MethodID:6149, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 14 this.player.adapter.pause(); } public function resume():void { //MethodID:6150, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 14 this.player.adapter.resume(); } public function seek(hug1:int):void { //MethodID:6151, LocalCount= 3 , MaxScope= 1, MaxStack= 4, CodeLength= 250 if(hug1 == this.currentFrameIndex) return; var hug2:Number = this.frameToSecond(hug1, this.currentVideo.fps); if(!this.player.adapter.hasStreaming && (hug1 > 0)){ if(this.waiting) throw new Error("waiting==true; seek()"); if(this.player.adapter.metadata && (this.player.adapter.metadata != this.keyframes.metadata)) this.keyframes.metadata = this.player.adapter.metadata; if(this.keyframes.available){ this.waitingForKeyframe = this.keyframes.getKeyframe(hug2, true); }else{ this.waitingForKeyframe = new Keyframe(hug2, this.player.adapter.bytesTotal); } if(this.waitingForKeyframe.firstBytePosition > this.player.adapter.bytesLoaded){ this.waiting = true; this.player.screen.waiting = true; return; } if(this.keyframes.available) hug2 = this.waitingForKeyframe.time; } this.player.adapter.seek(hug2); } public function set mute(hug1:Boolean):void { //MethodID:6152, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 14 this.player.adapter.mute = hug1; } public function setPlaybackEnabled(hug1:Boolean):void { //MethodID:6153, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 15 this.player.adapter.setPlaybackEnabled(hug1); } } } //script622 package actioplayer.transport{ import actioplayer.ActioPlayer import actioplayer.model.Metadata import flash.events.Event import flash.net.URLRequest import peace.design.command.NetCommand //class(instance)_index:621 public class LoadActiomlCommand extends NetCommand { //static constructor public static function LoadActiomlCommand$cinit() { //MethodID:6155, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function LoadActiomlCommand(hug1:String, hug2:ActioPlayer, hug3:Metadata=null) { //MethodID:6156, LocalCount= 4 , MaxScope= 1, MaxStack= 3, CodeLength= 22 super(new URLRequest(hug1)); this.player = hug2; this.metadata = hug3; } //variables/etc. private var player:ActioPlayer; //slotID:0 private var metadata:Metadata; //slotID:0 override public function execute():void { //MethodID:6157, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 60 if(request.url.toLowerCase() == "flashvars"){ loader.data = this.player.root.loaderInfo.parameters["actioml"]; this.onResult(null); }else{ super.execute(); } } override protected function onResult(hug1:Event):void { //MethodID:6158, LocalCount= 4 , MaxScope= 5, MaxStack= 3, CodeLength= 130 internal var e:Event; //slotID:1 internal var actioml:ActiomlReader; //slotID:2 e = hug1; if(!this.metadata) this.metadata = new Metadata(); actioml = new ActiomlReader(this.player); try{ actioml.read(XML(loader.data), this.metadata); } catch(error:Error){ player.reset(); } this.player.data = this.metadata; this.player.controller.startMonitoring(); super.onResult(e); } } } //script623 package actioplayer.transport{ import actioplayer.ActioPlayer import actioplayer.model.Action import actioplayer.utils.UrlUtils import flash.events.Event import flash.events.IOErrorEvent import flash.events.SecurityErrorEvent import flash.external.ExternalInterface import flash.net.URLLoader import flash.net.URLRequest import flash.net.URLRequestMethod import flash.net.URLVariables import flash.net.sendToURL import flash.system.Security import peace.util.Logger import peace.util.encryption.MD5 //class(instance)_index:622 public class Statistics extends Object { //static constructor public static function Statistics$cinit() { //MethodID:6160, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 48 LINK_TYPE = "Link"; VIDEO_TYPE = "Video"; SIDEBAR_TYPE = "Sidebar"; POPUP_TYPE = "Popup"; HREF_TYPE = "Href"; } //static variables/etc. public static const LINK_TYPE:String = "Link"; //slotID:1 public static const VIDEO_TYPE:String = "Video"; //slotID:2 public static const SIDEBAR_TYPE:String = "Sidebar"; //slotID:3 public static const POPUP_TYPE:String = "Popup"; //slotID:4 public static const HREF_TYPE:String = "Href"; //slotID:5 //constructor public function Statistics(hug1:String, hug2:ActioPlayer) { //MethodID:6161, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 16 super(); this.url = hug1; this.player = hug2; } //variables/etc. private var sessionStarted:Boolean = false; //slotID:0 private var pull:Array; //slotID:0 private var url:String; //slotID:0 private var sessionID:String; //slotID:0 private var baseUrl:String = ""; //slotID:0 private var player:ActioPlayer; //slotID:0 public function startSession():void { //MethodID:6162, LocalCount= 3 , MaxScope= 5, MaxStack= 5, CodeLength= 296 internal var v:URLVariables; //slotID:1 internal var href:Object; //slotID:2 href = null; if(ExternalInterface.available){ Security.allowDomain("*"); try{ href = ExternalInterface.call("function () { return window.location.href; }"); this.baseUrl = (href ? href.substr(0, (href.lastIndexOf("/") + 1)) : ""); } catch(e:Error){ Logger.error(e.message); } } this.sessionID = MD5.encrypt((String(new Date().time) + this.avsUrl) + (Math.random() * 10000)); v = new URLVariables(); v["SessionID"] = this.sessionID; v["DateTimeStart"] = new Date().time; v["ActioVersion"] = this.player.version.value; v["AvsURL"] = this.avsUrl; v["BaseURL"] = this.baseUrl; v["PlayerName"] = ActioPlayer.ID; this.sendTo(this.createRequest(v)); } public function send(hug1:*, hug2:String, hug3:String=null):void { //MethodID:6163, LocalCount= 6 , MaxScope= 1, MaxStack= 4, CodeLength= 414 if(!this.sessionID){ Logger._msg("Statistics::send() - ~u id uyy"); return; } var hug4:URLVariables = new URLVariables(); hug4["SessionID"] = this.sessionID; hug4["DateTimeClick"] = new Date().time; hug4["ObjectType"] = hug2; if(hug1 is Action){ var hug5:String = hug2; switch(hug5){ case LINK_TYPE: hug4["ObjectID"] = Action(hug1).id; hug4["ObjectName"] = Action(hug1).name; hug4["ObjectURL"] = Action(hug1).linkValue; break; case VIDEO_TYPE: case POPUP_TYPE: case SIDEBAR_TYPE: hug4["ObjectID"] = Action(hug1).id; hug4["ObjectName"] = Action(hug1).name; break; case HREF_TYPE: hug4["ObjectID"] = Action(hug1).id; hug4["ObjectName"] = Action(hug1).name; hug4["ObjectURL"] = (hug3 ? hug3 : Action(hug1).linkValue); break; default: break; } }else{ hug4["ObjectURL"] = String(hug1); } this.sendTo(this.createRequest(hug4)); } private function sendTo(hug1:URLRequest):void { //MethodID:6164, LocalCount= 3 , MaxScope= 2, MaxStack= 2, CodeLength= 23 internal var r:URLRequest; //slotID:1 r = hug1; sendToURL(r); } private function get avsUrl():String { //MethodID:6165, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 24 var hug1:String = this.player.currentMetadataUrl; return UrlUtils.getUrl(this.baseUrl, hug1); } private function get videoUrl():String { //MethodID:6166, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 49 var hug1:String = this.player.controller.currentVideo.url; if(hug1 && (hug1.indexOf("//") == (-1))) return (this.baseUrl + hug1); return hug1; } private function onSessionStarted(hug1:Event):void { //MethodID:6167, LocalCount= 6 , MaxScope= 1, MaxStack= 3, CodeLength= 163 var hug3:URLRequest = null; var hug2:URLLoader = (hug1.currentTarget as URLLoader); if(hug2){ hug2.removeEventListener(Event.COMPLETE, this.onSessionStarted); hug2.removeEventListener(IOErrorEvent.IO_ERROR, this.onSessionError); hug2.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, this.onSessionError); } if(String(hug2.data).indexOf("OK") == (-1)){ this.player.reset(); }else{ this.sessionStarted = true; if(this.pull){ for each(hug3 in this.pull){ this.createLoader().load(hug3); } this.pull = null; } } } private function onSessionError(hug1:Event):void { //MethodID:6168, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 75 var hug2:URLLoader = (hug1.currentTarget as URLLoader); if(hug2){ hug2.removeEventListener(Event.COMPLETE, this.onSessionStarted); hug2.removeEventListener(IOErrorEvent.IO_ERROR, this.onSessionError); hug2.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, this.onSessionError); } this.player.reset(); this.pull = null; } private function createLoader(hug1:Boolean=false):URLLoader { //MethodID:6169, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 62 var hug2:URLLoader = new URLLoader(); if(hug1){ hug2.addEventListener(Event.COMPLETE, this.onSessionStarted); hug2.addEventListener(IOErrorEvent.IO_ERROR, this.onSessionError); hug2.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.onSessionError); } return hug2; } private function createRequest(hug1:URLVariables):URLRequest { //MethodID:6170, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 31 var hug2:URLRequest = new URLRequest(this.url); hug2.method = URLRequestMethod.POST; hug2.data = hug1; return hug2; } } } //script624 package actioplayer.integrate{ import flash.display.MovieClip import flash.system.Security //class(instance)_index:623 public class SWFAdapter extends MovieClip { //static constructor public static function SWFAdapter$cinit() { //MethodID:6172, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 65 protocol = 1; CLEAR = "clear"; MUTE = "mute"; UNMUTE = "unmute"; VOLUME = "volume"; STATISTIC = "statistic"; EXTENDED_LINK = "extendedlink"; } //static variables/etc. public static const protocol:Number = 1.0; //slotID:1 public static const CLEAR:String = "clear"; //slotID:2 public static const MUTE:String = "mute"; //slotID:3 public static const UNMUTE:String = "unmute"; //slotID:4 public static const VOLUME:String = "volume"; //slotID:5 public static const STATISTIC:String = "statistic"; //slotID:6 public static const EXTENDED_LINK:String = "extendedlink"; //slotID:7 //variables/etc. protected var _id:String; //slotID:0 protected var _parent:Object; //slotID:0 public function init(hug1:String, hug2:Object):void { //MethodID:6173, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 23 Security.allowDomain("*"); this._id = hug1; this._parent = hug2; } public function execute(hug1:String, hug2:String):void { //MethodID:6174, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 13 throw new Error("Must override"); } public function sendCommand(hug1:String, hug2:String):void { //MethodID:6175, LocalCount= 3 , MaxScope= 1, MaxStack= 4, CodeLength= 25 if(this._parent) this._parent.doCommand(hug1, this._id, hug2); } //constructor public function SWFAdapter() { //MethodID:6176, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 super(); } } } //script625 package actioplayer.view.skin{ import flash.events.EventDispatcher import htmllooker.Htmllooker //class(instance)_index:624 public class Skinner extends EventDispatcher { //static constructor public static function Skinner$cinit() { //MethodID:6178, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function Skinner() { //MethodID:6179, LocalCount= 1 , MaxScope= 1, MaxStack= 8, CodeLength= 440 this.tooltipWebLink = Skinner_tooltipWebLink; this.tooltipScenarioLink = Skinner_tooltipScenarioLink; this.tooltipSidebarLink = Skinner_tooltipSidebarLink; this.tooltipPopupLink = Skinner_tooltipPopupLink; this.closeButton = Skinner_closeButton; this.closeButtonHover = Skinner_closeButtonHover; this.backDisabled = Skinner_backDisabled; this.backEnabled = Skinner_backEnabled; this.forwardDisabled = Skinner_forwardDisabled; this.forwardEnabled = Skinner_forwardEnabled; this.markerSkin = Skinner_markerSkin; this.markerSkin1 = Skinner_markerSkin1; this.sliderUp = Skinner_sliderUp; this.sliderDown = Skinner_sliderDown; this.sliderRunner = Skinner_sliderRunner; this.sliderTrack = Skinner_sliderTrack; this.roller = Skinner_roller; this.screenPreloader = Skinner_screenPreloader; this.promo = Skinner_promo; this.intro = Skinner_intro; this.pointersSwitchBg = Skinner_pointersSwitchBg; this.pointersSwitchSlider = Skinner_pointersSwitchSlider; this.pushButtonUp = Skinner_pushButtonUp; this.pushButtonOver = Skinner_pushButtonOver; this.pushButtonDown = Skinner_pushButtonDown; this.inputFocus = Skinner_inputFocus; this.inputBlur = Skinner_inputBlur; this.ScrollArrowDown_downSkin = Skinner_ScrollArrowDown_downSkin; this.ScrollArrowDown_overSkin = Skinner_ScrollArrowDown_overSkin; this.ScrollArrowDown_upSkin = Skinner_ScrollArrowDown_upSkin; this.ScrollArrowUp_downSkin = Skinner_ScrollArrowUp_downSkin; this.ScrollArrowUp_overSkin = Skinner_ScrollArrowUp_overSkin; this.ScrollArrowUp_upSkin = Skinner_ScrollArrowUp_upSkin; this.ScrollThumb_downSkin = Skinner_ScrollThumb_downSkin; this.ScrollThumb_overSkin = Skinner_ScrollThumb_overSkin; this.ScrollThumb_upSkin = Skinner_ScrollThumb_upSkin; this.ScrollTrack_Skin = Skinner_ScrollTrack_Skin; this.ComboBoxArrow_upSkin = Skinner_ComboBoxArrow_upSkin; this.ComboBoxArrow_overSkin = Skinner_ComboBoxArrow_overSkin; this.ComboBoxArrow_downSkin = Skinner_ComboBoxArrow_downSkin; this.ComboBoxArrow_editableUpSkin = Skinner_ComboBoxArrow_editableUpSkin; this.ComboBoxArrow_editableOverSkin = Skinner_ComboBoxArrow_editableOverSkin; this.ComboBoxArrow_editableDownSkin = Skinner_ComboBoxArrow_editableDownSkin; this.CheckBox_upIcon = Skinner_CheckBox_upIcon; this.CheckBox_overIcon = Skinner_CheckBox_overIcon; this.CheckBox_downIcon = Skinner_CheckBox_downIcon; this.CheckBox_icon = Skinner_CheckBox_icon; this.RadioButtonIcon = Skinner_RadioButtonIcon; this.RadioButton_overIcon = Skinner_RadioButton_overIcon; this.RadioButton_downIcon = Skinner_RadioButton_downIcon; this.RadioButton_icon = Skinner_RadioButton_icon; super(); FormScrollpane.skinner = this; FormButton.skinner = this; FormCheckbox.skinner = this; FormCombobox.skinner = this; FormInput.skinner = this; FormListbox.skinner = this; FormRadiobutton.skinner = this; Htmllooker.setFormSkins(FormButton, FormCheckbox, FormRadiobutton, FormListbox, FormCombobox, FormInput, FormInput); } //variables/etc. public var tooltipWebLink:Class; //slotID:0 public var tooltipScenarioLink:Class; //slotID:0 public var tooltipSidebarLink:Class; //slotID:0 public var tooltipPopupLink:Class; //slotID:0 public var closeButton:Class; //slotID:0 public var closeButtonHover:Class; //slotID:0 public var backDisabled:Class; //slotID:0 public var backEnabled:Class; //slotID:0 public var forwardDisabled:Class; //slotID:0 public var forwardEnabled:Class; //slotID:0 public var markerSkin:Class; //slotID:0 public var markerSkin1:Class; //slotID:0 public var sliderUp:Class; //slotID:0 public var sliderDown:Class; //slotID:0 public var sliderRunner:Class; //slotID:0 public var sliderTrack:Class; //slotID:0 public var roller:Class; //slotID:0 public var screenPreloader:Class; //slotID:0 public var promo:Class; //slotID:0 public var intro:Class; //slotID:0 public var pointersSwitchBg:Class; //slotID:0 public var pointersSwitchSlider:Class; //slotID:0 public var pushButtonUp:Class; //slotID:0 public var pushButtonOver:Class; //slotID:0 public var pushButtonDown:Class; //slotID:0 public var inputFocus:Class; //slotID:0 public var inputBlur:Class; //slotID:0 public var ScrollArrowDown_downSkin:Class; //slotID:0 public var ScrollArrowDown_overSkin:Class; //slotID:0 public var ScrollArrowDown_upSkin:Class; //slotID:0 public var ScrollArrowUp_downSkin:Class; //slotID:0 public var ScrollArrowUp_overSkin:Class; //slotID:0 public var ScrollArrowUp_upSkin:Class; //slotID:0 public var ScrollThumb_downSkin:Class; //slotID:0 public var ScrollThumb_overSkin:Class; //slotID:0 public var ScrollThumb_upSkin:Class; //slotID:0 public var ScrollTrack_Skin:Class; //slotID:0 public var ComboBoxArrow_upSkin:Class; //slotID:0 public var ComboBoxArrow_overSkin:Class; //slotID:0 public var ComboBoxArrow_downSkin:Class; //slotID:0 public var ComboBoxArrow_editableUpSkin:Class; //slotID:0 public var ComboBoxArrow_editableOverSkin:Class; //slotID:0 public var ComboBoxArrow_editableDownSkin:Class; //slotID:0 public var CheckBox_upIcon:Class; //slotID:0 public var CheckBox_overIcon:Class; //slotID:0 public var CheckBox_downIcon:Class; //slotID:0 public var CheckBox_icon:Class; //slotID:0 public var RadioButtonIcon:Class; //slotID:0 public var RadioButton_overIcon:Class; //slotID:0 public var RadioButton_downIcon:Class; //slotID:0 public var RadioButton_icon:Class; //slotID:0 } } //script626 package actioplayer.localize{ import flash.events.Event //class(instance)_index:625 public class LocaleChangeEvent extends Event { //static constructor public static function LocaleChangeEvent$cinit() { //MethodID:6181, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 12 CHANGE = "changeLocale"; } //static variables/etc. public static const CHANGE:String = "changeLocale"; //slotID:1 //constructor public function LocaleChangeEvent() { //MethodID:6182, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 9 super(CHANGE); } //variables/etc. override public function clone():Event { //MethodID:6183, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 10 return new LocaleChangeEvent(); } } } //script627 package actioplayer{ import actioplayer.command.ActioCommand import actioplayer.command.PauseCommand import actioplayer.model.Scenario import flash.events.Event import flash.events.EventDispatcher //class(instance)_index:626 public class History extends EventDispatcher { //static constructor public static function History$cinit() { //MethodID:6185, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function History(hug1:ActioPlayer) { //MethodID:6186, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 23 this.buffer = []; super(); this.player = hug1; this.cursor = -1; } //variables/etc. private var buffer:Array; //slotID:0 private var cursor:int; //slotID:0 private var player:ActioPlayer; //slotID:0 public function write(hug1:Scenario, hug2:int):void { //MethodID:6187, LocalCount= 5 , MaxScope= 1, MaxStack= 4, CodeLength= 100 if(!hug1) hug1 = this.player.scenarios.runningScenario; if(!hug1) return; this.buffer.length = (this.cursor + 1); this.cacheCurrentState(); this.cursor++; this.buffer.push(new HistoryPoint(hug1, hug2)); dispatchEvent(new Event(Event.CHANGE)); } private function goto(hug1:int):void { //MethodID:6188, LocalCount= 3 , MaxScope= 1, MaxStack= 4, CodeLength= 47 var hug2:HistoryPoint = HistoryPoint(this.buffer[hug1]); if(hug2) this.player.scenarios.play(hug2.scenario, hug2.frameIndex, false); } public function next():void { //MethodID:6189, LocalCount= 3 , MaxScope= 1, MaxStack= 4, CodeLength= 64 if(this.cursor < (this.buffer.length - 1)){ this.cacheCurrentState(); this.goto(++this.cursor); dispatchEvent(new Event(Event.CHANGE)); } } public function prev():void { //MethodID:6190, LocalCount= 3 , MaxScope= 1, MaxStack= 4, CodeLength= 58 if(this.cursor > 0){ this.cacheCurrentState(); this.goto(--this.cursor); dispatchEvent(new Event(Event.CHANGE)); } } public function get length():int { //MethodID:6191, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 10 return this.buffer.length; } public function get cursorPosition():int { //MethodID:6192, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this.cursor; } public function clear():void { //MethodID:6193, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 32 this.buffer = []; this.cursor = -1; dispatchEvent(new Event(Event.CHANGE)); } private function cacheCurrentState():void { //MethodID:6194, LocalCount= 4 , MaxScope= 1, MaxStack= 3, CodeLength= 96 var hug2:int = 0; var hug3:ActioCommand = null; var hug1:HistoryPoint = HistoryPoint(this.buffer[this.cursor]); if(hug1){ hug3 = hug1.scenario.runningCommand; if(hug3 && (hug3 is PauseCommand)){ hug2 = (hug3.fromFrame - 2); }else{ hug2 = this.player.controller.currentFrameIndex; } hug1.frameIndex = hug2; } } } } import actioplayer.model.Scenario //class(instance)_index:627 //private class HistoryPoint extends Object { //static constructor public static function HistoryPoint$cinit() { //MethodID:6195, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function HistoryPoint(hug1:Scenario, hug2:int) { //MethodID:6196, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 16 super(); this.scenario = hug1; this.frameIndex = hug2; } //variables/etc. public var scenario:Scenario; //slotID:0 public var frameIndex:int; //slotID:0 public function toString():String { //MethodID:6197, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 24 return ("[Scenario: " + this.scenario + "; frameIndex: " + this.frameIndex + "]"); } } //script628 package com.google.ads.instream.wrappers{ import com.google.ads.instream.api.MediaSelectionSettings //class(instance)_index:628 public class MediaSelectionSettingsWrapper extends MediaSelectionSettings { //static constructor public static function MediaSelectionSettingsWrapper$cinit() { //MethodID:6199, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function MediaSelectionSettingsWrapper() { //MethodID:6200, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 super(); } } } //script629 package com.google.ads.instream.wrappers{ import com.google.ads.instream.api.Ad import com.google.ads.instream.api.AdEvent import flash.events.Event import flash.utils.Dictionary //class(instance)_index:629 public class AdEventWrapper extends AdEvent { //static constructor public static function AdEventWrapper$cinit() { //MethodID:6202, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function AdEventWrapper(hug1:Object, hug2:Object=null) { //MethodID:6203, LocalCount= 3 , MaxScope= 1, MaxStack= 6, CodeLength= 54 remoteMethodResultsStore = new Dictionary(); this.remoteInstance = hug1; this.localInstance = hug2; super(hug1.type, (Wrappers.remoteToLocal(remoteMethodResultsStore, hug1.ad, localInstance) as Ad)); } //variables/etc. private var localInstance:Object = null; //slotID:0 private var remoteMethodResultsStore:Dictionary; //slotID:0 private var remoteInstance:Object = null; //slotID:0 override public function clone():Event { //MethodID:6204, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 16 return new AdEventWrapper(remoteInstance, localInstance); } } } //script630 package com.google.ads.instream.wrappers{ import com.google.ads.instream.api.Ad import com.google.ads.instream.api.AdSizeChangedEvent import flash.events.Event import flash.utils.Dictionary //class(instance)_index:630 public class AdSizeChangedEventWrapper extends AdSizeChangedEvent { //static constructor public static function AdSizeChangedEventWrapper$cinit() { //MethodID:6206, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function AdSizeChangedEventWrapper(hug1:Object, hug2:Object=null) { //MethodID:6207, LocalCount= 3 , MaxScope= 1, MaxStack= 6, CodeLength= 66 remoteMethodResultsStore = new Dictionary(); this.remoteInstance = hug1; this.localInstance = hug2; super((Wrappers.remoteToLocal(remoteMethodResultsStore, hug1.ad, localInstance) as Ad), hug1.type, hug1.state, hug1.width, hug1.height); } //variables/etc. private var localInstance:Object = null; //slotID:0 private var remoteMethodResultsStore:Dictionary; //slotID:0 private var remoteInstance:Object = null; //slotID:0 override public function clone():Event { //MethodID:6208, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 16 return new AdSizeChangedEventWrapper(remoteInstance, localInstance); } } } //script631 package com.google.ads.instream.wrappers{ //class(instance)_index:631 public class AdsManagerWrapper extends EventDispatcherWrapper implements AdsManager { //static constructor public static function AdsManagerWrapper$cinit() { //MethodID:6210, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function AdsManagerWrapper(hug1:Object, hug2:Object=null) { //MethodID:6211, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 8 super(hug1, hug2); } //variables/etc. public function get type():String { //MethodID:6212, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.type; } public function load(hug1:Object=null):void { //MethodID:6213, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 11 remoteInstance.load(hug1); } public function unload():void { //MethodID:6214, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 10 remoteInstance.unload(); } public function play(hug1:Object=null):void { //MethodID:6215, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 11 remoteInstance.play(hug1); } public function get ads():Array { //MethodID:6216, LocalCount= 1 , MaxScope= 1, MaxStack= 4, CodeLength= 25 return (Wrappers.remoteToLocal(remoteMethodResultsStore, remoteInstance.ads, localInstance) as Array); } public function get adSlotWidth():Number { //MethodID:6217, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.adSlotWidth; } public function set adSlotWidth(hug1:Number):void { //MethodID:6218, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 10 remoteInstance.adSlotWidth = hug1; } public function get adSlotHeight():Number { //MethodID:6219, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.adSlotHeight; } public function set adSlotHeight(hug1:Number):void { //MethodID:6220, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 10 remoteInstance.adSlotHeight = hug1; } } } //script632 package com.google.ads.instream.wrappers{ //class(instance)_index:632 public class FlashAdsManagerWrapper extends AdsManagerWrapper implements FlashAdsManager { //static constructor public static function FlashAdsManagerWrapper$cinit() { //MethodID:6222, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function FlashAdsManagerWrapper(hug1:Object, hug2:Object=null) { //MethodID:6223, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 8 super(hug1, hug2); } //variables/etc. public function set x(hug1:Number):void { //MethodID:6224, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 10 remoteInstance.x = hug1; } public function get x():Number { //MethodID:6225, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.x; } public function set y(hug1:Number):void { //MethodID:6226, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 10 remoteInstance.y = hug1; } public function get y():Number { //MethodID:6227, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.y; } public function set volumeAd(hug1:Number):void { //MethodID:6228, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 10 remoteInstance.volumeAd = hug1; } public function get volumeAd():Number { //MethodID:6229, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.volumeAd; } public function set decoratedAd(hug1:Boolean):void { //MethodID:6230, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 10 remoteInstance.decoratedAd = hug1; } } } //script633 package com.google.ads.instream.wrappers{ import flash.events.EventDispatcher import flash.utils.Dictionary //class(instance)_index:633 public class Wrapper extends EventDispatcher { //static constructor public static function Wrapper$cinit() { //MethodID:6232, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function Wrapper(hug1:Object, hug2:Object=null) { //MethodID:6233, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 42 remoteMethodResultsDictionary = new Dictionary(); super(); remoteMethodResultsDictionary = new Dictionary(); this.remoteInstanceReference = hug1; this.localInstanceReference = hug2; } //variables/etc. private var remoteInstanceReference:Object; //slotID:0 private var remoteMethodResultsDictionary:Dictionary; //slotID:0 private var localInstanceReference:Object; //slotID:0 public function get remoteInstance():Object { //MethodID:6234, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 return remoteInstanceReference; } public function get localInstance():Object { //MethodID:6235, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 return localInstanceReference; } protected function get remoteMethodResultsStore():Dictionary { //MethodID:6236, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 return remoteMethodResultsDictionary; } } } //script634 package com.google.ads.instream.api{ //class(instance)_index:634 public interface VastCustomClick { //static constructor public static function VastCustomClick$cinit() { //MethodID:6238, LocalCount= 1 , MaxScope= 0, MaxStack= 0, CodeLength= 1 } //variables/etc. function get url():String; //MethodID:6239, dispID:0 function get id():String; //MethodID:6240, dispID:0 //constructor public function VastCustomClick(); //MethodID:6241, dispID:0 } } //script635 package com.google.ads.instream.wrappers{ //class(instance)_index:635 public class VastCustomClickWrapper extends Wrapper implements VastCustomClick { //static constructor public static function VastCustomClickWrapper$cinit() { //MethodID:6243, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function VastCustomClickWrapper(hug1:Object, hug2:Object=null) { //MethodID:6244, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 8 super(hug1, hug2); } //variables/etc. public function get url():String { //MethodID:6245, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.url; } public function get id():String { //MethodID:6246, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.id; } } } //script636 package com.google.ads.instream.wrappers{ import com.google.ads.instream.api.Ad import com.google.ads.instream.api.AdLoadedEvent import flash.events.Event import flash.utils.Dictionary //class(instance)_index:636 public class AdLoadedEventWrapper extends AdLoadedEvent { //static constructor public static function AdLoadedEventWrapper$cinit() { //MethodID:6248, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function AdLoadedEventWrapper(hug1:Object, hug2:Object=null) { //MethodID:6249, LocalCount= 3 , MaxScope= 1, MaxStack= 5, CodeLength= 58 remoteMethodResultsStore = new Dictionary(); this.remoteInstance = hug1; this.localInstance = hug2; super((Wrappers.remoteToLocal(remoteMethodResultsStore, hug1.ad, localInstance) as Ad), hug1.type, hug1.netStream); } //variables/etc. private var localInstance:Object = null; //slotID:0 private var remoteMethodResultsStore:Dictionary; //slotID:0 private var remoteInstance:Object = null; //slotID:0 override public function clone():Event { //MethodID:6250, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 16 return new AdLoadedEventWrapper(remoteInstance, localInstance); } } } //script637 package com.google.ads.instream.api{ //class(instance)_index:637 public interface FlashAsset implements IEventDispatcher { //static constructor public static function FlashAsset$cinit() { //MethodID:6252, LocalCount= 1 , MaxScope= 0, MaxStack= 0, CodeLength= 1 } //variables/etc. function get width():Number; //MethodID:6253, dispID:0 function get height():Number; //MethodID:6254, dispID:0 function get expandedWidth():Number; //MethodID:6255, dispID:0 function get expandedHeight():Number; //MethodID:6256, dispID:0 function get frameRate():Number; //MethodID:6257, dispID:0 function get type():String; //MethodID:6258, dispID:0 function set x(hug1:Number):void; //MethodID:6259, dispID:0 function get x():Number; //MethodID:6260, dispID:0 function set y(hug1:Number):void; //MethodID:6261, dispID:0 function get y():Number; //MethodID:6262, dispID:0 //constructor public function FlashAsset(); //MethodID:6263, dispID:0 } } //script638 package com.google.ads.instream.api{ //class(instance)_index:638 public interface DoubleClickStudioFlashAsset implements FlashAsset { //static constructor public static function DoubleClickStudioFlashAsset$cinit() { //MethodID:6265, LocalCount= 1 , MaxScope= 0, MaxStack= 0, CodeLength= 1 } //variables/etc. function call(hug1:String, ...rest):void; //MethodID:6266, dispID:0 //constructor public function DoubleClickStudioFlashAsset(); //MethodID:6267, dispID:0 } } //script639 package com.google.ads.instream.wrappers{ //class(instance)_index:639 public class FlashAssetWrapper extends Wrapper implements FlashAsset { //static constructor public static function FlashAssetWrapper$cinit() { //MethodID:6269, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function FlashAssetWrapper(hug1:Object, hug2:Object=null) { //MethodID:6270, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 8 super(hug1, hug2); } //variables/etc. public function get width():Number { //MethodID:6271, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.width; } public function get height():Number { //MethodID:6272, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.height; } public function get expandedWidth():Number { //MethodID:6273, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.expandedWidth; } public function get expandedHeight():Number { //MethodID:6274, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.expandedHeight; } public function get frameRate():Number { //MethodID:6275, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.frameRate; } public function get type():String { //MethodID:6276, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.type; } public function set x(hug1:Number):void { //MethodID:6277, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 10 remoteInstance.x = hug1; } public function get x():Number { //MethodID:6278, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.x; } public function set y(hug1:Number):void { //MethodID:6279, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 10 remoteInstance.y = hug1; } public function get y():Number { //MethodID:6280, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.y; } } } //script640 package com.google.ads.instream.wrappers{ //class(instance)_index:640 public class DoubleClickStudioFlashAssetWrapper extends FlashAssetWrapper implements DoubleClickStudioFlashAsset { //static constructor public static function DoubleClickStudioFlashAssetWrapper$cinit() { //MethodID:6282, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function DoubleClickStudioFlashAssetWrapper(hug1:Object, hug2:Object=null) { //MethodID:6283, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 8 super(hug1, hug2); } //variables/etc. public function call(hug1:String, ...rest):void { //MethodID:6284, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 23 rest.unshift(hug1); remoteInstance.call.apply(remoteInstance, rest); } } } //script641 package com.google.ads.instream.api{ //class(instance)_index:641 public interface PlayListContent { //static constructor public static function PlayListContent$cinit() { //MethodID:6286, LocalCount= 1 , MaxScope= 0, MaxStack= 0, CodeLength= 1 } //variables/etc. function get url():String; //MethodID:6287, dispID:0 function set url(hug1:String):void; //MethodID:6288, dispID:0 //constructor public function PlayListContent(); //MethodID:6289, dispID:0 } } //script642 package com.google.ads.instream.wrappers{ //class(instance)_index:642 public class PlayListContentWrapper extends Wrapper implements PlayListContent { //static constructor public static function PlayListContentWrapper$cinit() { //MethodID:6291, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function PlayListContentWrapper(hug1:Object, hug2:Object=null) { //MethodID:6292, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 8 super(hug1, hug2); } //variables/etc. public function get url():String { //MethodID:6293, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.url; } public function set url(hug1:String):void { //MethodID:6294, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 10 remoteInstance.url = hug1; } } } //script643 package com.google.ads.instream.api{ //class(instance)_index:643 public interface PlayList { //static constructor public static function PlayList$cinit() { //MethodID:6296, LocalCount= 1 , MaxScope= 0, MaxStack= 0, CodeLength= 1 } //variables/etc. function get content():PlayListContent; //MethodID:6297, dispID:0 function get adRule():AdRule; //MethodID:6298, dispID:0 //constructor public function PlayList(); //MethodID:6299, dispID:0 } } //script644 package com.google.ads.instream.wrappers{ import com.google.ads.instream.api.AdRule import com.google.ads.instream.api.PlayListContent //class(instance)_index:644 public class PlayListWrapper extends Wrapper implements PlayList { //static constructor public static function PlayListWrapper$cinit() { //MethodID:6301, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function PlayListWrapper(hug1:Object, hug2:Object=null) { //MethodID:6302, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 8 super(hug1, hug2); } //variables/etc. public function get content():PlayListContent { //MethodID:6303, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.content; } public function get adRule():AdRule { //MethodID:6304, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.adRule; } } } //script645 package com.google.ads.instream.api{ //class(instance)_index:645 public interface VastWrapper { //static constructor public static function VastWrapper$cinit() { //MethodID:6306, LocalCount= 1 , MaxScope= 0, MaxStack= 0, CodeLength= 1 } //variables/etc. function get adSystem():String; //MethodID:6307, dispID:0 function get customClicks():Array; //MethodID:6308, dispID:0 //constructor public function VastWrapper(); //MethodID:6309, dispID:0 } } //script646 package com.google.ads.instream.wrappers{ //class(instance)_index:646 public class VastWrapperWrapper extends Wrapper implements VastWrapper { //static constructor public static function VastWrapperWrapper$cinit() { //MethodID:6311, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function VastWrapperWrapper(hug1:Object, hug2:Object=null) { //MethodID:6312, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 8 super(hug1, hug2); } //variables/etc. public function get adSystem():String { //MethodID:6313, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.adSystem; } public function get customClicks():Array { //MethodID:6314, LocalCount= 1 , MaxScope= 1, MaxStack= 4, CodeLength= 25 return (Wrappers.remoteToLocal(remoteMethodResultsStore, remoteInstance.customClicks, localInstance) as Array); } } } //script647 package com.google.ads.instream.wrappers{ //class(instance)_index:647 public class AdWrapper extends Wrapper implements Ad { //static constructor public static function AdWrapper$cinit() { //MethodID:6316, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function AdWrapper(hug1:Object, hug2:Object=null) { //MethodID:6317, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 8 super(hug1, hug2); } //variables/etc. public function get type():String { //MethodID:6318, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.type; } public function get id():String { //MethodID:6319, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.id; } public function get traffickingParameters():Object { //MethodID:6320, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.traffickingParameters; } public function get surveyUrl():String { //MethodID:6321, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.surveyUrl; } public function getCompanionAdUrl(hug1:String, hug2:String=null):String { //MethodID:6322, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 12 return remoteInstance.getCompanionAdUrl(hug1, hug2); } } } //script648 package com.google.ads.instream.wrappers{ import com.google.ads.instream.api.FlashAsset import flash.utils.Dictionary //class(instance)_index:648 public class FlashAdWrapper extends AdWrapper implements FlashAd { //static constructor public static function FlashAdWrapper$cinit() { //MethodID:6324, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function FlashAdWrapper(hug1:Object, hug2:Object=null) { //MethodID:6325, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 8 super(hug1, hug2); } //variables/etc. public function get asset():FlashAsset { //MethodID:6326, LocalCount= 1 , MaxScope= 1, MaxStack= 4, CodeLength= 26 return (Wrappers.remoteToLocal(remoteMethodResultsStore, remoteInstance.asset, localInstance) as FlashAsset); } public function reportCustomKeysAndValues(hug1:Dictionary):void { //MethodID:6327, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 11 remoteInstance.reportCustomKeysAndValues(hug1); } public function reportEvents():void { //MethodID:6328, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 10 remoteInstance.reportEvents(); } public function enableManualEventsReporting():void { //MethodID:6329, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 10 remoteInstance.enableManualEventsReporting(); } } } //script649 package com.google.ads.instream.wrappers{ import com.google.ads.instream.api.AdError import com.google.ads.instream.api.AdErrorEvent import flash.events.Event import flash.utils.Dictionary //class(instance)_index:649 public class AdErrorEventWrapper extends AdErrorEvent { //static constructor public static function AdErrorEventWrapper$cinit() { //MethodID:6331, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function AdErrorEventWrapper(hug1:Object, hug2:Object=null) { //MethodID:6332, LocalCount= 3 , MaxScope= 1, MaxStack= 5, CodeLength= 54 remoteMethodResultsStore = new Dictionary(); this.remoteInstance = hug1; this.localInstance = hug2; super((Wrappers.remoteToLocal(remoteMethodResultsStore, hug1.error, localInstance) as AdError), hug1.userRequestContext); } //variables/etc. private var localInstance:Object = null; //slotID:0 private var remoteMethodResultsStore:Dictionary; //slotID:0 private var remoteInstance:Object = null; //slotID:0 override public function clone():Event { //MethodID:6333, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 16 return new AdErrorEventWrapper(remoteInstance, localInstance); } } } //script650 package com.google.ads.instream.api{ //class(instance)_index:650 public interface AdRuleAdBreak { //static constructor public static function AdRuleAdBreak$cinit() { //MethodID:6335, LocalCount= 1 , MaxScope= 0, MaxStack= 0, CodeLength= 1 } //variables/etc. function get adType():String; //MethodID:6336, dispID:0 function get adBreakType():String; //MethodID:6337, dispID:0 function get startTime():int; //MethodID:6338, dispID:0 function get duration():int; //MethodID:6339, dispID:0 function get adTagUrl():String; //MethodID:6340, dispID:0 //constructor public function AdRuleAdBreak(); //MethodID:6341, dispID:0 } } //script651 package com.google.ads.instream.wrappers{ //class(instance)_index:651 public class AdRuleAdBreakWrapper extends Wrapper implements AdRuleAdBreak { //static constructor public static function AdRuleAdBreakWrapper$cinit() { //MethodID:6343, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function AdRuleAdBreakWrapper(hug1:Object, hug2:Object=null) { //MethodID:6344, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 8 super(hug1, hug2); } //variables/etc. public function get adType():String { //MethodID:6345, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.adType; } public function get adBreakType():String { //MethodID:6346, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.adBreakType; } public function get startTime():int { //MethodID:6347, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.startTime; } public function get duration():int { //MethodID:6348, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.duration; } public function get adTagUrl():String { //MethodID:6349, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.adTagUrl; } } } //script652 package com.google.ads.instream.api{ import flash.events.Event //class(instance)_index:652 public class PlayListLoadedEvent extends Event { //static constructor public static function PlayListLoadedEvent$cinit() { //MethodID:6351, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 12 PLAY_LIST_LOADED = "playListLoaded"; } //static variables/etc. public static const PLAY_LIST_LOADED:String = "playListLoaded"; //slotID:1 //constructor public function PlayListLoadedEvent(hug1:PlayListManager, hug2:Object) { //MethodID:6352, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 19 super(PLAY_LIST_LOADED); this.playListManagerValue = hug1; this.userRequestContextObject = hug2; } //variables/etc. private var playListManagerValue:PlayListManager; //slotID:0 private var userRequestContextObject:Object; //slotID:0 public function get playListManager():PlayListManager { //MethodID:6353, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this.playListManagerValue; } public function get userRequestContext():Object { //MethodID:6354, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 return userRequestContextObject; } override public function clone():Event { //MethodID:6355, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 18 return new PlayListLoadedEvent(this.playListManagerValue, this.userRequestContextObject); } } } //script653 package com.google.ads.instream.wrappers{ import com.google.ads.instream.api.PlayListLoadedEvent import com.google.ads.instream.api.PlayListManager import flash.events.Event import flash.utils.Dictionary //class(instance)_index:653 public class PlayListLoadedEventWrapper extends PlayListLoadedEvent { //static constructor public static function PlayListLoadedEventWrapper$cinit() { //MethodID:6357, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function PlayListLoadedEventWrapper(hug1:Object, hug2:Object=null) { //MethodID:6358, LocalCount= 3 , MaxScope= 1, MaxStack= 5, CodeLength= 54 remoteMethodResultsStore = new Dictionary(); this.remoteInstance = hug1; this.localInstance = hug2; super((Wrappers.remoteToLocal(remoteMethodResultsStore, hug1.playListManager, localInstance) as PlayListManager), hug1.userRequestContext); } //variables/etc. private var localInstance:Object; //slotID:0 private var remoteMethodResultsStore:Dictionary; //slotID:0 private var remoteInstance:Object; //slotID:0 override public function clone():Event { //MethodID:6359, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 16 return new PlayListLoadedEventWrapper(remoteInstance, localInstance); } } } //script654 package com.google.ads.instream.wrappers{ import flash.utils.Dictionary //class(instance)_index:654 public class AdErrorWrapper extends Error implements AdError { //static constructor public static function AdErrorWrapper$cinit() { //MethodID:6361, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function AdErrorWrapper(hug1:Object, hug2:Object=null) { //MethodID:6362, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 29 super(); remoteMethodResultsDictionary = new Dictionary(); this.remoteInstanceReference = hug1; this.localInstanceReference = hug2; } //variables/etc. private var remoteMethodResultsDictionary:Dictionary; //slotID:0 private var localInstanceReference:Object; //slotID:0 private var remoteInstanceReference:Object; //slotID:0 public function get remoteInstance():Object { //MethodID:6363, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 return remoteInstanceReference; } public function get localInstance():Object { //MethodID:6364, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 return localInstanceReference; } protected function get remoteMethodResultsStore():Dictionary { //MethodID:6365, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 return remoteMethodResultsDictionary; } public function get innerError():Error { //MethodID:6366, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.innerError; } public function get errorType():String { //MethodID:6367, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.errorType; } public function get errorMessage():String { //MethodID:6368, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.errorMessage; } } } //script655 package com.google.ads.instream.api{ import flash.events.ErrorEvent import flash.events.Event //class(instance)_index:655 public class PlayListErrorEvent extends ErrorEvent { //static constructor public static function PlayListErrorEvent$cinit() { //MethodID:6370, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 12 PLAY_LIST_ERROR = "playListError"; } //static variables/etc. public static const PLAY_LIST_ERROR:String = "playListError"; //slotID:1 //constructor public function PlayListErrorEvent(hug1:String, hug2:Object=null) { //MethodID:6371, LocalCount= 3 , MaxScope= 1, MaxStack= 5, CodeLength= 17 super(PLAY_LIST_ERROR, false, false, hug1); this.userRequestContextObject = hug2; } //variables/etc. private var userRequestContextObject:Object = null; //slotID:0 public function get userRequestContext():Object { //MethodID:6372, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 return userRequestContextObject; } override public function clone():Event { //MethodID:6373, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 16 return new PlayListErrorEvent(text, userRequestContextObject); } } } //script656 package com.google.ads.instream.wrappers{ import com.google.ads.instream.api.PlayListErrorEvent import flash.events.Event //class(instance)_index:656 public class PlayListErrorEventWrapper extends PlayListErrorEvent { //static constructor public static function PlayListErrorEventWrapper$cinit() { //MethodID:6375, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function PlayListErrorEventWrapper(hug1:Object, hug2:Object=null) { //MethodID:6376, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 24 this.remoteInstance = hug1; this.localInstance = hug2; super(hug1.text, hug1.userRequestContext); } //variables/etc. private var localInstance:Object; //slotID:0 private var remoteInstance:Object; //slotID:0 override public function clone():Event { //MethodID:6377, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 16 return new PlayListErrorEventWrapper(remoteInstance, localInstance); } } } //script657 package com.google.ads.instream.api{ import flash.events.Event import flash.net.NetStream //class(instance)_index:657 public class PlayListEvent extends Event { //static constructor public static function PlayListEvent$cinit() { //MethodID:6379, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 75 PLAY_LIST_STARTED = "playListStarted"; PLAY_LIST_COMPLETE = "playListComplete"; AD_STARTED = "playListAdStarted"; AD_COMPLETE = "playListAdComplete"; CONTENT_STARTED = "playListContentStarted"; CONTENT_PAUSED = "playListContentPaused"; CONTENT_RESUMED = "playListContentResumed"; CONTENT_COMPLETE = "playListContentComplete"; } //static variables/etc. public static const PLAY_LIST_STARTED:String = "playListStarted";//slotID:1 public static const PLAY_LIST_COMPLETE:String = "playListComplete";//slotID:2 public static const AD_STARTED:String = "playListAdStarted"; //slotID:3 public static const AD_COMPLETE:String = "playListAdComplete"; //slotID:4 public static const CONTENT_STARTED:String = "playListContentStarted";//slotID:5 public static const CONTENT_PAUSED:String = "playListContentPaused";//slotID:6 public static const CONTENT_RESUMED:String = "playListContentResumed";//slotID:7 public static const CONTENT_COMPLETE:String = "playListContentComplete";//slotID:8 //constructor public function PlayListEvent(hug1:String, hug2:NetStream=null) { //MethodID:6380, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 12 super(hug1); this.netStreamValue = hug2; } //variables/etc. private var netStreamValue:NetStream; //slotID:0 public function get netStream():NetStream { //MethodID:6381, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 return netStreamValue; } override public function clone():Event { //MethodID:6382, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 18 return new PlayListEvent(this.type, this.netStreamValue); } } } //script658 package com.google.ads.instream.wrappers{ import com.google.ads.instream.api.PlayListEvent import flash.events.Event //class(instance)_index:658 public class PlayListEventWrapper extends PlayListEvent { //static constructor public static function PlayListEventWrapper$cinit() { //MethodID:6384, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function PlayListEventWrapper(hug1:Object, hug2:Object=null) { //MethodID:6385, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 24 this.remoteInstance = hug1; this.localInstance = hug2; super(hug1.type, hug1.netStream); } //variables/etc. private var localInstance:Object; //slotID:0 private var remoteInstance:Object; //slotID:0 override public function clone():Event { //MethodID:6386, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 16 return new PlayListEventWrapper(remoteInstance, localInstance); } } } //script659 package com.google.ads.instream.wrappers{ import com.google.ads.instream.api.MediaSelectionSettings import flash.display.InteractiveObject //class(instance)_index:659 public class VideoAdsManagerWrapper extends AdsManagerWrapper implements VideoAdsManager { //static constructor public static function VideoAdsManagerWrapper$cinit() { //MethodID:6388, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function VideoAdsManagerWrapper(hug1:Object, hug2:Object=null) { //MethodID:6389, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 8 super(hug1, hug2); } //variables/etc. private var localMediaSelectionSettings:MediaSelectionSettings; //slotID:0 public function get isRenderedAsOverlay():Boolean { //MethodID:6390, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.isRenderedAsOverlay; } public function get mediaSelectionSettings():MediaSelectionSettings { //MethodID:6391, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 54 if(localMediaSelectionSettings == null) localMediaSelectionSettings = new MediaSelectionSettings(); if(remoteInstance.mediaSelectionSettings != null) Wrappers.copy(remoteInstance.mediaSelectionSettings, localMediaSelectionSettings); return localMediaSelectionSettings; } public function set mediaSelectionSettings(hug1:MediaSelectionSettings):void { //MethodID:6392, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 24 localMediaSelectionSettings = hug1; remoteInstance.mediaSelectionSettings = Wrappers.localToRemote(hug1); } public function get clickTrackingElement():InteractiveObject { //MethodID:6393, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.clickTrackingElement; } public function set clickTrackingElement(hug1:InteractiveObject):void { //MethodID:6394, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 10 remoteInstance.clickTrackingElement = hug1; } public function set x(hug1:Number):void { //MethodID:6395, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 10 remoteInstance.x = hug1; } public function get x():Number { //MethodID:6396, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.x; } public function set y(hug1:Number):void { //MethodID:6397, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 10 remoteInstance.y = hug1; } public function get y():Number { //MethodID:6398, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.y; } } } //script660 package com.google.ads.instream.api{ //class(instance)_index:660 public interface AdRule { //static constructor public static function AdRule$cinit() { //MethodID:6400, LocalCount= 1 , MaxScope= 0, MaxStack= 0, CodeLength= 1 } //variables/etc. function get adBreaks():Array; //MethodID:6401, dispID:0 //constructor public function AdRule(); //MethodID:6402, dispID:0 } } //script661 package com.google.ads.instream.wrappers{ //class(instance)_index:661 public class AdRuleWrapper extends Wrapper implements AdRule { //static constructor public static function AdRuleWrapper$cinit() { //MethodID:6404, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function AdRuleWrapper(hug1:Object, hug2:Object=null) { //MethodID:6405, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 8 super(hug1, hug2); } //variables/etc. public function get adBreaks():Array { //MethodID:6406, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.adBreaks; } } } //script662 package com.google.ads.instream.api{ import flash.net.NetStream //class(instance)_index:662 public interface VideoAd implements Ad { //static constructor public static function VideoAd$cinit() { //MethodID:6408, LocalCount= 1 , MaxScope= 0, MaxStack= 0, CodeLength= 1 } //variables/etc. function get ISCI():String; //MethodID:6409, dispID:0 function get deliveryType():String; //MethodID:6410, dispID:0 function get title():String; //MethodID:6411, dispID:0 function get author():String; //MethodID:6412, dispID:0 function get mediaUrl():String; //MethodID:6413, dispID:0 function set netStream(hug1:NetStream):void; //MethodID:6414, dispID:0 //constructor public function VideoAd(); //MethodID:6415, dispID:0 } } //script663 package com.google.ads.instream.api{ //class(instance)_index:663 public interface VastVideoAd implements VideoAd { //static constructor public static function VastVideoAd$cinit() { //MethodID:6417, LocalCount= 1 , MaxScope= 0, MaxStack= 0, CodeLength= 1 } //variables/etc. function get adSystem():String; //MethodID:6418, dispID:0 function get description():String; //MethodID:6419, dispID:0 function get customClicks():Array; //MethodID:6420, dispID:0 function get companionAdXMLList():XMLList; //MethodID:6421, dispID:0 function get nonLinearAdXMLList():XMLList; //MethodID:6422, dispID:0 function get wrappers():Array; //MethodID:6423, dispID:0 //constructor public function VastVideoAd(); //MethodID:6424, dispID:0 } } //script664 package com.google.ads.instream.wrappers{ import flash.net.NetStream //class(instance)_index:664 public class VideoAdWrapper extends AdWrapper implements VideoAd { //static constructor public static function VideoAdWrapper$cinit() { //MethodID:6426, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function VideoAdWrapper(hug1:Object, hug2:Object=null) { //MethodID:6427, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 8 super(hug1, hug2); } //variables/etc. public function get ISCI():String { //MethodID:6428, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.ISCI; } public function get deliveryType():String { //MethodID:6429, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.deliveryType; } public function get title():String { //MethodID:6430, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.title; } public function get author():String { //MethodID:6431, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.author; } public function get mediaUrl():String { //MethodID:6432, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.mediaUrl; } public function set netStream(hug1:NetStream):void { //MethodID:6433, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 10 remoteInstance.netStream = hug1; } } } //script665 package com.google.ads.instream.wrappers{ //class(instance)_index:665 public class VastVideoAdWrapper extends VideoAdWrapper implements VastVideoAd { //static constructor public static function VastVideoAdWrapper$cinit() { //MethodID:6435, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function VastVideoAdWrapper(hug1:Object, hug2:Object=null) { //MethodID:6436, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 8 super(hug1, hug2); } //variables/etc. public function get adSystem():String { //MethodID:6437, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.adSystem; } public function get description():String { //MethodID:6438, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.description; } public function get customClicks():Array { //MethodID:6439, LocalCount= 1 , MaxScope= 1, MaxStack= 4, CodeLength= 25 return (Wrappers.remoteToLocal(remoteMethodResultsStore, remoteInstance.customClicks, localInstance) as Array); } public function get wrappers():Array { //MethodID:6440, LocalCount= 1 , MaxScope= 1, MaxStack= 4, CodeLength= 25 return (Wrappers.remoteToLocal(remoteMethodResultsStore, remoteInstance.wrappers, localInstance) as Array); } public function get companionAdXMLList():XMLList { //MethodID:6441, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.companionAdXMLList; } public function get nonLinearAdXMLList():XMLList { //MethodID:6442, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.nonLinearAdXMLList; } } } //script666 package com.google.ads.instream.api{ import flash.display.InteractiveObject //class(instance)_index:666 public interface PlayListManager implements IEventDispatcher { //static constructor public static function PlayListManager$cinit() { //MethodID:6444, LocalCount= 1 , MaxScope= 0, MaxStack= 0, CodeLength= 1 } //variables/etc. function get clickTrackingElement():InteractiveObject; //MethodID:6445, dispID:0 function set clickTrackingElement(hug1:InteractiveObject):void; //MethodID:6446, dispID:0 function get adSlotX():Number; //MethodID:6447, dispID:0 function set adSlotX(hug1:Number):void; //MethodID:6448, dispID:0 function get adSlotY():Number; //MethodID:6449, dispID:0 function set adSlotY(hug1:Number):void; //MethodID:6450, dispID:0 function get playList():PlayList; //MethodID:6451, dispID:0 function load(hug1:Object):void; //MethodID:6452, dispID:0 function play(hug1:Object):void; //MethodID:6453, dispID:0 //constructor public function PlayListManager(); //MethodID:6454, dispID:0 } } //script667 package com.google.ads.instream.wrappers{ import com.google.ads.instream.api.PlayList import flash.display.InteractiveObject //class(instance)_index:667 public class PlayListManagerWrapper extends EventDispatcherWrapper implements PlayListManager { //static constructor public static function PlayListManagerWrapper$cinit() { //MethodID:6456, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function PlayListManagerWrapper(hug1:Object, hug2:Object=null) { //MethodID:6457, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 8 super(hug1, hug2); } //variables/etc. public function get clickTrackingElement():InteractiveObject { //MethodID:6458, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.clickTrackingElement; } public function set clickTrackingElement(hug1:InteractiveObject):void { //MethodID:6459, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 10 remoteInstance.clickTrackingElement = hug1; } public function get adSlotX():Number { //MethodID:6460, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.adSlotX; } public function set adSlotX(hug1:Number):void { //MethodID:6461, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 10 remoteInstance.adSlotX = hug1; } public function get playList():PlayList { //MethodID:6462, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.playList; } public function get adSlotY():Number { //MethodID:6463, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.adSlotY; } public function set adSlotY(hug1:Number):void { //MethodID:6464, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 10 remoteInstance.adSlotY = hug1; } public function load(hug1:Object):void { //MethodID:6465, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 11 remoteInstance.load(hug1); } public function play(hug1:Object):void { //MethodID:6466, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 11 remoteInstance.play(hug1); } } } //script668 package com.google.ads.instream.wrappers{ import com.google.ads.instream.api.AdsLoadedEvent import com.google.ads.instream.api.AdsManager import flash.events.Event import flash.utils.Dictionary //class(instance)_index:668 public class AdsLoadedEventWrapper extends AdsLoadedEvent { //static constructor public static function AdsLoadedEventWrapper$cinit() { //MethodID:6468, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function AdsLoadedEventWrapper(hug1:Object, hug2:Object=null) { //MethodID:6469, LocalCount= 3 , MaxScope= 1, MaxStack= 5, CodeLength= 54 remoteMethodResultsStore = new Dictionary(); this.remoteInstance = hug1; this.localInstance = hug2; super((Wrappers.remoteToLocal(remoteMethodResultsStore, hug1.adsManager, localInstance) as AdsManager), hug1.userRequestContext); } //variables/etc. private var localInstance:Object = null; //slotID:0 private var remoteMethodResultsStore:Dictionary; //slotID:0 private var remoteInstance:Object = null; //slotID:0 override public function clone():Event { //MethodID:6470, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 16 return new AdsLoadedEventWrapper(remoteInstance, localInstance); } } } //script669 package com.google.ads.instream.api{ //class(instance)_index:669 public interface CustomContentAd implements Ad { //static constructor public static function CustomContentAd$cinit() { //MethodID:6472, LocalCount= 1 , MaxScope= 0, MaxStack= 0, CodeLength= 1 } //variables/etc. function get content():String; //MethodID:6473, dispID:0 //constructor public function CustomContentAd(); //MethodID:6474, dispID:0 } } //script670 package com.google.ads.instream.wrappers{ //class(instance)_index:670 public class CustomContentAdWrapper extends AdWrapper implements CustomContentAd { //static constructor public static function CustomContentAdWrapper$cinit() { //MethodID:6476, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function CustomContentAdWrapper(hug1:Object, hug2:Object=null) { //MethodID:6477, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 8 super(hug1, hug2); } //variables/etc. public function get content():String { //MethodID:6478, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 9 return remoteInstance.content; } } } //script671 package com.google.ads.instream.wrappers{ import com.google.ads.instream.api.FlashAd import com.google.ads.instream.api.FlashAdCustomEvent import flash.events.Event import flash.utils.Dictionary //class(instance)_index:671 public class FlashAdCustomEventWrapper extends FlashAdCustomEvent { //static constructor public static function FlashAdCustomEventWrapper$cinit() { //MethodID:6480, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function FlashAdCustomEventWrapper(hug1:Object, hug2:Object=null) { //MethodID:6481, LocalCount= 3 , MaxScope= 1, MaxStack= 6, CodeLength= 66 remoteMethodResultsStore = new Dictionary(); this.remoteInstance = hug1; this.localInstance = hug2; super((Wrappers.remoteToLocal(remoteMethodResultsStore, hug1.ad, localInstance) as FlashAd), {eventObject:hug1.eventContext, eventName:hug1.eventName}); } //variables/etc. private var localInstance:Object = null; //slotID:0 private var remoteMethodResultsStore:Dictionary; //slotID:0 private var remoteInstance:Object = null; //slotID:0 override public function clone():Event { //MethodID:6482, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 16 return new FlashAdCustomEventWrapper(remoteInstance, localInstance); } } } //script672 package org.osmf.net{ //class(instance)_index:672 public class DynamicStreamingItem extends Object { //static constructor public static function DynamicStreamingItem$cinit() { //MethodID:6484, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function DynamicStreamingItem(hug1:String, hug2:Number, hug3:int=-1, hug4:int=-1) { //MethodID:6485, LocalCount= 5 , MaxScope= 1, MaxStack= 2, CodeLength= 27 super(); this._stream = hug1; this._bitrate = hug2; this._width = hug3; this._height = hug4; } //variables/etc. private var _height:int; //slotID:0 private var _width:int; //slotID:0 private var _bitrate:Number; //slotID:0 private var _stream:String; //slotID:0 public function get streamName():String { //MethodID:6486, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._stream; } public function set streamName(hug1:String):void { //MethodID:6487, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this._stream = hug1; } public function get bitrate():Number { //MethodID:6488, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._bitrate; } public function set bitrate(hug1:Number):void { //MethodID:6489, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this._bitrate = hug1; } public function get width():int { //MethodID:6490, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._width; } public function set width(hug1:int):void { //MethodID:6491, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this._width = hug1; } public function get height():int { //MethodID:6492, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._height; } public function set height(hug1:int):void { //MethodID:6493, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this._height = hug1; } } } //script673 package org.osmf.net{ //class(instance)_index:673 public class PortProtocol extends Object { //static constructor public static function PortProtocol$cinit() { //MethodID:6495, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //variables/etc. private var _port:int; //slotID:0 private var _protocol:String; //slotID:0 public function get port():int { //MethodID:6496, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._port; } public function set port(hug1:int):void { //MethodID:6497, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this._port = hug1; } public function get protocol():String { //MethodID:6498, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._protocol; } public function set protocol(hug1:String):void { //MethodID:6499, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this._protocol = hug1; } //constructor public function PortProtocol() { //MethodID:6500, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 super(); } } } //script674 package org.osmf.net{ import __AS3__.vec.Vector import flash.events.AsyncErrorEvent import flash.events.EventDispatcher import flash.events.NetStatusEvent import flash.events.SecurityErrorEvent import flash.events.TimerEvent import flash.net.NetConnection import flash.utils.Timer import org.osmf.events.MediaError import org.osmf.events.MediaErrorCodes import org.osmf.events.NetConnectionFactoryEvent import org.osmf.media.URLResource import ru.rutube.managers.statistic.debug.PlayerDebug //class(instance)_index:674 public class NetNegotiator extends EventDispatcher { //static constructor public static function NetNegotiator$cinit() { //MethodID:6502, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 20 DEFAULT_TIMEOUT = 10000; CONNECTION_ATTEMPT_INTERVAL = 50; } //static variables/etc. private static const DEFAULT_TIMEOUT:Number = 10000.0; //slotID:1 private static const CONNECTION_ATTEMPT_INTERVAL:Number = 50.0; //slotID:2 //constructor public function NetNegotiator():void { //MethodID:6503, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 super(); } //variables/etc. private var timeOutTimer:Timer; //slotID:0 private var attemptIndex:int; //slotID:0 private var connectionTimer:Timer; //slotID:0 private var mediaError:MediaError; //slotID:0 private var resource:URLResource; //slotID:0 private var failedConnectionCount:int; //slotID:0 private var netConnectionURLs:Vector.; //slotID:0 private var netConnections:Vector.; //slotID:0 private var netConnectionArguments:Vector.; //slotID:0 public function createNetConnection(hug1:URLResource, hug2:Vector., hug3:Vector.):void { //MethodID:6504, LocalCount= 5 , MaxScope= 1, MaxStack= 2, CodeLength= 87 this.resource = hug1; this.netConnectionURLs = hug2; this.netConnections = hug3; var hug4:StreamingURLResource = (hug1 as StreamingURLResource); if((hug4 != null) && (hug4.connectionArguments != null) && (hug4.connectionArguments.length > 0)) this.netConnectionArguments = hug4.connectionArguments; this.initializeConnectionAttempts(); this.tryToConnect(null); } private function initializeConnectionAttempts():void { //MethodID:6505, LocalCount= 1 , MaxScope= 1, MaxStack= 4, CodeLength= 95 this.timeOutTimer = new Timer(DEFAULT_TIMEOUT, 1); this.timeOutTimer.addEventListener(TimerEvent.TIMER_COMPLETE, this.masterTimeout); this.timeOutTimer.start(); this.connectionTimer = new Timer(CONNECTION_ATTEMPT_INTERVAL); this.connectionTimer.addEventListener(TimerEvent.TIMER, this.tryToConnect); this.connectionTimer.start(); this.failedConnectionCount = 0; this.attemptIndex = 0; } private function tryToConnect(hug1:TimerEvent):void { //MethodID:6506, LocalCount= 5 , MaxScope= 9, MaxStack= 6, CodeLength= 740 internal var evt:TimerEvent; //slotID:1 internal var rs:StreamingURLResource; //slotID:2 internal var strUrl:String; //slotID:3 internal var host:String; //slotID:4 internal var args:Array; //slotID:5 internal var arg:Object; //slotID:6 strUrl = null; host = null; args = null; arg = null; evt = hug1; this.netConnections[this.attemptIndex].addEventListener(NetStatusEvent.NET_STATUS, this.onNetStatus, false, 0, true); this.netConnections[this.attemptIndex].addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.onNetSecurityError, false, 0, true); this.netConnections[this.attemptIndex].addEventListener(AsyncErrorEvent.ASYNC_ERROR, this.onAsyncError, false, 0, true); this.netConnections[this.attemptIndex].client = new NetClient(); rs = (this.resource as StreamingURLResource); if((rs != null) && (rs.rtmfpGroupspec != null) && (rs.rtmfpGroupspec.length > 0)){ strUrl = rs.url; if(strUrl.indexOf("rtmp://") > (-1)){ strUrl = strUrl.replace(":80/", ":1935/"); }else if(strUrl.indexOf("rtmpt://") > (-1)){ strUrl = strUrl.replace(":1935/", ":80/"); } NetConnection(this.netConnections[this.attemptIndex]).connect(strUrl); return; } try{ host = this.netConnectionURLs[this.attemptIndex]; strUrl = host; if(strUrl.indexOf("rtmp://") > (-1)){ strUrl = strUrl.replace(":80/", ":1935/"); }else if(strUrl.indexOf("rtmpt://") > (-1)){ strUrl = strUrl.replace(":1935/", ":80/"); } args = [strUrl]; if(this.netConnectionArguments != null){ for each(arg in this.netConnectionArguments){ args.push(arg); } } NetConnection(this.netConnections[this.attemptIndex]).connect.apply(this.netConnections[this.attemptIndex], args); this.attemptIndex++; if(this.attemptIndex >= this.netConnectionURLs.length) this.connectionTimer.stop(); } catch(ioError:IOError){ handleFailedConnectionSession(new MediaError(MediaErrorCodes.IO_ERROR, ioError.message), netConnectionURLs[attemptIndex]); } catch(argumentError:ArgumentError){ handleFailedConnectionSession(new MediaError(MediaErrorCodes.ARGUMENT_ERROR, argumentError.message), netConnectionURLs[attemptIndex]); } catch(securityError:SecurityError){ handleFailedConnectionSession(new MediaError(MediaErrorCodes.SECURITY_ERROR, securityError.message), netConnectionURLs[attemptIndex]); } } private function onNetStatus(hug1:NetStatusEvent):void { //MethodID:6508, LocalCount= 5 , MaxScope= 2, MaxStack= 7, CodeLength= 660 internal var event:NetStatusEvent; //slotID:1 internal var index:int; //slotID:2 internal var tempTimer:Timer; //slotID:3 internal var onTempTimer:Function; //slotID:4 index = 0; tempTimer = null; onTempTimer = null; event = hug1; switch(event.info.code){ case NetConnectionCodes.CONNECT_INVALIDAPP: this.handleFailedConnectionSession(new MediaError(MediaErrorCodes.NETCONNECTION_APPLICATION_INVALID, event.info.description), NetConnection(event.target).uri); break; case NetConnectionCodes.CONNECT_REJECTED: if(event.info.hasOwnProperty("ex") && (event.info.ex.code == 302)){ onTempTimer = function(hug1:TimerEvent):void{ //MethodID:6507, LocalCount= 2 , MaxScope= 0, MaxStack= 3, CodeLength= 31 tempTimer.removeEventListener(TimerEvent.TIMER, onTempTimer); tempTimer.stop(); tryToConnect(null); }; index = this.netConnections.indexOf(event.target as NetConnection); this.netConnectionURLs[index] = event.info.ex.redirect; this.attemptIndex = index; tempTimer = new Timer(100, 1); tempTimer.addEventListener(TimerEvent.TIMER, onTempTimer); tempTimer.start(); }else{ this.handleFailedConnectionSession(new MediaError(MediaErrorCodes.NETCONNECTION_REJECTED, event.info.description), NetConnection(event.target).uri); } PlayerDebug.instance.sendRTMPNetStatus(event.info.code, this.resource.url); break; case NetConnectionCodes.CONNECT_FAILED: this.failedConnectionCount++; if(this.failedConnectionCount >= this.netConnectionURLs.length) this.handleFailedConnectionSession(new MediaError(MediaErrorCodes.NETCONNECTION_FAILED), NetConnection(event.target).uri); PlayerDebug.instance.sendRTMPNetStatus(event.info.code, this.resource.url); break; case NetConnectionCodes.CONNECT_SUCCESS: PlayerDebug.instance.sendRTMPNetStatus(event.info.code, this.resource.url); this.shutDownUnsuccessfulConnections(); dispatchEvent(new NetConnectionFactoryEvent(NetConnectionFactoryEvent.CREATION_COMPLETE, false, false, (event.currentTarget as NetConnection), this.resource)); break; case "NetStream.Publish.Start": break; case "NetConnection.Connect.Closed": this.shutDownUnsuccessfulConnections(); break; default: break; } } private function shutDownUnsuccessfulConnections():void { //MethodID:6509, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 140 var hug2:NetConnection = null; this.timeOutTimer.stop(); this.connectionTimer.stop(); var hug1:int = 0; while(hug1 < this.netConnections.length){ hug2 = this.netConnections[hug1]; if(!hug2.connected){ PlayerDebug.instance.sendRTMPNetStatus("DISCONNECT", hug2.uri); hug2.removeEventListener(NetStatusEvent.NET_STATUS, this.onNetStatus); hug2.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, this.onNetSecurityError); hug2.removeEventListener(AsyncErrorEvent.ASYNC_ERROR, this.onAsyncError); hug2.close(); delete this.netConnections[hug1]; } hug1++; } } private function handleFailedConnectionSession(hug1:MediaError, hug2:String):void { //MethodID:6510, LocalCount= 3 , MaxScope= 1, MaxStack= 8, CodeLength= 36 this.shutDownUnsuccessfulConnections(); dispatchEvent(new NetConnectionFactoryEvent(NetConnectionFactoryEvent.CREATION_ERROR, false, false, null, this.resource, hug1)); } private function onNetSecurityError(hug1:SecurityErrorEvent):void { //MethodID:6511, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 39 this.handleFailedConnectionSession(new MediaError(MediaErrorCodes.SECURITY_ERROR, hug1.text), NetConnection(hug1.target).uri); } private function onAsyncError(hug1:AsyncErrorEvent):void { //MethodID:6512, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 39 this.handleFailedConnectionSession(new MediaError(MediaErrorCodes.ASYNC_ERROR, hug1.text), NetConnection(hug1.target).uri); } private function masterTimeout(hug1:TimerEvent):void { //MethodID:6513, LocalCount= 2 , MaxScope= 1, MaxStack= 5, CodeLength= 29 this.handleFailedConnectionSession(new MediaError(MediaErrorCodes.NETCONNECTION_TIMEOUT, ("" + DEFAULT_TIMEOUT)), ""); } } } //script675 package org.osmf.events{ import flash.events.Event import org.osmf.metadata.TimelineMarker //class(instance)_index:675 public class TimelineMetadataEvent extends MetadataEvent { //static constructor public static function TimelineMetadataEvent$cinit() { //MethodID:6515, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 39 MARKER_TIME_REACHED = "markerTimeReached"; MARKER_DURATION_REACHED = "markerDurationReached"; MARKER_ADD = "markerAdd"; MARKER_REMOVE = "markerRemove"; } //static variables/etc. public static const MARKER_TIME_REACHED:String = "markerTimeReached";//slotID:1 public static const MARKER_DURATION_REACHED:String = "markerDurationReached";//slotID:2 public static const MARKER_ADD:String = "markerAdd"; //slotID:3 public static const MARKER_REMOVE:String = "markerRemove"; //slotID:4 //constructor public function TimelineMetadataEvent(hug1:String, hug2:Boolean=false, hug3:Boolean=false, hug4:TimelineMarker=null) { //MethodID:6516, LocalCount= 5 , MaxScope= 1, MaxStack= 6, CodeLength= 25 super(hug1, hug2, hug3, ("" + hug4.time), hug4); this._marker = hug4; } //variables/etc. private var _marker:TimelineMarker; //slotID:0 public function get marker():TimelineMarker { //MethodID:6517, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._marker; } override public function clone():Event { //MethodID:6518, LocalCount= 1 , MaxScope= 1, MaxStack= 5, CodeLength= 23 return new TimelineMetadataEvent(type, bubbles, cancelable, this._marker); } } } //script676 package org.osmf.net.dvr{ //class(instance)_index:676 public class DVRCastConstants extends Object { //static constructor public static function DVRCastConstants$cinit() { //MethodID:6520, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 92 RPC_GET_STREAM_INFO = "DVRGetStreamInfo"; RPC_SUBSCRIBE = "DVRSubscribe"; RPC_UNSUBSCRIBE = "DVRUnsubscribe"; RESULT_GET_STREAM_INFO_SUCCESS = "NetStream.DVRStreamInfo.Success"; RESULT_GET_STREAM_INFO_RETRY = "NetStream.DVRStreamInfo.Retry"; STREAM_INFO_KEY = "http://www.osmf.org/dvrCast/1.0/streamInfo"; RECORDING_INFO_KEY = "http://www.osmf.org/dvrCast/1.0/recordingInfo"; STREAM_INFO_UPDATE_DELAY = 3000; LOCAL_DURATION_UPDATE_INTERVAL = 500; LIVE_POSITION_SEEK_DELAY = 1.5; } //static variables/etc. public static const RPC_GET_STREAM_INFO:String = "DVRGetStreamInfo";//slotID:1 public static const RPC_SUBSCRIBE:String = "DVRSubscribe"; //slotID:2 public static const RPC_UNSUBSCRIBE:String = "DVRUnsubscribe"; //slotID:3 public static const RESULT_GET_STREAM_INFO_SUCCESS:String = "NetStream.DVRStreamInfo.Success";//slotID:4 public static const RESULT_GET_STREAM_INFO_RETRY:String = "NetStream.DVRStreamInfo.Retry";//slotID:5 public static const STREAM_INFO_KEY:String = "http://www.osmf.org/dvrCast/1.0/streamInfo";//slotID:6 public static const RECORDING_INFO_KEY:String = "http://www.osmf.org/dvrCast/1.0/recordingInfo";//slotID:7 public static const STREAM_INFO_UPDATE_DELAY:Number = 3000.0; //slotID:8 public static const LOCAL_DURATION_UPDATE_INTERVAL:Number = 500.0;//slotID:9 public static const LIVE_POSITION_SEEK_DELAY:Number = 1.5; //slotID:10 //constructor public function DVRCastConstants() { //MethodID:6521, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 super(); } } } //script677 package org.osmf.net.dvr{ //class(instance)_index:677 public class DVRCastRecordingInfo extends Object { //static constructor public static function DVRCastRecordingInfo$cinit() { //MethodID:6523, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function DVRCastRecordingInfo() { //MethodID:6524, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 super(); } //variables/etc. public var startOffset:Number; //slotID:0 public var startDuration:Number; //slotID:0 public var startTime:Date = null; //slotID:0 } } //script678 package org.osmf.net.dvr{ import flash.errors.IllegalOperationError import org.osmf.utils.OSMFStrings //class(instance)_index:678 public class DVRCastStreamInfo extends Object { //static constructor public static function DVRCastStreamInfo$cinit() { //MethodID:6526, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function DVRCastStreamInfo(hug1:Object):void { //MethodID:6527, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 12 super(); this.readFromDynamicObject(hug1); } //variables/etc. public var callTime:Date; //slotID:0 public var endOffset:Number; //slotID:0 public var lastUpdate:Date; //slotID:0 public var offline:Boolean; //slotID:0 public var isRecording:Boolean; //slotID:0 public var recordingEnd:Date; //slotID:0 public var streamName:String; //slotID:0 public var recordingStart:Date; //slotID:0 public var beginOffset:Number; //slotID:0 public var maxLength:Number; //slotID:0 public var currentLength:Number; //slotID:0 public function readFromDynamicObject(hug1:Object):void { //MethodID:6528, LocalCount= 4 , MaxScope= 5, MaxStack= 3, CodeLength= 174 internal var value:Object; //slotID:1 value = hug1; try{ this.callTime = value.callTime; this.offline = value.offline; this.beginOffset = value.begOffset; this.endOffset = value.endOffset; this.recordingStart = value.startRec; this.recordingEnd = value.stopRec; this.isRecording = value.isRec; this.streamName = value.streamName; this.lastUpdate = value.lastUpdate; this.currentLength = value.currLen; this.maxLength = value.maxLen; } catch(e:Error){ throw new IllegalOperationError(OSMFStrings.getString(OSMFStrings.INVALID_PARAM)); } } public function readFromDVRCastStreamInfo(hug1:DVRCastStreamInfo):void { //MethodID:6529, LocalCount= 4 , MaxScope= 5, MaxStack= 3, CodeLength= 174 internal var value:DVRCastStreamInfo; //slotID:1 value = hug1; try{ this.callTime = value.callTime; this.offline = value.offline; this.beginOffset = value.beginOffset; this.endOffset = value.endOffset; this.recordingStart = value.recordingStart; this.recordingEnd = value.recordingEnd; this.isRecording = value.isRecording; this.streamName = value.streamName; this.lastUpdate = value.lastUpdate; this.currentLength = value.currentLength; this.maxLength = value.maxLength; } catch(e:Error){ throw new IllegalOperationError(OSMFStrings.getString(OSMFStrings.INVALID_PARAM)); } } public function toString():String { //MethodID:6530, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 101 return ("callTime: " + this.callTime + "\noffline: " + this.offline + "\nbeginOffset: " + this.beginOffset + "\nendOffset: " + this.endOffset + "\nrecordingStart: " + this.recordingStart + "\nrecordingEnd: " + this.recordingEnd + "\nisRecording: " + this.isRecording + "\nstreamName: " + this.streamName + "\nlastUpdate: " + this.lastUpdate + "\ncurrentLength: " + this.currentLength + "\nmaxLength: " + this.maxLength); } } } //script679 package org.osmf.net.dvr{ import flash.net.Responder //class(instance)_index:679 public class TestableResponder extends Responder { //static constructor public static function TestableResponder$cinit() { //MethodID:6532, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function TestableResponder(hug1:Function, hug2:Function=null) { //MethodID:6533, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 18 this._result = hug1; this._status = hug2; super(hug1, hug2); } //variables/etc. private var _status:Function; //slotID:0 private var _result:Function; //slotID:0 internal function get result():Function { //MethodID:6534, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._result; } internal function get status():Function { //MethodID:6535, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._status; } } } //script680 package org.osmf.net.dvr{ //class(instance)_index:680 public class DVRUtils extends Object { //static constructor public static function DVRUtils$cinit() { //MethodID:6537, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //static variables/etc. public static function calculateOffset(hug1:Number, hug2:Number, hug3:Number):Number { //dispID:3, MethodID:6538, LocalCount= 5 , MaxScope= 1, MaxStack= 3, CodeLength= 68 var hug4:Number = 0; if(hug2 != 0){ if(hug3 > hug2){ hug4 = (hug3 - hug2); }else{ hug4 = Math.min(hug1, hug3); } }else if(hug1 != 0){ hug4 = Math.min(hug1, hug3); } return hug4; } //constructor public function DVRUtils() { //MethodID:6539, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 super(); } } } //script681 package org.osmf.net.dvr{ import flash.errors.IllegalOperationError import flash.events.Event import flash.events.EventDispatcher import flash.events.TimerEvent import flash.net.NetConnection import flash.net.Responder import flash.utils.Timer import org.osmf.utils.OSMFStrings //class(instance)_index:681 public class DVRCastStreamInfoRetriever extends EventDispatcher { //static constructor public static function DVRCastStreamInfoRetriever$cinit() { //MethodID:6541, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function DVRCastStreamInfoRetriever(hug1:NetConnection, hug2:String) { //MethodID:6542, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 53 super(); if((hug1 == null) || (hug2 == null)) throw new IllegalOperationError(OSMFStrings.getString(OSMFStrings.NULL_PARAM)); this.connection = hug1; this.streamName = hug2; } //variables/etc. private var timer:Timer; //slotID:0 private var retries:Number; //slotID:0 private var _error:Object; //slotID:0 private var streamName:String; //slotID:0 private var _streamInfo:DVRCastStreamInfo; //slotID:0 private var connection:NetConnection; //slotID:0 public function get streamInfo():DVRCastStreamInfo { //MethodID:6543, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._streamInfo; } public function get error():Object { //MethodID:6544, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._error; } public function retrieve(hug1:int=5, hug2:Number=3.0):void { //MethodID:6545, LocalCount= 4 , MaxScope= 1, MaxStack= 6, CodeLength= 106 if(!isNaN(this.retries)){ }else{ hug1 = (hug1 || 1); this._streamInfo = null; this._error = this._error = {message:OSMFStrings.getString(OSMFStrings.DVR_MAXIMUM_RPC_ATTEMPTS).replace("%i", hug1)}; this.retries = hug1; this.timer = new Timer((hug2 * 1000), 1); this.getStreamInfo(); } } private function getStreamInfo():void { //MethodID:6546, LocalCount= 4 , MaxScope= 1, MaxStack= 4, CodeLength= 58 var hug1:Responder = new TestableResponder(this.onGetStreamInfoResult, this.onServerCallError); this.retries--; this.connection.call(DVRCastConstants.RPC_GET_STREAM_INFO, hug1, this.streamName); } private function onGetStreamInfoResult(hug1:Object):void { //MethodID:6547, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 158 if(hug1 && (hug1.code == DVRCastConstants.RESULT_GET_STREAM_INFO_SUCCESS)){ this._error = null; this._streamInfo = new DVRCastStreamInfo(hug1.data); this.complete(); }else if(hug1 && (hug1.code == DVRCastConstants.RESULT_GET_STREAM_INFO_RETRY)){ if(this.retries != 0){ this.timer.addEventListener(TimerEvent.TIMER_COMPLETE, this.onTimerComplete); this.timer.start(); }else{ this.complete(); } }else{ this._error = {message:(OSMFStrings.getString(OSMFStrings.DVR_UNEXPECTED_SERVER_RESPONSE) + hug1.code)}; this.complete(); } } private function onServerCallError(hug1:Object):void { //MethodID:6548, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 13 this._error = hug1; this.complete(); } private function onTimerComplete(hug1:TimerEvent):void { //MethodID:6549, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 25 this.timer.removeEventListener(TimerEvent.TIMER_COMPLETE, this.onTimerComplete); this.getStreamInfo(); } private function complete():void { //MethodID:6550, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 32 this.retries = NaN; this.timer = null; dispatchEvent(new Event(Event.COMPLETE)); } } } //script682 package org.osmf.elements.f4mClasses{ import flash.utils.ByteArray //class(instance)_index:682 public class BootstrapInfo extends Object { //static constructor public static function BootstrapInfo$cinit() { //MethodID:6552, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function BootstrapInfo() { //MethodID:6553, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 super(); } //variables/etc. public var profile:String; //slotID:0 public var data:ByteArray; //slotID:0 public var id:String; //slotID:0 public var url:String; //slotID:0 } } //script683 package org.osmf.net.httpstreaming.dvr{ //class(instance)_index:683 public class DVRInfo extends Object { //static constructor public static function DVRInfo$cinit() { //MethodID:6555, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function DVRInfo() { //MethodID:6556, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 super(); } //variables/etc. public var offline:Boolean; //slotID:0 public var isRecording:Boolean; //slotID:0 public var beginOffset:uint = 0; //slotID:0 public var curLength:Number; //slotID:0 public var url:String; //slotID:0 public var startTime:Number = Number.NaN; //slotID:0 public var endOffset:uint = 0; //slotID:0 public var id:String; //slotID:0 } } //script684 package org.osmf.elements.f4mClasses{ import flash.utils.ByteArray //class(instance)_index:684 public class Media extends Object { //static constructor public static function Media$cinit() { //MethodID:6558, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function Media() { //MethodID:6559, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 17 this.drmAdditionalHeader = new DRMAdditionalHeader(); super(); } //variables/etc. public var rtmfpStreamName:String; //slotID:0 public var metadata:Object; //slotID:0 public var moov:ByteArray; //slotID:0 public var bitrate:Number; //slotID:0 public var height:Number; //slotID:0 public var url:String; //slotID:0 public var drmAdditionalHeader:DRMAdditionalHeader; //slotID:0 public var rtmfpGroupspec:String; //slotID:0 public var width:Number; //slotID:0 public var xmp:ByteArray; //slotID:0 public var bootstrapInfo:BootstrapInfo; //slotID:0 } } //script685 package org.osmf.elements.f4mClasses{ import flash.utils.ByteArray //class(instance)_index:685 public class Base64Decoder extends Object { //static constructor public static function Base64Decoder$cinit() { //MethodID:6561, LocalCount= 1 , MaxScope= 1, MaxStack= 257, CodeLength= 406 ESCAPE_CHAR_CODE = 61; inverse = [64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 62, 64, 64, 64, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 64, 64, 64, 64, 64, 64, 64, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 64, 64, 64, 64, 64, 64, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64]; } //static variables/etc. private static const ESCAPE_CHAR_CODE:Number = 61.0; //slotID:1 private static const inverse:Array; //slotID:2 private static function copyByteArray(hug1:ByteArray, hug2:ByteArray, hug3:uint=0):void { //dispID:3, MethodID:6562, LocalCount= 6 , MaxScope= 1, MaxStack= 2, CodeLength= 81 var hug4:int = hug1.position; hug1.position = 0; hug2.position = 0; var hug5:uint = 0; while((hug1.bytesAvailable > 0) && (hug5 < hug3)){ hug2.writeByte(hug1.readByte()); hug5++; } hug1.position = hug4; hug2.position = 0; } //constructor public function Base64Decoder() { //MethodID:6563, LocalCount= 1 , MaxScope= 1, MaxStack= 5, CodeLength= 29 this.work = [0, 0, 0, 0]; super(); this.data = new ByteArray(); } //variables/etc. private var work:Array; //slotID:0 private var filled:int = 0; //slotID:0 private var data:ByteArray; //slotID:0 private var count:int = 0; //slotID:0 public function decode(hug1:String):void { //MethodID:6564, LocalCount= 7 , MaxScope= 1, MaxStack= 4, CodeLength= 366 var hug3:Number = NaN; var hug2:uint = 0; while(hug2 < hug1.length){ hug3 = hug1.charCodeAt(hug2); if(hug3 == ESCAPE_CHAR_CODE){ this.count = this.count; this.work[this.count++] = -1; }else if(inverse[hug3] != 64){ this.count = this.count; this.work[this.count++] = inverse[hug3]; }else{ hug2++; continue; } if(this.count == 4){ this.count = 0; this.data.writeByte((this.work[0] << 2) | ((this.work[1] & 255) >> 4)); this.filled++; if(this.work[2] == (-1)) break; this.data.writeByte((this.work[1] << 4) | ((this.work[2] & 255) >> 2)); this.filled++; if(this.work[3] == (-1)) break; this.data.writeByte((this.work[2] << 6) | this.work[3]); this.filled++; } hug2++; } } public function drain():ByteArray { //MethodID:6565, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 37 var hug1:ByteArray = new ByteArray(); copyByteArray(this.data, hug1, this.filled); this.filled = 0; return hug1; } } } //script686 package org.osmf.elements.f4mClasses{ //class(instance)_index:686 public class DateUtil extends Object { //static constructor public static function DateUtil$cinit() { //MethodID:6567, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //static variables/etc. public static function parseW3CDTF(hug1:String):Date { //dispID:3, MethodID:6568, LocalCount= 4 , MaxScope= 5, MaxStack= 9, CodeLength= 1009 internal var str:String; //slotID:1 internal var finalDate:Date; //slotID:2 internal var dateStr:String; //slotID:3 internal var timeStr:String; //slotID:4 internal var dateArr:Array; //slotID:5 internal var year:Number; //slotID:6 internal var month:Number; //slotID:7 internal var date:Number; //slotID:8 internal var multiplier:Number; //slotID:9 internal var offsetHours:Number; //slotID:10 internal var offsetMinutes:Number; //slotID:11 internal var offsetStr:String; //slotID:12 internal var timeArr:Array; //slotID:13 internal var hour:Number; //slotID:14 internal var minutes:Number; //slotID:15 internal var secondsArr:Array; //slotID:16 internal var seconds:Number; //slotID:17 internal var milliseconds:Number; //slotID:18 internal var utc:Number; //slotID:19 internal var offset:Number; //slotID:20 internal var eStr:String; //slotID:21 finalDate = null; dateStr = null; timeStr = null; dateArr = null; year = NaN; month = NaN; date = NaN; multiplier = NaN; offsetHours = NaN; offsetMinutes = NaN; offsetStr = null; timeArr = null; hour = NaN; minutes = NaN; secondsArr = null; seconds = NaN; milliseconds = NaN; utc = NaN; offset = NaN; eStr = null; str = hug1; try{ dateStr = str.substring(0, str.indexOf("T")); timeStr = str.substring((str.indexOf("T") + 1), str.length); dateArr = dateStr.split("-"); year = Number(dateArr.shift()); month = Number(dateArr.shift()); date = Number(dateArr.shift()); if(timeStr.indexOf("Z") != (-1)){ multiplier = 1; offsetHours = 0; offsetMinutes = 0; timeStr = timeStr.replace("Z", ""); }else if(timeStr.indexOf("+") != (-1)){ multiplier = 1; offsetStr = timeStr.substring((timeStr.indexOf("+") + 1), timeStr.length); offsetHours = Number(offsetStr.substring(0, offsetStr.indexOf(":"))); offsetMinutes = Number(offsetStr.substring((offsetStr.indexOf(":") + 1), offsetStr.length)); timeStr = timeStr.substring(0, timeStr.indexOf("+")); }else{ multiplier = -1; offsetStr = timeStr.substring((timeStr.indexOf("-") + 1), timeStr.length); offsetHours = Number(offsetStr.substring(0, offsetStr.indexOf(":"))); offsetMinutes = Number(offsetStr.substring((offsetStr.indexOf(":") + 1), offsetStr.length)); timeStr = timeStr.substring(0, timeStr.indexOf("-")); } timeArr = timeStr.split(":"); hour = Number(timeArr.shift()); minutes = Number(timeArr.shift()); secondsArr = ((timeArr.length > 0) ? String(timeArr.shift()).split(".") : null); seconds = (((secondsArr != null) && (secondsArr.length > 0)) ? Number(secondsArr.shift()) : 0); milliseconds = (((secondsArr != null) && (secondsArr.length > 0)) ? Number(secondsArr.shift()) : 0); utc = Date.UTC(year, (month - 1), date, hour, minutes, seconds, milliseconds); offset = (((offsetHours * 0x36EE80) + (offsetMinutes * 0xEA60)) * multiplier); finalDate = new Date(utc - offset); if(finalDate.toString() == "Invalid Date") throw new Error("This date does not conform to W3CDTF."); } catch(e:Error){ eStr = ("Unable to parse the string [" + str + "] into a date. "); eStr += ("The internal error was: " + e.toString()); throw new Error(eStr); } return finalDate; } //constructor public function DateUtil() { //MethodID:6569, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 super(); } } } //script687 package org.osmf.net.httpstreaming.f4f{ import flash.utils.ByteArray import org.osmf.elements.f4mClasses.BootstrapInfo //class(instance)_index:687 public class HTTPStreamingF4FStreamInfo extends Object { //static constructor public static function HTTPStreamingF4FStreamInfo$cinit() { //MethodID:6571, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function HTTPStreamingF4FStreamInfo(hug1:BootstrapInfo, hug2:String, hug3:Number, hug4:ByteArray, hug5:Object, hug6:ByteArray) { //MethodID:6572, LocalCount= 7 , MaxScope= 1, MaxStack= 2, CodeLength= 39 super(); this._streamName = hug2; this._bitrate = hug3; this._additionalHeader = hug4; this._bootstrap = hug1; this._streamMetadata = hug5; this._xmpMetadata = hug6; } //variables/etc. private var _streamName:String; //slotID:0 private var _bitrate:Number; //slotID:0 private var _bootstrap:BootstrapInfo; //slotID:0 private var _xmpMetadata:ByteArray; //slotID:0 private var _streamMetadata:Object; //slotID:0 private var _additionalHeader:ByteArray; //slotID:0 public function get streamName():String { //MethodID:6573, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._streamName; } public function get bitrate():Number { //MethodID:6574, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._bitrate; } public function get additionalHeader():ByteArray { //MethodID:6575, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._additionalHeader; } public function get bootstrapInfo():BootstrapInfo { //MethodID:6576, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._bootstrap; } public function get streamMetadata():Object { //MethodID:6577, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._streamMetadata; } public function get xmpMetadata():ByteArray { //MethodID:6578, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._xmpMetadata; } } } //script688 package org.osmf.net.httpstreaming{ //class(instance)_index:688 public class HTTPStreamingIndexInfoBase extends Object { //static constructor public static function HTTPStreamingIndexInfoBase$cinit() { //MethodID:6580, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function HTTPStreamingIndexInfoBase() { //MethodID:6581, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 super(); } } } //script689 package org.osmf.net.httpstreaming.f4f{ import __AS3__.vec.Vector import org.osmf.net.httpstreaming.HTTPStreamingIndexInfoBase import org.osmf.net.httpstreaming.dvr.DVRInfo //class(instance)_index:689 public class HTTPStreamingF4FIndexInfo extends HTTPStreamingIndexInfoBase { //static constructor public static function HTTPStreamingF4FIndexInfo$cinit() { //MethodID:6583, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function HTTPStreamingF4FIndexInfo(hug1:String=null, hug2:Vector.=null, hug3:DVRInfo=null) { //MethodID:6584, LocalCount= 4 , MaxScope= 1, MaxStack= 2, CodeLength= 21 super(); this._serverBaseURL = hug1; this._streamInfos = hug2; this._dvrInfo = hug3; } //variables/etc. private var _streamInfos:Vector.; //slotID:0 private var _serverBaseURL:String; //slotID:0 private var _dvrInfo:DVRInfo; //slotID:0 public function get serverBaseURL():String { //MethodID:6585, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._serverBaseURL; } public function get streamInfos():Vector. { //MethodID:6586, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._streamInfos; } public function get dvrInfo():DVRInfo { //MethodID:6587, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._dvrInfo; } } } //script690 package Data{ //class(instance)_index:690 public class SourceData extends Object { //static constructor public static function SourceData$cinit() { //MethodID:6589, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 43 UINT = 0; INT = 1; NUMBER = 2; STRING = 3; BOOLEAN = 4; } //static variables/etc. public static const UINT:uint = 0; //slotID:1 public static const INT:uint = 1; //slotID:2 public static const NUMBER:uint = 2; //slotID:3 public static const STRING:uint = 3; //slotID:4 public static const BOOLEAN:uint = 4; //slotID:5 public static function value(hug1:*, hug2:String, hug3:uint=3, hug4:*=null, hug5:*=null):* { //dispID:3, MethodID:6590, LocalCount= 8 , MaxScope= 1, MaxStack= 3, CodeLength= 667 var hug6:* = undefined; if(hug4 == null){ var hug7:uint = hug3; switch(hug7){ case UINT: case INT: case NUMBER: hug4 = 0; break; case STRING: hug4 = ""; break; case BOOLEAN: hug4 = false; default: break; } } if(!hug1 || !hug1.hasOwnProperty(hug2)) return hug4; if(hug1 is XML){ hug6 = String(hug1.child(hug2)[0].text()[0]); }else{ hug6 = hug1[hug2]; } hug7 = hug3; switch(hug7){ case UINT: case INT: case NUMBER: hug6 = Number(hug6); if(isNaN(hug6) || ((hug3 == UINT) && (hug6 < 0))) hug6 = hug4; if(hug3 == UINT){ hug6 = uint(hug6); }else if(hug3 == INT){ hug6 = int(hug6); } if(hug5 != null){ if(hug5 is Array){ if(hug5.indexOf(hug6) == (-1)) hug6 = hug4; }else if((hug5.hasOwnProperty("min") && (hug6 < hug5.min)) || (hug5.hasOwnProperty("max") && (hug6 > hug5.max))){ hug6 = hug4; } } break; case STRING: hug6 = (((hug5 != null) && (hug5 is Array) && (hug5.indexOf(hug6) == (-1))) ? hug4 : String(hug6)); break; case BOOLEAN: hug6 = Boolean(Number(hug6) != 0); default: break; } return hug6; } public static function validParamObject(hug1:*):Object { //dispID:4, MethodID:6591, LocalCount= 3 , MaxScope= 1, MaxStack= 6, CodeLength= 99 var hug2:Object = {type:String, defaultValue:null, range:null}; if(!(hug1 is Number)){ if(hug1.hasOwnProperty("type")) hug2.type = hug1.type; if(hug1.hasOwnProperty("defaultValue")) hug2.defaultValue = hug1.defaultValue; if(hug1.hasOwnProperty("range")) hug2.range = hug1.range; }else{ hug2.type = hug1; } return hug2; } public static function parameters(hug1:XML, hug2:Object, hug3:Object=null):Object { //dispID:5, MethodID:6592, LocalCount= 8 , MaxScope= 1, MaxStack= 8, CodeLength= 107 var hug4:Object = null; var hug5:String = null; if(hug3 == null) hug3 = new Object(); for(hug5 in hug2){ hug4 = validParamObject(hug2[hug5]); hug3[hug5] = value(hug1, hug5, hug4.type, hug4.defaultValue, hug4.range); } return hug3; } //constructor public function SourceData() { //MethodID:6593, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 super(); } } } //script691 package com.eyewonder.instream.events{ import flash.events.Event //class(instance)_index:691 public dynamic class UIFEvent extends Event { //static constructor public static function UIFEvent$cinit() { //MethodID:6595, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 48 CONTROL_EVENT = "controlEvent"; TRACK_EVENT = "trackingEvent"; VAST_EVENT = "vastEvent"; test = "TEST"; ERROR_EVENT = "sOnError"; } //static variables/etc. public static const CONTROL_EVENT:String = "controlEvent"; //slotID:1 public static const TRACK_EVENT:String = "trackingEvent"; //slotID:2 public static const VAST_EVENT:String = "vastEvent"; //slotID:3 public static const test:* = "TEST"; //slotID:4 public static const ERROR_EVENT:String = "sOnError"; //slotID:5 //constructor public function UIFEvent(hug1:String, hug2:Object=null) { //MethodID:6596, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 21 this.info = new Object(); super(hug1); this.info = hug2; } //variables/etc. public var info:Object; //slotID:0 override public function toString():String { //MethodID:6597, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 43 var hug1:String = super.toString(); hug1 = hug1.slice(0, (hug1.length - 1)); return ((hug1 + " UIFEvent=") + String(this.info) + "]"); } } } //script692 package com.eyewonder.instream.events{ //class(instance)_index:692 public class UIFControlEvent extends UIFEvent { //static constructor public static function UIFControlEvent$cinit() { //MethodID:6599, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 210 ON_AD_LOAD_COMPLETE = "sOnAdLoadComplete"; ON_START_PLAY_AD = "sOnStartPlayAd"; ON_START_REQUEST_AD = "sOnStartRequestAd"; ON_START_LINEAR = "sOnStartLinear"; ON_START_LINEAR_INTERACTIVE = "sOnStartLinearInteractive"; ON_START_OVERLAY = "sOnStartOverlay"; ON_END_AD = "sOnEndAd"; ON_REMINDER_OVERRIDE = "sOnReminderOverride"; ON_REMINDER_DETECTED = "sOnReminderDetected"; ON_RESIZE_NOTIFY = "sOnResizeNotify"; AD_VID_PLAY = "adVidPlay"; AD_VID_PAUSE = "adVidPause"; AD_VID_SEEK = "adVidSeek"; AD_REMAINING_TIME = "remainingTime"; AD_INFORMATION_DATA = "adInformationData"; AD_VOLUME_CHANGED = "audioVolumeChanged"; CONTENT_VID_PLAY = "contentVidPlay"; CONTENT_VID_PAUSE = "contentVidPause"; CONTENT_VID_STOP = "contentVidStop"; HIDE_CONTROLS = "hideControls"; SHOW_CONTROLS = "showControls"; ON_START_FIXEDROLL = "sOnStartFixedroll"; RESIZE_NOTIFY = "resizeNotify"; } //static variables/etc. public static const ON_AD_LOAD_COMPLETE:String = "sOnAdLoadComplete";//slotID:1 public static const ON_START_PLAY_AD:String = "sOnStartPlayAd"; //slotID:2 public static const ON_START_REQUEST_AD:String = "sOnStartRequestAd";//slotID:3 public static const ON_START_LINEAR:String = "sOnStartLinear"; //slotID:4 public static const ON_START_LINEAR_INTERACTIVE:String = "sOnStartLinearInteractive";//slotID:5 public static const ON_START_OVERLAY:String = "sOnStartOverlay";//slotID:6 public static const ON_END_AD:String = "sOnEndAd"; //slotID:7 public static const ON_REMINDER_OVERRIDE:String = "sOnReminderOverride";//slotID:8 public static const ON_REMINDER_DETECTED:String = "sOnReminderDetected";//slotID:9 public static const ON_RESIZE_NOTIFY:String = "sOnResizeNotify";//slotID:10 public static const AD_VID_PLAY:String = "adVidPlay"; //slotID:11 public static const AD_VID_PAUSE:String = "adVidPause"; //slotID:12 public static const AD_VID_SEEK:String = "adVidSeek"; //slotID:13 public static const AD_REMAINING_TIME:String = "remainingTime"; //slotID:14 public static const AD_INFORMATION_DATA:String = "adInformationData";//slotID:15 public static const AD_VOLUME_CHANGED:String = "audioVolumeChanged";//slotID:16 public static const CONTENT_VID_PLAY:String = "contentVidPlay"; //slotID:17 public static const CONTENT_VID_PAUSE:String = "contentVidPause";//slotID:18 public static const CONTENT_VID_STOP:String = "contentVidStop"; //slotID:19 public static const HIDE_CONTROLS:String = "hideControls"; //slotID:20 public static const SHOW_CONTROLS:String = "showControls"; //slotID:21 public static const ON_START_FIXEDROLL:String = "sOnStartFixedroll";//slotID:22 public static const RESIZE_NOTIFY:String = "resizeNotify"; //slotID:23 //constructor public function UIFControlEvent(hug1:String, hug2:Object) { //MethodID:6600, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 8 super(hug1, hug2); } } } //script693 package com.eyewonder.instream.events{ import flash.events.EventDispatcher import flash.events.IEventDispatcher //class(instance)_index:693 public class UIFEventDispatcher extends EventDispatcher { //static constructor public static function UIFEventDispatcher$cinit() { //MethodID:6602, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function UIFEventDispatcher(hug1:IEventDispatcher=null) { //MethodID:6603, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 16 this.eventListeners = new Array(); super(hug1); } //variables/etc. private var eventListeners:Array; //slotID:0 override public function addEventListener(hug1:String, hug2:Function, hug3:Boolean=false, hug4:int=0, hug5:Boolean=false):void { //MethodID:6604, LocalCount= 7 , MaxScope= 1, MaxStack= 6, CodeLength= 87 var hug6:Object = null; if((hug1 != UIFEvent.CONTROL_EVENT) && (hug1 != UIFEvent.TRACK_EVENT) && (hug1 != UIFEvent.ERROR_EVENT)){ hug6 = {type:hug1, listener:hug2}; this.eventListeners.push(hug6); } super.addEventListener(hug1, hug2, hug3, hug4, hug5); } public function listenerCleanup():void { //MethodID:6605, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 49 var hug1:Object = null; while(this.eventListeners.length > 0){ hug1 = this.eventListeners.pop(); super.removeEventListener(hug1.type, hug1.listener); } } } } //script694 package com.eyewonder.instream.base{ import com.eyewonder.instream.UIFConfig import com.eyewonder.instream.cartridge.base.PublisherCartridgeBase import com.eyewonder.instream.debugger.UIFDebugMessage import com.eyewonder.instream.events.UIFControlEvent import com.eyewonder.instream.events.UIFEvent import com.eyewonder.instream.events.UIFEventDispatcher import com.eyewonder.instream.events.UIFTrackEvent import com.eyewonder.instream.modules.AdCountdown import com.eyewonder.instream.modules.InstreamFrameworkUtility import com.eyewonder.instream.modules.videoAdModule.VAST.VASTVideoAdModule import com.eyewonder.instream.modules.videoAdModule.VAST.utility.AdTagService import com.eyewonder.instream.modules.videoAdModule.VAST.utility.CacheBuster import com.eyewonder.instream.modules.videoAdScreenModule.ewVideoAdScreen.EWVideoAdScreenModule import com.eyewonder.instream.parser.EWParser import com.eyewonder.instream.parser.VASTParser import com.eyewonder.instream.parser.events.ParserErrorEvent import com.eyewonder.instream.parser.events.ParserEvent import com.eyewonder.instream.parser.ew.ReminderList import com.eyewonder.instream.parser.ew.ReminderUnit import flash.display.MovieClip import flash.events.Event import flash.events.FullScreenEvent import flash.events.IOErrorEvent import flash.events.SecurityErrorEvent import flash.events.StatusEvent import flash.geom.Rectangle import flash.net.LocalConnection import flash.net.URLLoader import flash.net.URLRequest import flash.system.Security import flash.utils.clearInterval import flash.utils.setInterval import flash.xml.XMLDocument import flash.xml.XMLNode //class(instance)_index:694 public dynamic class InstreamFrameworkBase extends UIFEventDispatcher { //static constructor public static function InstreamFrameworkBase$cinit() { //MethodID:6607, LocalCount= 1 , MaxScope= 1, MaxStack= 13, CodeLength= 101 _APIVersion = "2.8.2"; _APISupportedTagVersions = ["2.8.2", "2.8.1", "2.8", "2.7", "2.5.6", "2.5.5", "2.5.1", "2.5", "2.1", "2.0", "1.2", "1.1"]; REMINDER_TYPE_URL = "reminderTypeURL"; REMINDER_TYPE_XML = "reminderTypeXML"; AD_SLOT_TYPE_LINEAR = "adSlotTypeLinear"; AD_SLOT_TYPE_NONLINEAR = "adSlotTypeNonLinear"; AD_SLOT_TYPE_UNKNOWN = "adSlotTypeUnknown"; } //static variables/etc. public static var _APIVersion:String = "2.8.2"; //slotID:1 public static var _APISupportedTagVersions:Array; //slotID:2 public static const REMINDER_TYPE_URL:String = "reminderTypeURL";//slotID:3 public static const REMINDER_TYPE_XML:String = "reminderTypeXML";//slotID:4 public static const AD_SLOT_TYPE_LINEAR:String = "adSlotTypeLinear";//slotID:5 public static const AD_SLOT_TYPE_NONLINEAR:String = "adSlotTypeNonLinear";//slotID:6 public static const AD_SLOT_TYPE_UNKNOWN:String = "adSlotTypeUnknown";//slotID:7 //constructor public function InstreamFrameworkBase(hug1:MovieClip) { //MethodID:6609, LocalCount= 3 , MaxScope= 2, MaxStack= 4, CodeLength= 325 internal var root_mc:MovieClip; //slotID:1 root_mc = hug1; super(); this._debugMessages = 2; Security.allowDomain("*"); this._QAConnection = new LocalConnection(); this._QAConnection.addEventListener(StatusEvent.STATUS, this.OnStatus); this._loadTrackerCalled = false; this._root_mc = root_mc; this._adTagXML = new XMLDocument(); this._urlLoader = new URLLoader(); this._cacheBuster = new CacheBuster(); this._reminderList = new ReminderList(); this._eventData = new Object(); this._adInformationData = new Object(); this._adContainerParent_mc = new AdContainerParent(this, this.endAd); this._adContainerParent_mc.name = ("uif_loadercontainer_" + new Date().getTime()); this._actionscriptVersion = 3; this._debugMessage(1, ("Loading EyeWonder Instream Framework " + _APIVersion)); this._debugMessage(1, ("Supported tag major versions: " + _APISupportedTagVersions)); this._debugMessage(1, ("Actionscript version: " + this._actionscriptVersion)); this._config = new UIFConfig(); this._debugMessage(1, ("Player Version: " + this.config.version)); this._debugMessage(1, ("EyeWonder Instream API Integration Date: " + this.config.integration_date)); if(this._root_mc.stage != null){ this._root_mc.stage.addEventListener(FullScreenEvent.FULL_SCREEN, this.onFullScreen); }else{ this._root_mc.addEventListener(Event.ADDED_TO_STAGE, function(... args):void{ //MethodID:6608, LocalCount= 2 , MaxScope= 0, MaxStack= 3, CodeLength= 35 _root_mc.removeEventListener(Event.ADDED_TO_STAGE, args.callee); _root_mc.stage.addEventListener(FullScreenEvent.FULL_SCREEN, onFullScreen); }); } this.customInit(); } //variables/etc. public var _cacheBuster:CacheBuster; //slotID:0 public var _reminderList:ReminderList; //slotID:0 public var _defaultPause:Number; //slotID:0 public var _wrapperCount:Number; //slotID:0 public var _adTagService:AdTagService; //slotID:0 public var adCountdown_mc:AdCountdown; //slotID:0 public var _adContainerParent_mc:AdContainerParent; //slotID:0 public var _timerStep:Number; //slotID:0 public var _overlayLoadDelay:Number; //slotID:0 public var _adTagVersion:String; //slotID:0 public var _backgroundRect:Rectangle; //slotID:0 public var _vastAdLoaded:Boolean = false; //slotID:0 public var _config:UIFConfig; //slotID:0 public var _adContainerRect:Rectangle; //slotID:0 public var _actionscriptVersion:Number; //slotID:0 public var _adTagAlignHorizontal:String; //slotID:0 public var _videoState:Number; //slotID:0 private var _adVolume:Number = -1.0; //slotID:0 public var _adTagClickPrepend:String; //slotID:0 public var _vastWrapperCalled:Boolean = false; //slotID:0 public var _timerCountdown:Number; //slotID:0 public var _adContainerBackground_mc:MovieClip; //slotID:0 public var _adTagReminderUnit:String; //slotID:0 public var _ewVideoScreen:EWVideoAdScreenModule; //slotID:0 public var _adTagHeight:Number; //slotID:0 public var _debugMessages:Number; //slotID:0 public var _timerPauseCountdown:Number; //slotID:0 public var _maxPrerollTimer:Number; //slotID:0 public var _adTagDataURL:String; //slotID:0 public var _ewParser:EWParser; //slotID:0 public var _root_mc:MovieClip; //slotID:0 public var _tagParser:Object; //slotID:0 public var _urlLoader:URLLoader; //slotID:0 public var _vendorCartridge:Object; //slotID:0 public var _QAConnection:LocalConnection; //slotID:0 public var _adTagCustomPubData:String; //slotID:0 public var _adIsPlaying:Boolean; //slotID:0 public var _adTagAlignVertical:String; //slotID:0 public var _reminderUnit:ReminderUnit; //slotID:0 public var _loadTrackerCalled:Boolean; //slotID:0 public var _vastParser:VASTParser; //slotID:0 public var _adTagDuration:Number; //slotID:0 public var _adTagWidth:Number; //slotID:0 public var _adTagClick3rdParty:String; //slotID:0 public var _bandwidth:Number; //slotID:0 public var _onParseComplete:Object; //slotID:0 public var _adSlotType:String; //slotID:0 public var _adTagURLCreativeFormat:String; //slotID:0 public var _playerHeight:Number; //slotID:0 public var _adURL:String; //slotID:0 public var _overlayLoadDelayTimerID:Number; //slotID:0 public var _adTagInstreamType:String; //slotID:0 public var _adFormat:String; //slotID:0 public var _adTagRedirectURL:String; //slotID:0 public var _adCleanupCallbacks:Array; //slotID:0 public var _vastModule:String = "as3_module.swf"; //slotID:0 public var _adTagXML:XMLDocument; //slotID:0 public var _videoRect:Rectangle; //slotID:0 public var _publisherCartridge:PublisherCartridgeBase; //slotID:0 public var _playerWidth:Number; //slotID:0 public var _maxInteractionTimerPause:Number; //slotID:0 public var _urlRequest:URLRequest; //slotID:0 public var _adInformationData:Object; //slotID:0 public var _timerID:Number; //slotID:0 public var _eventData:Object; //slotID:0 public var _adContainer_mc:MovieClip; //slotID:0 public var _adTagImpr3rdParty:String; //slotID:0 public function get config():UIFConfig { //MethodID:6610, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._config; } public function OnStatus(hug1:StatusEvent):void { //MethodID:6611, LocalCount= 2 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } public function customInit():void { //MethodID:6612, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 13 this._debugMessage(2, "In customInit()."); } public function setVideoState(hug1:Number):void { //MethodID:6613, LocalCount= 3 , MaxScope= 1, MaxStack= 4, CodeLength= 153 this._debugMessage(2, ("In setVideoState(" + hug1 + ").")); this._videoState = hug1; var hug2:Number = hug1; switch(hug2){ case 1: this.dispatchUIFEvent(UIFControlEvent.CONTENT_VID_STOP); break; case 2: this.dispatchUIFEvent(UIFControlEvent.CONTENT_VID_PLAY); break; case 3: this.dispatchUIFEvent(UIFControlEvent.CONTENT_VID_PAUSE); break; default: break; } } public function getVideoState():Number { //MethodID:6614, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 17 this._debugMessage(2, "In getVideoState()."); return this._videoState; } public function set audioVolume(hug1:Number):void { //MethodID:6615, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 110 this._debugMessage(2, ("In set audioVolume(" + hug1 + ").")); if(hug1 > 100) hug1 = 100; if(hug1 <= 0){ hug1 = 0; if((this._adFormat == "VAST") && this._adContainer_mc){ VASTVideoAdModule(this._adContainer_mc).videoAdScreenModule.dispatchEvent(new Event("mute")); }else{ this.dispatchUIFEvent(UIFTrackEvent.TRACK_MUTE); } } this._adVolume = hug1; } public function get audioVolume():Number { //MethodID:6616, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 17 this._debugMessage(2, "In get audioVolume()."); return this._adVolume; } public function setAudioState(hug1:Number):void { //MethodID:6617, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 45 this._debugMessage(2, ("In setAudioState(" + hug1 + ").")); if(hug1 == 1) this.audioVolume = 0; if(hug1 == 2) this.audioVolume = 100; } public function getAudioState():Number { //MethodID:6618, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 28 this._debugMessage(2, "In getAudioState()."); if(this.audioVolume == 0) return 1; return 2; } public function endAdNotify():void { //MethodID:6619, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 13 this._debugMessage(2, "In endAdNotify()."); } public function playVideo():void { //MethodID:6620, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 20 this._debugMessage(2, "In playVideo()."); this.setVideoState(2); } public function pauseVideo():void { //MethodID:6621, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 20 this._debugMessage(2, "In pauseVideo()."); this.setVideoState(3); } public function get isPaused():Boolean { //MethodID:6622, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 21 this._debugMessage(2, "In isPaused()."); return (this.getVideoState() == 3); } public function get isPlaying():Boolean { //MethodID:6623, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 21 this._debugMessage(2, "In isPlaying()."); return (this.getVideoState() == 2); } public function get isStopped():Boolean { //MethodID:6624, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 21 this._debugMessage(2, "In isStopped()."); return (this.getVideoState() == 1); } public function onPlayerVideoPause():void { //MethodID:6625, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 24 this._debugMessage(2, "In adVidPause()."); this.dispatchUIFEvent(UIFControlEvent.AD_VID_PAUSE); } public function onPlayerVideoPlay():void { //MethodID:6626, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 24 this._debugMessage(2, "In adVidPlay()."); this.dispatchUIFEvent(UIFControlEvent.AD_VID_PLAY); } public function onPlayerVideoSeek(hug1:Number, hug2:Number):void { //MethodID:6627, LocalCount= 4 , MaxScope= 1, MaxStack= 4, CodeLength= 92 this._debugMessage(2, ("In adVidSeek() - adVidSeekPosition:" + hug1 + ":::adVidSeekOffset:" + hug2)); var hug3:Object = new Object(); if((hug1 != (-2)) && (hug1 != (-1))){ hug3.adVidSeekPosition = (hug1 * 1000); }else{ hug3.adVidSeekPosition = hug1; } hug3.adVidSeekOffset = (hug2 * 1000); this.eventData = hug3; this.dispatchUIFEvent(UIFControlEvent.AD_VID_SEEK); } public function forward():void { //MethodID:6628, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 22 this._debugMessage(2, "SEEK"); this.onPlayerVideoSeek(-2, 5); } public function next():void { //MethodID:6629, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 22 this._debugMessage(2, "SEEK"); this.onPlayerVideoSeek(-1, 0); } public function rewind():void { //MethodID:6630, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 22 this._debugMessage(2, "SEEK"); this.onPlayerVideoSeek(-2, -5); } public function prev():void { //MethodID:6631, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 21 this._debugMessage(2, "SEEK"); this.onPlayerVideoSeek(0, 0); } public function remainingTime(hug1:Number, hug2:Number):void { //MethodID:6632, LocalCount= 4 , MaxScope= 1, MaxStack= 3, CodeLength= 42 var hug3:Object = new Object(); hug3.adRemainingTime = hug1; hug3.adTotalTime = hug2; this.dispatchUIFEvent(UIFControlEvent.AD_REMAINING_TIME, hug3); this.adCountdown_mc.updateRemainingTimeDisplay(hug3); } public function set eventData(hug1:Object):* { //MethodID:6633, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this._eventData = hug1; } public function get eventData():Object { //MethodID:6634, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._eventData; } public function set adInformationData(hug1:Object):void { //MethodID:6635, LocalCount= 4 , MaxScope= 1, MaxStack= 4, CodeLength= 141 this._debugMessage(2, ("In adInformationData(" + hug1 + ").")); this._adInformationData = new Object(); this._adInformationData = hug1; this.dispatchUIFEvent(UIFControlEvent.AD_INFORMATION_DATA, hug1); var hug2:String = String(hug1["type"]).toUpperCase(); var hug3:String = String(hug1["subType"]).toUpperCase(); if(hug2 == "LINEAR"){ if(hug3 == "INTERACTIVE"){ this._debugMessage(2, "Linear interactive detected."); this.dispatchUIFEvent(UIFControlEvent.ON_START_LINEAR_INTERACTIVE); this.dispatchUIFEvent(UIFControlEvent.HIDE_CONTROLS); }else{ this.adCountdown_mc.visible = true; } } } public function get adInformationData():Object { //MethodID:6636, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._adInformationData; } public function get adCustomPubData():String { //MethodID:6637, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._adTagCustomPubData; } public function getPlayerInformation():Object { //MethodID:6638, LocalCount= 2 , MaxScope= 1, MaxStack= 6, CodeLength= 133 this._debugMessage(2, "In getPlayerInformation()."); var hug1:Object = new Object(); hug1.videoRect = new Rectangle(this.config.x, this.config.y, this.config.width, this.config.height); hug1.backgroundRect = new Rectangle(this.config.x, this.config.y, this.config.width, this.config.height); hug1.backgroundColor = this.config.backgroundColor; hug1.backgroundAlpha = this.config.backgroundAlpha; hug1.overlayLoadDelay = (this.config.overlay_delay * 1000); return hug1; } public function trackExpand():void { //MethodID:6639, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 24 this._debugMessage(2, "In trackExpand()."); this.dispatchUIFEvent(UIFTrackEvent.TRACK_EXPAND); } public function trackContract():void { //MethodID:6640, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 24 this._debugMessage(2, "In trackContract()."); this.dispatchUIFEvent(UIFTrackEvent.TRACK_CONTRACT); } public function trackLoad():void { //MethodID:6641, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 49 this._debugMessage(2, "In trackLoad()."); if(this._loadTrackerCalled == true) return; this._loadTrackerCalled = true; this._debugMessage(2, "trackLoad: First call verified. Tracking."); this.dispatchUIFEvent(UIFTrackEvent.TRACK_LOAD); } public function trackClose():void { //MethodID:6642, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 24 this._debugMessage(2, "In trackClose()."); this.dispatchUIFEvent(UIFTrackEvent.TRACK_CLOSE); } public function trackInteraction():void { //MethodID:6643, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 24 this._debugMessage(2, "In trackInteraction()."); this.dispatchUIFEvent(UIFTrackEvent.TRACK_INTERACTION); } public function trackClickthru():void { //MethodID:6644, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 24 this._debugMessage(2, "In trackClickthru()."); this.dispatchUIFEvent(UIFTrackEvent.TRACK_CLICKTHRU); } public function trackStartOfVideo():void { //MethodID:6645, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 24 this._debugMessage(2, "In trackStartOfVideo()."); this.dispatchUIFEvent(UIFTrackEvent.TRACK_START_OF_VIDEO); } public function trackFirstQuartileOfVideo():void { //MethodID:6646, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 24 this._debugMessage(2, "In trackFirstQuartileOfVideo()."); this.dispatchUIFEvent(UIFTrackEvent.TRACK_FIRST_QUARTILE_OF_VIDEO); } public function trackMidOfVideo():void { //MethodID:6647, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 24 this._debugMessage(2, "In trackMidOfVideo()."); this.dispatchUIFEvent(UIFTrackEvent.TRACK_MID_OF_VIDEO); } public function trackThirdQuartileOfVideo():void { //MethodID:6648, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 24 this._debugMessage(2, "In trackThirdQuartileOfVideo()."); this.dispatchUIFEvent(UIFTrackEvent.TRACK_THIRD_QUARTILE_OF_VIDEO); } public function trackEndOfVideo():void { //MethodID:6649, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 24 this._debugMessage(2, "In trackEndOfVideo()."); this.dispatchUIFEvent(UIFTrackEvent.TRACK_END_OF_VIDEO); } public function trackGoInteractive():void { //MethodID:6650, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 24 this._debugMessage(2, "In trackGoInteractive()."); this.dispatchUIFEvent(UIFTrackEvent.TRACK_GO_INTERACTIVE); } public function trackLeaveInteractive():void { //MethodID:6651, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 24 this._debugMessage(2, "In trackLeaveInteractive()."); this.dispatchUIFEvent(UIFTrackEvent.TRACK_LEAVE_INTERACTIVE); } public function trackEnterFullscreen():void { //MethodID:6652, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 24 this._debugMessage(2, "In trackEnterFullscreen()."); this.dispatchUIFEvent(UIFTrackEvent.TRACK_ENTER_FULLSCREEN); } public function beginVideoOnlyFixedroll(hug1:String, hug2:String, hug3:Number, hug4:String, hug5:String):void { //MethodID:6653, LocalCount= 6 , MaxScope= 1, MaxStack= 3, CodeLength= 34 this._debugMessage(2, "In beginVideoOnlyFixedroll()."); this._debugMessage(2, "Video only pre/mid/postroll not supported!"); this.dispatchUIFEvent(UIFEvent.ERROR_EVENT); } public function insertVendorCartridge(hug1:Object):void { //MethodID:6654, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 84 this._debugMessage(2, ("In insertVendorCartridge(" + hug1 + ")")); this._vendorCartridge = hug1; if(this._vendorCartridge.getVendorName() == "EyeWonder"){ if(this._root_mc.loaderInfo.parameters._qaReportUUID != undefined) Object(this._vendorCartridge)._qaReportUUID = this._root_mc.loaderInfo.parameters._qaReportUUID; } } public function registerAdCleanupCallback(hug1:Function):void { //MethodID:6655, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 34 this._debugMessage(2, ("In registerAdCleanupCallback(" + hug1 + ").")); this._adCleanupCallbacks[this._adCleanupCallbacks.length] = hug1; } public function getAdMovieClip(hug1:Rectangle):MovieClip { //MethodID:6656, LocalCount= 2 , MaxScope= 1, MaxStack= 6, CodeLength= 112 this._debugMessage(2, ("In getAdMovieClip ( Rectangle[x=" + hug1.x + ",y=" + hug1.y + ",width=" + hug1.width + ",height=" + hug1.height + "]).")); this._adContainerRect = new Rectangle(hug1.x, hug1.y, hug1.width, hug1.height); if(this._adContainerBackground_mc == null) this._adContainerBackground_mc = new MovieClip(); this._adContainerBackground_mc.mouseEnabled = false; this._root_mc.mouseEnabled = false; return this._root_mc; } public function removeAdMovieClip():void { //MethodID:6657, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 18 this._debugMessage(2, "In removeAdMovieClip()."); this._unloadSWF(); } public function timerStop():void { //MethodID:6658, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 50 this._debugMessage(2, "In timerStop."); if(this._timerID != (-1)){ this._debugMessage(1, "timerStop: Stopping timer."); clearInterval(this._timerID); this._timerID = -1; } } public function timerPause(hug1:Number):void { //MethodID:6659, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 66 this._debugMessage(2, ("In timerPause(" + hug1 + ").")); if(this._timerID == (-1)) return; this._debugMessage(1, "timerPause: Pausing timer."); hug1 = Math.floor(hug1); if(hug1 < 1) hug1 = 1; this._timerPauseCountdown = hug1; } public function timerStart(hug1:Number):void { //MethodID:6660, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 92 this._debugMessage(2, ("In timerStart(" + hug1 + ").")); this.timerStop(); this._debugMessage(1, "timerStart: Starting timer."); hug1 = Math.floor(hug1); if(hug1 < 1) hug1 = 1; this._timerStep = 500; this._timerCountdown = hug1; this._timerPauseCountdown = 0; this._timerID = setInterval(this._timerInterval, this._timerStep); } public function timerCountdownCompleted():void { //MethodID:6661, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 18 this._debugMessage(2, "In timerCountdownCompleted()."); this.endAd(); } public function pubTrace(hug1:Object):void { //MethodID:6662, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 25 this._sendToPanel("[::Publisher (Instream)::] " + hug1); trace("[::Publisher (Instream)::] " + hug1); } public function setDebugLevel(hug1:Number):void { //MethodID:6663, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 53 if(hug1 != 0) this._debugMessage(0, ("In setDebugLevel(" + hug1 + ").")); if(hug1 > 2) hug1 = 2; if(hug1 < 0) hug1 = 0; this._debugMessages = hug1; } public function getAPIVersion():String { //MethodID:6664, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 16 this._debugMessage(2, "In getAPIVersion()."); return _APIVersion; } public function loadAdCleanup():void { //MethodID:6665, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 47 this._debugMessage(2, "In loadAdCleanup()."); if(this._overlayLoadDelayTimerID != (-1)) clearInterval(this._overlayLoadDelayTimerID); if(this._adIsPlaying) this.endAd(); } public function get reminderListArray():Array { //MethodID:6666, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 15 return new Array(this._reminderList.reminderArray); } public function set reminderListArray(hug1:Array):void { //MethodID:6667, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 27 this._reminderList.reminderArray = hug1; this._debugMessage(2, ("ReminderList array replaced ( " + hug1 + ").")); } public function replaceReminderAdAt(hug1:Number, hug2:Object):void { //MethodID:6668, LocalCount= 3 , MaxScope= 1, MaxStack= 4, CodeLength= 33 this._reminderList.replaceAt(hug1, (hug2 as ReminderUnit)); this._debugMessage(2, ("Reminder Unit replaced ( " + hug2 + ").")); } public function loadReminderAdXML(hug1:XML):void { //MethodID:6669, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 185 this._debugMessage(2, "In loadReminderAdXML()."); this.dispatchUIFEvent(UIFControlEvent.ON_REMINDER_OVERRIDE); this.loadAdCleanup(); this._adURL = ""; this._adTagClickPrepend = ""; this._adTagDataURL = ""; this._adTagVersion = ""; this._adTagInstreamType = ""; this._adTagWidth = 0; this._adTagHeight = 0; this._adTagAlignHorizontal = ""; this._adTagAlignVertical = ""; this._adTagDuration = 0; this._adTagImpr3rdParty = ""; this._adTagClick3rdParty = ""; this._adTagURLCreativeFormat = ""; this._adTagReminderUnit = ""; addEventListener(UIFEvent.ERROR_EVENT, this.onErrorHandler); this._adTagService = new AdTagService(); this._adTagService.addEventListener(Event.COMPLETE, this.onAdTagServiceComplete); this._adTagService.addEventListener(AdTagService.ERROR_LOADING_XML, this.onXmlError); this._adTagService.setXMLData(hug1); } public function loadAdURL(hug1:String, hug2:String="adSlotTypeUnknown", hug3:String="unknown"):void { //MethodID:6670, LocalCount= 8 , MaxScope= 1, MaxStack= 4, CodeLength= 405 var hug5:ReminderUnit = null; var hug6:XML = null; var hug7:XML = null; this._adFormat = hug3; this._adSlotType = hug2; this._cacheBuster.randomizeCacheBuster(CacheBuster.AD, true); if((this._adSlotType == AD_SLOT_TYPE_NONLINEAR) && (this._reminderList.numReminders > 0)){ this._debugMessage(2, "Reminder Unit detected, ignoring Nonlinear Ad."); hug5 = this._reminderList.getOldest(); this._debugMessage(2, ("Reminder Unit poped (now available: " + this._reminderList.numReminders + ").")); if(hug5.reminderType == REMINDER_TYPE_URL){ hug1 = hug5.reminderURL; this.dispatchUIFEvent(UIFControlEvent.ON_REMINDER_OVERRIDE); }else{ if(hug5.reminderType == REMINDER_TYPE_XML){ hug6 = new XML(hug5.reminderXML); hug7 = new XML(hug6.children().toString()); this.loadReminderAdXML(hug7); return; } this._debugMessage(2, "Type of Reminder Unit unknown. Continue with Nonlinear Ad."); } } var hug4:String = this._cacheBuster.cacheBustURL(hug1); this._debugMessage(2, ("In loadURL(" + hug4 + ").")); this.loadAdCleanup(); this._adURL = ""; this._adTagClickPrepend = ""; this._adTagDataURL = ""; this._adTagVersion = ""; this._adTagInstreamType = ""; this._adTagWidth = 0; this._adTagHeight = 0; this._adTagAlignHorizontal = ""; this._adTagAlignVertical = ""; this._adTagDuration = 0; this._adTagImpr3rdParty = ""; this._adTagClick3rdParty = ""; this._adTagURLCreativeFormat = ""; this._adTagReminderUnit = ""; addEventListener(UIFEvent.ERROR_EVENT, this.onErrorHandler); this._adTagService = new AdTagService(); this._adTagService.addEventListener(Event.COMPLETE, this.onAdTagServiceComplete); this._adTagService.addEventListener(AdTagService.ERROR_LOADING_XML, this.onXmlError); this._adTagService.loadAdXMLURL(hug4); } public function onErrorHandler(hug1:UIFEvent):void { //MethodID:6671, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 23 this._debugMessage(2, "In onErrorHandler()"); this._adIsPlaying = true; this.endAd(); } public function onEndAdHandler(hug1:UIFEvent):void { //MethodID:6672, LocalCount= 2 , MaxScope= 1, MaxStack= 1, CodeLength= 10 listenerCleanup(); } public function controlEventDispatcher(hug1:UIFEvent):void { //MethodID:6673, LocalCount= 2 , MaxScope= 1, MaxStack= 6, CodeLength= 30 this.dispatchUIFEvent(UIFEvent.CONTROL_EVENT, {type:hug1.type, data:hug1.info}); } public function trackEventDispatcher(hug1:UIFEvent):void { //MethodID:6674, LocalCount= 2 , MaxScope= 1, MaxStack= 6, CodeLength= 30 this.dispatchUIFEvent(UIFEvent.TRACK_EVENT, {type:hug1.type, data:hug1.info}); } public function vastEventDispatcher(hug1:UIFEvent):void { //MethodID:6675, LocalCount= 2 , MaxScope= 1, MaxStack= 6, CodeLength= 30 this.dispatchUIFEvent(UIFEvent.VAST_EVENT, {type:hug1.type, data:hug1.info}); } public function attachControlListeners():void { //MethodID:6676, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 394 addEventListener(UIFControlEvent.AD_REMAINING_TIME, this.controlEventDispatcher); addEventListener(UIFControlEvent.AD_INFORMATION_DATA, this.controlEventDispatcher); addEventListener(UIFControlEvent.AD_VID_PAUSE, this.controlEventDispatcher); addEventListener(UIFControlEvent.AD_VID_PLAY, this.controlEventDispatcher); addEventListener(UIFControlEvent.AD_VID_SEEK, this.controlEventDispatcher); addEventListener(UIFControlEvent.AD_VOLUME_CHANGED, this.controlEventDispatcher); addEventListener(UIFControlEvent.ON_AD_LOAD_COMPLETE, this.controlEventDispatcher); addEventListener(UIFControlEvent.ON_END_AD, this.controlEventDispatcher); addEventListener(UIFControlEvent.ON_REMINDER_OVERRIDE, this.controlEventDispatcher); addEventListener(UIFControlEvent.ON_REMINDER_DETECTED, this.controlEventDispatcher); addEventListener(UIFControlEvent.ON_RESIZE_NOTIFY, this.controlEventDispatcher); addEventListener(UIFControlEvent.ON_START_FIXEDROLL, this.controlEventDispatcher); addEventListener(UIFControlEvent.ON_START_LINEAR, this.controlEventDispatcher); addEventListener(UIFControlEvent.ON_START_LINEAR_INTERACTIVE, this.controlEventDispatcher); addEventListener(UIFControlEvent.ON_START_OVERLAY, this.controlEventDispatcher); addEventListener(UIFControlEvent.ON_START_PLAY_AD, this.controlEventDispatcher); addEventListener(UIFControlEvent.ON_START_REQUEST_AD, this.controlEventDispatcher); addEventListener(UIFControlEvent.RESIZE_NOTIFY, this.controlEventDispatcher); addEventListener(UIFControlEvent.SHOW_CONTROLS, this.controlEventDispatcher); addEventListener(UIFControlEvent.HIDE_CONTROLS, this.controlEventDispatcher); addEventListener(UIFControlEvent.CONTENT_VID_PAUSE, this.controlEventDispatcher); addEventListener(UIFControlEvent.CONTENT_VID_PLAY, this.controlEventDispatcher); addEventListener(UIFControlEvent.CONTENT_VID_STOP, this.controlEventDispatcher); } public function attachTrackingListeners():void { //MethodID:6677, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 190 addEventListener(UIFTrackEvent.TRACK_CLICKTHRU, this.trackEventDispatcher); addEventListener(UIFTrackEvent.TRACK_CLOSE, this.trackEventDispatcher); addEventListener(UIFTrackEvent.TRACK_CONTRACT, this.trackEventDispatcher); addEventListener(UIFTrackEvent.TRACK_END_OF_VIDEO, this.trackEventDispatcher); addEventListener(UIFTrackEvent.TRACK_EXPAND, this.trackEventDispatcher); addEventListener(UIFTrackEvent.TRACK_FIRST_QUARTILE_OF_VIDEO, this.trackEventDispatcher); addEventListener(UIFTrackEvent.TRACK_INTERACTION, this.trackEventDispatcher); addEventListener(UIFTrackEvent.TRACK_LOAD, this.trackEventDispatcher); addEventListener(UIFTrackEvent.TRACK_MID_OF_VIDEO, this.trackEventDispatcher); addEventListener(UIFTrackEvent.TRACK_START_OF_VIDEO, this.trackEventDispatcher); addEventListener(UIFTrackEvent.TRACK_THIRD_QUARTILE_OF_VIDEO, this.trackEventDispatcher); } public function attachVastListeners():void { //MethodID:6678, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } public function loadDataObj(hug1:XML):void { //MethodID:6679, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 65 this._adFormat = "unknown"; this._adTagService = new AdTagService(); this._adTagService.addEventListener(Event.COMPLETE, this.onAdTagServiceComplete); this._adTagService.addEventListener(AdTagService.ERROR_LOADING_XML, this.onXmlError); this._adTagService.setXMLData(hug1); } public function loadAdXML(hug1:String, hug2:String="adSlotTypeUnknown"):void { //MethodID:6680, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 10 this.loadAdURL(hug1, hug2); } public function endAd():void { //MethodID:6681, LocalCount= 3 , MaxScope= 9, MaxStack= 3, CodeLength= 309 internal var i:Number; //slotID:1 i = NaN; this._debugMessage(2, "In endAd()."); this._wrapperCount = 0; this._vastWrapperCalled = false; try{ this._root_mc.removeChild(this.adCountdown_mc); } catch(e:Error){ } if(!hasEventListener(UIFControlEvent.ON_END_AD)){ this._debugMessage(3, "endAd: an error happened before the ad started playing."); this.attachControlListeners(); this.attachTrackingListeners(); } if(!this._adIsPlaying) return; this._debugMessage(1, "endAd: Killing ad."); this._adIsPlaying = false; this.timerStop(); this.removeAdMovieClip(); try{ if(this._adCleanupCallbacks != null){ i = 0; while(i < this._adCleanupCallbacks.length){ this._adCleanupCallbacks[i](); i += 1; } } this.endAdNotify(); } catch(e:Error){ _debugMessage(2, "endAd: error caused by 3rd party code ignored."); } this._loadTrackerCalled = false; try{ clearInterval(this._overlayLoadDelayTimerID); } catch(e:Error){ _debugMessage(2, "endAd: _overlayLoadDelayTimerID clear failed."); } this.dispatchUIFEvent(UIFControlEvent.SHOW_CONTROLS); this.dispatchUIFEvent(UIFControlEvent.ON_END_AD); } public function timerReset():void { //MethodID:6682, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 22 this._debugMessage(2, "In timerReset()."); this.timerStart(this._maxPrerollTimer); } public function handleInteraction():void { //MethodID:6683, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 22 this._debugMessage(2, "In handleInteraction()."); this.timerPause(this._maxInteractionTimerPause); } public function handleInteractiveModeStart():void { //MethodID:6684, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 13 this._debugMessage(2, "In handleInteractiveModeStart()."); } public function handleInteractiveModeEnd():void { //MethodID:6685, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 13 this._debugMessage(2, "In handleInteractiveModeEnd()."); } public function handleExpand():void { //MethodID:6686, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 13 this._debugMessage(2, "In handleExpand()."); } public function handleContract():void { //MethodID:6687, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 13 this._debugMessage(2, "In handleContract()."); } public function reportInteraction():void { //MethodID:6688, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 8 this.handleInteraction(); } public function resizeNotify():void { //MethodID:6689, LocalCount= 3 , MaxScope= 5, MaxStack= 6, CodeLength= 216 internal var playerInfo:Object; //slotID:1 this._debugMessage(2, "In resizeNotify()."); playerInfo = this.getPlayerInformation(); if(this._adFormat == "VAST"){ this._backgroundRect = new Rectangle(playerInfo.videoRect.x, playerInfo.videoRect.y, playerInfo.videoRect.width, playerInfo.videoRect.height); this.drawBackground(this._backgroundRect); try{ VASTVideoAdModule(this._adContainer_mc)._adContainerParentWidth = playerInfo.videoRect.width; VASTVideoAdModule(this._adContainer_mc)._adContainerParentHeight = playerInfo.videoRect.height; } catch(e:Error){ } this.dispatchUIFEvent(UIFControlEvent.ON_RESIZE_NOTIFY); }else if(this._adFormat == "EW"){ this._resizeNotifyEWHelper(); } if(this.adCountdown_mc) this.adCountdown_mc.resize(playerInfo); } public function _resizeNotifyEWHelper():void { //MethodID:6690, LocalCount= 9 , MaxScope= 1, MaxStack= 6, CodeLength= 1827 var hug2:String = null; var hug3:Rectangle = null; var hug4:Number = NaN; var hug5:String = null; var hug6:String = null; var hug7:Number = NaN; var hug8:Number = NaN; this._debugMessage(2, "In resizeNotify()."); var hug1:Object = this.getPlayerInformation(); this._playerHeight = this._root_mc.stage.height; this._playerWidth = this._root_mc.stage.width; this._videoRect = new Rectangle(0, 0, this._root_mc.stage.width, this._root_mc.stage.height); this._backgroundRect = new Rectangle(0, 0, this._root_mc.stage.width, this._root_mc.stage.height); this._maxPrerollTimer = 15000; this._maxInteractionTimerPause = 0x1D4C0; this._overlayLoadDelay = 5000; if((typeof(hug1) != "undefined") && (hug1 != null)){ if((typeof(hug1["videoRect"]) != "undefined") && (hug1["videoRect"] != null)) this._videoRect = hug1["videoRect"]; if((typeof(hug1.backgroundRect) != "undefined") && (hug1.backgroundRect != null)){ this._backgroundRect = hug1.backgroundRect; }else if((typeof(hug1.videoRect) != "undefined") && (hug1.videoRect != null)){ this._backgroundRect = this._videoRect; } if((typeof(hug1["maxPrerollTimer"]) != "undefined") && (hug1["maxPrerollTimer"] != null)) this._maxPrerollTimer = hug1["maxPrerollTimer"]; if((typeof(hug1["maxInteractionTimerPause"]) != "undefined") && (hug1["maxInteractionTimerPause"] != null)) this._maxInteractionTimerPause = hug1["maxInteractionTimerPause"]; if((typeof(hug1["overlayLoadDelay"]) != "undefined") && (hug1["overlayLoadDelay"] != null)) this._overlayLoadDelay = hug1["overlayLoadDelay"]; hug2 = ""; if((typeof(hug1["videoRect"]) != "undefined") && (hug1["videoRect"] != null)) hug2 += ((("getPlayerInformation returned ( videoRect = Rectangle[x=" + hug1["videoRect"].x + ",y=") + hug1["videoRect"].y + ",width=") + hug1["videoRect"].width + ",height=") + hug1["videoRect"].height + "],"; if((typeof(hug1["maxPrerollTimer"]) != "undefined") && (hug1["maxPrerollTimer"] != null)) hug2 += (" maxPrerollTimer=" + hug1["maxPrerollTimer"]); if((typeof(hug1["maxInteractionTimerPause"]) != "undefined") && (hug1["maxInteractionTimerPause"] != null)) hug2 += (" maxInteractionTimerPause=" + hug1["maxInteractionTimerPause"]); if((typeof(hug1["overlayLoadDelay"]) != "undefined") && (hug1["overlayLoadDelay"] != null)) hug2 += (" overlayLoadDelay=" + hug1["overlayLoadDelay"]); this._debugMessage(1, (hug2 + ").")); }else{ this._debugMessage(1, "resizeNotify: getPlayerInformation returned undefined."); return; } this._adContainerRect = this._alignAd(this._videoRect); this.drawBackground(this._backgroundRect); if(this.config.scaleEW == false){ this._debugMessage(2, "Scaling disabled. Positioning ad instead."); if((("number" != "undefined") && (this._adTagWidth > 0) && ((this._videoRect.width + 1) < this._adTagWidth)) || (("number" != "undefined") && (this._adTagHeight > 0) && ((this._videoRect.height + 1) < this._adTagHeight))){ this._debugMessage(1, ("resizeNotify: Ad width or height is larger than video width or height. Killing ad. Ad width=" + this._adTagWidth + " Ad height=" + this._adTagHeight + " Player video dimensions=Rectangle[x=" + this._videoRect.x + ",y=" + this._videoRect.y + ",width=" + this._videoRect.width + ",height=" + this._videoRect.height + "]")); this.endAd(); return; } this._debugMessage(2, ("resizeNotify: Repositioning ad to (" + this._adContainerRect.x + "," + this._adContainerRect.y + ")")); this._adContainerParent_mc.x = this._adContainerRect.x; this._adContainerParent_mc.y = this._adContainerRect.y; }else{ this._debugMessage(2, ("Scaling enabled. Ad tag WxH: [" + this._adTagWidth + " x " + this._adTagHeight + "]")); if(!this._adContainerParent_mc._isLoaded) return; hug3 = new Rectangle(this._videoRect.x, this._videoRect.y, this._videoRect.width, this._videoRect.height); hug4 = 1; if((this._adTagWidth / hug3.width) >= (this._adTagHeight / hug3.height)){ if((Number(this._adTagWidth) != 0) && !isNaN(Number(this._adTagWidth))){ hug4 = (this._adTagHeight / this._adTagWidth); }else{ this._debugMessage(2, "resizeNotify: Constrain by x. WARNING: _adTagWidth is 0. Scale set to 1 to avoid divide by 0 issue"); } hug3.height = (hug3.width * hug4); this._debugMessage(2, ("resizeNotify: Constrain by x. Scale=" + hug4 + " Newsize(WxH)=" + hug3.width + "x" + hug3.height)); }else{ if((Number(this._adTagHeight) != 0) && !isNaN(Number(this._adTagHeight))){ hug4 = (this._adTagWidth / this._adTagHeight); }else{ this._debugMessage(2, "resizeNotify: Constrain by y. WARNING: _adTagHeight is 0. Scale set to 1 to avoid divide by 0 issue"); } hug3.width = (hug3.height * hug4); this._debugMessage(2, ("resizeNotify: Constrain by y. Scale=" + hug4 + " Newsize(WxH)=" + hug3.width + "x" + hug3.height)); } hug5 = ""; hug6 = ""; if(this._adTagAlignHorizontal == "center"){ hug3.x += ((this._videoRect.width - hug3.width) / 2); hug5 = "Center"; }else if(this._adTagAlignHorizontal == "right"){ hug3.x += (this._videoRect.width - hug3.width); hug5 = "Right"; }else{ hug3.x = this._videoRect.x; hug5 = "Left"; } if(this._adTagAlignVertical == "middle"){ hug3.y += ((this._videoRect.height - hug3.height) / 2); hug6 = "Middle"; }else if(this._adTagAlignVertical == "bottom"){ hug3.y += (this._videoRect.height - hug3.height); hug6 = "Bottom"; }else{ hug3.y = this._videoRect.y; hug6 = "Top"; } this._debugMessage(2, ("resizeNotify: halign=" + hug5 + " valign=" + hug6)); if((((this._adContainer_mc != null) && (this._adContainer_mc.height > 0)) && ((Number(this._adTagWidth) != 0) && !isNaN(Number(this._adTagWidth)))) && ((Number(this._adTagHeight) != 0) && !isNaN(Number(this._adTagHeight)))){ hug7 = (this._adContainer_mc.width / this._adTagWidth); hug8 = (this._adContainer_mc.height / this._adTagHeight); this._debugMessage(2, ("resizeNotify: Adjusting for invisible area in creative. adjustmentXRatio=" + hug7 + " adjustmentYRatio=" + hug8)); hug3.width = (hug7 * hug3.width); hug3.height = (hug8 * hug3.height); } this._adContainerParent_mc.x = hug3.x; this._adContainerParent_mc.y = hug3.y; this._adContainerParent_mc.height = hug3.height; this._adContainerParent_mc.width = hug3.width; this._debugMessage(2, ("ResizeNotify: Streched ad to WxH [ " + this._adContainerParent_mc.width + " x " + this._adContainerParent_mc.height + " ] and moved to ( " + this._adContainerParent_mc.x + " , " + this._adContainerParent_mc.y + " )")); } } public function _loadAdXMLError(hug1:IOErrorEvent):void { //MethodID:6691, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 24 this._debugMessage(2, "_loadAdXMLError: Invalid HTTP Request"); this.dispatchUIFEvent(UIFEvent.ERROR_EVENT); } public function _loadAdXMLHandler(hug1:Event):void { //MethodID:6692, LocalCount= 4 , MaxScope= 5, MaxStack= 6, CodeLength= 1026 internal var event:Event; //slotID:1 internal var i:Number; //slotID:2 internal var itr:XMLNode; //slotID:3 internal var currentTag:XMLNode; //slotID:4 internal var currentValue:String; //slotID:5 internal var redirectURL:String; //slotID:6 i = NaN; currentTag = null; currentValue = null; redirectURL = null; event = hug1; this._debugMessage(2, "In _loadAdXMLHandler()."); this._urlLoader.removeEventListener(Event.COMPLETE, this._loadAdXMLHandler); try{ this._adTagXML = new XMLDocument(this._urlLoader.data); } catch(e:Error){ _debugMessage(2, "_loadAdXMLHandler: Malformed XML data."); dispatchUIFEvent(UIFEvent.ERROR_EVENT); return; } i = 0; while(i < this._adTagXML.childNodes.length){ if((this._adTagXML.childNodes[i].nodeName == "instreamAd") || (this._adTagXML.childNodes[i].nodeName == "ewAd")) break; i += 1; } if(i >= this._adTagXML.childNodes.length){ this._debugMessage(2, "_loadAdXMLHandler: Expected parent element not found."); this.dispatchUIFEvent(UIFControlEvent.ON_END_AD); return; } itr = this._adTagXML.childNodes[i]; i = 0; while(i < itr.childNodes.length){ currentTag = itr.childNodes[i]; if(currentTag.childNodes.length > 0){ currentValue = currentTag.childNodes[0].nodeValue; if(currentTag.nodeName == "adURL"){ this._adURL = currentValue; }else if(currentTag.nodeName == "adClickPrepend"){ this._adTagClickPrepend = currentValue; this._adTagClickPrepend = InstreamFrameworkUtility.strnreplace(this._adTagClickPrepend, "[clickthru]", "", 1); this._adTagClickPrepend = InstreamFrameworkUtility.strnreplace(this._adTagClickPrepend, "[ewclickthru]", "", 1); }else if(currentTag.nodeName == "dataURL"){ this._adTagDataURL = currentValue; }else if(currentTag.nodeName == "redirectURL"){ this._adTagRedirectURL = currentValue; }else if(currentTag.nodeName == "adTagVersion"){ this._adTagVersion = currentValue; }else if(currentTag.nodeName == "adWidth"){ this._adTagWidth = parseInt(currentValue); }else if(currentTag.nodeName == "adHeight"){ this._adTagHeight = parseInt(currentValue); }else if(currentTag.nodeName == "adInstreamType"){ this._adTagInstreamType = currentValue; }else if(currentTag.nodeName == "adAlignHorizontal"){ this._adTagAlignHorizontal = currentValue; }else if(currentTag.nodeName == "adAlignVertical"){ this._adTagAlignVertical = currentValue; }else if(currentTag.nodeName == "adDuration"){ this._adTagDuration = parseInt(currentValue); }else if(currentTag.nodeName == "adImpr3rdParty"){ this._adTagImpr3rdParty = currentValue; }else if(currentTag.nodeName == "adClick3rdParty"){ this._adTagClick3rdParty = currentValue; }else if(currentTag.nodeName == "adURLCreativeFormat"){ this._adTagURLCreativeFormat = currentValue; }else if(currentTag.nodeName == "adComment"){ this._debugMessage(2, ("Ad Comment: " + currentValue)); }else if(currentTag.nodeName == "reminderAdURL"){ this._adTagReminderUnit = currentValue; }else if(currentTag.nodeName == "reminderAdInLine"){ this._adTagReminderUnit = currentValue; } } i += 1; } if(this._adURL == "redirect"){ this._debugMessage(1, "In _loadAdXMLHandler: EW Redirect"); redirectURL = this._adTagRedirectURL; this.loadAdXML(redirectURL); return; } this._debugMessage(1, ("_loadAdXMLHandler final values: _adURL=" + this._adURL + " _adTagClickPrepend=" + this._adTagClickPrepend + " _adTagVersion=" + this._adTagVersion + " _adTagDataURL=" + this._adTagDataURL + " _adTagInstreamType=" + this._adTagInstreamType + " _adTagAlignHorizontal=" + this._adTagAlignHorizontal + " _adTagAlignVertical=" + this._adTagAlignVertical + " _adTagWidth=" + this._adTagWidth + " _adTagHeight=" + this._adTagHeight)); this._setupAd(); } public function onAdTagServiceComplete(hug1:Event):void { //MethodID:6693, LocalCount= 4 , MaxScope= 1, MaxStack= 4, CodeLength= 451 var hug2:String = null; this._onParseComplete = null; if((this._adFormat == "EW") || (this._adFormat == "unknown")){ if(String(this._adTagService.adTagData.adURL) == "redirect"){ hug2 = String(this._adTagService.adTagData.redirectURL); this.loadAdURL(hug2, "unknown"); return; } this._tagParser = this._ewParser = new EWParser(); if(this._tagParser.checkFormat(XML(this._adTagService.adTagData))){ this._adFormat = "EW"; this._onParseComplete = this.onEWParseComplete; } } if((this._adFormat == "VAST") || (this._adFormat == "unknown")){ if(!this._vastWrapperCalled) this._tagParser = this._vastParser = new VASTParser(); if(this._vastWrapperCalled && (this._adFormat == "unknown")) this._tagParser = this._vastParser; if(this._tagParser.checkFormat(XML(this._adTagService.adTagData))){ this._adFormat = "VAST"; this._onParseComplete = this.onVASTParseComplete; }else{ this.dispatchUIFEvent(UIFEvent.ERROR_EVENT); } } if((this._adFormat == "unknown") || (this._onParseComplete == null)){ this._debugMessage(1, " onAdTagServiceComplete: Unable to detect ad format. Dispatching sOnError"); this.dispatchUIFEvent(UIFEvent.ERROR_EVENT); return; } if((this._adFormat != "VAST") && (this._adFormat != "EW")){ this._debugMessage(1, " onAdTagServiceComplete: Unknown ad format indicated. Dispatching sOnError"); this.dispatchUIFEvent(UIFEvent.ERROR_EVENT); return; } this._tagParser.addEventListener(ParserErrorEvent.XML_ERROR, this.onXmlError); this._tagParser.addEventListener(ParserEvent.XML_PARSED, this._onParseComplete); UIFDebugMessage.getInstance().setDebugLevel(this._debugMessages); this.customPublisherTagHandler(); this._tagParser.parse(this._adTagService.adTagData); } public function onVASTParseComplete(hug1:Event):void { //MethodID:6694, LocalCount= 5 , MaxScope= 1, MaxStack= 3, CodeLength= 142 var hug2:String = null; if(this._vastParser.isVASTXMLWRAPPER && !this._vastWrapperCalled){ this._vastWrapperCalled = true; if(this._wrapperCount > 10){ this._debugMessage(2, "More than 10 wrappers called, breaking loop. Dispatching sOnError"); this.dispatchUIFEvent(UIFEvent.ERROR_EVENT); return; } this._wrapperCount++; this._vastParser.addEventListener(VASTParser.TOGGLE_VAST_WRAPPER_CALLED, this.onToggleVastWrapperCalled); hug2 = String(this._vastParser.VASTAdTagURL); this.loadAdURL(hug2, "unknown"); }else{ this._adURL = "VAST"; this._setupAd(); } } public function onToggleVastWrapperCalled(hug1:Event):void { //MethodID:6695, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 26 this._vastWrapperCalled = false; this._vastParser.removeEventListener(VASTParser.TOGGLE_VAST_WRAPPER_CALLED, this.onToggleVastWrapperCalled); } public function onEWParseComplete(hug1:Event):void { //MethodID:6696, LocalCount= 2 , MaxScope= 1, MaxStack= 1, CodeLength= 8 this.setEWVariables(); } public function onXmlError(hug1:Event):void { //MethodID:6697, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 24 this._debugMessage(2, "onXmlError: Malformed XML data. Dispatching sOnError"); this.dispatchUIFEvent(UIFEvent.ERROR_EVENT); } public function customPublisherTagHandler():void { //MethodID:6698, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 29 this._debugMessage(2, "In customPublisherTagHandler()."); var hug1:String = this._adFormat; var hug2:XML = this._adTagService.adTagData; } public function setEWVariables():void { //MethodID:6699, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 248 this._adURL = String(this._ewParser.adURL); this._adTagDataURL = String(this._ewParser.adTagDataURL); this._adTagClickPrepend = String(this._ewParser.adTagClickPrepend); this._adTagVersion = String(this._ewParser.adTagVersion); this._adTagInstreamType = String(this._ewParser.adTagInstreamType); this._adTagWidth = Number(this._ewParser.adTagWidth); this._adTagHeight = Number(this._ewParser.adTagHeight); this._adTagAlignHorizontal = String(this._ewParser.adTagAlignHorizontal); this._adTagAlignVertical = String(this._ewParser.adTagAlignVertical); this._adTagDuration = Number(this._ewParser.adTagDuration); this._adTagImpr3rdParty = String(this._ewParser.adTagImpr3rdParty); this._adTagClick3rdParty = String(this._ewParser.adTagClick3rdParty); this._adTagURLCreativeFormat = String(this._ewParser.adTagURLCreativeFormat); this._adTagReminderUnit = String(this._ewParser.adTagReminderUnit); this._adTagCustomPubData = String(this._ewParser.adTagCustomPubData); this._setupAd(); } public function _alignAd(hug1:Rectangle):Rectangle { //MethodID:6700, LocalCount= 3 , MaxScope= 1, MaxStack= 5, CodeLength= 424 this._debugMessage(2, ("In _alignAd ( Rectangle[x=" + hug1.x + ",y=" + hug1.y + ",width=" + hug1.width + ",height=" + hug1.height + "]).")); var hug2:Rectangle = new Rectangle(hug1.x, hug1.y, hug1.width, hug1.height); if(("number" != "undefined") && (this._adTagWidth > 0)){ hug2.width = this._adTagWidth; if(("number" != "undefined") && ("number" != "undefined") && (hug1.width > 0)){ hug2.x = (hug1.x + ((hug1.width - this._adTagWidth) / 2)); if(("string" != "undefined") && (this._adTagAlignHorizontal == "top")){ hug2.x = hug1.x; }else if(("string" != "undefined") && (this._adTagAlignHorizontal == "right")){ hug2.x = (hug1.x + hug1.width - this._adTagWidth); } } } if(("number" != "undefined") && (this._adTagHeight > 0)){ hug2.height = this._adTagHeight; if(("number" != "undefined") && ("number" != "undefined") && (hug1.height > 0)){ hug2.y = (hug1.y + hug1.height - this._adTagHeight); if(("string" != "undefined") && (this._adTagAlignVertical == "top")){ hug2.y = hug1.y; }else if(("string" != "undefined") && (this._adTagAlignVertical == "middle")){ hug2.y = (hug1.y + ((hug1.height - this._adTagHeight) / 2)); } } } return hug2; } public function _setupAd():void { //MethodID:6701, LocalCount= 5 , MaxScope= 1, MaxStack= 6, CodeLength= 1779 var hug4:String = null; this._debugMessage(2, "In _setupAd()."); this._adContainerParent_mc = null; this._adContainerParent_mc = new AdContainerParent(this, this.endAd); this._adContainerParent_mc.name = ("uif_loadercontainer_" + new Date().getTime()); if((this._adFormat == "EW") && ((this._adURL == "") || (this._adURL == "frequency_capped") || (this._adURL == "ew_capped"))){ this.dispatchUIFEvent(UIFEvent.ERROR_EVENT); return; } if((this._adFormat == "EW") && !this._verifyAdTag()){ this.dispatchUIFEvent(UIFEvent.ERROR_EVENT); return; } listenerCleanup(); this.attachControlListeners(); this.attachTrackingListeners(); addEventListener(UIFControlEvent.ON_END_AD, this.onEndAdHandler); if((this._adTagReminderUnit != "null") && (this._adTagReminderUnit != "") && (this._adTagInstreamType == "fixedroll")){ this._reminderUnit = new ReminderUnit(); if(this._adTagReminderUnit.indexOf("reminderAdInLine", 0) == (-1)){ this._reminderUnit.reminderType = REMINDER_TYPE_URL; this._reminderUnit.reminderURL = this._adTagReminderUnit; this._reminderUnit.reminderXML = ""; }else{ this._reminderUnit.reminderType = REMINDER_TYPE_XML; this._reminderUnit.reminderURL = ""; this._reminderUnit.reminderXML = this._adTagReminderUnit; } this._reminderList.replaceAt(0, this._reminderUnit); this.dispatchUIFEvent(UIFControlEvent.ON_REMINDER_DETECTED); } var hug1:Object = this.getPlayerInformation(); this._playerHeight = this._root_mc.stage.height; this._playerWidth = this._root_mc.stage.width; this._videoRect = new Rectangle(0, 0, this._root_mc.stage.width, this._root_mc.stage.height); this._backgroundRect = new Rectangle(0, 0, this._root_mc.stage.width, this._root_mc.stage.height); this._maxPrerollTimer = 15000; this._maxInteractionTimerPause = 0x1D4C0; this._overlayLoadDelay = 5000; if((typeof(hug1) != "undefined") && (hug1 != null)){ if((typeof(hug1["videoRect"]) != "undefined") && (hug1["videoRect"] != null)) this._videoRect = hug1["videoRect"]; if((typeof(hug1.backgroundRect) != "undefined") && (hug1.backgroundRect != null)){ this._backgroundRect = hug1.backgroundRect; }else if((typeof(hug1.videoRect) != "undefined") && (hug1.videoRect != null)){ this._backgroundRect = this._videoRect; } if((typeof(hug1["maxPrerollTimer"]) != "undefined") && (hug1["maxPrerollTimer"] != null)) this._maxPrerollTimer = hug1["maxPrerollTimer"]; if((typeof(hug1["maxInteractionTimerPause"]) != "undefined") && (hug1["maxInteractionTimerPause"] != null)) this._maxInteractionTimerPause = hug1["maxInteractionTimerPause"]; if((typeof(hug1["overlayLoadDelay"]) != "undefined") && (hug1["overlayLoadDelay"] != null)) this._overlayLoadDelay = hug1["overlayLoadDelay"]; hug4 = ""; if((typeof(hug1["videoRect"]) != "undefined") && (hug1["videoRect"] != null)) hug4 += ((("getPlayerInformation returned ( videoRect = Rectangle[x=" + hug1["videoRect"].x + ",y=") + hug1["videoRect"].y + ",width=") + hug1["videoRect"].width + ",height=") + hug1["videoRect"].height + "],"; if((typeof(hug1["maxPrerollTimer"]) != "undefined") && (hug1["maxPrerollTimer"] != null)) hug4 += (" maxPrerollTimer=" + hug1["maxPrerollTimer"]); if((typeof(hug1["maxInteractionTimerPause"]) != "undefined") && (hug1["maxInteractionTimerPause"] != null)) hug4 += (" maxInteractionTimerPause=" + hug1["maxInteractionTimerPause"]); if((typeof(hug1["overlayLoadDelay"]) != "undefined") && (hug1["overlayLoadDelay"] != null)) hug4 += (" overlayLoadDelay=" + hug1["overlayLoadDelay"]); this._debugMessage(1, (hug4 + ").")); }else{ this._debugMessage(1, "getPlayerInformation returned undefined."); this.dispatchUIFEvent(UIFEvent.ERROR_EVENT); } var hug2:Rectangle = this._alignAd(this._videoRect); this._debugMessage(1, ("_setupAd final values: _playerHeight=" + this._playerHeight + " _playerWidth=" + this._playerWidth + " positionRect=Rectangle[x=" + hug2.x + ",y=" + hug2.y + ",width=" + hug2.width + ",height=" + hug2.height + "] _maxPrerollTimer=" + this._maxPrerollTimer + " _maxInteractionTimerPause=" + this._maxInteractionTimerPause + " _overlayLoadDelay=" + this._overlayLoadDelay)); this.getAdMovieClip(hug2).addChild(this._adContainerBackground_mc); this.getAdMovieClip(hug2).addChild(this._adContainerParent_mc); this.drawBackground(this._backgroundRect); this._adContainerBackground_mc.visible = false; this.dispatchUIFEvent(UIFControlEvent.ON_START_REQUEST_AD); this._adCleanupCallbacks = []; this._overlayLoadDelayTimerID = -1; var hug3:Boolean = false; if(((this._adFormat == "EW") && (this._adTagInstreamType == "ticker")) || (this._adTagInstreamType == "bug")){ this._debugMessage(1, (this._adTagInstreamType + " overlay detected (non-linear).")); hug3 = true; this.dispatchUIFEvent(UIFControlEvent.ON_START_OVERLAY); if(this._adTagInstreamType == "ticker") this.dispatchUIFEvent(UIFControlEvent.HIDE_CONTROLS); }else if(((this._adFormat == "EW") && (this._adTagInstreamType == "linear")) || ((this._adTagInstreamType == "fixedroll") || (this._adTagInstreamType == "takeover") || (this._adTagInstreamType == "fixedrollwithreminder"))){ this._debugMessage(1, (this._adTagInstreamType + " linear detected.")); this.setVideoState(3); hug3 = false; if(this._adTagDuration != 0) this._maxPrerollTimer = ((Number(this._adTagDuration) * 1000) + 5000); if(this._adTagURLCreativeFormat == "FLV"){ this.endAd(); this.beginVideoOnlyFixedroll(this._adTagURLCreativeFormat, this._adURL, this._maxPrerollTimer, this._adTagImpr3rdParty, this._adTagClick3rdParty); return; } this.dispatchUIFEvent(UIFControlEvent.ON_START_FIXEDROLL); this.dispatchUIFEvent(UIFControlEvent.ON_START_LINEAR); } if((this.config.scaleEW == false) && (("number" != "undefined") && (this._adTagWidth > 0) && ((this._videoRect.width + 1) < this._adTagWidth)) || (("number" != "undefined") && (this._adTagHeight > 0) && ((this._videoRect.height + 1) < this._adTagHeight))){ this._debugMessage(1, ("_setupAd: Ad width or height is larger than video width or height. Not displaying ad. Ad width=" + this._adTagWidth + " Ad height=" + this._adTagHeight + " Player dimensions=Rectangle[x=" + hug1.videoRect.x + ",y=" + hug1.videoRect.y + ",width=" + hug1.videoRect.width + ",height=" + hug1.videoRect.height + "]")); this.dispatchUIFEvent(UIFEvent.ERROR_EVENT); return; } if((hug3 == true) && (this._overlayLoadDelay > 0)){ this._debugMessage(1, ("Delaying " + this._overlayLoadDelay + " milliseconds. Setting _overlayLoadDelayTimerID interval.")); this._overlayLoadDelayTimerID = setInterval(this._loadSWF, this._overlayLoadDelay); }else{ this._loadSWF(); } this.drawAdCountdown(); if(this._adFormat == "VAST") this.adCountdown_mc.visible = true; } public function _checkMajorVersion(hug1:String):Boolean { //MethodID:6702, LocalCount= 5 , MaxScope= 1, MaxStack= 4, CodeLength= 70 var hug2:Object = null; for(hug2 in _APISupportedTagVersions){ if(hug1.substring(0, 2) == _APISupportedTagVersions[hug2].substring(0, 2)) return true; } return false; } public function _verifyAdTag():Boolean { //MethodID:6703, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 97 this._debugMessage(2, "In _verifyAdTag()."); if(("string" == "undefined") || (this._adURL.indexOf("http") != 0)){ this._debugMessage(1, "_verifyAdTag -- url check failed."); return false; } if(("string" == "undefined") || !this._checkMajorVersion(this._adTagVersion)){ this._debugMessage(1, "_verifyAdTag -- ad tag version check failed."); return false; } return true; } public function _unloadSWF():void { //MethodID:6704, LocalCount= 3 , MaxScope= 5, MaxStack= 3, CodeLength= 161 this._debugMessage(2, "In _unloadSWF()."); this._adIsPlaying = false; this._adContainerParent_mc.visible = false; if(this._adContainerBackground_mc) this._adContainerBackground_mc.visible = false; if(this._vendorCartridge != null) this._vendorCartridge.closeAd(); if(this._adContainerParent_mc != null) this._adContainerParent_mc.unloadClip(); try{ if(this._adFormat == "VAST"){ this._adContainer_mc.cleanUp(); this._ewVideoScreen.cleanUp(); this._adContainer_mc = null; this._ewVideoScreen = null; } this._adContainerParent_mc.removeChild(this._adContainer_mc); this._root_mc.removeChild(this._adContainerParent_mc); } catch(error:Error){ } } public function _loadSWF():void { //MethodID:6705, LocalCount= 1 , MaxScope= 1, MaxStack= 4, CodeLength= 226 this._debugMessage(2, ("In _loadSWF(" + this._adURL + ").")); this._debugMessage(2, "Preparing to load advertisement..."); if(this._overlayLoadDelayTimerID != (-1)){ this._debugMessage(1, "Clearing _overlayLoadDelayTimerID interval."); clearInterval(this._overlayLoadDelayTimerID); } this._adContainerParent_mc.addEventListener(Event.INIT, this._movieClipLoadInit); this._adContainerParent_mc.addEventListener(Event.COMPLETE, this._movieClipLoadComplete); this._adContainerParent_mc.addEventListener(IOErrorEvent.IO_ERROR, this._movieClipLoadError); this._adContainerParent_mc.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this._movieClipLoadError); this._adContainerParent_mc.ew_instreamObject = this; this._adContainerParent_mc.ew_instreamEndAd = this.endAd; this._adContainerParent_mc.uif_instreamObject = this; this._adContainerParent_mc.x = this._adContainerRect.x; this._adContainerParent_mc.y = this._adContainerRect.y; if(this._adFormat == "VAST"){ this.createVASTAd(); }else{ this._adContainerParent_mc.loadClip(this._cacheBuster.cacheBustURL(this._adURL)); } } public function createVASTAd():void { //MethodID:6706, LocalCount= 1 , MaxScope= 1, MaxStack= 4, CodeLength= 58 this._adContainerParent_mc.visible = true; this._adContainerBackground_mc.visible = true; this._ewVideoScreen = new EWVideoAdScreenModule(); this._adContainer_mc = new VASTVideoAdModule(this, this._ewVideoScreen); this._adContainerParent_mc.addChild(this._adContainer_mc); } public function _movieClipLoadInit(hug1:Event):void { //MethodID:6707, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 53 this._debugMessage(2, ("In _movieClipLoadInit(" + hug1 + ").")); this._adIsPlaying = true; this.dispatchUIFEvent(UIFControlEvent.ON_START_PLAY_AD); trace("Instream object = " + this._adContainerParent_mc.uif_instreamObject); } public function _movieClipLoadComplete(hug1:Event):void { //MethodID:6708, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 109 this._debugMessage(2, ("In _movieClipLoadComplete(" + hug1 + ").")); this._adContainer_mc = MovieClip(this._adContainerParent_mc._adContainer.content); if(this._adFormat != "VAST") this.resizeNotify(); this._adContainerParent_mc.visible = true; if((this._adTagInstreamType != "ticker") && (this._adTagInstreamType != "bug")) this._adContainerBackground_mc.visible = true; this.dispatchUIFEvent(UIFControlEvent.ON_AD_LOAD_COMPLETE); } public function _movieClipLoadError(hug1:IOErrorEvent):void { //MethodID:6709, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 30 this._debugMessage(2, ("In _movieClipLoadError(" + hug1 + ").")); this.dispatchUIFEvent(UIFEvent.ERROR_EVENT); } public function drawBackground(hug1:Rectangle):void { //MethodID:6710, LocalCount= 2 , MaxScope= 1, MaxStack= 5, CodeLength= 148 this._debugMessage(2, ("In drawBackground. [" + hug1.width + " x " + hug1.height + "] :: (" + hug1.x + " ," + hug1.y + ")")); if(this._adContainerBackground_mc){ this._adContainerBackground_mc.graphics.clear(); this._adContainerBackground_mc.graphics.beginFill(this.config.backgroundColor, this.config.backgroundAlpha); this._adContainerBackground_mc.graphics.drawRect(0, 0, hug1.width, hug1.height); this._adContainerBackground_mc.graphics.endFill(); this._adContainerBackground_mc.x = hug1.x; this._adContainerBackground_mc.y = hug1.y; } } public function drawAdCountdown():void { //MethodID:6711, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 55 var hug1:Object = this.getPlayerInformation(); this.adCountdown_mc = new AdCountdown(this.config); this.adCountdown_mc.draw(hug1); this.adCountdown_mc.visible = false; this._root_mc.addChild(this.adCountdown_mc); } public function _timerInterval():void { //MethodID:6712, LocalCount= 1 , MaxScope= 1, MaxStack= 4, CodeLength= 104 if(this._timerPauseCountdown != 0){ this._timerPauseCountdown -= this._timerStep; if(this._timerPauseCountdown <= 0) this._timerPauseCountdown = 0; }else{ this._timerCountdown -= this._timerStep; if(this._timerCountdown <= 0){ this._timerCountdown = 0; this.timerCountdownCompleted(); } } this._debugMessage(2, ("_timerInterval _timerPauseCountdown=" + this._timerPauseCountdown + " _timerCountdown=" + this._timerCountdown)); } public function _errorMessage(hug1:Object):void { //MethodID:6713, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 22 var hug2:String = ("Error: " + hug1.toString()); this._debugMessage(0, hug2); } public function _debugMessage(hug1:Number, hug2:Object):void { //MethodID:6714, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 47 if(this._debugMessages >= hug1){ trace(""); trace("[::EW Instream API::] " + hug2.toString()); this._sendToPanel("[::EW Instream API::] " + hug2); } } public function _sendToPanel(hug1:Object):void { //MethodID:6715, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 125 this._QAConnection.send("_ewQAConnection", "ewDisplayText", hug1.toString()); if((this._root_mc["loaderInfo"] != undefined) && (this._root_mc.loaderInfo.parameters["_qaReportUUID"] != undefined) && (this._root_mc.loaderInfo.parameters._qaReportUUID != "common")) this._QAConnection.send(("ewQA_" + this._root_mc.loaderInfo.parameters._qaReportUUID), "ewDisplayText", hug1.toString()); } public function dispatchUIFEvent(hug1:String, hug2:Object=null):void { //MethodID:6716, LocalCount= 3 , MaxScope= 1, MaxStack= 4, CodeLength= 19 dispatchEvent(new UIFEvent(hug1, hug2)); } public function onFullScreen(hug1:FullScreenEvent):void { //MethodID:6717, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 63 if(hug1.fullScreen){ if(this._adFormat == "VAST"){ VASTVideoAdModule(this._adContainer_mc).videoAdScreenModule.dispatchEvent(new Event("fullscreen")); }else{ this.dispatchUIFEvent(UIFTrackEvent.TRACK_ENTER_FULLSCREEN); } } } } } //script695 package com.eyewonder.instream{ import com.eyewonder.instream.base.InstreamFrameworkBase import com.eyewonder.instream.cartridge.MyPublisherCartridge import flash.display.MovieClip //class(instance)_index:695 public class InstreamFramework extends InstreamFrameworkBase { //static constructor public static function InstreamFramework$cinit() { //MethodID:6719, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function InstreamFramework(hug1:MovieClip) { //MethodID:6720, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 7 super(hug1); } //variables/etc. protected var _state:Number; //slotID:0 public var _customVarExample:Number; //slotID:0 protected var _vol:Number; //slotID:0 override public function customInit():void { //MethodID:6721, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 28 _debugMessage(2, "In customInit()."); _publisherCartridge = new MyPublisherCartridge(); } override public function endAdNotify():void { //MethodID:6722, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 15 _debugMessage(2, "In endAdNotify()."); } override public function customPublisherTagHandler():void { //MethodID:6723, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 29 _debugMessage(2, "In customPublisherTagHandler()."); var hug1:String = _adFormat; var hug2:XML = _adTagService.adTagData; } override public function handleInteractiveModeStart():void { //MethodID:6724, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 15 _debugMessage(2, "In handleInteractiveModeStart()."); } override public function handleInteractiveModeEnd():void { //MethodID:6725, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 15 _debugMessage(2, "In handleInteractiveModeEnd()."); } override public function handleExpand():void { //MethodID:6726, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 15 _debugMessage(2, "In handleExpand()."); } override public function handleContract():void { //MethodID:6727, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 15 _debugMessage(2, "In handleContract()."); } } } //script696 package ru.rutube.managers.advertisement.model.adriver{ import com.eyewonder.instream.InstreamFramework import com.eyewonder.instream.events.UIFTrackEvent import flash.display.MovieClip //class(instance)_index:696 public class InstreamFrameworkRutube extends InstreamFramework { //static constructor public static function InstreamFrameworkRutube$cinit() { //MethodID:6729, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function InstreamFrameworkRutube(hug1:MovieClip) { //MethodID:6730, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 7 super(hug1); } //variables/etc. override public function attachTrackingListeners():void { //MethodID:6731, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 56 super.attachTrackingListeners(); addEventListener(UIFTrackEvent.TRACK_GO_INTERACTIVE, trackEventDispatcher); addEventListener(UIFTrackEvent.TRACK_LEAVE_INTERACTIVE, trackEventDispatcher); addEventListener(UIFTrackEvent.TRACK_MUTE, trackEventDispatcher); } } } //script697 package com.eyewonder.instream.events{ //class(instance)_index:697 public class UIFTrackEvent extends UIFEvent { //static constructor public static function UIFTrackEvent$cinit() { //MethodID:6733, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 138 TRACK_LOAD = "trackLoad"; TRACK_EXPAND = "trackExpand"; TRACK_CONTRACT = "trackContract"; TRACK_CLOSE = "trackClose"; TRACK_INTERACTION = "trackInteraction"; TRACK_CLICKTHRU = "trackClickthru"; TRACK_START_OF_VIDEO = "trackStartOfVideo"; TRACK_FIRST_QUARTILE_OF_VIDEO = "trackFirstQuartileOfVideo"; TRACK_MID_OF_VIDEO = "trackMidOfVideo"; TRACK_THIRD_QUARTILE_OF_VIDEO = "trackThirdQuartileOfVideo"; TRACK_END_OF_VIDEO = "trackEndOfVideo"; TRACK_GO_INTERACTIVE = "trackGoInteractive"; TRACK_LEAVE_INTERACTIVE = "trackLeaveInteractive"; TRACK_ENTER_FULLSCREEN = "trackEnterFullscreen"; TRACK_MUTE = "trackMute"; } //static variables/etc. public static const TRACK_LOAD:String = "trackLoad"; //slotID:1 public static const TRACK_EXPAND:String = "trackExpand"; //slotID:2 public static const TRACK_CONTRACT:String = "trackContract"; //slotID:3 public static const TRACK_CLOSE:String = "trackClose"; //slotID:4 public static const TRACK_INTERACTION:String = "trackInteraction";//slotID:5 public static const TRACK_CLICKTHRU:String = "trackClickthru"; //slotID:6 public static const TRACK_START_OF_VIDEO:String = "trackStartOfVideo";//slotID:7 public static const TRACK_FIRST_QUARTILE_OF_VIDEO:String = "trackFirstQuartileOfVideo";//slotID:8 public static const TRACK_MID_OF_VIDEO:String = "trackMidOfVideo";//slotID:9 public static const TRACK_THIRD_QUARTILE_OF_VIDEO:String = "trackThirdQuartileOfVideo";//slotID:10 public static const TRACK_END_OF_VIDEO:String = "trackEndOfVideo";//slotID:11 public static const TRACK_GO_INTERACTIVE:String = "trackGoInteractive";//slotID:12 public static const TRACK_LEAVE_INTERACTIVE:String = "trackLeaveInteractive";//slotID:13 public static const TRACK_ENTER_FULLSCREEN:String = "trackEnterFullscreen";//slotID:14 public static const TRACK_MUTE:String = "trackMute"; //slotID:15 //constructor public function UIFTrackEvent(hug1:String, hug2:Object) { //MethodID:6734, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 8 super(hug1, hug2); } } } //script698 package org.osmf.net{ //class(instance)_index:698 public class FMSHost extends Object { //static constructor public static function FMSHost$cinit() { //MethodID:6736, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function FMSHost(hug1:String, hug2:String=1935) { //MethodID:6737, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 16 super(); this._host = hug1; this._port = hug2; } //variables/etc. private var _host:String; //slotID:0 private var _port:String; //slotID:0 public function get host():String { //MethodID:6738, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._host; } public function set host(hug1:String):void { //MethodID:6739, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this._host = hug1; } public function get port():String { //MethodID:6740, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._port; } public function set port(hug1:String):void { //MethodID:6741, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 8 this._port = hug1; } } } //script699 package Components.Forms{ import flash.display.Sprite import flash.text.TextField import flash.text.TextFieldAutoSize import flash.text.TextFormat //class(instance)_index:699 public class Tab extends Sprite { //static constructor public static function Tab$cinit() { //MethodID:6743, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function Tab(hug1:uint, hug2:String, hug3:Boolean=false):void { //MethodID:6744, LocalCount= 4 , MaxScope= 1, MaxStack= 5, CodeLength= 118 this.textField = new TextField(); super(); buttonMode = true; mouseChildren = false; this._index = hug1; this.textField.defaultTextFormat = new TextFormat("_sans", 13, 0xFFFFFF); this.textField.selectable = false; this.textField.autoSize = TextFieldAutoSize.LEFT; this.textField.text = hug2; addChild(this.textField); this.textField.x = 10; this.textField.y = 3; this.actived = hug3; } //variables/etc. private var _index:uint = 0; //slotID:0 private var textField:TextField; //slotID:0 public function get index():uint { //MethodID:6745, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._index; } public function set actived(hug1:Boolean):void { //MethodID:6746, LocalCount= 2 , MaxScope= 1, MaxStack= 6, CodeLength= 103 mouseEnabled = !hug1; graphics.clear(); if(hug1){ graphics.beginFill(0xFFFFFF, 1); }else{ graphics.beginFill(0x212125, 0.5); } graphics.drawRoundRect(0, 0, Math.round(this.textField.textWidth + 24), 31, 9); this.textField.textColor = (hug1 ? 0 : 0xFFFFFF); } } } //script700 package peace.gui.controls.tooltip{ import flash.display.DisplayObject import flash.display.InteractiveObject import flash.display.Stage import flash.events.MouseEvent import flash.geom.Point import flash.geom.Rectangle import flash.utils.Dictionary //class(instance)_index:700 public class Tooltips extends Object { //static constructor public static function Tooltips$cinit() { //MethodID:6748, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 24 hideOnClick = true; map = new Dictionary(false); } //static variables/etc. public static var hideOnClick:Boolean = true; //slotID:1 protected static var map:Dictionary; //slotID:2 public static function bind(hug1:InteractiveObject, hug2:DisplayObject):void { //dispID:3, MethodID:6749, LocalCount= 3 , MaxScope= 1, MaxStack= 6, CodeLength= 64 if(map[hug1]) unbind(hug1); map[hug1] = hug2; hug1.addEventListener(MouseEvent.ROLL_OVER, onRollOver, false, 0, true); hug1.addEventListener(MouseEvent.ROLL_OUT, onRollOut, false, 0, true); } public static function unbind(hug1:InteractiveObject):void { //dispID:4, MethodID:6750, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 74 if(map[hug1]){ hug1.removeEventListener(MouseEvent.ROLL_OVER, onRollOver); hug1.removeEventListener(MouseEvent.ROLL_OUT, onRollOut); hug1.removeEventListener(MouseEvent.MOUSE_MOVE, onMouseMove); hug1.removeEventListener(MouseEvent.MOUSE_DOWN, onMouseDown); } delete map[hug1]; } private static function onRollOver(hug1:MouseEvent):void { //dispID:5, MethodID:6751, LocalCount= 4 , MaxScope= 1, MaxStack= 6, CodeLength= 81 var hug2:InteractiveObject = InteractiveObject(hug1.currentTarget); var hug3:DisplayObject = DisplayObject(map[hug2]); hug2.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove, false, 0, true); hug2.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown, false, 0, true); hug2.stage.addChild(hug3); onMouseMove(hug1); } private static function onRollOut(hug1:MouseEvent):void { //dispID:6, MethodID:6752, LocalCount= 5 , MaxScope= 1, MaxStack= 3, CodeLength= 105 var hug2:InteractiveObject = InteractiveObject(hug1.currentTarget); var hug3:DisplayObject = DisplayObject(map[hug2]); hug2.removeEventListener(MouseEvent.MOUSE_MOVE, onMouseMove); hug2.removeEventListener(MouseEvent.MOUSE_DOWN, onMouseDown); var hug4:Stage = (hug2.stage || hug3.stage); if(hug4 && hug4.contains(hug3)) hug4.removeChild(hug3); } protected static function onMouseMove(hug1:MouseEvent):void { //dispID:7, MethodID:6753, LocalCount= 6 , MaxScope= 1, MaxStack= 5, CodeLength= 177 var hug2:InteractiveObject = null; hug2 = InteractiveObject(hug1.currentTarget); var hug3:DisplayObject = DisplayObject(map[hug2]); var hug4:Point = new Point(0, 20); var hug5:Rectangle = new Rectangle(hug1.stageX, hug1.stageY, hug3.width, hug3.height); hug3.x = Math.min((hug2.stage.stageWidth - hug5.width), (hug5.x + hug4.x)); if((hug5.bottom + hug4.y) > hug2.stage.stageHeight){ hug3.y = ((hug5.y - hug5.height) - (hug4.y / 2)); }else{ hug3.y = (hug5.y + hug4.y); } hug1.updateAfterEvent(); } private static function onMouseDown(hug1:MouseEvent):void { //dispID:8, MethodID:6754, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 18 if(hideOnClick) onRollOut(hug1); } //constructor public function Tooltips() { //MethodID:6755, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 super(); } } } //script701 package peace.util{ import flash.utils.Dictionary //class(instance)_index:701 public class ArraysIntersection extends Object { //static constructor public static function ArraysIntersection$cinit() { //MethodID:6757, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function ArraysIntersection(hug1:Array, hug2:Array, hug3:String) { //MethodID:6758, LocalCount= 9 , MaxScope= 1, MaxStack= 5, CodeLength= 201 var hug4:Object = null; this.added = []; this.deleted = []; this.updated = new Dictionary(true); super(); var hug5:Object = Arrays.toHash(hug1, hug3); var hug6:Object = Arrays.toHash(hug2, hug3); for each(hug4 in hug1){ if(hug6[hug4[hug3]]){ this.updated[hug4] = hug6[hug4[hug3]]; }else{ this.deleted.push(hug4); } } for each(hug4 in hug2){ if(!hug5[hug4[hug3]]) this.added.push(hug4); } } //variables/etc. public var added:Array; //slotID:0 public var deleted:Array; //slotID:0 public var updated:Dictionary; //slotID:0 } } //script702 package actioplayer.view.control{ import actioplayer.ActioPlayer import actioplayer.model.Action import actioplayer.view.skin.Skinner import flash.display.Bitmap import flash.display.Sprite import flash.filters.BitmapFilterQuality import flash.filters.DropShadowFilter import flash.text.TextField import flash.text.TextFieldAutoSize import flash.text.TextFormat import peace.gui.layout.Align import peace.gui.layout.Container import peace.gui.layout.RowLayout import peace.gui.layout.Valign //class(instance)_index:702 public class LinkTooltip extends Sprite { //static constructor public static function LinkTooltip$cinit() { //MethodID:6760, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function LinkTooltip(hug1:ActioPlayer, hug2:Action=null) { //MethodID:6761, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 26 this.tf = new TextField(); super(); this.player = hug1; this.init(hug2); } //variables/etc. public var action:Action; //slotID:0 protected var maxTextWidth:Number = 250.0; //slotID:0 protected var c:Container; //slotID:0 protected var tf:TextField; //slotID:0 private var player:ActioPlayer; //slotID:0 protected function init(hug1:Action=null):void { //MethodID:6762, LocalCount= 4 , MaxScope= 1, MaxStack= 6, CodeLength= 135 var hug2:RowLayout = new RowLayout(); var hug3:int = 5; hug2.padding.right = hug3; hug2.padding.bottom = hug3; hug2.padding.top = hug3; hug2.padding.left = hug3; hug2.hSpacing = 2; hug2.align = Align.LEFT; hug2.valign = Valign.MIDDLE; this.c = new Container(hug2); mouseChildren = mouseEnabled = false; this.initContent(); this.initShadow(); if(hug1) this.data = hug1; } protected function initContent():void { //MethodID:6763, LocalCount= 1 , MaxScope= 1, MaxStack= 5, CodeLength= 56 this.tf.selectable = false; this.tf.defaultTextFormat = new TextFormat("Arial", 12, 0xFFFFFF); this.tf.autoSize = TextFieldAutoSize.LEFT; addChild(this.c); } protected function drawBackground():void { //MethodID:6764, LocalCount= 1 , MaxScope= 1, MaxStack= 5, CodeLength= 52 graphics.clear(); graphics.beginFill(0, 0.5); graphics.drawRect(0, 0, this.c.width, this.c.height); graphics.endFill(); } protected function initShadow():void { //MethodID:6765, LocalCount= 3 , MaxScope= 1, MaxStack= 4, CodeLength= 60 var hug1:DropShadowFilter = new DropShadowFilter(); hug1.distance = 2; hug1.alpha = 0.5; var hug2:int = 10; hug1.blurY = hug2; hug1.blurX = hug2; hug1.quality = BitmapFilterQuality.HIGH; filters = [hug1]; } public function set data(hug1:Action):void { //MethodID:6766, LocalCount= 5 , MaxScope= 1, MaxStack= 4, CodeLength= 297 var hug2:Bitmap = null; if(!hug1 || (this.action == hug1)) return; this.action = hug1; this.c.removeAll(); var hug3:Skinner = this.player.skinner; if((hug1.linkType == Action.FRAME_LINK) || (hug1.linkType == Action.SCENARIO_LINK)){ hug2 = new hug3.tooltipScenarioLink(); }else if(hug1.linkType == Action.WEB_LINK){ hug2 = new hug3.tooltipWebLink(); }else if(hug1.sidebarOnClick){ hug2 = new hug3.tooltipSidebarLink(); }else if(hug1.popupOnClick){ hug2 = new hug3.tooltipPopupLink(); } if(hug2) this.c.add(hug2); var hug4:Boolean = false; this.tf.multiline = hug4; this.tf.wordWrap = hug4; this.tf.text = hug1.name; if(this.tf.width > this.maxTextWidth){ var hug4:Boolean = true; this.tf.multiline = hug4; this.tf.wordWrap = hug4; this.tf.width = this.maxTextWidth; } this.c.add(this.tf); this.c.arrange(); if(hug2) hug2.y += 1; this.drawBackground(); } public function get data():Action { //MethodID:6767, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this.action; } } } //script703 package actioplayer.view.control{ import actioplayer.ActioPlayer import actioplayer.model.Action import actioplayer.transport.Statistics import actioplayer.view.skin.Skinner import axelr.utils.serialization.json.JSON import flash.display.DisplayObject import flash.display.Graphics import flash.display.Sprite import flash.events.Event import flash.events.MouseEvent import flash.events.TextEvent import flash.events.TimerEvent import flash.filters.DropShadowFilter import flash.geom.Point import flash.text.StyleSheet import flash.text.TextField import flash.text.TextFieldAutoSize import flash.text.TextFormat import flash.utils.Timer import htmllooker.events.HTMLEvent import peace.data.Dimensions import peace.gui.controls.scroll.Scrollpane import peace.util.Logger //class(instance)_index:703 public class Popup extends Sprite { //static constructor public static function Popup$cinit() { //MethodID:6769, LocalCount= 1 , MaxScope= 1, MaxStack= 4, CodeLength= 174 DEFAULT = 0; DIALOG = 1; THINK = 2; TRANSPARENT = 3; SIZE = new Dimensions(200, 150); CSS = new StyleSheet(); CSS2 = new StyleSheet(); TRUNCATION_INDICATOR = "..."; PROPERTY_CHANGE = "propertyChange"; CSS.parseCSS("a {color: #0099ff; text-decoration: underline;}" + " html {fontFamily:Arial; fontSize:12; color: #ffffff;}" + " h1 {fontFamily:Arial; fontSize:20; fontWeight:bold; color: #ffffff;}" + " h2 {fontFamily:Arial; fontSize:18; fontWeight:bold; color: #ffffff;}" + " h3 {fontFamily:Arial; fontSize:16; fontWeight:bold; color: #ffffff;}" + " h4 {fontFamily:Arial; fontSize:14; fontWeight:bold; color: #ffffff;}" + " h5 {fontFamily:Arial; fontSize:12; fontWeight:bold; color: #ffffff;}" + " h6 {fontFamily:Arial; fontSize:10; fontWeight:bold; color: #ffffff;}"); CSS2.parseCSS("a {color: #0099ff; text-decoration: underline;}" + " html {fontFamily:Arial; fontSize:12; color: #000000;}" + " h1 {fontFamily:Arial; fontSize:20; fontWeight:bold; color: #000000;}" + " h2 {fontFamily:Arial; fontSize:18; fontWeight:bold; color: #000000;}" + " h3 {fontFamily:Arial; fontSize:16; fontWeight:bold; color: #000000;}" + " h4 {fontFamily:Arial; fontSize:14; fontWeight:bold; color: #000000;}" + " h5 {fontFamily:Arial; fontSize:12; fontWeight:bold; color: #000000;}" + " h6 {fontFamily:Arial; fontSize:10; fontWeight:bold; color: #000000;}"); } //static variables/etc. public static const DEFAULT:int = 0; //slotID:1 public static const DIALOG:int = 1; //slotID:2 public static const THINK:int = 2; //slotID:3 public static const TRANSPARENT:int = 3; //slotID:4 public static const SIZE:Dimensions; //slotID:5 public static const CSS:StyleSheet; //slotID:6 public static const CSS2:StyleSheet; //slotID:7 private static const TRUNCATION_INDICATOR:String = "..."; //slotID:8 public static const PROPERTY_CHANGE:String = "propertyChange"; //slotID:9 //constructor public function Popup(hug1:Action, hug2:ActioPlayer) { //MethodID:6798, LocalCount= 3 , MaxScope= 1, MaxStack= 4, CodeLength= 116 this._size = SIZE; this.background = new Sprite(); this.shadow = new Sprite(); this._closeButton = new Sprite(); this._head = new Sprite(); this._timer = new Timer(this.TIMER_DELAY, 1); this._titleField = new TextField(); this._anchorPoint = new Point(); this._initialPoint = new Point(); super(); this.player = hug2; this.action = hug1; this.setupListeners(); } //variables/etc. private const TIMER_DELAY:int = 0x5265C00; //slotID:0 private const GAP:int = 0; //slotID:0 private const BACKGROUND_ALPHA:Number = 0.8; //slotID:0 private const BACKGROUND_COLOR:Number = 0.0; //slotID:0 private var addedToStage:Boolean = false; //slotID:0 public var browser:ActioBrowser; //slotID:0 private var _sizeType:int = 0; //slotID:0 private var _size:Dimensions; //slotID:0 private var startPoint:Point; //slotID:0 private var topLeftPoint:Point; //slotID:0 private var _action:Action; //slotID:0 private var backgroundColor:uint = 0; //slotID:0 private var backgroundAlpha:Number = 0.8; //slotID:0 private var hasBackground:Boolean = true; //slotID:0 private var background:Sprite; //slotID:0 private var shadow:Sprite; //slotID:0 private var _cornerRadius:uint = 0; //slotID:0 private var _borderColor:uint = 0x424242; //slotID:0 private var _borderThickness:uint = 1; //slotID:0 private var _borderAlpha:Number = 0.8; //slotID:0 private var _border:Boolean = true; //slotID:0 private var _dragable:Boolean = false; //slotID:0 private var _useCloseButton:Boolean = true; //slotID:0 private var _setCloseButton:Boolean = false; //slotID:0 private var _closeButton:DisplayObject; //slotID:0 private var _head:Sprite; //slotID:0 private var _timer:Timer; //slotID:0 private var _useTitle:Boolean = false; //slotID:0 private var _titleField:TextField; //slotID:0 private var _type:int = 0; //slotID:0 private var _anchorPoint:Point; //slotID:0 private var _initialPoint:Point; //slotID:0 private var linkBeforeClick:Boolean = false; //slotID:0 private var _paddingLeft:int = 7; //slotID:0 private var _paddingTop:int = 7; //slotID:0 private var _paddingRight:int = 7; //slotID:0 private var _paddingBottom:int = 7; //slotID:0 private var _userWidth:int = 200; //slotID:0 private var _userHeight:int = 150; //slotID:0 private var _innerWidth:int; //slotID:0 private var _innerHeight:int; //slotID:0 private var player:ActioPlayer; //slotID:0 private var sp:ExtScrollpane; //slotID:0 private function set size(hug1:Dimensions):void { //MethodID:6770, LocalCount= 4 , MaxScope= 1, MaxStack= 4, CodeLength= 371 var hug2:Boolean = false; if(hug1){ if((hug1.width > 0) && (hug1.width <= 1)) hug2 = true; } if((this._sizeType == Action.PERCENTS_SIZE) || hug2){ if(hug1){ this._userWidth = ((hug1.width * this.player.screen.videoSize.width * this.player.screen.scaleRatio.x) / (hug2 ? 1 : 100)); this._userHeight = ((hug1.height * this.player.screen.videoSize.height * this.player.screen.scaleRatio.y) / (hug2 ? 1 : 100)); this._innerWidth = ((hug1.width * this.player.screen.videoSize.width) / (hug2 ? 1 : 100)); this._innerHeight = ((hug1.height * this.player.screen.videoSize.height) / (hug2 ? 1 : 100)); }else{ this._innerWidth = this._userWidth = SIZE.width; this._innerHeight = this._userHeight = SIZE.height; } }else if(hug1){ this._innerWidth = this._userWidth = hug1.width; this._innerHeight = this._userHeight = hug1.height; }else{ this._innerWidth = this._userWidth = SIZE.width; this._innerHeight = this._userHeight = SIZE.height; } } private function recalcPoints():void { //MethodID:6771, LocalCount= 4 , MaxScope= 1, MaxStack= 5, CodeLength= 510 var hug2:Number = NaN; var hug3:Number = NaN; var hug1:Boolean = false; if(this.topLeftPoint){ if(((this.topLeftPoint.x > 0) && (this.topLeftPoint.x < 1)) || ((this.topLeftPoint.y > 0) && (this.topLeftPoint.y < 1))) hug1 = true; } if(this.startPoint && this.topLeftPoint){ if(hug1){ this._anchorPoint = new Point(((this.player.screen.videoSize.width * this.startPoint.x * this.player.screen.scaleRatio.x) + this.player.screen.markers.x), ((this.player.screen.videoSize.height * this.startPoint.y * this.player.screen.scaleRatio.y) + this.player.screen.markers.y)); }else{ this._anchorPoint = new Point(((this.startPoint.x * this.player.screen.scaleRatio.x) + this.player.screen.markers.x), ((this.startPoint.y * this.player.screen.scaleRatio.y) + this.player.screen.markers.y)); } } if(this.topLeftPoint){ if(hug1){ hug2 = ((this.topLeftPoint.x * this.player.screen.videoSize.width * this.player.screen.scaleRatio.x) + this.player.screen.markers.x); hug3 = ((this.topLeftPoint.y * this.player.screen.videoSize.height * this.player.screen.scaleRatio.y) + this.player.screen.markers.y); }else{ hug2 = ((this.topLeftPoint.x * this.player.screen.scaleRatio.x) + this.player.screen.markers.x); hug3 = ((this.topLeftPoint.y * this.player.screen.scaleRatio.y) + this.player.screen.markers.y); } this._initialPoint = new Point(hug2, hug3); this.x = hug2; this.y = hug3; } } public function get action():Action { //MethodID:6772, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._action; } public function set action(hug1:Action):void { //MethodID:6773, LocalCount= 2 , MaxScope= 1, MaxStack= 6, CodeLength= 722 if(hug1 != null){ this._action = hug1; this._type = this._action.popupType; this.browser = null; if(hug1.popupTransparency == (-1)){ this.backgroundAlpha = this.BACKGROUND_ALPHA; }else{ this.backgroundAlpha = (1 - (hug1.popupTransparency / 100)); } this._borderAlpha = this.backgroundAlpha; this.backgroundColor = this._action.popupColor; if(this._action.popupTextColor){ CSS.parseCSS("a {color: #0099ff; text-decoration: underline;}" + " html {fontFamily:Arial; fontSize:12; color: #" + this._action.popupTextColor.toString(16) + ";}" + " h1 {fontFamily:Arial; fontSize:20; fontWeight:bold; color: #" + this._action.popupTextColor.toString(16) + ";}" + " h2 {fontFamily:Arial; fontSize:18; fontWeight:bold; color: #" + this._action.popupTextColor.toString(16) + ";}" + " h3 {fontFamily:Arial; fontSize:16; fontWeight:bold; color: #" + this._action.popupTextColor.toString(16) + ";}" + " h4 {fontFamily:Arial; fontSize:14; fontWeight:bold; color: #" + this._action.popupTextColor.toString(16) + ";}" + " h5 {fontFamily:Arial; fontSize:12; fontWeight:bold; color: #" + this._action.popupTextColor.toString(16) + ";}" + " h6 {fontFamily:Arial; fontSize:10; fontWeight:bold; color: #" + this._action.popupTextColor.toString(16) + ";}"); CSS2.parseCSS("a {color: #0099ff; text-decoration: underline;}" + " html {fontFamily:Arial; fontSize:12; color: #" + this._action.popupTextColor.toString(16) + ";}" + " h1 {fontFamily:Arial; fontSize:20; fontWeight:bold; color: #" + this._action.popupTextColor.toString(16) + ";}" + " h2 {fontFamily:Arial; fontSize:18; fontWeight:bold; color: #" + this._action.popupTextColor.toString(16) + ";}" + " h3 {fontFamily:Arial; fontSize:16; fontWeight:bold; color: #" + this._action.popupTextColor.toString(16) + ";}" + " h4 {fontFamily:Arial; fontSize:14; fontWeight:bold; color: #" + this._action.popupTextColor.toString(16) + ";}" + " h5 {fontFamily:Arial; fontSize:12; fontWeight:bold; color: #" + this._action.popupTextColor.toString(16) + ";}" + " h6 {fontFamily:Arial; fontSize:10; fontWeight:bold; color: #" + this._action.popupTextColor.toString(16) + ";}"); } this._sizeType = this._action.popupSizeType; this._size = this._action.popupSize; this.size = this._size; this._useCloseButton = !this._action.popupHasntCloseButton; this.startPoint = this._action.popupStartPoint; this.topLeftPoint = this._action.popupTopLeftPoint; this._timer = new Timer(((this._action.popupDisplayTime > 0) ? (this._action.popupDisplayTime * 1000) : this.TIMER_DELAY), 1); if(hasEventListener(MouseEvent.CLICK)) removeEventListener(MouseEvent.CLICK, this.onClick); if(this._action.popupStatic && (this._action.sidebarOnClick || this._action.pictureOnClick || (this._action.linkType != Action.EMPTY_LINK))) addEventListener(MouseEvent.CLICK, this.onClick, false, 0, true); if(this.browser){ if(this._action.linkInPopup){ this.browser.url = this._action.popupContent; }else{ ActioBrowser(this.browser).content = this._action.popupContent; } } dispatchEvent(new Event(PROPERTY_CHANGE)); } } public function get cornerRadius():uint { //MethodID:6774, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._cornerRadius; } public function set cornerRadius(hug1:uint):void { //MethodID:6775, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 17 if(this._cornerRadius != hug1) this._cornerRadius = hug1; } public function get borderColor():uint { //MethodID:6776, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._borderColor; } public function set borderColor(hug1:uint):void { //MethodID:6777, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 17 if(this._borderColor != hug1) this._borderColor = hug1; } public function get borderThickness():uint { //MethodID:6778, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._borderThickness; } public function set borderThickness(hug1:uint):void { //MethodID:6779, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 17 if(this._borderThickness != hug1) this._borderThickness = hug1; } public function get borderAlpha():Number { //MethodID:6780, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._borderAlpha; } public function set borderAlpha(hug1:Number):void { //MethodID:6781, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 29 if((this._borderAlpha != hug1) && (hug1 <= 1)) this._borderAlpha = hug1; } public function get border():Boolean { //MethodID:6782, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._border; } public function set border(hug1:Boolean):void { //MethodID:6783, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 17 if(this._border != hug1) this._border = hug1; } public function get dragable():Boolean { //MethodID:6784, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._dragable; } public function set dragable(hug1:Boolean):void { //MethodID:6785, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 17 if(this._dragable != hug1) this._dragable = hug1; } public function get closeButton():DisplayObject { //MethodID:6786, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._closeButton; } public function set closeButton(hug1:DisplayObject):void { //MethodID:6787, LocalCount= 2 , MaxScope= 1, MaxStack= 6, CodeLength= 55 if(this._closeButton != hug1){ this._closeButton = hug1; this._closeButton.addEventListener(MouseEvent.CLICK, this.onClose, false, 0, true); this._setCloseButton = ((hug1 == null) ? false : true); } } public function get timer():Timer { //MethodID:6788, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._timer; } public function get useTitle():Boolean { //MethodID:6789, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._useTitle; } public function set useTitle(hug1:Boolean):void { //MethodID:6790, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 17 if(this._useTitle != hug1) this._useTitle = hug1; } public function get titleField():TextField { //MethodID:6791, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 24 return (this._useTitle ? this._titleField : null); } public function get title():String { //MethodID:6792, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 10 return this._titleField.text; } public function set title(hug1:String):void { //MethodID:6793, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 54 if(this._titleField.htmlText != hug1){ if((hug1 == null) || (hug1 == "")){ this._useTitle = false; }else{ this._useTitle = true; this._titleField.htmlText = hug1; } } } public function get type():int { //MethodID:6794, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._type; } public function get anchorPoint():Point { //MethodID:6795, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 20 if(this._type != DEFAULT) return this._anchorPoint; return null; } public function set anchorPoint(hug1:Point):void { //MethodID:6796, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 32 if(this._anchorPoint != hug1){ this._anchorPoint = hug1; dispatchEvent(new Event(PROPERTY_CHANGE)); } } public function set initialPoint(hug1:Point):void { //MethodID:6797, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 32 if(this._initialPoint != hug1){ this._initialPoint = hug1; dispatchEvent(new Event(PROPERTY_CHANGE)); } } private function setupListeners():void { //MethodID:6799, LocalCount= 1 , MaxScope= 1, MaxStack= 6, CodeLength= 167 this.addEventListener(Event.ADDED_TO_STAGE, this.draw, false, 0, true); this.addEventListener(PROPERTY_CHANGE, this.draw, false, 0, true); this._timer.addEventListener(TimerEvent.TIMER_COMPLETE, this.onClose, false, 0, true); if(this._dragable){ this._head.addEventListener(MouseEvent.MOUSE_DOWN, this.dragHandler, false, 0, true); this._head.addEventListener(MouseEvent.MOUSE_UP, this.dragHandler, false, 0, true); } this._closeButton.addEventListener(MouseEvent.CLICK, this.onClose, false, 0, true); if((this.action.popupDisplayTime > 0) || (this.action.popupDisplayTime < 0)) this._timer.start(); } private function onClick(hug1:MouseEvent):void { //MethodID:6800, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 89 if(((hug1.target != this._closeButton) && (!this.sp.contains(hug1.target as DisplayObject) || (hug1.target == this.sp.MouseShield))) && !this.linkBeforeClick) this.player.controller.doAction(this._action, true); this.linkBeforeClick = false; } public function draw(hug1:Event=null, hug2:Boolean=false):void { //MethodID:6801, LocalCount= 24 , MaxScope= 1, MaxStack= 11, CodeLength= 4492 var hug4:int = 0; var hug5:String = null; var hug6:Number = NaN; var hug7:Number = NaN; var hug8:Graphics = null; var hug10:Point = null; var hug11:Number = NaN; var hug12:Number = NaN; var hug13:Number = NaN; var hug14:Number = NaN; var hug15:Number = NaN; var hug16:Number = NaN; var hug17:Number = NaN; var hug18:Number = NaN; var hug19:Number = NaN; var hug20:Number = NaN; var hug21:Number = NaN; var hug22:Number = NaN; this._timer.stop(); if(hug1 && (hug1.type == Event.ADDED_TO_STAGE)) this.addedToStage = true; if(!this.addedToStage) return; this.size = this._size; this.recalcPoints(); var hug3:Graphics = this.background.graphics; hug3.clear(); if(this.hasBackground) hug3.beginFill(((this.backgroundColor == 0) ? this.BACKGROUND_COLOR : this.backgroundColor), 1); if(this._border){ hug3.lineStyle(this._borderThickness, this._borderColor, this._borderAlpha); }else{ hug3.lineStyle(); } switch(this._type){ case TRANSPARENT: hug3.beginFill(this.backgroundColor, 0); hug3.lineStyle(this._borderThickness, this._borderColor, 0); case DEFAULT: hug3.drawRoundRect(0, 0, this._userWidth, this._userHeight, this._cornerRadius, this._cornerRadius); break; case DIALOG: hug5 = ""; if(this._anchorPoint.x < (this._initialPoint.x + (this._userWidth / 2))){ hug5 += "0"; }else{ hug5 += "1"; } if(this._anchorPoint.y < (this._initialPoint.y + (this._userHeight / 2))){ hug5 += "0"; }else{ hug5 += "1"; } if((this._anchorPoint.x >= this._initialPoint.x) && (this._anchorPoint.x <= (this._initialPoint.x + this._userWidth)) && (this._anchorPoint.y >= this._initialPoint.y) && (this._anchorPoint.y <= (this._initialPoint.y + this._userHeight))) hug5 = "inside"; var hug23:String = hug5; switch(hug23){ case "00": hug6 = (this._userHeight / this._userWidth); hug7 = (this._initialPoint.y - (this._initialPoint.x * hug6)); if(((hug6 * this._anchorPoint.x) + hug7) > this._anchorPoint.y){ hug4 = (((this._userWidth / 2) - this._cornerRadius) / 10); hug3.moveTo((this._cornerRadius + hug4), 0); hug3.lineTo((this._anchorPoint.x - this._initialPoint.x), (this._anchorPoint.y - this._initialPoint.y)); hug3.lineTo(((this._userWidth / 2) - hug4), 0); hug3.lineTo((this._userWidth - this._cornerRadius), 0); hug3.curveTo(this._userWidth, 0, this._userWidth, this._cornerRadius); hug3.lineTo(this._userWidth, (this._userHeight - this._cornerRadius)); hug3.curveTo(this._userWidth, this._userHeight, (this._userWidth - this._cornerRadius), this._userHeight); hug3.lineTo(this._cornerRadius, this._userHeight); hug3.curveTo(0, this._userHeight, 0, (this._userHeight - this._cornerRadius)); hug3.lineTo(0, this._cornerRadius); hug3.curveTo(0, 0, this._cornerRadius, 0); hug3.lineTo((this._cornerRadius + hug4), 0); }else{ hug4 = (((this._userHeight / 2) - this._cornerRadius) / 10); hug3.moveTo(0, ((this._userHeight / 2) - hug4)); hug3.lineTo((this._anchorPoint.x - this._initialPoint.x), (this._anchorPoint.y - this._initialPoint.y)); hug3.lineTo(0, (this._cornerRadius + hug4)); hug3.lineTo(0, this._cornerRadius); hug3.curveTo(0, 0, this._cornerRadius, 0); hug3.lineTo((this._userWidth - this._cornerRadius), 0); hug3.curveTo(this._userWidth, 0, this._userWidth, this._cornerRadius); hug3.lineTo(this._userWidth, (this._userHeight - this._cornerRadius)); hug3.curveTo(this._userWidth, this._userHeight, (this._userWidth - this._cornerRadius), this._userHeight); hug3.lineTo(this._cornerRadius, this._userHeight); hug3.curveTo(0, this._userHeight, 0, (this._userHeight - this._cornerRadius)); hug3.lineTo(0, ((this._userHeight / 2) - hug4)); } break; case "01": hug6 = (-this._userHeight / this._userWidth); hug7 = (this._initialPoint.y + this._userHeight - (hug6 * this._initialPoint.x)); if(((hug6 * this._anchorPoint.x) + hug7) < this._anchorPoint.y){ hug4 = (((this._userWidth / 2) - this._cornerRadius) / 10); hug3.moveTo((this._cornerRadius + hug4), this._userHeight); hug3.lineTo((this._anchorPoint.x - this._initialPoint.x), (this._anchorPoint.y - this._initialPoint.y)); hug3.lineTo(((this._userWidth / 2) - hug4), this._userHeight); hug3.lineTo((this._userWidth - this._cornerRadius), this._userHeight); hug3.curveTo(this._userWidth, this._userHeight, this._userWidth, (this._userHeight - this._cornerRadius)); hug3.lineTo(this._userWidth, this._cornerRadius); hug3.curveTo(this._userWidth, 0, (this._userWidth - this._cornerRadius), 0); hug3.lineTo(this._cornerRadius, 0); hug3.curveTo(0, 0, 0, this._cornerRadius); hug3.lineTo(0, (this._userHeight - this._cornerRadius)); hug3.curveTo(0, this._userHeight, this._cornerRadius, this._userHeight); hug3.lineTo((this._cornerRadius + hug4), this._userHeight); }else{ hug4 = (((this._userHeight / 2) - this._cornerRadius) / 10); hug3.moveTo(0, ((this._userHeight / 2) + hug4)); hug3.lineTo((this._anchorPoint.x - this._initialPoint.x), (this._anchorPoint.y - this._initialPoint.y)); hug3.lineTo(0, (this._userHeight - this._cornerRadius - hug4)); hug3.lineTo(0, (this._userHeight - this._cornerRadius)); hug3.curveTo(0, this._userHeight, this._cornerRadius, this._userHeight); hug3.lineTo((this._userWidth - this._cornerRadius), this._userHeight); hug3.curveTo(this._userWidth, this._userHeight, this._userWidth, (this._userHeight - this._cornerRadius)); hug3.lineTo(this._userWidth, this._cornerRadius); hug3.curveTo(this._userWidth, 0, (this._userWidth - this._cornerRadius), 0); hug3.lineTo(this._cornerRadius, 0); hug3.curveTo(0, 0, 0, this._cornerRadius); hug3.lineTo(0, ((this._userHeight / 2) + hug4)); } break; case "10": hug6 = (-this._userHeight / this._userWidth); hug7 = (this._initialPoint.x - (hug6 * (this._initialPoint.x + this._userWidth))); if(((hug6 * this._anchorPoint.x) + hug7) < this._anchorPoint.y){ hug4 = (((this._userHeight / 2) - this._cornerRadius) / 10); hug3.moveTo(this._userWidth, (this._cornerRadius + hug4)); hug3.lineTo((this._anchorPoint.x - this._initialPoint.x), (this._anchorPoint.y - this._initialPoint.y)); hug3.lineTo(this._userWidth, ((this._userHeight / 2) - hug4)); hug3.lineTo(this._userWidth, (this._userHeight - this._cornerRadius)); hug3.curveTo(this._userWidth, this._userHeight, (this._userWidth - this._cornerRadius), this._userHeight); hug3.lineTo(this._cornerRadius, this._userHeight); hug3.curveTo(0, this._userHeight, 0, (this._userHeight - this._cornerRadius)); hug3.lineTo(0, this._cornerRadius); hug3.curveTo(0, 0, this._cornerRadius, 0); hug3.lineTo((this._userWidth - this._cornerRadius), 0); hug3.curveTo(this._userWidth, 0, this._userWidth, this._cornerRadius); hug3.lineTo(this._userWidth, (this._cornerRadius + hug4)); }else{ hug4 = (((this._userWidth / 2) - this._cornerRadius) / 10); hug3.moveTo(((this._userWidth / 2) + hug4), 0); hug3.lineTo((this._anchorPoint.x - this._initialPoint.x), (this._anchorPoint.y - this._initialPoint.y)); hug3.lineTo((this._userWidth - this._cornerRadius - hug4), 0); hug3.lineTo((this._userWidth - this._cornerRadius), 0); hug3.curveTo(this._userWidth, 0, this._userWidth, this._cornerRadius); hug3.lineTo(this._userWidth, (this._userHeight - this._cornerRadius)); hug3.curveTo(this._userWidth, this._userHeight, (this._userWidth - this._cornerRadius), this._userHeight); hug3.lineTo(this._cornerRadius, this._userHeight); hug3.curveTo(0, this._userHeight, 0, (this._userHeight - this._cornerRadius)); hug3.lineTo(0, this._cornerRadius); hug3.curveTo(0, 0, this._cornerRadius, 0); hug3.lineTo(((this._userWidth / 2) + hug4), 0); } break; case "11": hug6 = (this._userHeight / this._userWidth); hug7 = ((this._initialPoint.y + this._userHeight) - (hug6 * (this._initialPoint.x + this._userWidth))); if(((hug6 * this._anchorPoint.x) + hug7) > this._anchorPoint.y){ hug4 = (((this._userHeight / 2) - this._cornerRadius) / 10); hug3.moveTo(this._userWidth, ((this._userHeight / 2) + hug4)); hug3.lineTo((this._anchorPoint.x - this._initialPoint.x), (this._anchorPoint.y - this._initialPoint.y)); hug3.lineTo(this._userWidth, (this._userHeight - this._cornerRadius - hug4)); hug3.lineTo(this._userWidth, (this._userHeight - this._cornerRadius)); hug3.curveTo(this._userWidth, this._userHeight, (this._userWidth - this._cornerRadius), this._userHeight); hug3.lineTo(this._cornerRadius, this._userHeight); hug3.curveTo(0, this._userHeight, 0, (this._userHeight - this._cornerRadius)); hug3.lineTo(0, this._cornerRadius); hug3.curveTo(0, 0, this._cornerRadius, 0); hug3.lineTo((this._userWidth - this._cornerRadius), 0); hug3.curveTo(this._userWidth, 0, this._userWidth, this._cornerRadius); hug3.lineTo(this._userWidth, ((this._userHeight / 2) + hug4)); }else{ hug4 = (((this._userWidth / 2) - this._cornerRadius) / 10); hug3.moveTo((this._userWidth - this._cornerRadius - hug4), this._userHeight); hug3.lineTo((this._anchorPoint.x - this._initialPoint.x), (this._anchorPoint.y - this._initialPoint.y)); hug3.lineTo(((this._userWidth / 2) + hug4), this._userHeight); hug3.lineTo(this._cornerRadius, this._userHeight); hug3.curveTo(0, this._userHeight, 0, (this._userHeight - this._cornerRadius)); hug3.lineTo(0, this._cornerRadius); hug3.curveTo(0, 0, this._cornerRadius, 0); hug3.lineTo((this._userWidth - this._cornerRadius), 0); hug3.curveTo(this._userWidth, 0, this._userWidth, this._cornerRadius); hug3.lineTo(this._userWidth, (this._userHeight - this._cornerRadius)); hug3.curveTo(this._userWidth, this._userHeight, (this._userWidth - this._cornerRadius), this._userHeight); hug3.lineTo((this._userWidth - this._cornerRadius - hug4), this._userHeight); } break; default: hug3.drawRoundRect(0, 0, this._userWidth, this._userHeight, (2 * this._cornerRadius), (2 * this._cornerRadius)); break; } break; case THINK: hug10 = new Point((this._anchorPoint.x - this._initialPoint.x), (this._anchorPoint.y - this._initialPoint.y)); hug11 = ((this._userWidth / 2) - hug10.x); hug12 = ((this._userHeight / 2) - hug10.y); if(hug11 != 0) hug6 = ((hug11 != 0) ? (hug12 / hug11) : (hug11 / hug12)); hug13 = ((this._userWidth * Math.SQRT2) / 2); hug7 = ((this._userHeight * Math.SQRT2) / 2); hug14 = ((hug11 != 0) ? (hug10.y - (hug6 * hug10.x)) : (this._userWidth / 2)); if(hug11 != 0){ hug15 = Math.sqrt((((((-2 * hug13 * hug13 * hug6 * hug14 * hug7 * hug7) * (this._userWidth / 2)) + (((2 * hug7 * hug7) * (this._userWidth / 2) * hug13 * hug13 * hug6) * (this._userHeight / 2)) - (hug7 * hug7 * hug13 * hug13 * hug14 * hug14)) + ((2 * hug7 * hug7 * hug13 * hug13 * hug14) * (this._userHeight / 2))) - (((hug7 * hug7 * hug13 * hug13) * (this._userHeight / 2)) * (this._userHeight / 2)) + (hug7 * hug7 * hug7 * hug7 * hug13 * hug13)) - (((hug13 * hug13 * hug6 * hug6 * hug7 * hug7) * (this._userWidth / 2)) * (this._userWidth / 2)) + (hug13 * hug13 * hug13 * hug13 * hug6 * hug6 * hug7 * hug7)); hug16 = ((((-hug13 * hug13 * hug6 * hug14) + ((hug7 * hug7) * (this._userWidth / 2))) + ((hug13 * hug13 * hug6) * (this._userHeight / 2)) + hug15) / ((hug7 * hug7) + (hug13 * hug13 * hug6 * hug6))); hug17 = ((hug6 * hug16) + hug14); hug18 = ((((-hug13 * hug13 * hug6 * hug14) + ((hug7 * hug7) * (this._userWidth / 2))) + ((hug13 * hug13 * hug6) * (this._userHeight / 2)) - hug15) / ((hug7 * hug7) + (hug13 * hug13 * hug6 * hug6))); hug19 = ((hug6 * hug18) + hug14); }else{ hug15 = Math.sqrt(((-hug7 * hug7 * hug14 * hug14) + ((2 * hug7 * hug7 * hug14) * (this._userWidth / 2))) - (((hug7 * hug7) * (this._userWidth / 2)) * (this._userWidth / 2)) + (hug13 * hug13 * hug7 * hug7)); var hug23:Number = (this._userWidth / 2); hug18 = hug23; hug16 = hug23; hug17 = ((((this._userHeight / 2) * hug13) - hug15) / hug13); hug19 = ((((this._userHeight / 2) * hug13) + hug15) / hug13); } hug4 = Math.min(Math.sqrt(Math.pow((hug16 - hug10.x), 2) + Math.pow((hug17 - hug10.y), 2)), Math.sqrt(Math.pow((hug18 - hug10.x), 2) + Math.pow((hug19 - hug10.y), 2))); hug20 = Math.atan2(hug12, hug11); hug21 = (hug4 / 9); hug22 = Math.max(Math.min(hug21, (hug7 / 2)), 3); hug3.beginFill(((this.backgroundColor == 0) ? 0xFFFFFF : this.backgroundColor), 1); hug3.drawEllipse((hug10.x - ((1.5 * hug22) / 2)), (hug10.y - (hug22 / 2)), (1.2 * hug22), hug22); if(hug11 != 0){ hug3.drawEllipse(((hug10.x + ((2.5 * hug21) * Math.cos(hug20))) - ((2.5 * hug22) / 2)), ((hug6 * (hug10.x + ((2.5 * hug21) * Math.cos(hug20)))) + hug14 - hug22), (2.5 * hug22), (2 * hug22)); hug3.drawEllipse(((hug10.x + ((6 * hug21) * Math.cos(hug20))) - ((3 * hug22) / 2)), (((hug6 * (hug10.x + ((6 * hug21) * Math.cos(hug20)))) + hug14) - ((2.5 * hug22) / 2)), (3 * hug22), (2.5 * hug22)); }else{ hug3.drawEllipse((hug10.x - ((2.5 * hug22) / 2)), (hug10.y + ((2.5 * hug21) * Math.sin(hug20)) - hug22), (2.5 * hug22), (2 * hug22)); hug3.drawEllipse((hug10.x - ((3 * hug22) / 2)), ((hug10.y + ((6 * hug21) * Math.sin(hug20))) - ((2.5 * hug22) / 2)), (3 * hug22), (2.5 * hug22)); } hug3.drawEllipse(((-(Math.SQRT2 - 1) * this._userWidth) / 2), ((-(Math.SQRT2 - 1) * this._userHeight) / 2), (this._userWidth * Math.SQRT2), (this._userHeight * Math.SQRT2)); hug3.endFill(); break; default: break; } if(!this._setCloseButton){ hug8 = Sprite(this._closeButton).graphics; hug8.clear(); hug8.lineStyle(1); hug8.beginFill(0xFF0000, 0.8); hug8.drawCircle(8, 8, 8); hug8.endFill(); hug8.moveTo(5, 5); hug8.lineTo(11, 11); hug8.moveTo(5, 11); hug8.lineTo(11, 5); } hug8 = this._head.graphics; hug8.clear(); hug8.beginFill(0, 0); hug8.drawRoundRectComplex(0, 0, this._userWidth, (this._closeButton.height + this._paddingTop), this._cornerRadius, this._cornerRadius, 0, 0); hug8.endFill(); if(!hug2 && !this.browser){ this.createChildren(); }else{ this.browser.arrange(); } this.background.alpha = this.backgroundAlpha; this.shadow.graphics.copyFrom(hug3); this.shadow.alpha = this.backgroundAlpha; var hug9:DropShadowFilter = new DropShadowFilter(0, 0, 0, 2, 10, 10, 1, 2, false, true); this.shadow.filters = [hug9]; } private function createChildren():void { //MethodID:6802, LocalCount= 2 , MaxScope= 1, MaxStack= 6, CodeLength= 497 var hug1:Skinner = null; this.refreshTextField(); if(!contains(this.background)){ addChild(this.shadow); addChild(this.background); }else{ this.background.visible = true; this.shadow.visible = true; } if(!contains(this._head)) addChildAt(this._head, 0); if(!this.sp) this.sp = new ExtScrollpane(0, 0, false, !this.action.popupNoScrolling); if(!this.browser){ hug1 = this.player.skinner; this.sp.setVerticalBarSkin(new hug1.sliderUp(), new hug1.sliderDown(), new hug1.sliderRunner(), new hug1.sliderTrack()); this.browser = this.createBrowser(((this._type == THINK) ? CSS2 : CSS), this.sp, new hug1.roller()); addChild(this.browser); addChild(this.sp); } this.browser.html = ""; this.browser.width = (this._innerWidth - this._paddingLeft - this._paddingRight); this.browser.height = (this._innerHeight - this._paddingTop - this._paddingBottom); if(this._action){ if(this._action.linkInPopup){ this.browser.url = this._action.popupContent; }else{ ActioBrowser(this.browser).content = this._action.popupContent; } } if(!this.contains(this._closeButton) && this._useCloseButton){ addChild(this._closeButton); }else if(this.contains(this._closeButton) && !this._useCloseButton){ removeChild(this._closeButton); } this.setOnPlace(); if((this._type == TRANSPARENT) || (this.backgroundAlpha == 0)){ mouseEnabled = false; this.background.visible = false; this.shadow.visible = false; this.browser.scrollpane.MouseShield.visible = false; } } private function refreshTextField(hug1:Event=null):void { //MethodID:6803, LocalCount= 7 , MaxScope= 1, MaxStack= 6, CodeLength= 373 var hug2:int = 0; var hug3:String = null; var hug4:int = 0; var hug5:int = 0; var hug6:int = 0; if(this._useTitle){ this._titleField.defaultTextFormat = new TextFormat("Arial", 14, ((this._type == THINK) ? 0 : 0xFFFFFF)); this._titleField.autoSize = TextFieldAutoSize.LEFT; this._titleField.multiline = false; this._titleField.selectable = false; this._titleField.wordWrap = false; this._titleField.mouseEnabled = false; this._titleField.setTextFormat(new TextFormat("Arial", 14, ((this._type == THINK) ? 0 : 0xFFFFFF))); hug2 = (this._useCloseButton ? this._closeButton.width : 0); if(this._titleField.width > (this._userWidth - this._paddingLeft - this._paddingRight - hug2 - 5)){ hug3 = this._titleField.text; hug4 = 0; hug5 = this._titleField.text.length; while((hug5 - hug4) > 1){ hug6 = ((hug4 + hug5) / 2); this._titleField.text = (hug3.substr(0, hug6) + TRUNCATION_INDICATOR); if(this._titleField.width < (this._userWidth - this._paddingLeft - this._paddingRight - hug2 - 5)){ hug4 = hug6; continue; } hug5 = hug6; } } addChild(this._titleField); }else if(contains(this._titleField)){ removeChild(this._titleField); } } private function setOnPlace():void { //MethodID:6804, LocalCount= 4 , MaxScope= 1, MaxStack= 3, CodeLength= 433 var hug3:Number = NaN; this._closeButton.x = (this._userWidth - this._closeButton.width - 5); this._closeButton.y = 5; this._titleField.x = this._paddingLeft; this._titleField.y = this._paddingTop; if(this._useTitle){ hug3 = this._titleField.textHeight; this._titleField.height = (hug3 + 3); } var hug1:Number = (this._userWidth / this._innerWidth); var hug2:Number = (this._userHeight / this._innerHeight); if(!this._useTitle){ ExtScrollbar(this.sp.vbar).clearDisplace(); ExtScrollbar(this.sp.vbar).scrollPosition = 0; if(this._useCloseButton){ if((this._paddingTop + 25) > (this._userHeight - this._paddingBottom)){ ExtScrollbar(this.sp.vbar).alpha = 0; }else{ ExtScrollbar(this.sp.vbar).alpha = 1; ExtScrollbar(this.sp.vbar).displace = (this._paddingTop + 15); } } } this.browser.scaleX = hug1; this.browser.scaleY = hug2; this.browser.x = (this._paddingLeft * this.browser.scaleX); this.browser.y = (this._paddingTop * this.browser.scaleY); this.sp.x = this.browser.x; this.sp.y = this.browser.y; this.sp.vbarX = (this._userWidth - this.sp.x - 13); if((!this._timer.running && !this._action.popupStatic) && ((this.action.popupDisplayTime > 0) || (this.action.popupDisplayTime < 0))) this._timer.start(); if(this.browser) this.browser.arrange(); } public function update():void { //MethodID:6805, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 15 this.draw(null, true); this.setOnPlace(); } public function onClose(hug1:Event=null):void { //MethodID:6806, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 48 var hug2:Sprite = (this.parent as Sprite); if(hug2){ hug2.removeChild(this); if(this.action.pauseOnClick) this.player.adapter.resume(); } } private function mouseHandler(hug1:MouseEvent):void { //MethodID:6807, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 104 if(hug1.type == MouseEvent.ROLL_OVER){ if(this.action.popupDisplayTime < 0) this._timer.stop(); }else if(hug1.type == MouseEvent.ROLL_OUT){ if(!this._timer.running && !this._action.popupStatic && (this.action.popupDisplayTime < 0)) this._timer.start(); } } private function dragHandler(hug1:MouseEvent):void { //MethodID:6808, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 43 if(hug1.type == MouseEvent.MOUSE_DOWN){ this.startDrag(); }else if(hug1.type == MouseEvent.MOUSE_UP){ this.stopDrag(); } } public function setPaddings(hug1:int=5, hug2:int=5, hug3:int=5, hug4:int=5):void { //MethodID:6809, LocalCount= 5 , MaxScope= 1, MaxStack= 2, CodeLength= 24 this._paddingLeft = hug1; this._paddingRight = hug2; this._paddingTop = hug3; this._paddingBottom = hug4; } override public function get width():Number { //MethodID:6810, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._userWidth; } override public function get height():Number { //MethodID:6811, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._userHeight; } override public function set x(hug1:Number):void { //MethodID:6812, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 107 if((hug1 + this.width) > ((this.player.screen.videoSize.width * this.player.screen.scaleRatio.x) + this.player.screen.markers.x)) hug1 = ((this.player.screen.videoSize.width * this.player.screen.scaleRatio.x) - this.width + this.player.screen.markers.x); super.x = hug1; } override public function set y(hug1:Number):void { //MethodID:6813, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 107 if((hug1 + this.height) > ((this.player.screen.videoSize.height * this.player.screen.scaleRatio.y) + this.player.screen.markers.y)) hug1 = ((this.player.screen.videoSize.height * this.player.screen.scaleRatio.y) - this.height + this.player.screen.markers.y); super.y = hug1; } override public function set width(hug1:Number):void { //MethodID:6814, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 13 Logger._msg("[Class Popup]: Use setSize instead width and height"); } override public function set height(hug1:Number):void { //MethodID:6815, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 13 Logger._msg("[Class Popup]: Use setSize instead width and height"); } private function redraw(hug1:Event):void { //MethodID:6816, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 53 if(this.browser.looker.hasBackground){ this.backgroundColor = this.browser.looker.backgroundColor; this.draw(null, true); }else{ this.backgroundColor = this._action.popupColor; } } private function createBrowser(hug1:StyleSheet, hug2:Scrollpane, hug3:DisplayObject):ActioBrowser { //MethodID:6817, LocalCount= 5 , MaxScope= 1, MaxStack= 6, CodeLength= 81 var hug4:ActioBrowser = new ActioBrowser(this.player, hug1, hug2, hug3); hug4.addEventListener(TextEvent.LINK, this.onLink, false, 0, true); hug4.addEventListener(Event.RENDER, this.redraw, false, 0, true); hug4.addEventListener(HTMLEvent.PULLOUT, this.onPullout, false, 0, true); return hug4; } private function onPullout(hug1:HTMLEvent):void { //MethodID:6818, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 37 hug1.params.action = this.action; hug1.params.container = this; this.player.swfcont.add(hug1.params); } public function onLink(hug1:TextEvent):void { //MethodID:6819, LocalCount= 5 , MaxScope= 5, MaxStack= 6, CodeLength= 1010 internal var e:TextEvent; //slotID:1 internal var match:Array; //slotID:2 internal var actions:Array; //slotID:3 internal var actID:String; //slotID:4 internal var a:Action; //slotID:5 internal var co:Object; //slotID:6 internal var actionID:int; //slotID:7 match = null; actions = null; actID = null; a = null; co = null; actionID = 0; e = hug1; this.linkBeforeClick = true; this.player.statistics.send(this._action, Statistics.HREF_TYPE, e.text); if((e.text.indexOf("DATA::") != (-1)) || (e.text.indexOf("data::") != (-1))){ if(e.text.indexOf("frame=") != (-1)){ match = e.text.match(new RegExp("frame=(\d+)", "is")); this.player.scenarios.play(null, match[1]); this.player.adapter.resume(); }else if(e.text.indexOf("id=") != (-1)){ match = e.text.match(new RegExp("id=([\d,]+)", "is")); actions = String(match[1]).split(","); for each(actID in actions){ a = Action(this.player.data.actions.getItem("id", actID)); if(a) this.player.controller.doAction(a, true); } }else if(e.text.indexOf("avs=") != (-1)){ match = e.text.match(new RegExp("avs=(.*?).avs", "is")); if(match[1]){ this.player.reset(); this.player.setMetadataUrl(match[1] + ".avs"); } }else if(e.text.indexOf("complex") != (-1)){ match = e.text.match(new RegExp("complex=(.*)", "is")); if(match[1]){ try{ co = JSON.decode(match[1]); } catch(e:*){ return; } if(co.hasOwnProperty("close") && co["close"]) this.onClose(null); if(co.hasOwnProperty("url")) this.browser.url = co["url"]; if(co.hasOwnProperty("id")){ if(co["id"] is Array){ for each(actionID in co["id"]){ a = Action(this.player.data.actions.getItem("id", actionID)); if(a) this.player.controller.doAction(a, true); } }else{ a = Action(this.player.data.actions.getItem("id", co["id"])); if(a) this.player.controller.doAction(a, true); } } if(co.hasOwnProperty("frame")){ this.player.scenarios.play(null, co["frame"]); this.player.adapter.resume(); } if(co.hasOwnProperty("video")) this.player.adapter.play(co["video"]); if(co.hasOwnProperty("avs")){ this.player.reset(); this.player.setMetadataUrl(co["avs"]); } if(co.hasOwnProperty("pause")) this.player.adapter.pause(); } } } } } } //script704 package peace.graphic.tween{ //class(instance)_index:704 public class TweenParameter extends Object { //static constructor public static function TweenParameter$cinit() { //MethodID:6821, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function TweenParameter(hug1:String=null, hug2:Number=0.0, hug3:Number=0.0) { //MethodID:6822, LocalCount= 4 , MaxScope= 1, MaxStack= 2, CodeLength= 21 super(); this.name = hug1; this.begin = hug2; this.end = hug3; } //variables/etc. public var end:Number; //slotID:0 public var begin:Number; //slotID:0 public var name:String; //slotID:0 public function get delta():Number { //MethodID:6823, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 12 return (this.end - this.begin); } } } //script705 package peace.gui.layout{ import flash.display.DisplayObject import flash.display.Sprite //class(instance)_index:705 public class Container extends Sprite { //static constructor public static function Container$cinit() { //MethodID:6825, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function Container(hug1:Layout=null, hug2:Number=0.0, hug3:Number=0.0) { //MethodID:6826, LocalCount= 4 , MaxScope= 1, MaxStack= 2, CodeLength= 27 this.children = []; super(); this.layout = hug1; this.userWidth = hug2; this.userHeight = hug3; } //variables/etc. public var layout:Layout; //slotID:0 public var userHeight:Number; //slotID:0 public var userWidth:Number; //slotID:0 public var children:Array; //slotID:0 public function add(hug1:DisplayObject, hug2:int=0x7FFFFFFF):DisplayObject { //MethodID:6827, LocalCount= 4 , MaxScope= 1, MaxStack= 4, CodeLength= 155 var hug3:int = 0; if(hug1){ hug3 = this.children.indexOf(hug1); if(hug2 <= numChildren){ if(hug3 > (-1)){ if(hug2 != hug3){ this.children.splice(hug3, 1); this.children.splice(hug2, 0, hug1); } }else{ this.children.splice(hug2, 0, hug1); super.addChildAt(hug1, hug2); } }else if(hug3 > (-1)){ if(hug3 != (this.children.length - 1)){ this.children.splice(hug3, 1); this.children.push(hug1); } }else{ this.children.push(hug1); super.addChild(hug1); } return hug1; } return null; } public function remove(hug1:DisplayObject):DisplayObject { //MethodID:6828, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 61 var hug2:int = 0; if(hug1){ hug2 = this.children.indexOf(hug1); if(hug2 > (-1)) this.children.splice(hug2, 1); if(contains(hug1)) super.removeChild(hug1); return hug1; } return null; } public function removeAt(hug1:int):DisplayObject { //MethodID:6829, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 16 return this.remove(this.children[hug1]); } public function removeAll():void { //MethodID:6830, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 30 this.children = []; while(numChildren > 0){ super.removeChildAt(0); } } public function get length():int { //MethodID:6831, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 10 return this.children.length; } public function arrange():void { //MethodID:6832, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 12 this.layout.arrange(this); } override public function get width():Number { //MethodID:6833, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 21 return Math.max(this.layout.width, this.userWidth); } override public function get height():Number { //MethodID:6834, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 21 return Math.max(this.layout.height, this.userHeight); } override public function removeChild(hug1:DisplayObject):DisplayObject { //MethodID:6835, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 9 return this.remove(hug1); } override public function removeChildAt(hug1:int):DisplayObject { //MethodID:6836, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 20 var hug2:DisplayObject = getChildAt(hug1); return this.remove(hug2); } } } //script706 package actioplayer.view.debug{ import actioplayer.ActioPlayer import actioplayer.model.Frame import actioplayer.model.VideoFile import peace.gui.layout.Container import peace.gui.layout.MultipleRowLayout //class(instance)_index:706 public class DebugGrid extends Container { //static constructor public static function DebugGrid$cinit() { //MethodID:6838, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function DebugGrid(hug1:ActioPlayer) { //MethodID:6839, LocalCount= 3 , MaxScope= 1, MaxStack= 4, CodeLength= 44 this.l = new MultipleRowLayout(); super(this.l); this.player = hug1; mouseEnabled = mouseChildren = false; } //variables/etc. private var l:MultipleRowLayout; //slotID:0 private var player:ActioPlayer; //slotID:0 private var currentVideo:VideoFile; //slotID:0 private function setVideo(hug1:VideoFile):void { //MethodID:6840, LocalCount= 6 , MaxScope= 1, MaxStack= 4, CodeLength= 129 var hug3:Cell = null; removeAll(); userWidth = (hug1.gridSize.width * hug1.cellSize.width); var hug2:Number = (hug1.gridSize.width * hug1.gridSize.height); var hug4:int = 0; while(hug4 < hug2){ hug3 = new Cell(); hug3.height = hug1.cellSize.width; hug3.width = hug1.cellSize.width; hug3.visible = false; add(hug3); hug4++; } arrange(); this.currentVideo = hug1; } public function set frame(hug1:Frame):void { //MethodID:6841, LocalCount= 9 , MaxScope= 1, MaxStack= 4, CodeLength= 178 var hug2:Cell = null; var hug4:int = 0; var hug5:int = 0; if(!hug1){ for each(hug2 in children){ hug2.visible = false; } return; } if(this.currentVideo != hug1.video) this.setVideo(hug1.video); var hug3:Array = this.player.controller.currentFrameMarking; var hug6:int = 0; while(hug6 < children.length){ hug2 = Cell(children[hug6]); hug4 = (hug6 % hug3.length); hug5 = (hug6 / hug3.length); hug2.visible = Boolean(hug3[hug4][hug5]); hug6++; } } } } import flash.display.Sprite //class(instance)_index:707 //private class Cell extends Sprite { //static constructor public static function Cell$cinit() { //MethodID:6842, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function Cell() { //MethodID:6843, LocalCount= 2 , MaxScope= 1, MaxStack= 5, CodeLength= 49 super(); mouseEnabled = mouseChildren = false; graphics.beginFill(0xFFCC00, 0.5); graphics.drawRect(0, 0, 1, 1); } } //script707 package peace.gui.manage{ import flash.display.DisplayObject import flash.display.InteractiveObject import flash.display.Stage import flash.events.Event import flash.events.MouseEvent import flash.geom.Point import flash.ui.Mouse import peace.util.Logger //class(instance)_index:708 public class Cursors extends Object { //static constructor public static function Cursors$cinit() { //MethodID:6845, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //static variables/etc. private static var c:DisplayObject; //slotID:1 private static var s:Stage; //slotID:2 private static var cShift:Point; //slotID:3 public static function setCursor(hug1:DisplayObject, hug2:Stage, hug3:Point=null):void { //dispID:3, MethodID:6846, LocalCount= 4 , MaxScope= 1, MaxStack= 3, CodeLength= 158 if(!hug1 || !hug2){ Logger.error("Cursors::setCursor", "uutp|y ~u rp|yt~u pp}u"); return; } if(c) defaultCursor(); c = hug1; if(c is InteractiveObject) InteractiveObject(c).mouseEnabled = false; s = hug2; cShift = hug3; s.addEventListener(Event.ADDED, onStageAddedChild); s.addEventListener(Event.MOUSE_LEAVE, onMouseLeave); s.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove); s.addChild(c); onMouseMove(null); Mouse.hide(); } public static function getCursor():DisplayObject { //dispID:4, MethodID:6847, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 return c; } public static function defaultCursor():void { //dispID:5, MethodID:6848, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 116 if(c && s && s.contains(c)){ s.removeChild(c); s.removeEventListener(Event.ADDED, onStageAddedChild); s.removeEventListener(Event.MOUSE_LEAVE, onMouseLeave); s.removeEventListener(MouseEvent.MOUSE_MOVE, onMouseMove); c = null; cShift = null; } Mouse.show(); } private static function onStageAddedChild(hug1:Event):void { //dispID:6, MethodID:6849, LocalCount= 2 , MaxScope= 1, MaxStack= 4, CodeLength= 20 s.setChildIndex(c, (s.numChildren - 1)); } private static function onMouseMove(hug1:MouseEvent):void { //dispID:7, MethodID:6850, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 178 if(!c.visible){ c.visible = ((s.mouseX >= 0) && (s.mouseX <= s.stageWidth) && (s.mouseY >= 0) && (s.mouseY <= s.stageHeight)); if(!c.visible) return; } c.x = (cShift ? (s.mouseX + cShift.x) : s.mouseX); c.y = (cShift ? (s.mouseY + cShift.y) : s.mouseY); if(hug1) hug1.updateAfterEvent(); } private static function onMouseLeave(hug1:Event):void { //dispID:8, MethodID:6851, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 10 c.visible = false; } //constructor public function Cursors() { //MethodID:6852, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 6 super(); } } } //script708 package actioplayer.view.control{ import actioplayer.ActioPlayer import actioplayer.model.Action import actioplayer.view.skin.Skinner import flash.display.DisplayObject import flash.display.SimpleButton import flash.display.Sprite import flash.geom.Rectangle import flash.utils.Dictionary //class(instance)_index:709 public class SidebarManager extends Sprite { //static constructor public static function SidebarManager$cinit() { //MethodID:6854, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function SidebarManager(hug1:ActioPlayer) { //MethodID:6855, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 34 this.hash = new Dictionary(false); super(); this.player = hug1; this.skinner = this.player.skinner; } //variables/etc. private var hash:Dictionary; //slotID:0 private var player:ActioPlayer; //slotID:0 private var skinner:Skinner; //slotID:0 private var screenRect:Rectangle; //slotID:0 public function containsSidebarByAction(hug1:Action):Boolean { //MethodID:6856, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 14 return this.hash[hug1.id]; } public function getSidebarByAction(hug1:Action):Popup { //MethodID:6857, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 40 return (this.hash[hug1.id] ? this.hash[hug1.id] : null); } public function setBounds(hug1:Rectangle):void { //MethodID:6858, LocalCount= 5 , MaxScope= 1, MaxStack= 2, CodeLength= 75 var hug2:Sidebar = null; this.screenRect = hug1.clone(); for each(hug2 in this.hash){ if(!this.screenRect){ hug2.setInitialBounds(hug1); }else{ hug2.setBounds(hug1); } } } public function resetSidebar():void { //MethodID:6859, LocalCount= 4 , MaxScope= 1, MaxStack= 3, CodeLength= 70 var hug1:Sidebar = null; for each(hug1 in this.hash){ if(contains(hug1)) this.removeChild(hug1); } this.hash = new Dictionary(false); } public function openSidebar(hug1:Action, hug2:Boolean=false, hug3:Rectangle=null):void { //MethodID:6860, LocalCount= 8 , MaxScope= 1, MaxStack= 6, CodeLength= 343 var hug4:Sidebar = null; var hug5:DisplayObject = null; for each(hug4 in this.hash){ if(hug4 && contains(hug4) && (hug1.sidebarLocation == hug4.action.sidebarLocation) && (hug1.id != hug4.action.id)) this.removeChild(hug4); } if(this.hash[hug1.id]){ hug4 = this.hash[hug1.id]; }else{ hug4 = new Sidebar(this.player, Sidebar.RIGHT, false); this.hash[hug1.id] = hug4; hug5 = new this.skinner.closeButton(); hug4.closeButton = new SimpleButton(hug5, new this.skinner.closeButtonHover(), hug5, hug5); hug4.setBounds(hug3); } if(hug4.action == hug1){ if(!hug2){ hug4.expand(); }else if(!hug4.expanded){ hug4.expand(); } }else{ hug4.action = hug1; if(!hug4.expanded) hug4.expand(); } if(!contains(hug4)){ addChild(hug4); }else{ setChildIndex(hug4, (numChildren - 1)); } } public function removeSidebar(hug1:Action):void { //MethodID:6861, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 51 var hug2:Sidebar = this.hash[hug1.id]; if(hug2 && contains(hug2)){ hug2.expand(true); this.removeChild(hug2); } } public function removeStaticSidebars():void { //MethodID:6862, LocalCount= 4 , MaxScope= 1, MaxStack= 2, CodeLength= 89 var hug1:Sidebar = null; for each(hug1 in this.hash){ if(hug1 && contains(hug1) && hug1.action.sidebarStatic){ hug1.expand(true); this.removeChild(hug1); } } } public function removeOnClickSidebars():void { //MethodID:6863, LocalCount= 4 , MaxScope= 1, MaxStack= 2, CodeLength= 104 var hug1:Sidebar = null; for each(hug1 in this.hash){ if(hug1 && contains(hug1) && hug1.action.sidebarOnClick && hug1.action.pauseOnClick){ hug1.expand(true); this.removeChild(hug1); } } } override public function removeChild(hug1:DisplayObject):DisplayObject { //MethodID:6864, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 113 var hug2:Sidebar = null; if(hug1 is Sidebar){ this.player.swfcont.remove(Sidebar(hug1).action); hug2 = this.hash[Sidebar(hug1).action.id]; if(hug2 && contains(hug2)) delete this.hash[Sidebar(hug1).action.id]; } return super.removeChild(hug1); } } } //script709 package peace.data{ //class(instance)_index:710 public class Dimensions extends Object { //static constructor public static function Dimensions$cinit() { //MethodID:6866, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function Dimensions(hug1:Number=0.0, hug2:Number=0.0) { //MethodID:6867, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 16 super(); this.width = hug1; this.height = hug2; } //variables/etc. public var width:Number; //slotID:0 public var height:Number; //slotID:0 public function toString():String { //MethodID:6868, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 20 return ("width:" + this.width + ", height:" + this.height); } } } //script710 package peace.graphic.tween{ import flash.display.DisplayObject import flash.display.Shape import flash.events.Event import flash.events.EventDispatcher import flash.events.TimerEvent import flash.utils.Timer //class(instance)_index:711 public class Tween extends EventDispatcher { //static constructor public static function Tween$cinit() { //MethodID:6870, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 16 listener = new Shape(); } //static variables/etc. protected static const listener:DisplayObject; //slotID:1 //constructor public function Tween(hug1:uint=100, hug2:Boolean=false, hug3:uint=25) { //MethodID:6874, LocalCount= 4 , MaxScope= 1, MaxStack= 4, CodeLength= 63 this.motions = new Array(); super(); this.durationFrames = hug1; this.useTimer = hug2; if(hug2){ this.timer = new Timer(1000 / hug3); this.timer.addEventListener(TimerEvent.TIMER, this.onFrame); } } //variables/etc. public var durationFrames:uint; //slotID:0 public var loop:Boolean = false; //slotID:0 public var reverse:Boolean = false; //slotID:0 protected var time:int = 0; //slotID:0 protected var motions:Array; //slotID:0 protected var isRunning:Boolean = false; //slotID:0 protected var useTimer:Boolean = false; //slotID:0 protected var timer:Timer; //slotID:0 public function get running():Boolean { //MethodID:6871, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this.isRunning; } public function get currentFrame():int { //MethodID:6872, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this.time; } public function get totalFrames():int { //MethodID:6873, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this.durationFrames; } public function addMotion(hug1:Motion, hug2:Boolean=true):Motion { //MethodID:6875, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 83 if((this.motions.length == 0) && !this.useTimer) listener.addEventListener(Event.ENTER_FRAME, this.onFrame); this.motions.push(hug1); if(hug2) hug1.render(this.reverse ? this.durationFrames : 0); return hug1; } public function removeMotion(hug1:Motion):void { //MethodID:6876, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 50 var hug2:int = this.motions.indexOf(hug1); if(hug2 > (-1)) this.motions.splice(hug2, 1); if(this.motions.length == 0) this.remove(); } public function clearMotions():void { //MethodID:6877, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 14 this.motions = []; this.remove(); } public function play(hug1:Boolean=false, hug2:Boolean=false):void { //MethodID:6878, LocalCount= 3 , MaxScope= 1, MaxStack= 4, CodeLength= 54 if(this.useTimer) this.timer.start(); this.isRunning = true; dispatchEvent(new TweenEvent(TweenEvent.PLAY, this.time)); } public function stop():void { //MethodID:6879, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 24 if(this.useTimer) this.timer.stop(); this.isRunning = false; } public function gotoBegin():void { //MethodID:6880, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 27 this.goto(this.reverse ? this.durationFrames : 0); } public function gotoEnd():void { //MethodID:6881, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 27 this.goto(this.reverse ? 0 : this.durationFrames); } public function gotoAndStop(hug1:int):void { //MethodID:6882, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 14 this.goto(hug1); this.stop(); } public function nextFrame():void { //MethodID:6883, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 35 this.goto((this.time == this.durationFrames) ? 0 : (this.time + 1)); } public function prevFrame():void { //MethodID:6884, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 34 this.goto((this.time == 0) ? this.durationFrames : (this.time - 1)); } public function gotoAndPlay(hug1:int):void { //MethodID:6885, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 22 this.goto(hug1); this.play(this.loop, this.reverse); } public function remove():void { //MethodID:6886, LocalCount= 1 , MaxScope= 1, MaxStack= 3, CodeLength= 24 this.stop(); listener.removeEventListener(Event.ENTER_FRAME, this.onFrame); } protected function goto(hug1:int):void { //MethodID:6887, LocalCount= 3 , MaxScope= 1, MaxStack= 4, CodeLength= 175 if(hug1 < 0) hug1 = 0; if(hug1 > this.durationFrames) hug1 = this.durationFrames; if(hug1 == this.time) return; this.time = hug1; var hug2:uint = 0; while(hug2 < this.motions.length){ Motion(this.motions[hug2]).render(this.time); hug2++; } dispatchEvent(new TweenEvent(TweenEvent.CHANGE, hug1)); if((this.reverse && (hug1 == 0)) || (!this.reverse && (hug1 == this.durationFrames))) dispatchEvent(new TweenEvent(TweenEvent.END, hug1)); } protected function onFrame(hug1:Event):void { //MethodID:6888, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 111 if(!this.isRunning) return; if(this.motions.length == 0) return; if(this.reverse){ this.prevFrame(); }else{ this.nextFrame(); } if(this.useTimer) TimerEvent(hug1).updateAfterEvent(); if((this.time == (this.reverse ? 0 : this.durationFrames)) && !this.loop) this.stop(); } } } //script711 package actioplayer.model{ import flash.geom.Point //class(instance)_index:712 public class ScreenElement extends Point { //static constructor public static function ScreenElement$cinit() { //MethodID:6890, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function ScreenElement(hug1:int, hug2:int, hug3:int=0) { //MethodID:6891, LocalCount= 4 , MaxScope= 1, MaxStack= 3, CodeLength= 13 super(hug1, hug2); this.actionId = hug3; } //variables/etc. public var actionId:int; //slotID:0 public var visible:Boolean = true; //slotID:0 } } //script712 package actioplayer.model{ import flash.geom.Point import peace.data.Dimensions //class(instance)_index:713 public class Action extends Object { //static constructor public static function Action$cinit() { //MethodID:6893, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 152 NONE = 0; ONCLICK = 1; ONHOVER = 2; STATIC = 3; PIXELS_SIZE = 0; PERCENTS_SIZE = 1; EMPTY_LINK = 0; AVS_LINK = 1; WEB_LINK = 2; SCENARIO_LINK = 3; STREAMING_LINK = 4; FRAME_LINK = 5; ACTION_LINK = 6; SELF_TARGET = "_self"; TOP_TARGET = "_top"; PARENT_TARGET = "_parent"; BLANK_TARGET = "_blank"; NONE_TARGET = "_none"; } //static variables/etc. public static const NONE:int = 0; //slotID:1 public static const ONCLICK:int = 1; //slotID:2 public static const ONHOVER:int = 2; //slotID:3 public static const STATIC:int = 3; //slotID:4 public static const PIXELS_SIZE:int = 0; //slotID:5 public static const PERCENTS_SIZE:int = 1; //slotID:6 public static const EMPTY_LINK:int = 0; //slotID:7 public static const AVS_LINK:int = 1; //slotID:8 public static const WEB_LINK:int = 2; //slotID:9 public static const SCENARIO_LINK:int = 3; //slotID:10 public static const STREAMING_LINK:int = 4; //slotID:11 public static const FRAME_LINK:int = 5; //slotID:12 public static const ACTION_LINK:int = 6; //slotID:13 public static const SELF_TARGET:String = "_self"; //slotID:14 public static const TOP_TARGET:String = "_top"; //slotID:15 public static const PARENT_TARGET:String = "_parent"; //slotID:16 public static const BLANK_TARGET:String = "_blank"; //slotID:17 public static const NONE_TARGET:String = "_none"; //slotID:18 //constructor public function Action() { //MethodID:6894, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 15 this.mouseCursorPosition = new Point(); super(); } //variables/etc. public var id:uint; //slotID:0 public var name:String; //slotID:0 public var description:String; //slotID:0 public var linkType:int = 0; //slotID:0 public var linkValue:String; //slotID:0 public var hiddenObject:Boolean = false; //slotID:0 public var hideTooltip:Boolean = false; //slotID:0 public var urlTarget:String = "_blank"; //slotID:0 public var none:Boolean = false; //slotID:0 public var hidden:Boolean = false; //slotID:0 public var stopOnClick:Boolean = false; //slotID:0 public var external:Boolean = false; //slotID:0 public var pauseOnClick:Boolean = false; //slotID:0 public var pauseOnHover:Boolean = false; //slotID:0 public var sidebarSizeType:int = 1; //slotID:0 public var popupSizeType:int = 0; //slotID:0 public var popupType:int = 0; //slotID:0 public var popupContent:String; //slotID:0 public var popupOnHover:Boolean = false; //slotID:0 public var popupOnClick:Boolean = false; //slotID:0 public var popupStatic:Boolean = false; //slotID:0 public var linkInPopup:Boolean = false; //slotID:0 public var popupStartPoint:Point; //slotID:0 public var popupTopLeftPoint:Point; //slotID:0 public var popupSize:Dimensions; //slotID:0 public var popupHasntCloseButton:Boolean = false; //slotID:0 public var popupColor:uint; //slotID:0 public var popupTextColor:uint; //slotID:0 public var popupTransparency:int = -1; //slotID:0 public var popupNoScrolling:Boolean = false; //slotID:0 public var popupDisplayTime:int = -1; //slotID:0 public var sidebarContent:String; //slotID:0 public var sidebarOnHover:Boolean = false; //slotID:0 public var sidebarOnClick:Boolean = false; //slotID:0 public var sidebarStatic:Boolean = false; //slotID:0 public var linkInSidebar:Boolean = false; //slotID:0 public var sidebarLocation:int = 0; //slotID:0 public var sidebarSize:Number = -1.0; //slotID:0 public var sidebarTransparency:int = -1; //slotID:0 public var sidebarHasntCloseButton:Boolean = false; //slotID:0 public var sidebarHasntSideCloseButton:Boolean = false; //slotID:0 public var sidebarColor:uint; //slotID:0 public var sidebarTextColor:uint; //slotID:0 public var sidebarNoScrolling:Boolean = false; //slotID:0 public var sidebarDisplayTime:int = -1; //slotID:0 public var pictureUrl:String; //slotID:0 public var pictureOnClick:Boolean = false; //slotID:0 public var pictureOnHover:Boolean = false; //slotID:0 public var pictureStatic:Boolean = false; //slotID:0 public var pictureSize:Dimensions; //slotID:0 public var picturePosition:Point; //slotID:0 public var pictureDisplayTime:int = -1; //slotID:0 public var pictureHasntCloseButton:Boolean = true; //slotID:0 public var mouseCursorImageUrl:String; //slotID:0 public var mouseCursorPosition:Point; //slotID:0 public var markerId:uint; //slotID:0 public var markerUrl:String; //slotID:0 public var videoUrl:String; //slotID:0 } } //script713 package actioplayer.view.control{ import actioplayer.ActioPlayer import actioplayer.model.Action import actioplayer.view.skin.Skinner import flash.display.DisplayObject import flash.display.SimpleButton import flash.display.Sprite import flash.geom.Point import flash.geom.Rectangle import flash.utils.Dictionary //class(instance)_index:714 public class PictureManager extends Sprite { //static constructor public static function PictureManager$cinit() { //MethodID:6896, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function PictureManager(hug1:ActioPlayer) { //MethodID:6897, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 34 this.hash = new Dictionary(false); super(); this.player = hug1; this.skinner = this.player.skinner; } //variables/etc. private var hash:Dictionary; //slotID:0 private var player:ActioPlayer; //slotID:0 private var skinner:Skinner; //slotID:0 private var screenRect:Rectangle; //slotID:0 public function containsPictureByAction(hug1:Action):Boolean { //MethodID:6898, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 14 return this.hash[hug1.id]; } public function getPictureByAction(hug1:Action):Picture { //MethodID:6899, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 40 return (this.hash[hug1.id] ? this.hash[hug1.id] : null); } public function updateInitialPoint(hug1:Action, hug2:Point=null):void { //MethodID:6900, LocalCount= 6 , MaxScope= 1, MaxStack= 3, CodeLength= 166 var hug3:Picture = null; var hug4:Point = null; var hug5:Boolean = false; hug3 = this.hash[hug1.id]; if(hug3){ hug4 = this.player.screen.getInitialPoint(hug1.id); if(hug4 && hug1.pictureStatic){ hug5 = false; if((hug4.x > 0) && (hug4.x < 1)) hug5 = true; hug3.x = ((hug5 ? this.screenRect.width : 1) * hug4.x); hug3.y = ((hug5 ? this.screenRect.height : 1) * hug4.y); } } } public function updateInitialPoints():void { //MethodID:6901, LocalCount= 4 , MaxScope= 1, MaxStack= 2, CodeLength= 49 var hug1:Picture = null; for each(hug1 in this.hash){ this.updateInitialPoint(hug1.action); } } public function setBounds(hug1:Rectangle):void { //MethodID:6902, LocalCount= 5 , MaxScope= 1, MaxStack= 2, CodeLength= 60 var hug2:Picture = null; this.screenRect = hug1.clone(); for each(hug2 in this.hash){ hug2.setBounds(this.screenRect); } } public function resetPicture():void { //MethodID:6903, LocalCount= 4 , MaxScope= 1, MaxStack= 3, CodeLength= 70 var hug1:Picture = null; for each(hug1 in this.hash){ if(contains(hug1)) this.removeChild(hug1); } this.hash = new Dictionary(false); } public function openPicture(hug1:Action, hug2:Point=null):void { //MethodID:6904, LocalCount= 6 , MaxScope= 1, MaxStack= 6, CodeLength= 487 var hug3:Picture = null; var hug4:DisplayObject = null; var hug5:Boolean = false; if(this.hash[hug1.id] && hug1.pictureOnClick){ hug3 = this.hash[hug1.id]; hug3.onClose(); return; } if(!this.hash[hug1.id]){ hug3 = new Picture(hug1, this.player); this.hash[hug1.id] = hug3; hug4 = new this.skinner.closeButton(); hug3.closeButton = new SimpleButton(hug4, new this.skinner.closeButtonHover(), hug4, hug4); }else{ hug3 = this.hash[hug1.id]; } if((hug1.picturePosition == null) && !hug1.pictureStatic){ hug3.x = (((this.screenRect.x + this.screenRect.width - hug3.width) < (this.player.screen.mouseX + 5)) ? (this.screenRect.x + this.screenRect.width - hug3.width) : (this.player.screen.mouseX + 5)); hug3.y = (((this.screenRect.y + this.screenRect.height - hug3.height) < (this.player.screen.mouseY + 5)) ? (this.screenRect.y + this.screenRect.height - hug3.height) : (this.player.screen.mouseY + 5)); } if(hug1.pictureStatic && hug2){ hug5 = false; if((hug2.x > 0) && (hug2.x < 1)) hug5 = true; hug3.x = ((hug5 ? this.screenRect.width : 1) * hug2.x); hug3.y = ((hug5 ? this.screenRect.height : 1) * hug2.y); } if(!contains(hug3)){ addChild(hug3); }else{ setChildIndex(hug3, (numChildren - 1)); } } public function removePicture(hug1:Action):void { //MethodID:6905, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 45 var hug2:Picture = this.hash[hug1.id]; if(hug2 && contains(hug2)) this.removeChild(hug2); } public function removeStaticPictures():void { //MethodID:6906, LocalCount= 4 , MaxScope= 1, MaxStack= 2, CodeLength= 73 var hug1:Picture = null; for each(hug1 in this.hash){ if(contains(hug1) && hug1.action.pictureStatic) this.removeChild(hug1); } } public function removeOnClickPictures():void { //MethodID:6907, LocalCount= 4 , MaxScope= 1, MaxStack= 2, CodeLength= 87 var hug1:Picture = null; for each(hug1 in this.hash){ if(contains(hug1) && hug1.action.pictureOnClick && hug1.action.pauseOnClick) this.removeChild(hug1); } } override public function removeChild(hug1:DisplayObject):DisplayObject { //MethodID:6908, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 113 var hug2:Picture = null; if(hug1 is Picture){ this.player.swfcont.remove(Picture(hug1).action); hug2 = this.hash[Picture(hug1).action.id]; if(hug2 && contains(hug2)) delete this.hash[Picture(hug1).action.id]; } return super.removeChild(hug1); } } } //script714 package actioplayer.view.control{ import actioplayer.ActioPlayer import actioplayer.model.Action import actioplayer.view.skin.Skinner import flash.display.DisplayObject import flash.display.Graphics import flash.display.Loader import flash.display.Sprite import flash.events.Event import flash.events.IOErrorEvent import flash.events.MouseEvent import flash.events.TimerEvent import flash.geom.Rectangle import flash.net.URLRequest import flash.system.LoaderContext import flash.utils.Timer import peace.data.Dimensions //class(instance)_index:715 public class Picture extends Sprite { //static constructor public static function Picture$cinit() { //MethodID:6910, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 3 } //constructor public function Picture(hug1:Action, hug2:ActioPlayer) { //MethodID:6916, LocalCount= 3 , MaxScope= 1, MaxStack= 6, CodeLength= 97 this.loader = new Loader(); this._closeButton = new Sprite(); super(); this.player = hug2; this.skinner = this.player.skinner; this.action = hug1; this.loader.contentLoaderInfo.addEventListener(Event.COMPLETE, this.onComplete, false, 0, true); this.loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, this.onError, false, 0, true); } //variables/etc. private var skinner:Skinner; //slotID:0 private var loader:Loader; //slotID:0 private var _screenRect:Rectangle; //slotID:0 private var initialWidth:int; //slotID:0 private var initialHeight:int; //slotID:0 private var userWidth:int; //slotID:0 private var userHeight:int; //slotID:0 private var content:DisplayObject; //slotID:0 private var needLoad:Boolean = false; //slotID:0 private var useCloseButton:Boolean = false; //slotID:0 private var _closeButton:DisplayObject; //slotID:0 private var _action:Action; //slotID:0 private var url:String = ""; //slotID:0 private var player:ActioPlayer; //slotID:0 private var _timer:Timer; //slotID:0 public function get closeButton():DisplayObject { //MethodID:6911, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._closeButton; } public function set closeButton(hug1:DisplayObject):void { //MethodID:6912, LocalCount= 2 , MaxScope= 1, MaxStack= 6, CodeLength= 38 if(this._closeButton != hug1){ this._closeButton = hug1; this._closeButton.addEventListener(MouseEvent.CLICK, this.closeHandler, false, 0, true); } } public function get action():Action { //MethodID:6913, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 7 return this._action; } public function set action(hug1:Action):void { //MethodID:6914, LocalCount= 3 , MaxScope= 1, MaxStack= 6, CodeLength= 389 if(this._action != hug1){ this._action = hug1; this.loader.unload(); this.userWidth = this.userHeight = 0; this.useCloseButton = !hug1.pictureHasntCloseButton; if(this._timer) this._timer.stop(); if(this.url != hug1.pictureUrl){ this.needLoad = true; this.url = hug1.pictureUrl; } this.size = hug1.pictureSize; this.draw(); if(this.useCloseButton){ this._closeButton.x = (this.userWidth - this._closeButton.width); if(!contains(this._closeButton)) addChild(this._closeButton); } if(this.needLoad){ while(numChildren > 0){ removeChildAt(0); } this.loader.load(new URLRequest(this.url), new LoaderContext(true)); if(this.action.pictureDisplayTime > 0){ this._timer = new Timer((this.action.pictureDisplayTime * 1000), 1); this._timer.addEventListener(TimerEvent.TIMER_COMPLETE, this.closeHandler, false, 0, true); } }else{ this.startDisplayTime(); } if(hasEventListener(MouseEvent.CLICK)) removeEventListener(MouseEvent.CLICK, this.onClick); if(hug1.pictureStatic && (hug1.sidebarOnClick || hug1.popupOnClick || (hug1.linkType != Action.EMPTY_LINK))) addEventListener(MouseEvent.CLICK, this.onClick, false, 0, true); }else{ this.startDisplayTime(); } } private function set size(hug1:Dimensions):void { //MethodID:6915, LocalCount= 3 , MaxScope= 1, MaxStack= 3, CodeLength= 211 var hug2:Boolean = false; if(hug1){ if((hug1.width > 0) && (hug1.width <= 1)) hug2 = true; } if(hug1){ if(hug2){ if(this._screenRect){ this.userWidth = (this._screenRect.width * hug1.width); this.userHeight = (this._screenRect.height * hug1.height); }else{ this.userWidth = (this.player.screen.screenRect.width * hug1.width); this.userHeight = (this.player.screen.screenRect.height * hug1.height); } }else{ this.userWidth = hug1.width; this.userHeight = hug1.height; } }else if((this.initialWidth != 0) && (this.initialHeight != 0) && !this.needLoad){ this.userWidth = this.initialWidth; this.userHeight = this.initialHeight; } } public function setBounds(hug1:Rectangle):void { //MethodID:6917, LocalCount= 2 , MaxScope= 1, MaxStack= 2, CodeLength= 24 this._screenRect = hug1; this.size = this._action.pictureSize; this.draw(); } public function update():void { //MethodID:6918, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 8 this.draw(); } private function draw():void { //MethodID:6919, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 38 if(this.content){ this.content.width = this.userWidth; this.content.height = this.userHeight; } this.recalcPoints(); } private function recalcPoints():void { //MethodID:6920, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 316 var hug1:Boolean = false; if(this._action.picturePosition){ if(((this._action.picturePosition.x > 0) && (this._action.picturePosition.x < 1)) || ((this._action.picturePosition.y > 0) && (this._action.picturePosition.y < 1))) hug1 = true; } if(this._action.picturePosition){ if(hug1){ x = ((this._action.picturePosition.x * this.player.screen.videoSize.width * this.player.screen.scaleRatio.x) + this.player.screen.markers.x); y = ((this._action.picturePosition.y * this.player.screen.videoSize.height * this.player.screen.scaleRatio.y) + this.player.screen.markers.y); }else{ x = ((this._action.picturePosition.x * this.player.screen.scaleRatio.x) + this.player.screen.screenRect.x); y = ((this._action.picturePosition.y * this.player.screen.scaleRatio.y) + this.player.screen.screenRect.y); } } } private function onComplete(hug1:Event):void { //MethodID:6921, LocalCount= 4 , MaxScope= 5, MaxStack= 6, CodeLength= 395 internal var event:Event; //slotID:1 internal var g:Graphics; //slotID:2 g = null; event = hug1; this.needLoad = false; try{ this.content = this.loader.content; } catch(e:*){ content = loader; } this.initialWidth = this.content.width; this.initialHeight = this.content.height; if((this.userWidth == 0) && (this.userHeight == 0)){ this.userWidth = this.initialWidth; this.userHeight = this.initialHeight; } this.draw(); addChild(this.content); if((this._closeButton == null) && this.useCloseButton){ this._closeButton = new Sprite(); g = Sprite(this._closeButton).graphics; this._closeButton.addEventListener(MouseEvent.CLICK, this.closeHandler, false, 0, true); var hug3:Boolean = true; Sprite(this._closeButton).buttonMode = hug3; Sprite(this._closeButton).useHandCursor = hug3; g.lineStyle(1); g.beginFill(0x999999); g.drawCircle(8, 8, 8); g.endFill(); g.moveTo(5, 5); g.lineTo(11, 11); g.moveTo(5, 11); g.lineTo(11, 5); } if(this.useCloseButton){ this._closeButton.x = (this.userWidth - this._closeButton.width); if(!contains(this._closeButton)) addChild(this._closeButton); } this.startDisplayTime(); } private function startDisplayTime():void { //MethodID:6922, LocalCount= 1 , MaxScope= 1, MaxStack= 2, CodeLength= 64 if(!this.action.pictureStatic && (this.action.pictureDisplayTime > 0) && !this._timer.running){ if(!this._timer.running) this._timer.start(); } } private function onError(hug1:Event):void { //MethodID:6923, LocalCount= 3 , MaxScope= 1, MaxStack= 6, CodeLength= 92 while(numChildren > 0){ removeChildAt(0); } this.loader.unload(); this.initialWidth = this.initialHeight = this.userWidth = this.userHeight = 0; this.url = ""; this.needLoad = this.useCloseButton = false; this.content = null; } public function onClose():void { //MethodID:6924, LocalCount= 1 , MaxScope= 1, MaxStack= 1, CodeLength= 8 this.closeHandler(); } private function closeHandler(hug1:*=null):void { //MethodID:6925, LocalCount= 3 , MaxScope= 1, MaxStack= 2, CodeLength= 26 var hug2:Sprite = (this.parent as Sprite); if(hug2) hug2.removeChild(this); } private function onClick(hug1:MouseEvent):void { //MethodID:6926, LocalCount= 2 , MaxScope= 1, MaxStack= 3, CodeLength= 19 this.player.controller.doAction(this._action, true); } } }