Section 1
//EPPCache (com.busfront.epp.base.cache.EPPCache)
package com.busfront.epp.base.cache {
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
public final class EPPCache extends EPPCollectionLoadable implements IIntelligentCollection {
private var _autoLoadBehavior:String;
private var _autoLoadEnabled:Boolean;// = false
public function EPPCache(){
_autoLoadBehavior = EPPLoaderEvent.PRELOAD;
super(EPPObjectType.CACHE, new Array(EPPObjectType.CACHE_ITEM));
}
public function get enabled():Boolean{
return (EPP.epp.intelligentLibraryIsEnabled(this.type));
}
public function set enabled(_arg1:Boolean){
if (_arg1 == true){
return (EPP.epp.enableIntelligentCollection(this.type));
};
EPP.epp.disableIntelligentCollection(this.type);
return (null);
}
override function addInternalChild(_arg1:EPPObject):void{
var _local8:*;
var _local2:ICacheable = (_arg1 as ICacheable);
var _local3:Array = _children;
var _local4:uint = _local3.length;
var _local5:uint;
while (_local5 < _local4) {
if (_local3[_local5].url == _local2.url){
if (_local2.cache != null){
_local2.cache.removeReference(_local2);
};
_local3[_local5].addReference(_local2);
_local8 = _arg1;
_local8.setCache(_local3[_local5]);
checkCollectionFiles();
return;
};
_local5++;
};
if (_local2.cache != null){
_local2.cache.removeReference(_local2);
};
var _local6:EPPCacheItem = new EPPCacheItem(_local2.url);
_local6._parent = this;
_children.push(_local6);
_local6.addReference(_local2);
var _local7:* = _local2;
_local7.setCache(_local6);
checkCollectionFiles();
_local6.dispatchEvent(new EPPEvent(EPPEvent.ADDED, this));
dispatchEvent(new EPPEvent(EPPEvent.ADDED_ITEM, _local6));
}
}
}//package com.busfront.epp.base.cache
Section 2
//EPPCacheItem (com.busfront.epp.base.cache.EPPCacheItem)
package com.busfront.epp.base.cache {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
import com.busfront.epp.controls.player.*;
import com.busfront.epp.net.stream.*;
import com.busfront.epp.controls.loader.*;
import com.busfront.epp.base.media.*;
import com.busfront.epp.base.swf.*;
import com.busfront.epp.net.connection.*;
public class EPPCacheItem extends EPPObject implements ILoadable {
protected var _connected:Boolean;// = false
private var _references:Array;
private var _autoLoadControl:String;// = null
protected var _url:String;
public function EPPCacheItem(_arg1:String){
_references = new Array();
super(EPPObjectType.CACHE_ITEM, _arg1);
_url = _arg1;
}
public function get uses():uint{
return (_references.length);
}
public function set autoLoadControl(_arg1:String):void{
if ((((((((_arg1 == null)) || ((_arg1 == EPPLoaderEvent.CHECK_CONNECTION)))) || ((_arg1 == EPPLoaderEvent.PRELOAD)))) || ((_arg1 == EPPLoaderEvent.LOAD)))){
_autoLoadControl = _arg1;
};
throw (new Error((("[EPP] " + _arg1) + " not exist for loader.")));
}
public function get cachedReferences():Array{
var _local1:uint = _references.length;
var _local2:Array = new Array();
var _local3:uint;
while (_local3 < _local1) {
_local2.push(_references[_local3]);
_local3++;
};
return (_local2);
}
public function get loader():EPPLoader{
return ((getControlGroup(EPPControlGroupType.LOADER) as EPPLoader));
}
function createConcreteChannel(_arg1:ICacheable):void{
}
function updateURL(_arg1:String, _arg2:ICacheable):void{
var _local3:Array = EPP.epp.cache._children;
var _local4:uint = _local3.length;
removeReference(_arg2);
var _local5:uint;
while (_local5 < _local4) {
if (_local3[_local5]._url == _arg1){
_local3[_local5].addReference(_arg2);
return;
};
_local5++;
};
EPPMediaCacheable(_arg2).setUrl(_arg1);
EPPMediaCacheable(_arg2).setCache(null);
EPP.epp.cache.addInternalChild((_arg2 as EPPObject));
destroy();
}
function addReference(_arg1:ICacheable):void{
_references.push(_arg1);
if (loader.connection == null){
this._autoLoadControl = _arg1.autoLoadControl;
switch (_arg1.type){
case EPPObjectType.VIDEO:
loader.setConnection(new EPPStreamVideoCache(this));
break;
case EPPObjectType.AUDIO:
loader.setConnection(new EPPStreamAudio(this));
break;
case EPPObjectType.IMAGE:
loader.setConnection(new EPPStreamImage(this, EPPImage(_arg1).duration));
break;
case EPPObjectType.SWF:
loader.setConnection(new EPPConnectionSWF(this));
break;
};
} else {
if ((((_arg1.type == EPPObjectType.SWF)) && ((loader.stateName == EPPLoaderEvent.LOADED)))){
EPPConnectionSWF(loader.connection).cloneContent((_arg1 as EPPSWF));
};
};
}
override public function get originalType():String{
return (_references[0].type);
}
function removeReference(_arg1:ICacheable):Boolean{
var _local2:uint = _references.length;
var _local3:uint;
while (_local3 < _local2) {
if (_references[_local3] == _arg1){
_references.splice(_local3, 1);
};
_local3++;
};
return (true);
}
public function get autoLoadControl():String{
if (_autoLoadControl == null){
return (EPP.epp.globalAutoLoadControl);
};
return (_autoLoadControl);
}
public function get url():String{
return (_url);
}
protected function checkFileValid():void{
var _local4:uint;
var _local5:uint;
_connected = true;
loader.setState(loader.getStateByName(EPPLoaderEvent.UNLOADED));
var _local1:uint = _references.length;
var _local2:EPPLoaderEvent = new EPPLoaderEvent(EPPLoaderEvent.CONNECTION_SUCCESS);
dispatchEvent(_local2);
var _local3:uint;
while (_local3 < _local1) {
_references[_local3].dispatchEvent(_local2);
if ((_references[_local3] is IPlayable)){
_local4 = _references[_local3].aliases.length;
_local5 = 0;
while (_local5 < _local4) {
_references[_local3].aliases[_local5].dispatchEvent(_local2);
_local5++;
};
};
_local3++;
};
}
function removeReferenceAt(_arg1:uint):Boolean{
_references.splice(_arg1, 1);
return (true);
}
}
}//package com.busfront.epp.base.cache
Section 3
//EPPObjectCacheable (com.busfront.epp.base.cache.EPPObjectCacheable)
package com.busfront.epp.base.cache {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
import com.busfront.epp.controls.loader.*;
import com.busfront.epp.base.media.*;
public class EPPObjectCacheable extends EPPObject implements ICacheable {
private var _cached:Boolean;// = false
private var _cache:EPPCacheItem;
private var _autoLoadControl:String;// = null
private var _url:String;
public function EPPObjectCacheable(_arg1:String, _arg2:String, _arg3:String=null):void{
_url = _arg3;
_autoLoadControl = _arg2;
if (EPP.epp.intelligentLibraryIsEnabled(EPPObjectType.CACHE) === true){
_cached = true;
};
super(_arg1, _arg3);
}
public function get cached():Boolean{
return (_cached);
}
public function set url(_arg1:String):void{
var _local2:EPPCacheItem;
_url = _arg1;
if (this.cache != null){
_local2 = (cache as EPPCacheItem);
_local2.updateURL(_arg1, (this as EPPMediaCacheable));
};
}
function setCache(_arg1:EPPCacheItem):void{
_cache = _arg1;
}
public function get autoLoadControl():String{
if (_autoLoadControl == null){
return (EPP.epp.globalAutoLoadControl);
};
return (_autoLoadControl);
}
public function get loader():EPPLoader{
return ((getControlGroup(EPPControlGroupType.LOADER) as EPPLoader));
}
public function get cache():EPPCacheItem{
return (_cache);
}
public function get url():String{
return (_url);
}
public function set autoLoadControl(_arg1:String):void{
if ((((((((_arg1 == null)) || ((_arg1 == EPPLoaderEvent.CHECK_CONNECTION)))) || ((_arg1 == EPPLoaderEvent.PRELOAD)))) || ((_arg1 == EPPLoaderEvent.LOAD)))){
_autoLoadControl = _arg1;
return;
};
throw (new Error((("[EPP] " + _arg1) + " does not exist for loader.")));
}
}
}//package com.busfront.epp.base.cache
Section 4
//ICacheable (com.busfront.epp.base.cache.ICacheable)
package com.busfront.epp.base.cache {
import com.busfront.epp.controls.loader.*;
public interface ICacheable extends ILoadable {
function get cache():EPPCacheItem;
function get cached():Boolean;
function set url(_arg1:String):void;
function get url():String;
}
}//package com.busfront.epp.base.cache
Section 5
//EPPAdapter (com.busfront.epp.base.feed.adapter.EPPAdapter)
package com.busfront.epp.base.feed.adapter {
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
import com.busfront.epp.base.feed.*;
import com.busfront.epp.controls.publisher.*;
import flash.events.*;
import com.busfront.epp.base.feed.adapter.*;
import com.busfront.epp.base.media.*;
import com.busfront.epp.net.connection.*;
class EPPAdapter extends EventDispatcher implements IAdapter {
protected var _audios:Array;
protected var _length:uint;// = 0
protected var _videos:Array;
protected var _data:Array;
private var audiosExtension:Array;
protected var _images:Array;
protected var _importingCollections:Array;
public var parser:EPPParser;
private var _simultaneousImport:Array;
private var imagesExtension:Array;
protected var nameSpace:String;
protected var _exportTarget:IPublishable;
private var videosExtension:Array;
protected var _totalItemindex:uint;// = 0
protected var _imported:Boolean;// = false
protected var _currentItemIndex:uint;// = 0
protected var nameSpaceMedia:String;
protected var _currentTarget:IPublishable;
protected var _rawXML:XML;
protected var _importingIncrement:uint;// = 0
private var _initImport:Boolean;
protected var _importEnd:uint;
protected var _importStart:uint;
function EPPAdapter(){
_videos = new Array("X-FLV", "FLV", "MP4", "QUICKTIME", "X-M4V");
_audios = new Array("MPEG", "MP3");
_images = new Array("PNG", "JPG", "BMP", "JPEG");
_importingCollections = new Array();
_simultaneousImport = new Array();
videosExtension = [{mime:"video/x-flv", extension:"FLV"}, {mime:"video/x-m4v", extension:"M4V"}, {mime:"video/quicktime", extension:"MOV"}, {mime:"video/mp4", extension:"MP4"}];
audiosExtension = [{mime:"audio/mpeg", extension:"MP3"}];
imagesExtension = [{mime:"image/gif", extension:"GIF"}, {mime:"image/png", extension:"PNG"}, {mime:"image/jpeg", extension:"JPEG"}, {mime:"image/jpg", extension:"JPG"}];
super();
}
public function isXmlAttributeString(_arg1:XML, _arg2:String, _arg3, _arg4):void{
if (_arg1.attribute(_arg2).toString() != ""){
_arg3[_arg4] = _arg1.attribute(_arg2).toString();
};
}
public function get imported():Boolean{
return (_imported);
}
protected function getTypeMime(_arg1:String, _arg2:String):String{
var _local4:String;
var _local6:uint;
var _local7:uint;
var _local8:uint;
var _local9:uint;
var _local10:uint;
var _local11:uint;
var _local3:String = _arg1;
var _local5 = "";
if (((!(_local3)) || ((_local3 == "")))){
return ("inconnu");
};
if (_local3.indexOf("?") > 0){
_local4 = _local3.substring(0, _local3.indexOf("?"));
} else {
_local4 = _local3;
};
_local4 = _local4.substring((_local4.lastIndexOf(".") + 1)).toLowerCase();
if (_local4.indexOf(" ") != -1){
_local4 = _local4.substring(0, _local4.indexOf(" "));
};
switch (_arg2){
case EPPObjectType.VIDEO:
_local6 = videosExtension.length;
_local9 = 0;
while (_local9 < _local6) {
if (_local4.toUpperCase() == videosExtension[_local9].extension){
_local5 = videosExtension[_local9].mime;
break;
};
_local9++;
};
break;
case EPPObjectType.AUDIO:
_local7 = audiosExtension.length;
_local10 = 0;
while (_local10 < _local7) {
if (_local4.toUpperCase() == audiosExtension[_local10].extension){
_local5 = audiosExtension[_local10].mime;
break;
};
_local10++;
};
break;
case EPPObjectType.IMAGE:
_local8 = imagesExtension.length;
_local11 = 0;
while (_local11 < _local8) {
if (_local4.toUpperCase() == imagesExtension[_local11].extension){
_local5 = imagesExtension[_local11].mime;
break;
};
_local11++;
};
break;
};
return (_local5);
}
protected function get header():String{
return (null);
}
protected function addChildToCollection(_arg1:EPPObject, _arg2:EPPMediaCollection):void{
if (_arg2.type != EPPObjectType.MEDIA_LIBRARY){
_arg2.addChild(_arg1);
};
_arg2.publisher.dispatchEvent(new EPPPublisherItemEvent(EPPPublisherItemEvent.ITEM_IMPORTED, null, _arg1.type, _arg1));
}
private function success(_arg1:EPPLoaderEvent):void{
parser.feed.loader.removeEventListener(EPPLoaderEvent.CONNECTION_SUCCESS, success);
parser.feed.loader.removeEventListener(EPPLoaderEvent.CONNECTION_FAILURE, fail);
parser.feed.loader.load();
}
public function attribute(_arg1:String):String{
throw (new Error((("attribute " + _arg1) + " no found")));
}
protected function get footer():String{
return (null);
}
private function fail(_arg1:EPPLoaderEvent):void{
parser.feed.loader.removeEventListener(EPPLoaderEvent.CONNECTION_SUCCESS, success);
parser.feed.loader.removeEventListener(EPPLoaderEvent.CONNECTION_FAILURE, fail);
parser.feed.loader.removeEventListener(EPPLoaderEvent.LOADED, startImport);
}
protected function preImport():void{
throw (new Error("preImport method must be overridden"));
}
protected function checkNextItemInSlot(_arg1:EPPSlotEvent):void{
var _local2:Object = getImportSessionByCollection(_currentTarget);
trace(("objSlot " + _local2));
trace(("objSlot.total " + _local2.total));
trace(("objSlot.current " + _local2.current));
_local2.total++;
_local2.current++;
var _local3:Boolean;
if ((((_initImport == true)) && ((_local2.current == EPP.epp.slotSize)))){
_initImport = false;
if (_local2.total == _data.length){
_local3 = true;
} else {
importInit(_currentTarget, _local2.total, (_local2.total + 1));
};
} else {
if (_initImport == false){
if (_local2.total == _length){
_local3 = true;
} else {
importInit(_currentTarget, _local2.total, (_local2.total + 1));
};
};
};
if (_local3 === true){
_local2.total = 0;
_local2.total = 0;
_importingCollections.splice((_local2.id - 1), 1);
EPP.epp.removeEventListener(EPPSlotEvent.SLOT_OUT, checkNextItemInSlot);
trace("DISPATCH IMPORTED !!!");
_currentTarget.publisher.dispatchEvent(new EPPPublisherEvent(EPPPublisherEvent.IMPORTED));
_imported = true;
};
}
private function startImport(_arg1:EPPLoaderEvent=null):void{
parser.feed.loader.removeEventListener(EPPLoaderEvent.LOADED, startImport);
var _local2:EPPConnectionFileContent = (parser.feed.loader.connection as EPPConnectionFileContent);
if (_local2.data != null){
_rawXML = new XML(_local2.data);
};
_initImport = true;
preImport();
_importingIncrement++;
_importingCollections.push({initImport:true, collection:_simultaneousImport[(_simultaneousImport.length - 1)], id:_importingIncrement, total:0, current:0});
var _local3:uint;
while (_local3 < _simultaneousImport.length) {
importInit(_simultaneousImport[_local3], 0, EPP.epp.slotSize);
_simultaneousImport.splice(_local3, 1);
_local3++;
};
}
protected function importInit(_arg1:IPublishable, _arg2:uint, _arg3:uint):void{
}
public function get length():uint{
return (_length);
}
public function importFeed(_arg1:IPublishable):void{
_simultaneousImport.push(_arg1);
var _local2:String = parser.feed.loader.stateName;
switch (_local2){
case EPPLoaderEvent.UNCHECKED:
parser.feed.loader.addEventListener(EPPLoaderEvent.CONNECTION_SUCCESS, success, false, 1);
parser.feed.loader.addEventListener(EPPLoaderEvent.CONNECTION_FAILURE, fail, false, 1);
parser.feed.loader.addEventListener(EPPLoaderEvent.LOADED, startImport, false, 1);
if (parser.feed.autoLoadControl == null){
parser.feed.loader.check();
};
break;
case EPPLoaderEvent.CHECKING:
parser.feed.loader.addEventListener(EPPLoaderEvent.CONNECTION_SUCCESS, success, false, 1);
parser.feed.loader.addEventListener(EPPLoaderEvent.CONNECTION_FAILURE, fail, false, 1);
parser.feed.loader.addEventListener(EPPLoaderEvent.LOADED, startImport, false, 1);
break;
case EPPLoaderEvent.UNLOADED:
parser.feed.loader.addEventListener(EPPLoaderEvent.LOADED, startImport, false, 1);
parser.feed.loader.load();
break;
case EPPLoaderEvent.UNLOADABLE:
break;
case EPPLoaderEvent.LOADING:
parser.feed.loader.addEventListener(EPPLoaderEvent.LOADED, startImport, false, 1);
break;
case EPPLoaderEvent.LOADED:
startImport();
break;
case EPPLoaderEvent.PRELOADED:
parser.feed.loader.addEventListener(EPPLoaderEvent.LOADED, startImport, false, 1);
parser.feed.loader.load();
break;
};
}
private function getImportSessionByCollection(_arg1:IPublishable):Object{
var _local2:Object;
var _local3:uint = _importingCollections.length;
var _local4:uint;
while (_local4 < _local3) {
if (_arg1 == _importingCollections[_local4].collection){
_local2 = _importingCollections[_local4];
};
_local4++;
};
if (!_local2){
throw (new Error("OUPS no Slot open"));
};
return (_local2);
}
public function exportFeed(_arg1:IPublishable):EPPFeed{
return (null);
}
public function destroy():void{
parser.feed.loader.removeEventListener(EPPLoaderEvent.CONNECTION_SUCCESS, success);
parser.feed.loader.removeEventListener(EPPLoaderEvent.CONNECTION_FAILURE, fail);
parser.feed.loader.removeEventListener(EPPLoaderEvent.LOADED, startImport);
_rawXML = null;
_data = null;
_currentItemIndex = 0;
_totalItemindex = 0;
_simultaneousImport = [];
_initImport = true;
}
}
}//package com.busfront.epp.base.feed.adapter
Section 6
//EPPASX (com.busfront.epp.base.feed.adapter.EPPASX)
package com.busfront.epp.base.feed.adapter {
import com.busfront.epp.base.*;
import com.busfront.epp.base.feed.*;
import com.busfront.epp.controls.publisher.*;
import com.busfront.epp.base.feed.adapter.*;
import com.busfront.epp.base.media.*;
import com.busfront.epp.utils.*;
final class EPPASX extends EPPAdapter {
function EPPASX():void{
}
private function SetMediaAttributes(_arg1:EPPMedia, _arg2:EPPMediaProxy):void{
_arg1.name = _arg2.name;
if (_arg1.type != EPPObjectType.IMAGE){
_arg1.player.start = _arg2.start;
if (_arg2.end){
_arg1.player.end = _arg2.end;
};
};
}
override public function exportFeed(_arg1:IPublishable):EPPFeed{
var _local8:EPPTime;
var _local9:EPPTime;
_exportTarget = _arg1;
var _local2:ICollection = (_exportTarget as ICollection);
var _local3:uint = _local2.children.length;
var _local4 = "\t<title>EPP exported ASX playlist</title>\r\n";
var _local5 = "";
var _local6 = "";
_length = _local3;
var _local7:uint;
while (_local7 < _local3) {
if ((_local2.children[_local7].type is EPPMediaOccurence)){
_local6 = _local2.children[_local7].original.type;
} else {
_local6 = _local2.children[_local7].type;
};
_local8 = new EPPTime(_local2.children[_local7].player.start);
_local9 = new EPPTime((_local2.children[_local7].player.end + _local2.children[_local7].player.start));
_local5 = ((((((((((((((((((_local5 + "<entry>\r\n") + "\t<title>") + _local2.children[_local7].name) + "</title>\r\n") + "\t<abstract>") + "</abstract>\r\n") + "\t<ref href=\"") + _local2.children[_local7].url) + "\" />\r\n") + "\t<author>") + "</author>\r\n") + "\t<starttime value=\"") + _local8.toTimeCode("H:M:S.C")) + "\"/>") + "\t<duration value=\"") + _local9.toTimeCode("H:M:S.C")) + "\"/>") + "</entry>\r\n");
_local7++;
};
_rawXML = new XML(((((((header + "\r\n") + _local4) + "\r\n") + _local5) + "\r\n") + footer));
return (new EPPVirtualFeed(this.parser));
}
override protected function importInit(_arg1:IPublishable, _arg2:uint, _arg3:uint):void{
var _local5:XML;
var _local6:uint;
var _local8:XML;
var _local9:EPPMediaProxy;
var _local10:EPPMedia;
var _local11:XML;
var _local12:String;
var _local13:Array;
var _local14:String;
var _local15:String;
var _local16:Number;
var _local17:String;
var _local18:String;
var _local19:String;
var _local20:String;
var _local21:uint;
var _local22:uint;
var _local23:uint;
var _local24:Number;
var _local25:Number;
var _local26:Array;
var _local27:uint;
var _local28:Array;
var _local29:uint;
var _local30:Array;
var _local31:uint;
var _local32:Number;
var _local33:Array;
var _local34:uint;
_currentTarget = _arg1;
_importStart = _arg2;
_importEnd = _arg3;
var _local4:Array = new Array();
for each (_local5 in _rawXML.children()) {
switch (_local5.name().toString()){
case "entry":
_local4.push(_local5);
break;
};
};
_local6 = _local4.length;
if (_arg3 > _local6){
_arg3 = _local6;
};
var _local7:uint = _arg2;
while (_local7 < _arg3) {
_local8 = _local4[_local7];
if (_local8){
switch (String(_local8.name())){
case "entry":
_local9 = new EPPMediaProxy("");
_local10 = null;
for each (_local11 in _local8.children()) {
switch (String(_local11.name())){
case "ref":
if (_local11.attribute("href").toString() != ""){
_local12 = _local11.attribute("href").toString();
if (_local12.indexOf("?") > 0){
_local20 = _local12.substring(0, _local12.indexOf("?"));
} else {
_local20 = _local12;
};
_local20 = _local20.substring((_local20.lastIndexOf(".") + 1)).toLowerCase();
if (_local20.indexOf(" ") != -1){
_local20 = _local20.substring(0, _local20.indexOf(" "));
};
} else {
_local12 = "";
_local20 = "";
};
_local21 = 0;
while (_local21 < _videos.length) {
if (_videos[_local21] == _local20.toUpperCase()){
_local10 = new EPPVideo(_local12);
addChildToCollection(_local10, (_arg1 as EPPMediaCollection));
};
_local21++;
};
_local22 = 0;
while (_local22 < _audios.length) {
if (_audios[_local22] == _local20.toUpperCase()){
_local10 = new EPPAudio(_local12);
addChildToCollection(_local10, (_arg1 as EPPMediaCollection));
};
_local22++;
};
_local23 = 0;
while (_local23 < _images.length) {
if (_images[_local23] == _local20.toUpperCase()){
_local24 = 5;
if (_local11.parent().duration.attribute("value").toString() != ""){
_local26 = _local11.parent().duration.attribute("value").toString().split(":");
_local27 = _local26.length;
if (_local27 == 1){
_local24 = Number(_local26[(_local27 - 1)]);
};
if (_local27 == 2){
_local24 = ((int(_local26[0]) * 60) + Number(_local26[(_local27 - 1)]));
};
if (_local27 == 3){
_local24 = (((int(_local26[0]) * 3600) + (int(_local26[1]) * 60)) + Number(_local26[(_local27 - 1)]));
};
};
_local25 = 5;
if (_local11.parent().starttime.attribute("value").toString() != ""){
_local28 = _local11.parent().starttime.attribute("value").toString().split(":");
_local29 = _local28.length;
if (_local29 == 1){
_local25 = Number(_local28[(_local27 - 1)]);
};
if (_local29 == 2){
_local25 = ((int(_local28[0]) * 60) + Number(_local28[(_local29 - 1)]));
};
if (_local29 == 3){
_local25 = (((int(_local28[0]) * 3600) + (int(_local28[1]) * 60)) + Number(_local28[(_local29 - 1)]));
};
};
_local10 = new EPPImage(_local12, (_local24 + _local25));
_local10.player.start = _local25;
addChildToCollection(_local10, (_arg1 as EPPMediaCollection));
};
_local23++;
};
break;
case "title":
_local14 = _local11.children();
_local9.name = _local14;
break;
case "starttime":
_local15 = _local11.attribute("value").toString();
_local16 = 0;
if (_local15 != ""){
_local30 = _local15.split(":");
_local31 = _local30.length;
if (_local31 == 1){
_local16 = Number(_local30[(_local31 - 1)]);
};
if (_local31 == 2){
_local16 = ((int(_local30[0]) * 60) + Number(_local30[(_local31 - 1)]));
};
if (_local31 == 3){
_local16 = (((int(_local30[0]) * 3600) + (int(_local30[1]) * 60)) + Number(_local30[(_local31 - 1)]));
};
};
_local9.start = _local16;
break;
case "duration":
_local17 = _local11.attribute("value").toString();
if (_local17 != ""){
_local32 = 0;
_local33 = _local17.split(":");
_local34 = _local33.length;
if (_local34 == 1){
_local32 = Number(_local33[(_local34 - 1)]);
};
if (_local34 == 2){
_local32 = ((int(_local33[0]) * 60) + Number(_local33[(_local34 - 1)]));
};
if (_local34 == 3){
_local32 = (((int(_local33[0]) * 3600) + (int(_local33[1]) * 60)) + Number(_local33[(_local34 - 1)]));
};
_local9.end = _local32;
};
break;
case "param":
_local18 = _local11.attribute("name").toString();
_local19 = _local11.attribute("value").toString();
break;
};
};
if (_local10 != null){
SetMediaAttributes(_local10, _local9);
};
break;
};
};
_local7++;
};
}
override protected function get footer():String{
var _local1 = "</asx>";
return (_local1);
}
override protected function get header():String{
var _local1 = "<asx version=\"3.0\">";
return (_local1);
}
}
}//package com.busfront.epp.base.feed.adapter
Section 7
//EPPATOM (com.busfront.epp.base.feed.adapter.EPPATOM)
package com.busfront.epp.base.feed.adapter {
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
import com.busfront.epp.base.feed.*;
import com.busfront.epp.controls.publisher.*;
import com.busfront.epp.base.feed.adapter.*;
import com.busfront.epp.base.media.*;
final class EPPATOM extends EPPAdapter {
function EPPATOM():void{
}
override public function exportFeed(_arg1:IPublishable):EPPFeed{
var _local3:Date;
var _local10:String;
_exportTarget = _arg1;
var _local2:ICollection = (_exportTarget as ICollection);
_local3 = new Date();
var _local4:uint = _local2.children.length;
var _local5:String = this.header;
var _local6 = "\t<title>Atom playlist</title>\r\n";
var _local7 = "";
var _local8 = "";
_length = _local4;
var _local9:uint;
while (_local9 < _local4) {
if ((_local2.children[_local9].type is EPPMediaOccurence)){
_local8 = _local2.children[_local9].original.type;
} else {
_local8 = _local2.children[_local9].type;
};
_local10 = getTypeMime(_local2.children[_local9].url, _local8);
_local7 = (((((((((((((((((((_local7 + "<entry>\r\n") + "\t<title>") + _local2.children[_local9].name) + "</title>\r\n") + "\t<id>") + _local2.children[_local9].id) + "</id>\r\n") + "\t<updated>") + _local3) + "</updated>\r\n") + "\t<link href=\"http://www.busfront.com\" />\r\n") + "\t<summary>") + "</summary>\r\n") + "\t<media:content url=\"") + _local2.children[_local9].url) + " \" type=\"") + _local10) + "\" />\r\n") + "</entry>\r\n");
_local9++;
};
_rawXML = new XML(((((((_local5 + "\r\n") + _local6) + "\r\n") + _local7) + "\r\n") + footer));
return (new EPPVirtualFeed(this.parser));
}
override protected function get footer():String{
var _local1 = "</feed>";
return (_local1);
}
override protected function get header():String{
var _local1 = ("<feed xmlns='http://www.w3.org/2005/Atom'" + " xmlns:media='http://search.yahoo.com/mrss/' >");
return (_local1);
}
override protected function importInit(_arg1:IPublishable, _arg2:uint, _arg3:uint):void{
var _local7:XML;
var _local8:uint;
var _local10:XML;
var _local11:XML;
var _local12:String;
var _local13:String;
var _local14:String;
var _local15:String;
var _local16:String;
var _local17:Array;
var _local18:String;
var _local19:String;
var _local20:Boolean;
var _local21:uint;
var _local22:EPPVideo;
var _local23:Boolean;
var _local24:uint;
var _local25:EPPImage;
var _local26:Boolean;
var _local27:uint;
var _local28:EPPAudio;
var _local4:Namespace = _rawXML.namespace();
var _local5:Namespace = _rawXML.namespace("media");
if (String(_local5) == ""){
nameSpaceMedia = "";
} else {
nameSpaceMedia = (String(_local5) + "::");
};
if (String(_local4) == ""){
nameSpace = "";
} else {
nameSpace = (String(_local4) + "::");
};
_currentTarget = _arg1;
_importStart = _arg2;
_importEnd = _arg3;
var _local6:Array = new Array();
for each (_local7 in _rawXML.children()) {
switch (String(_local7.name())){
case (nameSpace + "entry"):
_local6.push(_local7);
break;
};
};
_local8 = _local6.length;
if (_arg3 > _local8){
_arg3 = _local8;
};
var _local9:uint = _arg2;
while (_local9 < _arg3) {
_local10 = _local6[_local9];
if (_local10){
switch (String(_local10.name())){
case (nameSpace + "entry"):
for each (_local11 in _local10.children()) {
switch (String(_local11.name())){
case (nameSpaceMedia + "content"):
if (_local11.attribute("url").toString() != ""){
_local12 = _local11.attribute("url").toString();
} else {
_local12 = "";
};
if (_local11.attribute("type").toString() != ""){
_local13 = _local11.attribute("type").toString();
_local14 = _local13;
_local17 = _local13.split("/");
_local18 = _local17[0];
_local19 = _local17[1];
_local13 = _local18.toLowerCase();
_local15 = _local19.toUpperCase();
} else {
_local12 = "";
_local13 = "";
_local14 = _local13;
_local15 = "";
};
break;
case (nameSpace + "title"):
_local16 = _local11.children();
break;
};
};
if (_local13 == EPPObjectType.VIDEO){
_local20 = false;
_local21 = 0;
while (_local21 < _videos.length) {
if (_videos[_local21] == _local15){
_local20 = true;
_local22 = new EPPVideo(_local12);
_local22.name = _local16;
_local13 = null;
addChildToCollection(_local22, (_arg1 as EPPMediaCollection));
};
_local21++;
};
if (_local20 == false){
_arg1.publisher.dispatchEvent(new EPPPublisherItemEvent(EPPPublisherItemEvent.ITEM_IMPORT_FAIL, _local12, _local13, null));
};
} else {
if (_local13 == EPPObjectType.IMAGE){
_local23 = false;
_local24 = 0;
while (_local24 < _images.length) {
if (_images[_local24] == _local15){
_local23 = true;
_local25 = new EPPImage(_local12);
_local25.name = _local16;
_local13 = null;
addChildToCollection(_local25, (_arg1 as EPPMediaCollection));
};
_local24++;
};
if (_local23 == false){
_arg1.publisher.dispatchEvent(new EPPPublisherItemEvent(EPPPublisherItemEvent.ITEM_IMPORT_FAIL, _local12, _local13, null));
};
};
};
if (_local13 == EPPObjectType.AUDIO){
_local26 = false;
_local27 = 0;
while (_local27 < _audios.length) {
if (_audios[_local27] == _local15){
_local26 = true;
_local28 = new EPPAudio(_local12);
_local28.name = _local16;
_local13 = null;
addChildToCollection(_local28, (_arg1 as EPPMediaCollection));
};
_local27++;
};
if (_local26 == false){
_arg1.publisher.dispatchEvent(new EPPPublisherItemEvent(EPPPublisherItemEvent.ITEM_IMPORT_FAIL, _local12, _local13, null));
};
};
break;
};
};
_local9++;
};
}
}
}//package com.busfront.epp.base.feed.adapter
Section 8
//EPPM3U (com.busfront.epp.base.feed.adapter.EPPM3U)
package com.busfront.epp.base.feed.adapter {
import com.busfront.epp.controls.publisher.*;
import com.busfront.epp.base.feed.adapter.*;
import com.busfront.epp.base.media.*;
final class EPPM3U extends EPPAdapter {
override protected function importInit(_arg1:IPublishable, _arg2:uint, _arg3:uint):void{
var _local9:String;
var _local10:String;
var _local11:String;
var _local12:String;
var _local13:String;
var _local14:uint;
var _local15:uint;
var _local16:uint;
var _local17:EPPVideo;
var _local18:EPPAudio;
var _local19:Number;
var _local20:EPPImage;
var _local4:RegExp = /\n/;
var _local5:String = _rawXML.toString();
var _local6:Array = _local5.split("\n");
var _local7:uint = _local6.length;
_length = _local7;
var _local8:uint;
while (_local8 < _local7) {
_local9 = _local6[_local8];
if (_local9.substring(0, 7) == "#EXTINF"){
_local10 = _local9.slice((_local9.search(",") + 1), _local9.length);
_local11 = _local9.slice(8, _local9.search(","));
_local8 = (_local8 + 1);
_local12 = _local6[_local8];
if (_local12 != ""){
if (_local12.indexOf("?") > 0){
_local13 = _local12.substring(0, _local12.indexOf("?"));
} else {
_local13 = _local12;
};
_local13 = _local13.substring((_local13.lastIndexOf(".") + 1)).toLowerCase();
if (_local13.indexOf(" ") != -1){
_local13 = _local13.substring(0, _local13.indexOf(" "));
};
};
_local13 = _local13.toUpperCase();
_local14 = 0;
while (_local14 < _videos.length) {
if (_videos[_local14] == _local13){
_local17 = new EPPVideo(_local12);
_local17.name = _local10;
if (Number(_local11) > 0){
_local17.player.end = Number(_local11);
};
addChildToCollection(_local17, (_arg1 as EPPMediaCollection));
};
_local14++;
};
_local15 = 0;
while (_local15 < _audios.length) {
if (_audios[_local15] == _local13){
_local18 = new EPPAudio(_local12);
_local18.name = _local10;
if (Number(_local11) > 0){
_local18.player.end = Number(_local11);
};
addChildToCollection(_local18, (_arg1 as EPPMediaCollection));
};
_local15++;
};
_local16 = 0;
while (_local16 < _images.length) {
if (_images[_local16] == _local13){
_local19 = 5;
if (Number(_local11) > 0){
_local19 = Number(_local11);
};
_local20 = new EPPImage(_local12, _local19);
_local20.name = _local10;
addChildToCollection(_local20, (_arg1 as EPPMediaCollection));
};
_local16++;
};
};
_local8++;
};
}
}
}//package com.busfront.epp.base.feed.adapter
Section 9
//EPPMediaProxy (com.busfront.epp.base.feed.adapter.EPPMediaProxy)
package com.busfront.epp.base.feed.adapter {
import com.busfront.epp.base.feed.adapter.*;
final class EPPMediaProxy {
private var _id:String;
private var _loop:uint;
private var _isAlias:Boolean;// = false
private var _endTime:Number;// = 0
private var _order:uint;
private var _startTime:Number;// = 0
private var _keyId:String;
private var _name:String;
private var _url:String;
private var _volume:Number;// = 1
private var _duration:Number;
function EPPMediaProxy(_arg1:String){
_keyId = _arg1;
}
public function set start(_arg1:Number):void{
_startTime = _arg1;
}
public function set end(_arg1:Number):void{
_endTime = _arg1;
}
public function set loop(_arg1:uint):void{
_loop = _arg1;
}
public function get name():String{
return (_name);
}
public function set isAlias(_arg1:Boolean):void{
_isAlias = _arg1;
}
public function get isAlias():Boolean{
return (_isAlias);
}
public function get order():uint{
return (_order);
}
public function set name(_arg1:String):void{
_name = _arg1;
}
public function get keyId():String{
return (_keyId);
}
public function set order(_arg1:uint):void{
_order = _arg1;
}
public function get volume():Number{
return (_volume);
}
public function get id():String{
return (_id);
}
public function get duration():Number{
return (_duration);
}
public function get loop():uint{
return (_loop);
}
public function set url(_arg1:String):void{
_url = _arg1;
}
public function set duration(_arg1:Number):void{
_duration = _arg1;
}
public function get start():Number{
return (_startTime);
}
public function get end():Number{
return (_endTime);
}
public function set volume(_arg1:Number):void{
_volume = _arg1;
}
public function set id(_arg1:String):void{
_id = _arg1;
}
public function get url():String{
return (_url);
}
}
}//package com.busfront.epp.base.feed.adapter
Section 10
//EPPParser (com.busfront.epp.base.feed.adapter.EPPParser)
package com.busfront.epp.base.feed.adapter {
import com.busfront.epp.base.feed.*;
public final class EPPParser {
private var _adapter:EPPAdapter;
private var _type:String;
public var feed:EPPFeed;
public static const EPPML:EPPParser = new EPPParser("EPPML", new EPPAdapter());
;
public static const ASX:EPPParser = new EPPParser("ASX", new EPPASX());
;
public static const PODCAST:EPPParser = new EPPParser("PODCAST", new EPPPodcast());
;
public static const ATOM:EPPParser = new EPPParser("ATOM", new EPPATOM());
;
public static const M3U:EPPParser = new EPPParser("M3U", new EPPM3U());
;
public static const SMIL:EPPParser = new EPPParser("SMIL", new EPPSMIL());
;
public function EPPParser(_arg1:String, _arg2:EPPAdapter){
_type = _arg1;
_adapter = _arg2;
_arg2.parser = this;
}
public function get type():String{
return (_type);
}
public function get adapter():EPPAdapter{
return (_adapter);
}
}
}//package com.busfront.epp.base.feed.adapter
Section 11
//EPPPodcast (com.busfront.epp.base.feed.adapter.EPPPodcast)
package com.busfront.epp.base.feed.adapter {
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
import com.busfront.epp.base.feed.*;
import com.busfront.epp.controls.publisher.*;
import com.busfront.epp.base.media.*;
public final class EPPPodcast extends EPPAdapter {
public function EPPPodcast():void{
}
override protected function importInit(_arg1:IPublishable, _arg2:uint, _arg3:uint):void{
var _local5:XML;
var _local6:String;
var _local7:String;
var _local8:String;
var _local9:String;
var _local10:String;
var _local11:Array;
var _local12:String;
var _local13:String;
var _local14:Array;
var _local15:String;
var _local16:String;
var _local17:Array;
var _local18:String;
var _local19:String;
var _local20:Array;
var _local21:String;
var _local22:String;
var _local23:Boolean;
var _local24:uint;
var _local25:EPPVideo;
var _local26:Boolean;
var _local27:uint;
var _local28:EPPAudio;
var _local29:Boolean;
var _local30:uint;
var _local31:EPPImage;
_currentTarget = _arg1;
_importStart = _arg2;
_importEnd = _arg3;
_length = _data.length;
EPP.epp.removeEventListener(EPPSlotEvent.SLOT_OUT, checkNextItemInSlot);
EPP.epp.addEventListener(EPPSlotEvent.SLOT_OUT, checkNextItemInSlot, false, 1);
if (_arg3 > _length){
_arg3 = _length;
};
var _local4:uint = _arg2;
while (_local4 < _arg3) {
for each (_local5 in _data[_local4]) {
switch (String(_local5.name())){
case "enclosure":
if (_local5.attribute("url").toString() != ""){
_local6 = _local5.attribute("url").toString();
} else {
_local6 = "";
};
if (_local5.attribute("type").toString() != ""){
_local7 = _local5.attribute("type").toString();
_local8 = _local7;
_local11 = _local7.split("/");
_local12 = _local11[0];
_local13 = _local11[1];
_local7 = _local12.toLowerCase();
_local9 = _local13.toUpperCase();
} else {
if (this.getTypeMime(_local6, EPPObjectType.AUDIO)){
_local7 = EPPObjectType.AUDIO;
_local8 = this.getTypeMime(_local6, EPPObjectType.AUDIO);
_local14 = _local8.split("/");
_local15 = _local14[0];
_local16 = _local14[1];
_local7 = _local15.toLowerCase();
_local9 = _local16.toUpperCase();
} else {
if (this.getTypeMime(_local6, EPPObjectType.VIDEO)){
_local7 = EPPObjectType.VIDEO;
_local8 = this.getTypeMime(_local6, EPPObjectType.VIDEO);
_local17 = _local8.split("/");
_local18 = _local17[0];
_local19 = _local17[1];
_local7 = _local18.toLowerCase();
_local9 = _local19.toUpperCase();
} else {
if (this.getTypeMime(_local6, EPPObjectType.IMAGE)){
_local7 = EPPObjectType.IMAGE;
_local8 = this.getTypeMime(_local6, EPPObjectType.IMAGE);
_local20 = _local8.split("/");
_local21 = _local20[0];
_local22 = _local20[1];
_local7 = _local21.toLowerCase();
_local9 = _local22.toUpperCase();
} else {
_local6 = "";
_local7 = "";
_local8 = _local7;
_local9 = "";
};
};
};
};
break;
case "title":
_local10 = _local5.children();
break;
};
};
if (_local7 == EPPObjectType.VIDEO){
_local23 = false;
_local24 = 0;
while (_local24 < _videos.length) {
if (_videos[_local24] == _local9){
_local23 = true;
_local25 = new EPPVideo(_local6);
_local25.name = _local10;
addChildToCollection(_local25, (_arg1 as EPPMediaCollection));
break;
};
_local24++;
};
if (_local23 == false){
_arg1.publisher.dispatchEvent(new EPPPublisherItemEvent(EPPPublisherItemEvent.ITEM_IMPORT_FAIL, _local6, _local7, null));
};
} else {
if (_local7 == EPPObjectType.AUDIO){
_local26 = false;
_local27 = 0;
while (_local27 < _audios.length) {
if (_audios[_local27] == _local9){
_local26 = true;
_local28 = new EPPAudio(_local6);
_local28.name = _local10;
addChildToCollection(_local28, (_arg1 as EPPMediaCollection));
break;
};
_local27++;
};
if (_local26 == false){
_arg1.publisher.dispatchEvent(new EPPPublisherItemEvent(EPPPublisherItemEvent.ITEM_IMPORT_FAIL, _local6, _local7, null));
};
} else {
if (_local7 == EPPObjectType.IMAGE){
_local29 = false;
_local30 = 0;
while (_local30 < _images.length) {
if (_images[_local30] == _local9){
_local29 = true;
_local31 = new EPPImage(_local6);
_local31.name = _local10;
addChildToCollection(_local31, (_arg1 as EPPMediaCollection));
break;
};
_local30++;
};
if (_local29 == false){
_arg1.publisher.dispatchEvent(new EPPPublisherItemEvent(EPPPublisherItemEvent.ITEM_IMPORT_FAIL, _local6, _local7, null));
};
};
};
};
_local4++;
};
}
override protected function preImport():void{
var _local2:XML;
var _local1:Array = new Array();
for each (_local2 in _rawXML.channel.children()) {
switch (_local2.name().toString()){
case "item":
_local1.push(_local2.children());
break;
};
};
_data = _local1;
}
override public function exportFeed(_arg1:IPublishable):EPPFeed{
var _local10:String;
_exportTarget = _arg1;
var _local2:ICollection = (_exportTarget as ICollection);
var _local3:Date = new Date();
var _local4:uint = _local2.children.length;
var _local5:String = this.header;
var _local6 = (((((((((((((((((("\t<title>" + "</title>\r\n") + "\t<link>http://www.busfront.com</link>\r\n") + "\t<description>") + "</description>\r\n") + "\t<generator> EPP Podcast Generator/</generator>\r\n") + "\t<docs>http://busfront.net/parser </docs>\r\n") + "\t<language>en-us</language>\r\n") + "\t<copyright> © 2009 BUSFRONT</copyright>\r\n") + "\t<pubDate>") + _local3) + "</pubDate>\r\n") + "\t<lastBuildDate></lastBuildDate>\r\n") + "\t<image>\r\n") + "\t<url>http://busfront.com/display/templates/default/images/busfrontlogo.gif</url>\r\n") + "\t<title>Busfront EPP</title>\r\n") + "\t<link>http://busfront.com/</link>\r\n") + "\t</image>\r\n") + "\t<category>Multimedia</category>\r\n");
var _local7 = "";
var _local8 = "";
var _local9:uint;
while (_local9 < _local4) {
if ((_local2.children[_local9].type is EPPMediaOccurence)){
_local8 = _local2.children[_local9].original.type;
} else {
_local8 = _local2.children[_local9].type;
};
_local10 = getTypeMime(_local2.children[_local9].url, _local8);
_local7 = ((((((((((((((((((((((((((((((_local7 + "<item>") + "\t<guid>") + _local2.children[_local9].id) + "</guid>\r\n") + "\t<title>") + _local2.children[_local9].name) + "</title>\r\n") + "\t<link>") + "</link>\r\n") + "\t<enclosure url=\"") + _local2.children[_local9].url) + "\" length=\"\" type=\"") + _local10) + "\"/>\r\n") + "\t<pubDate>") + _local3.getUTCDate()) + "</pubDate>\r\n") + "\t<author>") + "</author>\r\n") + "\t<category>") + "</category>\r\n") + "\t<description>") + "</description>\r\n") + "\t<itunes:author></itunes:author>\r\n") + "\t<itunes:subtitle></itunes:subtitle>\r\n") + "\t<itunes:summary></itunes:summary>\r\n") + "\t<itunes:keywords></itunes:keywords>\r\n") + "\t<itunes:explicit>no</itunes:explicit>\r\n") + "\t<itunes:duration></itunes:duration>\r\n") + "</item>\r\n");
_local9++;
};
_rawXML = new XML(((((((_local5 + "\r\n") + _local6) + "\r\n") + _local7) + "\r\n") + footer));
return (new EPPVirtualFeed(this.parser));
}
override protected function get footer():String{
var _local1 = ("</channel>" + "</rss>");
return (_local1);
}
override public function attribute(_arg1:String):String{
if (_rawXML == null){
throw (new Error((("Adapter " + this) + " not loaded")));
};
if (_rawXML.channel[_arg1] != null){
return (_rawXML.channel[_arg1]);
};
throw (new Error((("attribute " + _arg1) + " no found")));
}
override protected function get header():String{
var _local1 = (("<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n " + "<rss xmlns:itunes=\"http://www.itunes.com/dtds/podcast-1.0.dtd\" version=\"2.0\">\r\n") + "<channel>\r\n");
return (_local1);
}
}
}//package com.busfront.epp.base.feed.adapter
Section 12
//EPPSMIL (com.busfront.epp.base.feed.adapter.EPPSMIL)
package com.busfront.epp.base.feed.adapter {
import com.busfront.epp.base.*;
import com.busfront.epp.base.feed.*;
import com.busfront.epp.controls.publisher.*;
import com.busfront.epp.base.feed.adapter.*;
import com.busfront.epp.base.media.*;
final class EPPSMIL extends EPPAdapter {
function EPPSMIL():void{
}
private function get head():String{
var _local1 = "";
_local1 = ((_local1 + "<head>\r\n") + "\t<meta name=\"Busfront SMIL Feed\" content=\"SMIL playlist for EPP\"/>\r\n");
_local1 = (_local1 + this.layout);
_local1 = (_local1 + "</head>\r\n");
return (_local1);
}
override public function exportFeed(_arg1:IPublishable):EPPFeed{
_exportTarget = _arg1;
var _local2:ICollection = (_exportTarget as ICollection);
var _local3:uint = _local2.children.length;
_length = _local3;
var _local4 = ("<body>\r\n" + "\t<seq>\r\n");
var _local5 = "";
var _local6:uint;
while (_local6 < _local3) {
if ((_local2.children[_local6].type is EPPMediaOccurence)){
_local5 = _local2.children[_local6].original.type;
} else {
_local5 = _local2.children[_local6].type;
};
switch (_local5){
case EPPObjectType.VIDEO:
_local4 = (((((((_local4 + "\t\t<video title=\"") + _local2.children[_local6].name) + "\" src=\"") + _local2.children[_local6].url) + "\"") + " author=\"Busfront\"") + " alt=\"\" />\r\n");
break;
case EPPObjectType.AUDIO:
_local4 = (((((((_local4 + "\t\t<audio title=\"") + _local2.children[_local6].name) + "\" src=\"") + _local2.children[_local6].url) + "\"") + " author=\"Busfront\"") + " alt=\"\" />\r\n");
break;
case EPPObjectType.IMAGE:
_local4 = (((((((_local4 + "\t\t<img title=\"") + _local2.children[_local6].name) + "\" src=\"") + _local2.children[_local6].url) + "\"") + " author=\"Busfront\"") + " alt=\"\" />\r\n");
break;
};
_local6++;
};
_local4 = ((_local4 + "\t</seq/>\r\n") + "</body>\r\n");
_rawXML = new XML(((((((header + "\r\n") + head) + "\r\n") + _local4) + "\r\n") + footer));
return (new EPPVirtualFeed(this.parser));
}
override protected function importInit(_arg1:IPublishable, _arg2:uint, _arg3:uint):void{
var _local5:XML;
var _local4:Namespace = _rawXML.namespace();
if (String(_local4) == ""){
nameSpace = "";
} else {
nameSpace = (String(_local4) + "::");
};
for each (_local5 in _rawXML.children()) {
switch (String(_local5.name())){
case (nameSpace + "body"):
importBody(_local5, (_arg1 as EPPMediaCollection));
break;
case (nameSpace + "head"):
break;
};
};
}
private function importBody(_arg1:XML, _arg2:EPPMediaCollection):void{
var _local3:EPPAudio;
var _local4:EPPVideo;
var _local5:EPPImage;
var _local6:XML;
var _local7:XML;
var _local8:XML;
switch (String(_arg1.name())){
case (nameSpace + "body"):
for each (_local6 in _arg1.children()) {
importBody(_local6, _arg2);
};
break;
case (nameSpace + "par"):
for each (_local7 in _arg1.children()) {
importBody(_local7, _arg2);
};
break;
case (nameSpace + "seq"):
for each (_local8 in _arg1.children()) {
importBody(_local8, _arg2);
};
break;
case (nameSpace + "audio"):
if (_arg1.attribute("src").toString() != ""){
_local3 = new EPPAudio(_arg1.attribute("src").toString());
} else {
_local3 = new EPPAudio();
};
_local3 = EPPAudio(getMediaAttributes(_local3, _arg1));
addChildToCollection(_local3, _arg2);
break;
case (nameSpace + "video"):
if (_arg1.attribute("src").toString() != ""){
_local4 = new EPPVideo(_arg1.attribute("src").toString());
} else {
_local4 = new EPPVideo();
};
_local4 = EPPVideo(getMediaAttributes(_local4, _arg1));
addChildToCollection(_local4, _arg2);
break;
case (nameSpace + "img"):
if (_arg1.attribute("src").toString() != ""){
_local5 = new EPPImage(_arg1.attribute("src").toString());
} else {
_local5 = new EPPImage();
};
_local5 = EPPImage(getMediaAttributes(_local5, _arg1));
addChildToCollection(_local5, _arg2);
break;
};
}
private function get layout():String{
var _local1 = ("\t<layout>\r\n" + "\t</layout>\r\n");
return (_local1);
}
override protected function get footer():String{
var _local1 = "</smil>\r\n";
return (_local1);
}
public function getMediaAttributes(_arg1:EPPObject, _arg2:XML):EPPObject{
if (_arg2.attribute("title").toString() != ""){
_arg1.name = _arg2.attribute("title").toString();
};
if (_arg2.attribute("begin").toString() != ""){
};
return (_arg1);
}
override protected function get header():String{
var _local1 = "<smil xmlns=\"http://www.w3.org/2001/SMIL20/Language\">\r\n";
return (_local1);
}
}
}//package com.busfront.epp.base.feed.adapter
Section 13
//IAdapter (com.busfront.epp.base.feed.adapter.IAdapter)
package com.busfront.epp.base.feed.adapter {
import com.busfront.epp.base.feed.*;
import com.busfront.epp.controls.publisher.*;
interface IAdapter {
function exportFeed(_arg1:IPublishable):EPPFeed;
function importFeed(_arg1:IPublishable):void;
}
}//package com.busfront.epp.base.feed.adapter
Section 14
//EPPFeed (com.busfront.epp.base.feed.EPPFeed)
package com.busfront.epp.base.feed {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
import com.busfront.epp.base.feed.adapter.*;
import com.busfront.epp.controls.loader.*;
import com.busfront.epp.net.connection.*;
public class EPPFeed extends EPPObject implements ILoadable {
private var _autoLoadControl:String;// = null
private var _feedURL:String;
private var _parser:EPPParser;
public function EPPFeed(_arg1:String, _arg2:EPPParser, _arg3:String=null, _arg4:Boolean=false){
trace("->->->->->_>_>->->");
super(EPPObjectType.FEED, _arg1);
_feedURL = _arg1;
_parser = _arg2;
_arg2.feed = this;
if (_arg4 == true){
loader.setState(loader.getStateByName(EPPLoaderEvent.LOADED));
};
_autoLoadControl = _arg3;
loader.setConnection(new EPPConnectionFileContent(this));
trace("->->->->->_>_>->->");
if (((EPP.epp.feedLibrary) && (EPP.epp.intelligentLibraryIsEnabled(EPPObjectType.FEED_LIBRARY)))){
trace("->->->->->_>_>->-> EPP.epp.feedLibrary.restricted::addInternalChild");
EPP.epp.feedLibrary.addInternalChild(this);
};
}
override public function destroy():void{
_parser.adapter.destroy();
super.destroy();
}
public function get loader():EPPLoader{
return ((getControlGroup(EPPControlGroupType.LOADER) as EPPLoader));
}
public function get autoLoadControl():String{
if (_autoLoadControl == null){
return (EPP.epp.globalAutoLoadControl);
};
return (_autoLoadControl);
}
public function set autoLoadControl(_arg1:String):void{
if ((((((((_arg1 == null)) || ((_arg1 == EPPLoaderEvent.CHECK_CONNECTION)))) || ((_arg1 == EPPLoaderEvent.PRELOAD)))) || ((_arg1 == EPPLoaderEvent.LOAD)))){
_autoLoadControl = _arg1;
return;
};
throw (new Error((("[EPP] " + _arg1) + " does not exist for loader.")));
}
public function get url():String{
return (_feedURL);
}
public function get parser():EPPParser{
return (_parser);
}
}
}//package com.busfront.epp.base.feed
Section 15
//EPPFeedLibrary (com.busfront.epp.base.feed.EPPFeedLibrary)
package com.busfront.epp.base.feed {
import com.busfront.epp.base.*;
public final class EPPFeedLibrary extends EPPLibrary {
public function EPPFeedLibrary(){
var _local1:Array = new Array(EPPObjectType.FEED);
super(EPPObjectType.FEED_LIBRARY, _local1);
}
}
}//package com.busfront.epp.base.feed
Section 16
//EPPVirtualFeed (com.busfront.epp.base.feed.EPPVirtualFeed)
package com.busfront.epp.base.feed {
import com.busfront.epp.base.feed.adapter.*;
public class EPPVirtualFeed extends EPPFeed {
public function EPPVirtualFeed(_arg1:EPPParser){
super(null, _arg1, null, true);
}
}
}//package com.busfront.epp.base.feed
Section 17
//EPPAudio (com.busfront.epp.base.media.EPPAudio)
package com.busfront.epp.base.media {
import com.busfront.epp.controls.*;
import com.busfront.epp.base.*;
import com.busfront.epp.net.stream.*;
import com.busfront.epp.controls.mixer.*;
import flash.media.*;
public final class EPPAudio extends EPPMediaCacheable implements IMixable {
var _channelAudio:SoundChannel;
public function EPPAudio(_arg1:String=null, _arg2:String=null):void{
_channelAudio = new SoundChannel();
super(EPPObjectType.AUDIO, _arg2, _arg1);
if (this.cached === false){
loader.setConnection(new EPPStreamAudio(this));
};
}
public function get mixer():EPPMixer{
return ((getControlGroup(EPPControlGroupType.MIXER) as EPPMixer));
}
}
}//package com.busfront.epp.base.media
Section 18
//EPPCacheableOccurence (com.busfront.epp.base.media.EPPCacheableOccurence)
package com.busfront.epp.base.media {
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
import com.busfront.epp.net.stream.*;
import com.busfront.epp.base.cache.*;
public class EPPCacheableOccurence extends EPPMediaOccurence implements ICacheable {
private var _cacheableOriginalOccurence:ICacheable;
public function EPPCacheableOccurence(_arg1:IOccurable, _arg2:EPPMediaCollection){
var cacheable:ICacheable;
var originalMedia = _arg1;
var parent = _arg2;
_cacheableOriginalOccurence = (originalMedia as ICacheable);
super(originalMedia, parent);
if (originalMedia.type == EPPObjectType.VIDEO){
cacheable = (originalMedia as ICacheable);
if (cacheable.cached === true){
loader.setConnection(new EPPStreamVideoCached(this));
} else {
loader.setConnection(new EPPStreamVideo(this));
};
} else {
if (originalMedia.player.stateName == EPPPlayerEvent.BUFFERED){
player.setState(player.getStateByName(EPPPlayerEvent.BUFFERED));
} else {
with ({}) {
with ({}) {
!ERROR!.gh = function (_arg1:EPPPlayerEvent):void{
player.setState(player.getStateByName(EPPPlayerEvent.BUFFERED));
};
};
originalMedia.player.addEventListener(EPPPlayerEvent.BUFFERED, function (_arg1:EPPPlayerEvent):void{
player.setState(player.getStateByName(EPPPlayerEvent.BUFFERED));
});
};
};
}
function setCache(_arg1:EPPCacheItem):void{
}
public function get cache():EPPCacheItem{
return (_cacheableOriginalOccurence.cache);
}
public function get cached():Boolean{
return (_cacheableOriginalOccurence.cached);
}
public function get url():String{
return (_cacheableOriginalOccurence.url);
}
public function set url(_arg1:String):void{
_cacheableOriginalOccurence.url = url;
}
}
}//package com.busfront.epp.base.media
Section 19
//EPPCollectionLibrary (com.busfront.epp.base.media.EPPCollectionLibrary)
package com.busfront.epp.base.media {
import com.busfront.epp.base.*;
public final class EPPCollectionLibrary extends EPPMediaLibrary {
public function EPPCollectionLibrary(){
_type = EPPObjectType.COLLECTION_LIBRARY;
_allowedChildTypes.push(EPPObjectType.PLAYLIST);
}
}
}//package com.busfront.epp.base.media
Section 20
//EPPImage (com.busfront.epp.base.media.EPPImage)
package com.busfront.epp.base.media {
import com.busfront.epp.base.*;
import com.busfront.epp.net.stream.*;
public final class EPPImage extends EPPMediaCacheable {
private var _duration:Number;
public function EPPImage(_arg1:String=null, _arg2:Number=5, _arg3:String=null):void{
_duration = _arg2;
super(EPPObjectType.IMAGE, _arg3, _arg1);
if (_arg2 < 0){
throw (new Error("[EPP] Duration value must be bigger than 0."));
};
if (this.cached === false){
loader.setConnection(new EPPStreamImage(this, _arg2));
};
}
function get duration():Number{
return (_duration);
}
}
}//package com.busfront.epp.base.media
Section 21
//EPPMedia (com.busfront.epp.base.media.EPPMedia)
package com.busfront.epp.base.media {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
import com.busfront.epp.controls.player.*;
import com.busfront.epp.controls.loader.*;
public class EPPMedia extends EPPObject implements IPlayable {
private var _autoLoadControl:String;
public function EPPMedia(_arg1:String, _arg2:String, _arg3:String){
_autoLoadControl = _arg3;
super(_arg1, _arg2);
}
public function get player():EPPPlayer{
return ((getControlGroup(EPPControlGroupType.PLAYER) as EPPPlayer));
}
public function get loader():EPPLoader{
return ((getControlGroup(EPPControlGroupType.LOADER) as EPPLoader));
}
public function get autoLoadControl():String{
if (_autoLoadControl == null){
return (EPP.epp.globalAutoLoadControl);
};
return (_autoLoadControl);
}
public function set autoLoadControl(_arg1:String):void{
if ((((((((_arg1 == null)) || ((_arg1 == EPPLoaderEvent.CHECK_CONNECTION)))) || ((_arg1 == EPPLoaderEvent.PRELOAD)))) || ((_arg1 == EPPLoaderEvent.LOAD)))){
_autoLoadControl = _arg1;
return;
};
throw (new Error((("[EPP] " + _arg1) + " does not exist for loader.")));
}
override public function destroy():void{
var _local1:IOccurable;
var _local2:uint;
var _local3:uint;
player.stop();
if ((this is IOccurable)){
_local1 = (this as IOccurable);
_local2 = _local1.occurences.length;
_local3 = 0;
while (_local3 < _local2) {
_local1.occurences[_local3].destroy();
_local3++;
};
};
super.destroy();
}
}
}//package com.busfront.epp.base.media
Section 22
//EPPMediaCacheable (com.busfront.epp.base.media.EPPMediaCacheable)
package com.busfront.epp.base.media {
import com.busfront.epp.base.*;
import com.busfront.epp.base.cache.*;
public class EPPMediaCacheable extends EPPMedia implements ICacheable, IOccurable {
private var _cached:Boolean;// = false
private var _cache:EPPCacheItem;
private var _url:String;
var _occurences:Array;
public function EPPMediaCacheable(_arg1:String, _arg2:String, _arg3:String=null):void{
var _local4:uint;
_occurences = new Array();
_url = _arg3;
if (EPP.epp.cache){
_cached = true;
} else {
if (EPP.epp.cache != null){
_local4 = 0;
while (_local4 < EPP.epp.cache.length) {
if (EPP.epp.cache.getChildAt(_local4).url == _arg3){
_cached = true;
break;
};
_local4++;
};
};
};
super(_arg1, _arg3, _arg2);
if (((EPP.epp.mediaLibrary) && (EPP.epp.intelligentLibraryIsEnabled(EPPObjectType.MEDIA_LIBRARY)))){
EPP.epp.mediaLibrary.addInternalChild(this);
};
}
public function set url(_arg1:String):void{
var _local2:EPPCacheItem;
if (_arg1 != _url){
_url = _arg1;
loader.unload();
trace(("new URL set -> " + _url));
if (this.cache != null){
_local2 = (cache as EPPCacheItem);
_local2.updateURL(_arg1, (this as EPPMediaCacheable));
};
};
}
function setCache(_arg1:EPPCacheItem):void{
_cache = _arg1;
}
public function get cache():EPPCacheItem{
return (_cache);
}
function setUrl(_arg1:String):void{
_url = _arg1;
}
public function get url():String{
if (this.cache != null){
return (cache.url);
};
return (_url);
}
public function get cached():Boolean{
return (_cached);
}
public function get occurences():Array{
return (_occurences);
}
}
}//package com.busfront.epp.base.media
Section 23
//EPPMediaCollection (com.busfront.epp.base.media.EPPMediaCollection)
package com.busfront.epp.base.media {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
import com.busfront.epp.controls.player.*;
import com.busfront.epp.controls.publisher.*;
import com.busfront.epp.controls.mixer.*;
public class EPPMediaCollection extends EPPCollectionLoadable implements IPublishable {
public function EPPMediaCollection(_arg1:String, _arg2:Array, _arg3:String):void{
super(_arg1, _arg2, _arg3);
_sortableTypes.push(EPPSortableProperty.DURATION, EPPSortableProperty.END, EPPSortableProperty.LOOP, EPPSortableProperty.TIME, EPPSortableProperty.TIME_REMAINING);
}
public function get player():EPPPlayer{
return ((getControlGroup(EPPControlGroupType.PLAYER) as EPPPlayer));
}
public function get publisher():EPPPublisher{
return ((getControlGroup(EPPControlGroupType.PUBLISHER) as EPPPublisher));
}
public function get playerCollection():EPPPlayerCollection{
return ((getControlGroup(EPPControlGroupType.PLAYER) as EPPPlayerCollection));
}
override public function removeChildren():Boolean{
var _local1:uint = length;
var _local2:uint;
while (_local2 < _local1) {
getChildAt(_local2)._parent = null;
_local2++;
};
_children.splice(0, length);
checkCollectionFiles();
return (true);
}
override public function removeChildAt(_arg1:uint):Boolean{
if (_arg1 > (length - 1)){
throw (new Error("[EPP] Index is out of bounds."));
};
getChildAt(_arg1)._parent = null;
_children.splice(_arg1, 1);
checkCollectionFiles();
return (true);
}
override public function addChildAt(_arg1:EPPObject, _arg2:uint):EPPObject{
if (canContain(_arg1.type)){
_children.splice(_arg2, 0, _arg1);
_arg1._parent = this;
checkCollectionFiles();
_arg1.dispatchEvent(new EPPEvent(EPPEvent.ADDED, this));
dispatchEvent(new EPPEvent(EPPEvent.ADDED_ITEM, _arg1));
return (_arg1);
};
throw (new Error(((("[EPP] " + _arg1.type) + " cannot be added in ") + this)));
}
public function get mixer():EPPMixer{
return ((getControlGroup(EPPControlGroupType.MIXER) as EPPMixer));
}
override function checkCollectionFiles():void{
}
override public function removeChild(_arg1:EPPObject):Boolean{
var _local2:uint;
if (this.contains(_arg1)){
_local2 = _arg1.order;
_arg1._parent = null;
_children.splice(_local2, 1);
checkCollectionFiles();
_arg1.dispatchEvent(new EPPEvent(EPPEvent.REMOVED, this));
dispatchEvent(new EPPEvent(EPPEvent.REMOVED_ITEM, _arg1));
return (true);
};
return (false);
}
}
}//package com.busfront.epp.base.media
Section 24
//EPPMediaLibrary (com.busfront.epp.base.media.EPPMediaLibrary)
package com.busfront.epp.base.media {
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
public class EPPMediaLibrary extends EPPMediaCollection implements IIntelligentCollection {
private var _isFirst:Boolean;// = false
public function EPPMediaLibrary(_arg1:String=null, _arg2:Array=null){
if (_arg1 != EPPObjectType.COLLECTION_LIBRARY){
_arg1 = EPPObjectType.MEDIA_LIBRARY;
};
if (_arg1 != EPPObjectType.COLLECTION_LIBRARY){
_arg2 = new Array(EPPObjectType.VIDEO, EPPObjectType.AUDIO, EPPObjectType.IMAGE);
};
super(_arg1, _arg2, null);
}
public function get enabled():Boolean{
return (EPP.epp.intelligentLibraryIsEnabled(this.type));
}
override function addInternalChild(_arg1:EPPObject):void{
if (((canContain(_arg1.type)) && ((enabled === true)))){
_arg1._parent = this;
_children.push(_arg1);
checkCollectionFiles();
_arg1.dispatchEvent(new EPPEvent(EPPEvent.ADDED, this));
dispatchEvent(new EPPEvent(EPPEvent.ADDED_ITEM, _arg1));
};
}
public function set enabled(_arg1:Boolean){
if (_arg1 === true){
return (EPP.epp.enableIntelligentCollection(this.type));
};
EPP.epp.disableIntelligentCollection(this.type);
return (null);
}
override public function addChild(_arg1:EPPObject):EPPObject{
return (addChildAt(_arg1, length));
}
}
}//package com.busfront.epp.base.media
Section 25
//EPPMediaOccurence (com.busfront.epp.base.media.EPPMediaOccurence)
package com.busfront.epp.base.media {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
import flash.display.*;
import flash.events.*;
import com.busfront.epp.controls.mixer.*;
import flash.utils.*;
import flash.media.*;
public class EPPMediaOccurence extends EPPMedia implements IMixable {
private var _original:IOccurable;
var _channelAudio:SoundChannel;
var _channelImage:BitmapData;
public function EPPMediaOccurence(_arg1:IOccurable, _arg2:EPPMediaCollection){
var tim:Timer;
var truc:*;
var originalMedia = _arg1;
var parent = _arg2;
_original = originalMedia;
super(EPPObjectType.OCCURENCE, null, _original.autoLoadControl);
_parent = parent;
originalMedia.occurences.push(this);
autoLoadControl = parent.autoLoadControl;
if (autoLoadControl){
if (originalMedia.loader.stateName == EPPLoaderEvent.UNLOADABLE){
loader.setState(loader.getStateByName(EPPLoaderEvent.UNLOADABLE));
} else {
if ((originalMedia is EPPVideo)){
truc = function (_arg1:TimerEvent):void{
tim.stop();
tim.removeEventListener(TimerEvent.TIMER, truc);
};
tim = new Timer(10);
tim.addEventListener(TimerEvent.TIMER, truc);
tim.start();
} else {
var _local4 = originalMedia.loader;
_local4[autoLoadControl]();
};
};
};
}
public function get original():IOccurable{
return (_original);
}
public function get mixer():EPPMixer{
return ((getControlGroup(EPPControlGroupType.MIXER) as EPPMixer));
}
override public function get originalType():String{
return (_original.type);
}
}
}//package com.busfront.epp.base.media
Section 26
//EPPPlaylist (com.busfront.epp.base.media.EPPPlaylist)
package com.busfront.epp.base.media {
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
import com.busfront.epp.base.cache.*;
public final class EPPPlaylist extends EPPMediaCollection implements IOccurable {
var _occurences:Array;
public function EPPPlaylist(_arg1:String=null):void{
_occurences = new Array();
var _local2:Array = new Array(EPPObjectType.AUDIO, EPPObjectType.PLAYLIST, EPPObjectType.VIDEO, EPPObjectType.IMAGE, EPPObjectType.OCCURENCE);
super(EPPObjectType.PLAYLIST, _local2, _arg1);
if (((EPP.epp.collectionLibrary) && (EPP.epp.intelligentLibraryIsEnabled(EPPObjectType.COLLECTION_LIBRARY)))){
EPP.epp.collectionLibrary.addInternalChild(this);
};
}
override public function addChild(_arg1:EPPObject):EPPObject{
return (addChildAt(_arg1, length));
}
public function get occurences():Array{
return (_occurences);
}
override public function addChildAt(_arg1:EPPObject, _arg2:uint):EPPObject{
var _local3:EPPMediaOccurence;
if (canContain(_arg1.type)){
if ((_arg1 is EPPMediaOccurence)){
_local3 = (_arg1 as EPPMediaOccurence);
_local3.parent.removeChild(_local3);
_local3._parent = this;
} else {
if ((_arg1 is ICacheable)){
_local3 = new EPPCacheableOccurence((_arg1 as IOccurable), this);
} else {
_local3 = new EPPMediaOccurence((_arg1 as IOccurable), this);
};
};
_children.splice(_arg2, 0, _local3);
checkCollectionFiles();
_arg1.dispatchEvent(new EPPEvent(EPPEvent.ADDED, this));
dispatchEvent(new EPPEvent(EPPEvent.ADDED_ITEM, _arg1));
return (_local3);
};
throw (new Error(((("[EPP] " + _arg1.type) + " cannot be added in ") + this)));
}
}
}//package com.busfront.epp.base.media
Section 27
//EPPVideo (com.busfront.epp.base.media.EPPVideo)
package com.busfront.epp.base.media {
import com.busfront.epp.controls.*;
import com.busfront.epp.base.*;
import flash.display.*;
import com.busfront.epp.net.stream.*;
import com.busfront.epp.controls.mixer.*;
import flash.media.*;
public class EPPVideo extends EPPMediaCacheable implements IMixable {
private var _defaultBufferTime:Number;// = 3
var _channelVideo:BitmapData;
private var _video:Video;
public function EPPVideo(_arg1:String=null, _arg2:String=null, _arg3:Video=null):void{
super(EPPObjectType.VIDEO, _arg2, _arg1);
_video = _arg3;
if (this.cached === true){
loader.setConnection(new EPPStreamVideoCached(this));
} else {
loader.setConnection(new EPPStreamVideo(this));
};
}
public function get mixer():EPPMixer{
return ((getControlGroup(EPPControlGroupType.MIXER) as EPPMixer));
}
public function get bufferTime():Number{
var _local1:EPPStreamVideo = (loader.connection as EPPStreamVideo);
if (!_local1){
return (_defaultBufferTime);
};
var _local2:EPPNetStream = _local1.stream;
if (!_local2){
return (_defaultBufferTime);
};
return (_local2.bufferTime);
}
function set video(_arg1:Video):void{
_video = _arg1;
}
public function get videoEvenIfNull():Video{
return (_video);
}
public function set bufferTime(_arg1:Number):void{
var _local3:EPPNetStream;
_defaultBufferTime = _arg1;
var _local2:EPPStreamVideo = (loader.connection as EPPStreamVideo);
if (_local2){
_local3 = _local2.stream;
_local3.bufferTime = length;
};
}
public function get video():Video{
return (_video);
}
}
}//package com.busfront.epp.base.media
Section 28
//IOccurable (com.busfront.epp.base.media.IOccurable)
package com.busfront.epp.base.media {
import com.busfront.epp.controls.player.*;
public interface IOccurable extends IPlayable {
function get occurences():Array;
}
}//package com.busfront.epp.base.media
Section 29
//EPPScreen (com.busfront.epp.base.screen.EPPScreen)
package com.busfront.epp.base.screen {
import com.busfront.epp.controls.*;
import com.busfront.epp.base.*;
import flash.display.*;
import com.busfront.epp.controls.player.*;
import com.busfront.epp.controls.filter.*;
public class EPPScreen extends EPPObject implements IFilterable {
protected var _player:EPPPlayer;
protected var _mediaObject:IPlayable;
protected var _displayObject:DisplayObject;
protected var _isUsed:Boolean;// = false
protected var _filters:Array;
public function EPPScreen(_arg1:EPPPlayer){
_filters = new Array();
_player = _arg1;
super(EPPObjectType.SCREEN, null);
}
public function get display():DisplayObject{
return (_displayObject);
}
public function get scale():EPPScreenScale{
return (null);
}
public function clear():void{
}
public function set media(_arg1:IPlayable):void{
_mediaObject = _arg1;
}
public function get filter():EPPFilter{
return ((getControlGroup(EPPControlGroupType.FILTER) as EPPFilter));
}
public function set scale(_arg1:EPPScreenScale):void{
}
public function removeFilter(_arg1:EPPControlApply):void{
var _local2 = -1;
var _local3:uint = _filters.length;
var _local4:uint;
while (_local4 < _local3) {
if (_filters[_local4] === _arg1){
_local2 = _local4;
break;
};
_local4++;
};
if (_local2 == -1){
throw (new Error("Filter to remove not found in filters list"));
};
_filters.splice(_local2, 1);
}
public function getFilterById(_arg1:String):EPPControlApply{
var _local2:EPPControlApply;
var _local3:uint = _filters.length;
var _local4:uint;
while (_local4 < _local3) {
if (_filters[_local4].id === _arg1){
_local2 = _filters[_local4];
};
_local4++;
};
if (_local2 == null){
throw (new Error((("Filter " + _arg1) + " not found")));
};
return (_local2);
}
public function get media():IPlayable{
return (_mediaObject);
}
public function attachStream():Boolean{
return (false);
}
public function refreshScreen():void{
}
public function addFilter(_arg1:EPPControlApply):void{
_filters.push(_arg1);
}
}
}//package com.busfront.epp.base.screen
Section 30
//EPPScreenBitmap (com.busfront.epp.base.screen.EPPScreenBitmap)
package com.busfront.epp.base.screen {
import com.busfront.epp.events.*;
import flash.display.*;
import com.busfront.epp.controls.player.*;
import com.busfront.epp.base.media.*;
import com.busfront.epp.net.channel.*;
public class EPPScreenBitmap extends EPPScreen {
private var _mc:Sprite;
private var _bitmap:Bitmap;
public function EPPScreenBitmap(_arg1:EPPPlayer){
super(_arg1);
}
private function setSize(_arg1:EPPLoaderEvent):void{
trace(((("SET SIZE " + _mediaObject.loader.metadata.width) + " ") + _mediaObject.loader.metadata.height));
_displayObject = new Sprite();
var _local2:Shape = new Shape();
_local2.graphics.drawRect(0, 0, _mediaObject.loader.metadata.width, _mediaObject.loader.metadata.height);
var _local3:Sprite = (_displayObject as Sprite);
_local3.addChild(_local2);
trace(((("added rect " + _local2) + " in ") + _local3));
_mediaObject.loader.removeEventListener(EPPLoaderEvent.LOADED, setSize);
}
override public function attachStream():Boolean{
var _local1:EPPChannel;
var _local2:DisplayObjectContainer;
trace(("attachStream " + _isUsed));
trace(("_displayObject " + _displayObject));
if (_displayObject == null){
setSize(null);
};
if (_isUsed == false){
_local1 = _mediaObject.player.channel;
if ((_mediaObject is EPPMediaCollection)){
_local1 = EPPMediaCollection(_mediaObject).playerCollection.realChild.player.channel;
};
if (_local1.channel == null){
_local1.createChannel();
};
clear();
_bitmap = new Bitmap(_local1.channel);
_mc = new Sprite();
_mc.addChild(_bitmap);
_local2 = (_displayObject as DisplayObjectContainer);
_local2.addChild(_mc);
_isUsed = true;
return (true);
//unresolved jump
};
return (false);
}
override public function set media(_arg1:IPlayable):void{
_mediaObject = _arg1;
if (_mediaObject.loader.stateName == EPPLoaderEvent.LOADED){
setSize(null);
} else {
_mediaObject.loader.addEventListener(EPPLoaderEvent.LOADED, setSize, false, 1);
};
}
override public function clear():void{
var _local1:Sprite;
_mediaObject.loader.removeEventListener(EPPLoaderEvent.LOADED, setSize);
if (_bitmap){
if (_mc.contains(_bitmap)){
_mc.removeChild(_bitmap);
};
};
if (_displayObject){
_local1 = (_displayObject as Sprite);
if (((_mc) && (_local1.contains(_mc)))){
_local1.removeChild(_mc);
};
};
_isUsed = false;
}
}
}//package com.busfront.epp.base.screen
Section 31
//EPPScreenGeneric (com.busfront.epp.base.screen.EPPScreenGeneric)
package com.busfront.epp.base.screen {
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
import flash.display.*;
import com.busfront.epp.controls.player.*;
import flash.geom.*;
import flash.events.*;
import com.busfront.epp.base.media.*;
import flash.utils.*;
public class EPPScreenGeneric extends EPPScreen {
private var _screenWidth:Number;
private var _firstTimeScreenFill:Boolean;// = false
private var _firstPixelDispatched:Boolean;// = false
private var _screenHeight:Number;
private var _bitmapData:BitmapData;
private var _positionSetted:Boolean;// = false
private var _timerCopy:Timer;
private var _image:Bitmap;
private var _scaleMedia:EPPScreenScale;
private var _sizeInfosX:Number;// = 0
private var _sizeInfosY:Number;// = 0
private var _updateScreen:Boolean;// = false
private var _originalScreen:EPPScreen;
public function EPPScreenGeneric(_arg1:EPPPlayer, _arg2:DisplayObjectContainer, _arg3:EPPScreenScale=null){
_timerCopy = new Timer(10);
super(_arg1);
if (_arg2 == null){
throw (new Error("[EPP] Gived argument 'sprite' for addScreen is 'null'."));
};
_displayObject = _arg2;
if (_arg3 != null){
_scaleMedia = _arg3;
} else {
_scaleMedia = EPPScreenScale.FIT;
};
}
override public function destroy():void{
clear();
_mediaObject.player.removeEventListener(EPPPlayerEvent.SEEK, seekThing);
_mediaObject.player.removeEventListener(EPPPlayerEvent.SEEK, goTo);
_mediaObject.player.removeEventListener(EPPPlayerEvent.PLAYING, goTo);
_mediaObject.player.removeEventListener(EPPPlayerEvent.SEEKED, seekedThing);
_mediaObject.player.removeEventListener(EPPPlayerEvent.STOPPING, stopThing);
_mediaObject.player.removeEventListener(EPPPlayerEvent.PLAYING, unstopThing);
_mediaObject.loader.removeEventListener(EPPLoaderEvent.UNLOADED, removeScreen);
_mediaObject.player.removeEventListener(EPPPlayerEvent.PLAYING, attachTheScreen);
_bitmapData = null;
_originalScreen = null;
_image = null;
_scaleMedia = null;
_timerCopy = null;
}
private function goTo(_arg1:EPPPlayerEvent):void{
buildBitmapData();
_mediaObject.player.removeEventListener(EPPPlayerEvent.SEEK, goTo);
_mediaObject.player.removeEventListener(EPPPlayerEvent.PLAYING, goTo);
}
private function restartPrinting():void{
_timerCopy.removeEventListener(TimerEvent.TIMER, updateScreen);
_timerCopy.addEventListener(TimerEvent.TIMER, updateScreen);
_timerCopy.start();
this.dispatchEvent(new EPPScreenEvent(EPPScreenEvent.PRINT_STOP, _bitmapData));
}
override public function clear():void{
if (_timerCopy){
_timerCopy.removeEventListener(TimerEvent.TIMER, updateScreen);
_timerCopy.stop();
_timerCopy.reset();
};
var _local1:MovieClip = (_displayObject as MovieClip);
if (_image != null){
if (_local1.contains(_image)){
_local1.removeChild(_image);
_image = null;
};
};
_isUsed = false;
}
private function attachTheScreen(_arg1:EPPPlayerEvent):void{
_mediaObject.player.removeEventListener(EPPPlayerEvent.PLAYING, attachTheScreen);
attachStream();
}
override public function set media(_arg1:IPlayable):void{
_mediaObject = _arg1;
_originalScreen = _arg1.player.screens[0];
_screenWidth = _displayObject.width;
_screenHeight = _displayObject.height;
if ((((((_mediaObject.player.state is EPPStatePlaying)) || ((_mediaObject.player.state is EPPStatePaused)))) || ((_mediaObject.player.state is EPPStatePlayed)))){
attachStream();
} else {
if ((((((_mediaObject.player.stateName == EPPPlayerEvent.UNPLAYED)) || ((_mediaObject.player.stateName == EPPPlayerEvent.BUFFERING)))) || ((_mediaObject.player.stateName == EPPPlayerEvent.BUFFERED)))){
_mediaObject.player.removeEventListener(EPPPlayerEvent.PLAYING, attachTheScreen);
_mediaObject.player.addEventListener(EPPPlayerEvent.PLAYING, attachTheScreen, false, 1);
};
};
_mediaObject.player.removeEventListener(EPPPlayerEvent.SEEK, seekThing);
_mediaObject.player.addEventListener(EPPPlayerEvent.SEEK, seekThing, false, 1);
_mediaObject.loader.removeEventListener(EPPLoaderEvent.UNLOADED, removeScreen);
_mediaObject.loader.addEventListener(EPPLoaderEvent.UNLOADED, removeScreen, false, 1);
_mediaObject.player.removeEventListener(EPPPlayerEvent.STOPPING, stopThing);
_mediaObject.player.addEventListener(EPPPlayerEvent.STOPPING, stopThing, false, 1);
}
override public function get scale():EPPScreenScale{
return (_scaleMedia);
}
private function stopThing(_arg1:EPPPlayerEvent):void{
_mediaObject.player.removeEventListener(EPPPlayerEvent.STOPPING, stopThing);
_mediaObject.player.addEventListener(EPPPlayerEvent.PLAYING, unstopThing, false, 1);
stopPrinting();
}
private function removeScreen(_arg1:EPPLoaderEvent):void{
_firstTimeScreenFill = false;
clear();
}
private function unstopThing(_arg1:EPPPlayerEvent):void{
_mediaObject.player.removeEventListener(EPPPlayerEvent.PLAYING, unstopThing);
_mediaObject.player.addEventListener(EPPPlayerEvent.STOPPING, stopThing, false, 1);
restartPrinting();
}
override public function set scale(_arg1:EPPScreenScale):void{
_scaleMedia = _arg1;
}
private function updateScreen(_arg1:TimerEvent):void{
var lepecli:MovieClip;
var sizeInfos:EPPScreenSize;
var rectangle:Rectangle;
var rct:Rectangle;
var filtersCount:uint;
var i:uint;
var pt:Point;
var n:Object;
var a:Array;
var p:int;
var x:int;
var c:String;
var y:int;
var e = _arg1;
if ((((((((((((_mediaObject is EPPImage)) || ((_mediaObject is EPPMediaCollection)))) || ((((((_mediaObject is EPPMediaOccurence)) && ((EPPMediaOccurence(_mediaObject).original is EPPImage)))) && ((_firstTimeScreenFill == false)))))) || ((e == null)))) || ((_mediaObject.player.stateName == EPPPlayerEvent.PLAYING)))) || ((_mediaObject.player.stateName == EPPPlayerEvent.SEEKING)))){
lepecli = (_displayObject as MovieClip);
if (_image != null){
if (lepecli.contains(_image)){
lepecli.removeChild(_image);
};
};
sizeInfos = _scaleMedia.getScaledSize((_mediaObject.loader.metadata.width as Number), (_mediaObject.loader.metadata.height as Number), _displayObject.width, _displayObject.height, _scaleMedia.type, _originalScreen.display);
rectangle = sizeInfos.rectangle;
if (_positionSetted == true){
sizeInfos.setCoordinates(_sizeInfosX, _sizeInfosY);
};
if (_bitmapData == null){
buildBitmapData();
};
try {
_bitmapData.draw(_originalScreen.display, sizeInfos.matrix, null, null, sizeInfos.rectangle);
} catch(error:SecurityError) {
trace(("SecurityErrorEvent catch: " + error));
};
rct = _bitmapData.rect;
filtersCount = _filters.length;
i = 0;
while (i < filtersCount) {
if (_filters[i].point){
pt = _filters[i].point;
} else {
pt = new Point(0, 0);
};
if (_filters[i].rect){
rct = _filters[i].rect;
};
_bitmapData.applyFilter(_bitmapData, rct, pt, _filters[i].bitmapFilter);
i = (i + 1);
};
_firstTimeScreenFill = true;
if (_mediaObject.player.screens[1] == this){
if ((_mediaObject is EPPImage)){
_firstTimeScreenFill = true;
} else {
if ((((_firstTimeScreenFill === false)) && ((_firstPixelDispatched === false)))){
n = {};
a = [];
x = 0;
while (x < _bitmapData.width) {
y = 0;
while (y < _bitmapData.height) {
p = _bitmapData.getPixel(x, y);
if (n[p]){
var _local3 = n;
var _local4 = p;
var _local5 = (_local3[_local4] + 1);
_local3[_local4] = _local5;
} else {
n[p] = 1;
};
y = (y + 1);
};
x = (x + 1);
};
for (c in n) {
a.push({colour:c, count:n[c]});
};
if (a.length > 1){
_firstTimeScreenFill = true;
};
};
};
};
if (((!((this == _mediaObject.player.screens[1]))) && ((_mediaObject.player.screens[1].isPrint == true)))){
_firstTimeScreenFill = true;
};
if ((((_firstTimeScreenFill === true)) && ((_firstPixelDispatched == false)))){
_firstPixelDispatched = true;
this.dispatchEvent(new EPPScreenEvent(EPPScreenEvent.PRINT_PIXEL, _bitmapData));
};
this.dispatchEvent(new EPPScreenEvent(EPPScreenEvent.PRINT_UPDATE, _bitmapData));
_image = sizeInfos.apply(_bitmapData);
if (EPP.epp.stage.displayState == StageDisplayState.FULL_SCREEN){
_image.smoothing = true;
} else {
_image.smoothing = false;
};
lepecli.addChild(_image);
};
}
private function seekThing(_arg1:EPPPlayerEvent):void{
_mediaObject.player.removeEventListener(EPPPlayerEvent.SEEK, seekThing);
stopPrinting();
restartPrinting();
_mediaObject.player.addEventListener(EPPPlayerEvent.SEEKED, seekedThing, false, 1);
}
private function seekedThing(_arg1:EPPPlayerEvent):void{
_mediaObject.player.removeEventListener(EPPPlayerEvent.SEEKED, seekedThing);
if ((((_mediaObject.player.stateName == EPPPlayerEvent.PLAYING)) || ((_mediaObject.player.stateName == EPPPlayerEvent.PAUSED)))){
restartPrinting();
};
_mediaObject.player.addEventListener(EPPPlayerEvent.SEEK, seekThing, false, 1);
}
private function buildBitmapData():void{
if (_bitmapData != null){
_bitmapData.dispose();
};
if (_originalScreen.display == null){
throw (new Error("NULL DISPLAY"));
};
_bitmapData = new BitmapData(_originalScreen.display.width, _originalScreen.display.height, true, 0);
_timerCopy.removeEventListener(TimerEvent.TIMER, updateScreen);
_updateScreen = false;
if ((((_mediaObject is EPPVideo)) || ((((_mediaObject is EPPMediaOccurence)) && ((EPPMediaOccurence(_mediaObject).original is EPPVideo)))))){
_updateScreen = true;
} else {
if ((((((((_mediaObject is EPPMediaCollection)) && ((EPPMediaCollection(_mediaObject).playerCollection.currentChild is EPPVideo)))) || ((((_mediaObject is EPPMediaCollection)) && ((EPPMediaCollection(_mediaObject).playerCollection.currentChild is EPPPlaylist)))))) || ((((((_mediaObject is ICollection)) && ((EPPMediaCollection(_mediaObject).playerCollection.currentChild is EPPMediaOccurence)))) && ((EPPMediaCollection(_mediaObject).playerCollection.currentChild.original is EPPVideo)))))){
_updateScreen = true;
};
};
if (_updateScreen == false){
_timerCopy.repeatCount = 1;
} else {
_timerCopy.repeatCount = 0;
};
this.dispatchEvent(new EPPScreenEvent(EPPScreenEvent.PRINT_START, _bitmapData));
_timerCopy.addEventListener(TimerEvent.TIMER, updateScreen);
_timerCopy.start();
}
override public function attachStream():Boolean{
_mediaObject.player.removeEventListener(EPPPlayerEvent.PLAYING, attachTheScreen);
if (_isUsed == false){
if ((((_mediaObject.player.stateName == EPPPlayerEvent.BUFFERED)) || ((_mediaObject.player.stateName == EPPPlayerEvent.BUFFERING)))){
_mediaObject.player.addEventListener(EPPPlayerEvent.SEEK, goTo, false, 1);
_mediaObject.player.addEventListener(EPPPlayerEvent.PLAYING, goTo, false, 1);
} else {
buildBitmapData();
};
_isUsed = true;
return (true);
};
return (false);
}
override public function refreshScreen():void{
if (_originalScreen.display){
updateScreen(null);
};
}
public function isPrint():Boolean{
return (_firstPixelDispatched);
}
public function setPosition(_arg1:Number, _arg2:Number):void{
_positionSetted = true;
_sizeInfosX = _arg1;
_sizeInfosY = _arg2;
}
private function stopPrinting():void{
_timerCopy.removeEventListener(TimerEvent.TIMER, updateScreen);
_timerCopy.stop();
this.dispatchEvent(new EPPScreenEvent(EPPScreenEvent.PRINT_STOP, _bitmapData));
}
}
}//package com.busfront.epp.base.screen
Section 32
//EPPScreenMediaCollection (com.busfront.epp.base.screen.EPPScreenMediaCollection)
package com.busfront.epp.base.screen {
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
import flash.display.*;
import com.busfront.epp.controls.player.*;
import com.busfront.epp.base.media.*;
import flash.media.*;
public class EPPScreenMediaCollection extends EPPScreen {
private var _originalScreen:EPPScreen;
private var _playScreen:MovieClip;
private var _video:Video;
private var _bitmap:Bitmap;
private var _realType:String;
public function EPPScreenMediaCollection(_arg1:EPPPlayer){
super(_arg1);
}
override public function get display():DisplayObject{
return (_originalScreen.display);
}
override public function attachStream():Boolean{
_originalScreen.attachStream();
_isUsed = true;
return (true);
}
override public function set media(_arg1:IPlayable):void{
_mediaObject = _arg1;
var _local2:EPPMediaCollection = (_mediaObject as EPPMediaCollection);
if (((!((_local2.loader.stateName == EPPLoaderEvent.LOADING))) && (!((_local2.loader.stateName == EPPLoaderEvent.LOADED))))){
_local2.loader.removeEventListener(EPPLoaderEvent.LOADING, setSize);
_local2.loader.addEventListener(EPPLoaderEvent.LOADING, setSize, false, 1);
} else {
setSize(null);
};
}
private function setSize(_arg1:EPPLoaderEvent):void{
var _local2:EPPMediaCollection = (_mediaObject as EPPMediaCollection);
_local2.loader.removeEventListener(EPPLoaderEvent.LOADING, setSize);
var _local3:IPlayable = _local2.playerCollection.realChild;
if (_local3.originalType == EPPObjectType.VIDEO){
_originalScreen = new EPPScreenVideo(_local2.player);
} else {
_originalScreen = new EPPScreenBitmap(_local2.player);
};
_originalScreen.media = _local2;
}
override public function clear():void{
if (_originalScreen){
_originalScreen.clear();
};
_isUsed = false;
}
override public function destroy():void{
if (_originalScreen){
_originalScreen.destroy();
};
}
}
}//package com.busfront.epp.base.screen
Section 33
//EPPScreenScale (com.busfront.epp.base.screen.EPPScreenScale)
package com.busfront.epp.base.screen {
import flash.display.*;
public class EPPScreenScale {
private var _scaleMode:String;
public static const FIT:EPPScreenScale = new EPPScreenScale("FIT");
;
public static const FILL:EPPScreenScale = new EPPScreenScale("FILL");
;
public static const CROP:EPPScreenScale = new EPPScreenScale("CROP");
;
public static const NONE:EPPScreenScale = new EPPScreenScale("NONE");
;
public static const FIT_TO_SCREEN:EPPScreenScale = new EPPScreenScale("FIT_TO_SCREEN");
;
public function EPPScreenScale(_arg1:String):void{
_scaleMode = _arg1;
}
public function getScaledSize(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:String, _arg6:DisplayObject=null):EPPScreenSize{
return (new EPPScreenSize(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6));
}
public function get type():String{
return (_scaleMode);
}
}
}//package com.busfront.epp.base.screen
Section 34
//EPPScreenSize (com.busfront.epp.base.screen.EPPScreenSize)
package com.busfront.epp.base.screen {
import com.busfront.epp.base.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
public class EPPScreenSize {
private var _originalScreenHeight:Number;
private var _x:Number;// = 0
private var _screenHeight:Number;
private var _type:String;
private var _matrix:Matrix;
private var _posSetted:Boolean;// = false
private var _originalScreenWidth:Number;
private var _rectangle:Rectangle;
private var _y:Number;// = 0
private var _screenWidth:Number;
public function EPPScreenSize(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:String, _arg6:DisplayObject=null){
var _local7:Rectangle;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Array;
var _local13:Number;
var _local14:Number;
var _local15:Array;
var _local16:Number;
var _local17:Number;
super();
_screenWidth = _arg3;
_screenHeight = _arg4;
_originalScreenWidth = _arg1;
_originalScreenHeight = _arg2;
_type = _arg5;
_matrix = null;
switch (_arg5){
case "CROP":
_matrix = new Matrix();
if ((((_originalScreenWidth > _screenWidth)) && ((_originalScreenHeight > _screenHeight)))){
if (_posSetted === false){
_local10 = (-((_originalScreenWidth - _screenWidth)) / 2);
_local11 = (-((_originalScreenHeight - _screenHeight)) / 2);
} else {
_local10 = _x;
_local11 = _y;
};
_matrix.translate(_local10, _local11);
_local8 = _screenWidth;
_local9 = _screenHeight;
} else {
if (_originalScreenWidth > _screenWidth){
if (_posSetted === false){
_local10 = (-((_originalScreenWidth - _screenWidth)) / 2);
_local11 = 0;
} else {
_local10 = _x;
_local11 = _y;
};
_matrix.translate(_local10, _local11);
_local8 = _screenWidth;
_local9 = _originalScreenHeight;
} else {
if (_originalScreenHeight > _screenHeight){
if (_posSetted === false){
_local10 = 0;
_local11 = (-((_originalScreenHeight - _screenHeight)) / 2);
} else {
_local10 = _x;
_local11 = _y;
};
_matrix.translate(_local10, _local11);
_local8 = _originalScreenWidth;
_local9 = _screenHeight;
} else {
_local8 = _originalScreenWidth;
_local9 = _originalScreenHeight;
};
};
};
_rectangle = new Rectangle(0, 0, _local8, _local9);
break;
case "FIT":
if (((((EPP.epp.stage) && ((EPP.epp.stage.numChildren > 0)))) && ((_arg6 is Video)))){
_local12 = EPP.epp.stage.getChildAt(0).toString().split("_mx_managers_SystemManager");
if (_local12.length > 1){
_local13 = (_originalScreenWidth / EPP.epp.firstVideoWidth);
_local14 = (_originalScreenHeight / EPP.epp.firstVideoHeight);
_matrix = new Matrix();
_matrix.scale(_local13, _local14);
};
};
case "FIT_TO_SCREEN":
if (((((EPP.epp.stage) && ((EPP.epp.stage.numChildren > 0)))) && ((_arg6 is Video)))){
_local15 = EPP.epp.stage.getChildAt(0).toString().split("_mx_managers_SystemManager");
if (_local15.length > 1){
_local16 = (_originalScreenWidth / EPP.epp.firstVideoWidth);
_local17 = (_originalScreenHeight / EPP.epp.firstVideoHeight);
_matrix = new Matrix();
_matrix.scale(_local16, _local17);
};
};
case "FILL":
case "NONE":
_rectangle = new Rectangle(0, 0, _originalScreenWidth, _originalScreenHeight);
break;
};
}
public function get matrix():Matrix{
return (_matrix);
}
public function get y():Number{
return (_y);
}
public function apply(_arg1:BitmapData):Bitmap{
var _local3:Number;
var _local4:Number;
var _local5:BitmapData;
var _local6:BitmapData;
var _local7:BitmapData;
var _local8:Number;
var _local9:Number;
var _local2:Bitmap = new Bitmap(_arg1);
switch (_type){
case "CROP":
if ((((_originalScreenWidth > _screenWidth)) && ((_originalScreenHeight > _screenHeight)))){
_local5 = new BitmapData(_screenWidth, _screenHeight, true, 0);
_local5.draw(_local2);
_local2 = new Bitmap(_local5, PixelSnapping.AUTO);
} else {
if (_originalScreenHeight > _screenHeight){
_local6 = new BitmapData(_originalScreenWidth, _screenHeight, true, 0);
_local6.draw(_local2);
_local2 = new Bitmap(_local6, PixelSnapping.AUTO);
_local2.x = (_local2.x + ((_screenWidth - _local2.width) / 2));
} else {
if (_originalScreenWidth > _screenWidth){
_local7 = new BitmapData(_screenWidth, _originalScreenHeight, true, 0);
_local7.draw(_local2);
_local2 = new Bitmap(_local7, PixelSnapping.AUTO);
_local2.y = (_local2.y + ((_screenHeight - _local2.height) / 2));
} else {
_local2.x = (_local2.x + ((_screenWidth - _local2.width) / 2));
_local2.y = (_local2.y + ((_screenHeight - _local2.height) / 2));
};
};
};
break;
case "FIT":
if ((((_originalScreenWidth > _screenWidth)) || ((_originalScreenHeight > _screenHeight)))){
_local8 = (_originalScreenWidth / _screenWidth);
_local9 = (_originalScreenHeight / _screenHeight);
if (_local8 > _local9){
_local2.width = _screenWidth;
_local2.height = (_originalScreenHeight / _local8);
_local2.y = (_local2.y + ((_screenHeight - _local2.height) / 2));
} else {
_local2.height = _screenHeight;
_local2.width = (_originalScreenWidth / _local9);
_local2.x = (_local2.x + ((_screenWidth - _local2.width) / 2));
};
} else {
_local2.y = (_local2.y + ((_screenHeight - _local2.height) / 2));
_local2.x = (_local2.x + ((_screenWidth - _local2.width) / 2));
};
break;
case "FIT_TO_SCREEN":
_local3 = (_originalScreenWidth / _screenWidth);
_local4 = (_originalScreenHeight / _screenHeight);
if (_local3 > _local4){
_local2.width = _screenWidth;
_local2.height = (_originalScreenHeight / _local3);
} else {
_local2.height = _screenHeight;
_local2.width = (_originalScreenWidth / _local4);
};
_local2.y = (_local2.y + ((_screenHeight - _local2.height) / 2));
_local2.x = (_local2.x + ((_screenWidth - _local2.width) / 2));
break;
case "FILL":
_local2.width = _screenWidth;
_local2.height = _screenHeight;
break;
case "NONE":
break;
};
return (_local2);
}
public function get rectangle():Rectangle{
return (_rectangle);
}
public function get x():Number{
return (_x);
}
public function setCoordinates(_arg1:Number, _arg2:Number):void{
_posSetted = true;
_x = _arg1;
_y = _arg2;
_matrix = new Matrix();
_matrix.translate(_x, _y);
_matrix.invert();
}
}
}//package com.busfront.epp.base.screen
Section 35
//EPPScreenVideo (com.busfront.epp.base.screen.EPPScreenVideo)
package com.busfront.epp.base.screen {
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
import flash.display.*;
import com.busfront.epp.controls.player.*;
import com.busfront.epp.net.stream.*;
import com.busfront.epp.base.media.*;
import com.busfront.epp.base.cache.*;
import flash.media.*;
public class EPPScreenVideo extends EPPScreen {
public function EPPScreenVideo(_arg1:EPPPlayer){
super(_arg1);
}
override public function set media(_arg1:IPlayable):void{
_mediaObject = _arg1;
_mediaObject.loader.removeEventListener(EPPLoaderEvent.PRELOADED, setSize);
if ((((((_mediaObject.loader.stateName == EPPLoaderEvent.PRELOADED)) || ((_mediaObject.loader.stateName == EPPLoaderEvent.LOADED)))) || ((_mediaObject.loader.stateName == EPPLoaderEvent.LOADING)))){
setSize(null);
} else {
_mediaObject.loader.addEventListener(EPPLoaderEvent.PRELOADED, setSize, false, 1);
};
}
private function setSize(_arg1:EPPLoaderEvent):void{
var _local4:Video;
var _local5:Array;
_mediaObject.loader.removeEventListener(EPPLoaderEvent.PRELOADED, setSize);
var _local2:Namespace = _mediaObject.getRestrictedNamespace(this);
var _local3:EPPVideo = (_mediaObject as EPPVideo);
if (((_local3) && (!((_local3.video == null))))){
_displayObject = (_local3.video as DisplayObjectContainer);
} else {
_local4 = new Video(_mediaObject.loader.metadata.width, _mediaObject.loader.metadata.height);
_local4.width = _mediaObject.loader.metadata.width;
_local4.height = _mediaObject.loader.metadata.height;
if (((EPP.epp.stage) && ((EPP.epp.stage.numChildren > 0)))){
_local5 = EPP.epp.stage.getChildAt(0).toString().split("_mx_managers_SystemManager");
if (_local5.length > 1){
EPP.epp.rebuildVideoMatrix(_local4);
};
};
if (_local3){
_local3._local2::video = _local4;
};
_displayObject = _local4;
};
}
override public function clear():void{
if (_displayObject){
Video(_displayObject).clear();
_isUsed = false;
};
}
override public function attachStream():Boolean{
var _local1:IPlayable;
var _local2:EPPStreamVideoCache;
var _local3:EPPStreamVideo;
if (_isUsed == false){
_local1 = _mediaObject;
if ((_mediaObject is EPPMediaCollection)){
_local1 = EPPMediaCollection(_mediaObject).playerCollection.realChild;
};
if ((((_local1 is ICacheable)) && ((ICacheable(_local1).cached == true)))){
_local2 = (ICacheable(_local1).cache.loader.connection as EPPStreamVideoCache);
Video(_displayObject).attachNetStream(_local2.getStreamByCachedObject((_local1 as ICacheable)));
} else {
_local3 = (_local1.loader.connection as EPPStreamVideo);
Video(_displayObject).attachNetStream(_local3.stream);
};
_isUsed = true;
return (true);
//unresolved jump
};
return (false);
}
}
}//package com.busfront.epp.base.screen
Section 36
//EPPSWF (com.busfront.epp.base.swf.EPPSWF)
package com.busfront.epp.base.swf {
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
import flash.display.*;
import com.busfront.epp.base.cache.*;
import com.busfront.epp.net.connection.*;
public class EPPSWF extends EPPObjectCacheable {
private var _swfContent:Sprite;
public function EPPSWF(_arg1:String, _arg2:String=null){
super(EPPObjectType.SWF, _arg2, _arg1);
if (this.cached === false){
loader.setConnection(new EPPConnectionSWF(this));
};
if (((EPP.epp.swfLibrary) && (EPP.epp.intelligentLibraryIsEnabled(EPPObjectType.SWF_LIBRARY)))){
EPP.epp.swfLibrary.addInternalChild(this);
};
}
function set swfContent(_arg1:Sprite):void{
_swfContent = new MovieClip();
_swfContent.addChild(_arg1);
dispatchEvent(new EPPSWFEvent(EPPSWFEvent.INIT));
}
public function get swfContent():DisplayObject{
return (_swfContent);
}
}
}//package com.busfront.epp.base.swf
Section 37
//EPPSWFLibrary (com.busfront.epp.base.swf.EPPSWFLibrary)
package com.busfront.epp.base.swf {
import com.busfront.epp.base.*;
public final class EPPSWFLibrary extends EPPLibrary {
public function EPPSWFLibrary(){
super(EPPObjectType.SWF_LIBRARY, new Array(EPPObjectType.SWF));
}
}
}//package com.busfront.epp.base.swf
Section 38
//EPP (com.busfront.epp.base.EPP)
package com.busfront.epp.base {
import com.busfront.epp.events.*;
import flash.display.*;
import com.busfront.epp.base.feed.*;
import com.busfront.epp.controls.loader.*;
import com.busfront.epp.base.media.*;
import com.busfront.epp.base.swf.*;
import com.busfront.epp.base.cache.*;
import flash.media.*;
public final class EPP extends EPPCollection {
private var _slotSize:uint;// = 4
private var _heightProportion:Number;
private var _firstVideoHeight:Number;
private var _waitList:Array;
private var _firstVideoWidth:Number;
private var _inteligentCollections:Array;
private var _checkingArray:Array;
private var _cacheLibrary:EPPCache;
private var _widthProportion:Number;
var _globalAutoLoadControl:String;
private var _lastVideoFormatNonStandard:Boolean;// = false
private var _currentVideoFormatNonStandard:Boolean;// = true
private var _cacheEnabled:Boolean;// = false
private var _firstVideoCreated:Boolean;// = false
private var _checkingFull:Boolean;// = false
private var _checkingTimeout:uint;// = 60000
var _stage:Stage;
private static var _selfInstance:EPP;
private static var _allowInstanciation:Boolean = false;
static var _arrayId:Array = new Array();
public function EPP(){
var _local1:Array;
_waitList = new Array();
_checkingArray = new Array();
if (_allowInstanciation === true){
_local1 = new Array(EPPObjectType.CACHE, EPPObjectType.MEDIA_LIBRARY, EPPObjectType.SWF_LIBRARY, EPPObjectType.FEED_LIBRARY, EPPObjectType.COLLECTION_LIBRARY);
_inteligentCollections = new Array(new EPPInteligentCollection(EPPObjectType.CACHE), new EPPInteligentCollection(EPPObjectType.MEDIA_LIBRARY), new EPPInteligentCollection(EPPObjectType.SWF_LIBRARY), new EPPInteligentCollection(EPPObjectType.FEED_LIBRARY), new EPPInteligentCollection(EPPObjectType.COLLECTION_LIBRARY));
super(EPPObjectType.EPP, _local1);
_allowInstanciation = false;
} else {
throw (new Error("[EPP] EPP Class is a singleton you can't instantiate it, use 'epp' property."));
};
}
public function get widthProportion():Number{
return (_widthProportion);
}
public function rebuildVideoMatrix(_arg1:Video):void{
if (!_firstVideoCreated){
_firstVideoCreated = true;
_firstVideoWidth = _arg1.width;
_firstVideoHeight = _arg1.height;
};
}
public function get cache():EPPCache{
return ((getIntelligentLibrary(EPPObjectType.CACHE) as EPPCache));
}
public function set widthProportion(_arg1:Number):void{
_widthProportion = _arg1;
}
public function set globalAutoLoadControl(_arg1:String):void{
if ((((((((_arg1 == null)) || ((_arg1 == EPPLoaderEvent.CHECK_CONNECTION)))) || ((_arg1 == EPPLoaderEvent.PRELOAD)))) || ((_arg1 == EPPLoaderEvent.LOAD)))){
_globalAutoLoadControl = _arg1;
return;
};
throw (new Error((("[EPP] " + _arg1) + " not exist for loader.")));
}
public function get heightProportion():Number{
return (_heightProportion);
}
public function get connectionTimeout():uint{
return (_checkingTimeout);
}
public function get slotSize():uint{
return (_slotSize);
}
public function initApplication(_arg1:Stage, _arg2:String=null, _arg3:uint=4):void{
if (_arg1 == null){
throw (new Error("[EPP] Cannot initialize EPP because passed 'stage' argument is null"));
};
if (_arg3 < 1){
throw (new Error("[EPP] Cannot initialize EPP because passed 'slotSize' argument is lower than 1."));
};
this.globalAutoLoadControl = _arg2;
_stage = _arg1;
_slotSize = _arg3;
}
function addToSlot(_arg1:ILoadable):void{
var _local4:String;
var _local2:EPPCollection = (_arg1 as EPPCollection);
var _local3:EPPMediaOccurence = (_arg1 as EPPMediaOccurence);
if (((_local3) && ((_local3.original.type == EPPObjectType.VIDEO)))){
_local3 = null;
};
if ((((_local2 == null)) && ((_local3 == null)))){
if (_checkingFull === false){
_checkingArray.push(_arg1);
dispatchEvent(new EPPSlotEvent(EPPSlotEvent.SLOT_IN, (_arg1 as EPPObject)));
if (_checkingArray.length == _slotSize){
_checkingFull = true;
};
_local4 = _arg1.autoLoadControl;
if (_local4 != null){
if (_local4 == EPPLoaderEvent.CHECK_CONNECTION){
_arg1.loader.removeEventListener(EPPLoaderEvent.CONNECTION_SUCCESS, checkFinish);
_arg1.loader.removeEventListener(EPPLoaderEvent.CONNECTION_FAILURE, checkFinish);
_arg1.loader.addEventListener(EPPLoaderEvent.CONNECTION_SUCCESS, checkFinish, false, 1);
_arg1.loader.addEventListener(EPPLoaderEvent.CONNECTION_FAILURE, checkFinish, false, 1);
} else {
_arg1.loader.addEventListener((_local4 + "ed"), checkFinish, false, 1);
};
var _local5 = _arg1.loader;
_local5[_local4]();
} else {
checkFinish(null, _arg1.loader);
};
} else {
_waitList.push(_arg1);
};
};
}
override public function get parent():EPPCollection{
throw (new Error("[EPP] It's impossible to set use parent property on EPP because it's composite root."));
}
public function get firstVideoHeight():Number{
return (_firstVideoHeight);
}
override public function set order(_arg1:int):void{
throw (new Error("[EPP] It's impossible to set use order property on EPP because it's composite root."));
}
public function get mediaLibrary():EPPMediaLibrary{
return ((getIntelligentLibrary(EPPObjectType.MEDIA_LIBRARY) as EPPMediaLibrary));
}
public function enableIntelligentCollection(_arg1:String):IIntelligentCollection{
var _local2:uint;
var _local3:uint;
if (this.canContain(_arg1)){
_local2 = _inteligentCollections.length;
_local3 = 0;
while (_local2) {
if (_inteligentCollections[_local3].type == _arg1){
_inteligentCollections[_local3].enabled = true;
return (_inteligentCollections[_local3].collection);
};
_local3++;
};
};
return (null);
}
public function get currentFormatNonStandard():Boolean{
return (_currentVideoFormatNonStandard);
}
private function checkFinish(_arg1:EPPLoaderEvent, _arg2:EPPLoader=null):void{
var _local5:String;
if (_arg1 != null){
_arg2 = (_arg1.target as EPPLoader);
if (_arg2.eppObject.autoLoadControl == EPPLoaderEvent.CHECK_CONNECTION){
_arg2.removeEventListener(EPPLoaderEvent.CONNECTION_SUCCESS, checkFinish);
_arg2.removeEventListener(EPPLoaderEvent.CONNECTION_FAILURE, checkFinish);
} else {
_arg2.removeEventListener(_arg1.type, checkFinish);
};
};
var _local3:uint = _checkingArray.length;
var _local4:uint;
while (_local4 < _local3) {
if (_checkingArray[_local4].loader == _arg2){
dispatchEvent(new EPPSlotEvent(EPPSlotEvent.SLOT_OUT, _checkingArray[_local4]));
_checkingArray.splice(_local4, 1);
_checkingFull = false;
break;
};
_local4++;
};
if (_waitList.length > 0){
_checkingArray.push(_waitList[0]);
dispatchEvent(new EPPSlotEvent(EPPSlotEvent.SLOT_IN, _waitList[0]));
_local5 = _waitList[0].autoLoadControl;
if (_local5 != null){
if (_local5 == EPPLoaderEvent.CHECK_CONNECTION){
_waitList[0].loader.addEventListener(EPPLoaderEvent.CONNECTION_SUCCESS, checkFinish, false, 1);
_waitList[0].loader.addEventListener(EPPLoaderEvent.CONNECTION_FAILURE, checkFinish, false, 1);
} else {
_waitList[0].loader.addEventListener((_local5 + "ed"), checkFinish, false, 1);
};
dispatchEvent(new EPPSlotEvent(EPPSlotEvent.SLOT_EMPTY, null));
var _local6 = _waitList[0].loader;
_local6[_local5]();
} else {
dispatchEvent(new EPPEvent(EPPSlotEvent.SLOT_EMPTY, null));
};
_waitList.splice(0, 1);
} else {
if (_checkingArray.length < _slotSize){
_checkingFull = false;
};
};
}
public function get lastFormatNonStandard():Boolean{
return (_lastVideoFormatNonStandard);
}
public function set heightProportion(_arg1:Number):void{
_heightProportion = _arg1;
}
public function get collectionLibrary():EPPCollectionLibrary{
return ((getIntelligentLibrary(EPPObjectType.COLLECTION_LIBRARY) as EPPCollectionLibrary));
}
public function get globalAutoLoadControl():String{
return (_globalAutoLoadControl);
}
public function get feedLibrary():EPPFeedLibrary{
return ((getIntelligentLibrary(EPPObjectType.FEED_LIBRARY) as EPPFeedLibrary));
}
override public function get order():int{
throw (new Error("[EPP] It's impossible to set use order property on EPP because it's composite root."));
}
function intelligentLibraryIsEnabled(_arg1:String):Boolean{
var _local2:uint;
var _local3:uint;
var _local4:Boolean;
if (this.canContain(_arg1)){
_local2 = _inteligentCollections.length;
_local3 = 0;
while (_local2) {
if (_inteligentCollections[_local3].type == _arg1){
_local4 = _inteligentCollections[_local3].enabled;
if (_local4 === true){
return (true);
};
break;
};
_local3++;
};
return (false);
};
throw (new Error((("Can't check if library is enabled because " + _arg1) + " is not an intelligent library.")));
}
public function set connectionTimeout(_arg1:uint):void{
_checkingTimeout = _arg1;
}
public function get swfLibrary():EPPSWFLibrary{
return ((getIntelligentLibrary(EPPObjectType.SWF_LIBRARY) as EPPSWFLibrary));
}
public function get firstVideoWidth():Number{
return (_firstVideoWidth);
}
function getIntelligentLibrary(_arg1:String):IIntelligentCollection{
var _local2:uint;
var _local3:uint;
if (this.canContain(_arg1)){
_local2 = _inteligentCollections.length;
_local3 = 0;
while (_local2) {
if (_inteligentCollections[_local3].type == _arg1){
return (_inteligentCollections[_local3].collection);
};
_local3++;
};
};
return (null);
}
public function set simultaneousChecking(_arg1:uint):void{
if (_arg1 < 1){
throw (new Error("[EPP] The 'slotSize' property can't be lower than 1."));
};
_slotSize = _arg1;
}
public function disableIntelligentCollection(_arg1:String):void{
var _local2:uint;
var _local3:uint;
if (this.canContain(_arg1)){
_local2 = _inteligentCollections.length;
_local3 = 0;
while (_local2) {
if (_inteligentCollections[_local3].type == _arg1){
_inteligentCollections[_local3].enabled = false;
return;
};
_local3++;
};
};
}
public function set currentFormatNonStandard(_arg1:Boolean):void{
_lastVideoFormatNonStandard = _currentVideoFormatNonStandard;
_currentVideoFormatNonStandard = _arg1;
}
public function get stage():Stage{
return (_stage);
}
public static function get epp():EPP{
if (_selfInstance == null){
_allowInstanciation = true;
_selfInstance = new (EPP);
};
return (_selfInstance);
}
static function generateId(_arg1:uint=12, _arg2:String="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"):String{
var _local3:Array = _arg2.split("");
var _local4:int = _local3.length;
var _local5 = "";
var _local6:uint;
while (_local6 < _arg1) {
_local5 = (_local5 + _local3[int(int((Math.random() * _local4)))]);
_local6++;
};
return (_local5);
}
}
}//package com.busfront.epp.base
Section 39
//EPPCollection (com.busfront.epp.base.EPPCollection)
package com.busfront.epp.base {
import com.busfront.epp.events.*;
import com.busfront.epp.controls.loader.*;
import com.busfront.epp.base.media.*;
public class EPPCollection extends EPPObject implements ICollection {
var _allowedChildTypes:Array;
var _children:Array;
protected var _sortableTypes:Array;
public function EPPCollection(_arg1:String, _arg2:Array){
_sortableTypes = new Array(EPPSortableProperty.ID, EPPSortableProperty.LENGTH, EPPSortableProperty.NAME, EPPSortableProperty.ORDER, EPPSortableProperty.TYPE);
super(_arg1, null);
_allowedChildTypes = _arg2;
_children = new Array();
}
public function get allowedChildTypes():Array{
return (cloneArray(_allowedChildTypes));
}
public function removeChild(_arg1:EPPObject):Boolean{
throw (new Error("[EPP] Impossible de supprimmer des enfants dans une collection intelligente."));
}
public function getChildrenSortedBy(_arg1:String, _arg2:uint=0, _arg3:Array=null):Array{
var _local8:uint;
var _local10:uint;
var _local11:uint;
var _local12:String;
var _local13:Object;
var _local14:uint;
var _local15:String;
var _local16:String;
var _local17:uint;
var _local18:String;
var _local4:Array = new Array();
var _local5:Array = new Array();
var _local6:uint = _sortableTypes.length;
var _local7:Array = new Array();
if (_arg3){
_local8 = _arg3.length;
};
var _local9:uint;
while (_local9 < _local6) {
if (_arg1 == _sortableTypes[_local9].property){
_sortableTypes[_local9].property;
if ((((this is EPPPlaylist)) && ((_arg1 == "type")))){
_arg1 = "originalType";
};
if (_sortableTypes[_local9].target == "eppObject"){
_local5 = children.sortOn(_arg1, _arg2);
if (_arg3 != null){
_local10 = 0;
while (_local10 < _children.length) {
_local11 = 0;
while (_local11 < _local8) {
_local12 = (_arg3[_local11].whereField as String);
_local13 = _children[_local10][_local12];
if ((((_children[_local10] is EPPMediaOccurence)) && ((_arg1 == EPPSortableProperty.TYPE)))){
_local13 = _children[_local10].originalType;
};
if (_local13 == _arg3[_local11].whereValue){
_local7.push(_children[_local10]);
break;
};
_local11++;
};
_local10++;
};
_local5 = _local7.sortOn(_arg1, _arg2);
};
} else {
_local14 = 0;
while (_local14 < _children.length) {
_local15 = _sortableTypes[_local9].target;
_local16 = _sortableTypes[_local9].property;
if (_arg3 != null){
_local17 = 0;
while (_local17 < _local8) {
_local18 = (_arg3[_local17].whereField as String);
if (_children[_local14][_local18] == _arg3[_local17].whereValue){
_local4.push({filteredValue:_children[_local14][_local15][_local16], id_med:_children[_local14].id});
break;
};
_local17++;
};
} else {
_local4.push({filteredValue:_children[_local14][_local15][_local16], id_med:_children[_local14].id});
};
_local14++;
};
_local4.sortOn("filteredValue", _arg2);
_local14 = 0;
while (_local14 < _local4.length) {
_local5.push(getChildById(_local4[_local14].id_med));
_local14++;
};
};
break;
};
_local9++;
};
return (_local5);
}
function internalRemoveChild(_arg1:EPPObject):void{
_children.splice(_arg1.order, 1);
}
public function getChildrenByType(_arg1:String):Array{
return (getChildrenBySomething("type", _arg1));
}
public function addChildAt(_arg1:EPPObject, _arg2:uint):EPPObject{
throw (new Error("[EPP] Impossible d'ajouter des enfant dans une collection intelligente."));
}
public function get validChildren():Array{
var _local1:Array = new Array();
var _local2:uint;
while (_local2 < length) {
if ((getChildAt(_local2) is ILoadable)){
if (((!((getChildAt(_local2).loader.state.name == EPPLoaderEvent.UNLOADABLE))) && (!((getChildAt(_local2).loader.state.name == EPPLoaderEvent.UNCHECKED))))){
_local1.push(getChildAt(_local2));
};
};
_local2++;
};
return (_local1);
}
public function contains(_arg1:EPPObject):Boolean{
var _local2:int = children.length;
var _local3:uint;
while (_local3 < _local2) {
if (children[_local3] == _arg1){
return (true);
};
_local3++;
};
return (false);
}
public function getChildrenByUrl(_arg1:String):Array{
return (getChildrenBySomething("url", _arg1));
}
private function getChildrenBySomething(_arg1:String, _arg2:String):Array{
var _local3:int;
var _local4:Array;
var _local5:uint;
if ((this is EPP)){
return (null);
};
_local3 = children.length;
_local4 = new Array();
_local5 = 0;
while (_local5 < _local3) {
if (children[_local5][_arg1] == _arg2){
_local4.push(children[_local5]);
};
_local5++;
};
return (_local4);
}
public function removeChildren():Boolean{
throw (new Error("[EPP] Impossible de supprimmer des enfant dans une collection intelligente."));
}
function addInternalChild(_arg1:EPPObject):void{
}
public function getChildAt(_arg1:int){
var _local3:uint;
var _local2:int = _children.length;
if ((((_arg1 < 0)) || ((_arg1 >= _local2)))){
throw (new Error((("[EPP] No child at specified index " + _arg1) + ".")));
};
_local3 = 0;
while (_local3 < _local2) {
if (_children[_local3].order == _arg1){
return (_children[_local3]);
};
_local3++;
};
throw (new Error((("[EPP] Aucun enfant n'existe a l'index spécifié " + _arg1) + ".")));
}
public function removeChildAt(_arg1:uint):Boolean{
throw (new Error("[EPP] Impossible de supprimmer des enfant dans une collection intelligente."));
}
function checkCollectionFiles():void{
var _local1:ILoadable = (this as ILoadable);
ILoader(_local1.loader.state).refreshCollectionState();
}
public function get lastValidChildIndex():int{
if (validChildren.length > 0){
return (validChildren[(validChildren.length - 1)].order);
};
return (-1);
}
public function getChildrenByName(_arg1:String):Array{
return (getChildrenBySomething("name", _arg1));
}
public function getChildById(_arg1:String){
var _local2:int = children.length;
var _local3:uint;
while (_local3 < _local2) {
if (children[_local3].id == _arg1){
return (children[_local3]);
};
_local3++;
};
return (null);
}
public function canContain(_arg1:String):Boolean{
var _local2:uint = this.allowedChildTypes.length;
var _local3:uint;
while (_local3 < _local2) {
if (allowedChildTypes[_local3] == _arg1){
return (true);
};
_local3++;
};
return (false);
}
public function get length():uint{
return (_children.length);
}
public function get firstValidChildIndex():int{
if (validChildren.length > 0){
return (validChildren[0].order);
};
return (-1);
}
public function sortChildrenBy(_arg1:String, _arg2:uint=0):Array{
var _local6:Array;
var _local7:uint;
var _local3:Array = new Array();
var _local4:uint = _sortableTypes.length;
var _local5:uint;
while (_local5 < _local4) {
if (_arg1 == _sortableTypes[_local5].property){
if (_sortableTypes[_local5].target == "eppObject"){
_children = children.sortOn(_arg1, _arg2);
} else {
_local6 = new Array();
_local7 = 0;
while (_local7 < _children.length) {
_local6.push({truc:_children[_local7][_sortableTypes[_local5].target][_sortableTypes[_local5].property], id_med:_children[_local7].id});
_local7++;
};
_local6.sortOn("truc", _arg2);
_local7 = 0;
while (_local7 < _local6.length) {
_local3.push(getChildById(_local6[_local7].id_med));
_local7++;
};
_children = _local3;
};
break;
};
_local5++;
};
return (_children);
}
override public function destroy():void{
var _local2:uint;
var _local1:uint = this.length;
while (_local2 < _local1) {
_children[0].destroy();
_local2++;
};
super.destroy();
}
public function addChild(_arg1:EPPObject):EPPObject{
throw (new Error("[EPP] Impossible d'ajouter des enfant dans une collection intelligente."));
}
public function get children():Array{
var _local1:uint = _children.length;
var _local2:Array = new Array();
var _local3:uint;
while (_local3 < _local1) {
_local2.push(_children[_local3]);
_local3++;
};
return (_local2);
}
}
}//package com.busfront.epp.base
Section 40
//EPPCollectionLoadable (com.busfront.epp.base.EPPCollectionLoadable)
package com.busfront.epp.base {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.controls.player.*;
import com.busfront.epp.net.stream.*;
import com.busfront.epp.controls.loader.*;
import com.busfront.epp.net.connection.*;
public class EPPCollectionLoadable extends EPPCollection implements ILoadable {
private var _autoLoadControl:String;
public function EPPCollectionLoadable(_arg1:String, _arg2:Array, _arg3:String=null){
super(_arg1, _arg2);
_autoLoadControl = _arg3;
if ((this is IPlayable)){
loader.setConnection(new EPPStreamCollection(this));
} else {
loader.setConnection(new EPPConnectionCollection(this));
};
_sortableTypes.push(EPPSortableProperty.BYTES_LOADED, EPPSortableProperty.BYTES_TOTAL, EPPSortableProperty.URL);
}
public function set autoLoadControl(_arg1:String):void{
if ((((((((_arg1 == null)) || ((_arg1 == EPPLoaderEvent.CHECK_CONNECTION)))) || ((_arg1 == EPPLoaderEvent.PRELOAD)))) || ((_arg1 == EPPLoaderEvent.LOAD)))){
_autoLoadControl = _arg1;
return;
};
throw (new Error((("[EPP] " + _arg1) + " not exist for loader.")));
}
public function get currentLoadingIndex():int{
var _local1:EPPStreamCollection;
var _local2:EPPConnectionCollection;
if ((this is IPlayable)){
_local1 = (loader.connection as EPPStreamCollection);
if (_local1.firstConnection){
return (_local1.firstConnection.currentLoadingIndex);
};
} else {
_local2 = (loader.connection as EPPConnectionCollection);
if (_local2){
return (_local2.currentLoadingIndex);
};
};
return (0);
}
public function get autoLoadControl():String{
if (_autoLoadControl == null){
return (EPP.epp.globalAutoLoadControl);
};
return (_autoLoadControl);
}
public function get loader():EPPLoader{
return ((getControlGroup(EPPControlGroupType.LOADER) as EPPLoader));
}
}
}//package com.busfront.epp.base
Section 41
//EPPInteligentCollection (com.busfront.epp.base.EPPInteligentCollection)
package com.busfront.epp.base {
import com.busfront.epp.base.*;
import com.busfront.epp.base.feed.*;
import com.busfront.epp.base.media.*;
import com.busfront.epp.base.swf.*;
import com.busfront.epp.base.cache.*;
final class EPPInteligentCollection {
private var _enabled:Boolean;// = false
private var _type:String;
private var _library:IIntelligentCollection;
function EPPInteligentCollection(_arg1:String){
_type = _arg1;
}
public function get enabled():Boolean{
return (_enabled);
}
public function buildmediaLibrary():IIntelligentCollection{
return (new EPPMediaLibrary());
}
public function buildswfLibrary():IIntelligentCollection{
return (new EPPSWFLibrary());
}
public function set enabled(_arg1:Boolean):void{
var _local2:Namespace = EPP.epp.getRestrictedNamespace(this);
if (_arg1 == true){
if (_library == null){
_library = this[("build" + _type)]();
};
EPP.epp._local2::_children.push(_library);
_library._local2::_parent = EPP.epp;
_enabled = true;
} else {
if ((((_arg1 == false)) && (!((_library == null))))){
if (_library.type != EPPObjectType.CACHE){
var _local3 = EPP.epp;
_local3._local2::internalRemoveChild(_library);
};
_enabled = false;
};
};
}
public function buildcollectionLibrary():IIntelligentCollection{
return (new EPPCollectionLibrary());
}
public function buildcache():IIntelligentCollection{
return (new EPPCache());
}
public function buildfeedLibrary():IIntelligentCollection{
return (new EPPFeedLibrary());
}
public function get type():String{
return (_type);
}
public function get collection():IIntelligentCollection{
return (_library);
}
}
}//package com.busfront.epp.base
Section 42
//EPPLibrary (com.busfront.epp.base.EPPLibrary)
package com.busfront.epp.base {
import com.busfront.epp.events.*;
public class EPPLibrary extends EPPCollectionLoadable implements IIntelligentCollection {
public function EPPLibrary(_arg1:String, _arg2:Array){
super(_arg1, _arg2);
}
public function set enabled(_arg1:Boolean){
if (_arg1 == true){
return (EPP.epp.enableIntelligentCollection(this.type));
};
EPP.epp.disableIntelligentCollection(this.type);
return (null);
}
override public function removeChildren():Boolean{
var _local1:uint = length;
var _local2:uint;
while (_local2 < _local1) {
getChildAt(_local2)._parent = null;
_local2++;
};
_children.splice(0, length);
checkCollectionFiles();
return (true);
}
public function get enabled():Boolean{
return (EPP.epp.intelligentLibraryIsEnabled(this.type));
}
override public function addChildAt(_arg1:EPPObject, _arg2:uint):EPPObject{
if (canContain(_arg1.type)){
_children.splice(_arg2, 0, _arg1);
checkCollectionFiles();
_arg1._parent = this;
checkCollectionFiles();
_arg1.dispatchEvent(new EPPEvent(EPPEvent.ADDED, this));
dispatchEvent(new EPPEvent(EPPEvent.ADDED_ITEM, _arg1));
return (_arg1);
};
throw (new Error(((("[EPP] " + _arg1.type) + " cannot be added in ") + this)));
}
override public function removeChildAt(_arg1:uint):Boolean{
if (_arg1 > (length - 1)){
throw (new Error("[EPP] Index is out of bounds."));
};
_children.splice(_arg1, 1);
checkCollectionFiles();
getChildAt(_arg1)._parent = null;
return (true);
}
override function addInternalChild(_arg1:EPPObject):void{
if (canContain(_arg1.type)){
_arg1._parent = this;
_children.push(_arg1);
checkCollectionFiles();
};
}
override public function removeChild(_arg1:EPPObject):Boolean{
if (this.contains(_arg1)){
_children.splice(_arg1.order, 1);
checkCollectionFiles();
_arg1._parent = null;
checkCollectionFiles();
_arg1.dispatchEvent(new EPPEvent(EPPEvent.REMOVED, this));
dispatchEvent(new EPPEvent(EPPEvent.REMOVED_ITEM, _arg1));
return (true);
};
return (false);
}
}
}//package com.busfront.epp.base
Section 43
//EPPObject (com.busfront.epp.base.EPPObject)
package com.busfront.epp.base {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.base.screen.*;
import com.busfront.epp.controls.player.*;
import com.busfront.epp.controls.publisher.*;
import flash.events.*;
import com.busfront.epp.controls.filter.*;
import com.busfront.epp.controls.mixer.*;
import com.busfront.epp.controls.loader.*;
import com.busfront.epp.base.media.*;
import com.busfront.epp.net.channel.*;
import com.busfront.epp.base.cache.*;
import com.busfront.epp.net.connection.*;
import flash.utils.*;
import com.busfront.epp.utils.*;
public class EPPObject extends EventDispatcher implements IEPPObject {
protected var _id:String;
var _parent:EPPCollection;
protected var _startURL:String;
var _type:String;
private var _name:String;
private var _authorizedGroups:Array;
private var _groups:Array;
protected namespace restricted = "com.busfront.epp.base:EPPObject/protected:restricted";
public function EPPObject(_arg1:String, _arg2:String){
var _local3:ICacheable;
var _local4:ILoadable;
_authorizedGroups = new Array();
_groups = new Array();
super();
_startURL = _arg2;
this._type = _arg1;
_id = EPP.generateId();
if ((this is ILoadable)){
_authorizedGroups.push(EPPControlGroupType.LOADER);
};
if ((this is IPlayable)){
_authorizedGroups.push(EPPControlGroupType.PLAYER);
};
if ((this is IMixable)){
_authorizedGroups.push(EPPControlGroupType.MIXER);
};
if ((this is IPublishable)){
_authorizedGroups.push(EPPControlGroupType.PUBLISHER);
};
if ((this is IFilterable)){
_authorizedGroups.push(EPPControlGroupType.FILTER);
};
if ((this is ICacheable)){
_local3 = (this as ICacheable);
if (_local3.cached == true){
EPP.epp.cache.addInternalChild(this);
};
};
if ((this is ILoadable)){
_local4 = (this as ILoadable);
_local4.loader.addEventListener(EPPControlGroupEvent.CHANGE_STATE, upgradeLoaderCollectionState, false, 1);
};
}
protected function cloneArray(_arg1:Array):Array{
var _local2:ByteArray = new ByteArray();
_local2.writeObject(_arg1);
_local2.position = 0;
return ((_local2.readObject() as Array));
}
private function upgradeLoaderCollectionState(_arg1:EPPControlGroupEvent):void{
if ((((hasParent == true)) && ((parent is EPPCollectionLoadable)))){
ILoader(EPPCollectionLoadable(parent).loader.state).refreshCollectionState();
};
}
function removeGroup(_arg1:EPPControlGroup):void{
var _local2:uint = _groups.length;
var _local3:uint;
while (_local3 < _local2) {
if (_groups[_local3] == _arg1){
_groups.splice(_local3, 1);
return;
};
_local3++;
};
throw (new Error((("[EPP] Impossible to remove " + _arg1) + ".")));
}
public function getRestrictedNamespace(_arg1:Object):Namespace{
if ((((((((((((((((((_arg1 is EPPPlaylist)) || ((_arg1 is EPPControlCheck)))) || ((_arg1 is EPPControlObject)))) || ((_arg1 is EPPState)))) || ((_arg1 is EPPScreen)))) || ((_arg1 is EPPString)))) || ((_arg1 is EPPChannel)))) || ((_arg1 is EPPConnection)))) || ((_arg1 is EPPInteligentCollection)))){
return (restricted);
};
throw (new Error((("[EPP] " + _arg1) + " is not authorized to acces restricted namespace.")));
}
public function get order():int{
var _local1:uint;
while (_local1 < parent._children.length) {
if (parent._children[_local1] === this){
return (_local1);
};
_local1++;
};
return (-1);
}
public function get name():String{
return (_name);
}
public function set name(_arg1:String):void{
_name = _arg1;
}
function getControlGroup(_arg1:EPPControlGroupType):EPPControlGroup{
var _local2:uint = _groups.length;
var _local3:uint;
while (_local3 < _local2) {
if (_groups[_local3].groupType.type == _arg1.type){
return (_groups[_local3]);
};
_local3++;
};
return (this.buildGroup(_arg1));
}
public function get id():String{
return (_id);
}
public function set order(_arg1:int):void{
var _local2:EPPObject;
var _local3:uint;
if (parent){
if (_arg1 > (parent.length - 1)){
throw (new Error((("[EPP] ORDER : " + _arg1) + " is out of collection bounds.")));
};
if (_arg1 < 0){
throw (new Error((("[EPP] ORDER : " + _arg1) + " is out of collection bounds.")));
};
_local3 = 0;
while (_local3 < parent.length) {
if (parent._children[_local3] === this){
_local2 = parent._children[_local3];
parent._children.splice(_local3, 1);
parent._children.splice(_arg1, 0, _local2);
if ((parent is IPlayable)){
parent.checkCollectionFiles();
};
break;
};
_local3++;
};
if (_local2 == null){
throw (new Error((("[EPP] ORDER : " + _arg1) + " is out of collection bounds.")));
};
};
}
public function get hasParent():Boolean{
if (this._parent){
return (true);
};
return (false);
}
public function get type():String{
return (this._type);
}
public function destroy():void{
var _local3:ILoadable;
if (hasParent == true){
parent.removeChild(this);
_parent = null;
};
if ((this is ILoadable)){
_local3 = (this as ILoadable);
_local3.loader.removeEventListener(EPPControlGroupEvent.CHANGE_STATE, upgradeLoaderCollectionState);
};
var _local1:uint = _groups.length;
var _local2:uint;
while (_local2 < _local1) {
_groups[_local2].destroy();
_local2++;
};
}
public function get parent():EPPCollection{
if (this._parent){
return (this._parent);
};
return (null);
}
public function get originalType():String{
return (type);
}
function buildGroup(_arg1:EPPControlGroupType):EPPControlGroup{
var _local2:uint = _authorizedGroups.length;
var _local3:uint;
while (_local3 < _local2) {
if (_authorizedGroups[_local3].type == _arg1.type){
if (_arg1.type == EPPControlGroupType.LOADER.type){
if ((this is EPPMediaOccurence)){
if (EPPMediaOccurence(this).original.type == EPPObjectType.VIDEO){
_groups.push(new EPPLoader((this as ILoadable), EPPCacheableOccurence(this).url));
} else {
_groups.push(new EPPLoaderOccurence((this as EPPMediaOccurence)));
};
return (_groups[(_groups.length - 1)]);
} else {
if (((((!((type == EPPObjectType.VIDEO))) && ((this is ICacheable)))) && ((ICacheable(this).cached === true)))){
_groups.push(new EPPLoaderAlias((this as ICacheable), _startURL));
return (_groups[(_groups.length - 1)]);
};
if ((this is ILoadable)){
_groups.push(new EPPLoader((this as ILoadable), _startURL));
return (_groups[(_groups.length - 1)]);
};
};
};
if (_arg1.type == EPPControlGroupType.PLAYER.type){
if ((this is EPPMediaCollection)){
_groups.push(new EPPPlayerCollection((this as EPPMediaCollection)));
return (_groups[(_groups.length - 1)]);
};
_groups.push(new EPPPlayer((this as IPlayable)));
return (_groups[(_groups.length - 1)]);
};
if (_arg1.type == EPPControlGroupType.MIXER.type){
_groups.push(new EPPMixer((this as IPlayable)));
return (_groups[(_groups.length - 1)]);
};
if (_arg1.type == EPPControlGroupType.PUBLISHER.type){
_groups.push(new EPPPublisher((this as IPublishable)));
return (_groups[(_groups.length - 1)]);
};
if (_arg1.type == EPPControlGroupType.FILTER.type){
_groups.push(new EPPFilter((this as IFilterable)));
return (_groups[(_groups.length - 1)]);
};
};
_local3++;
};
throw (new Error((((("[EPP] Impossible to build " + _arg1.type) + " on ") + this) + ".")));
}
public function set id(_arg1:String):void{
var _local2:uint = EPP._arrayId.length;
var _local3:uint;
while (_local3 < _local2) {
if (EPP._arrayId[_local3] == _arg1){
throw (new Error((((("[EPP] ID : " + _arg1) + " is allready used by ") + name) + " another EPPObject.")));
};
_local3++;
};
_id = _arg1;
EPP._arrayId.push(_id);
}
function getUrl():String{
return (_startURL);
}
}
}//package com.busfront.epp.base
Section 44
//EPPObjectType (com.busfront.epp.base.EPPObjectType)
package com.busfront.epp.base {
public final class EPPObjectType {
public static const FEED_LIBRARY:String = "feedLibrary";
public static const EPP:String = "epp";
public static const AUDIO:String = "audio";
public static const CACHE_ITEM:String = "cacheItem";
public static const PLAYLIST:String = "playlist";
public static const OCCURENCE:String = "occurence";
public static const VIDEO:String = "video";
public static const FEED:String = "feed";
public static const MEDIA_LIBRARY:String = "mediaLibrary";
public static const CACHE:String = "cache";
public static const SWF:String = "swf";
public static const SCREEN:String = "screen";
public static const COLLECTION_LIBRARY:String = "collectionLibrary";
public static const IMAGE:String = "image";
public static const SWF_LIBRARY:String = "swfLibrary";
}
}//package com.busfront.epp.base
Section 45
//EPPSortableProperty (com.busfront.epp.base.EPPSortableProperty)
package com.busfront.epp.base {
public class EPPSortableProperty {
public static const START:Object = {property:"start", target:"player"};
public static const NAME:Object = {property:"name", target:"eppObject"};
public static const TIME:Object = {property:"time", target:"player"};
public static const URL:Object = {property:"url", target:"eppObject"};
public static const DURATION:Object = {property:"duration", target:"player"};
public static const PAN:Object = {property:"pan", target:"mixer"};
public static const ID:Object = {property:"id", target:"eppObject"};
public static const VOLUME:Object = {property:"volume", target:"mixer"};
public static const LOOP:Object = {property:"loop", target:"player"};
public static const LENGTH:Object = {property:"length", target:"eppObject"};
public static const BYTES_REMAINING:Object = {property:"bytesRemaining", target:"loader"};
public static const TIME_REMAINING:Object = {property:"timeRemaining", target:"player"};
public static const ORDER:Object = {property:"order", target:"eppObject"};
public static const BYTES_TOTAL:Object = {property:"bytesTotal", target:"loader"};
public static const BYTES_LOADED:Object = {property:"bytesLoaded", target:"loader"};
public static const TYPE:Object = {property:"type", target:"eppObject"};
public static const END:Object = {property:"end", target:"player"};
}
}//package com.busfront.epp.base
Section 46
//ICollection (com.busfront.epp.base.ICollection)
package com.busfront.epp.base {
public interface ICollection extends IEPPObject {
function contains(_arg1:EPPObject):Boolean;
function get firstValidChildIndex():int;
function removeChildren():Boolean;
function canContain(_arg1:String):Boolean;
function get allowedChildTypes():Array;
function get length():uint;
function getChildById(_arg1:String);
function getChildrenSortedBy(_arg1:String, _arg2:uint=0, _arg3:Array=null):Array;
function get validChildren():Array;
function removeChildAt(_arg1:uint):Boolean;
function getChildrenByType(_arg1:String):Array;
function addChildAt(_arg1:EPPObject, _arg2:uint):EPPObject;
function getChildrenByUrl(_arg1:String):Array;
function sortChildrenBy(_arg1:String, _arg2:uint=0):Array;
function getChildrenByName(_arg1:String):Array;
function removeChild(_arg1:EPPObject):Boolean;
function getChildAt(_arg1:int);
function addChild(_arg1:EPPObject):EPPObject;
function get lastValidChildIndex():int;
function get children():Array;
}
}//package com.busfront.epp.base
Section 47
//IEPPObject (com.busfront.epp.base.IEPPObject)
package com.busfront.epp.base {
import flash.events.*;
public interface IEPPObject extends IEventDispatcher {
function destroy():void;
function get hasParent():Boolean;
function getRestrictedNamespace(_arg1:Object):Namespace;
function get originalType():String;
function get order():int;
function get parent():EPPCollection;
function get name():String;
function set name(_arg1:String):void;
function get type():String;
function get id():String;
function set order(_arg1:int):void;
function set id(_arg1:String):void;
}
}//package com.busfront.epp.base
Section 48
//IIntelligentCollection (com.busfront.epp.base.IIntelligentCollection)
package com.busfront.epp.base {
public interface IIntelligentCollection extends ICollection {
function get enabled():Boolean;
function set enabled(_arg1:Boolean);
}
}//package com.busfront.epp.base
Section 49
//EPPControlApply (com.busfront.epp.controls.filter.EPPControlApply)
package com.busfront.epp.controls.filter {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import flash.geom.*;
import flash.filters.*;
public class EPPControlApply extends EPPControl {
private var _bmFilter:BitmapFilter;
private var _rect:Rectangle;
private var _point:Point;
protected var _value:Number;
private var _filter:EPPFilterType;
private var _id:String;
public function EPPControlApply(_arg1:EPPFilterType, _arg2:Rectangle, _arg3:Point, _arg4:BitmapFilter, _arg5:EPPFilter, _arg6:String, _arg7:Number=0){
_value = _arg7;
_id = _arg6;
_filter = _arg1;
_rect = _arg2;
_point = _arg3;
_bmFilter = _arg4;
super(new EPPFilterEvent(EPPFilterEvent.APPLY), _arg5);
var _local8:Array = new Array();
_local8["name"] = "value";
_local8["type"] = "*";
_args.push(_local8);
_specProp = "value";
}
override public function exec(_arg1:Array){
var _local2:IFilterable;
if (super.exec(_arg1) == true){
_local2 = (_eppObject as IFilterable);
_bmFilter = this.update(_filter, _arg1[0]);
};
}
public function get type():String{
return (_filter.type);
}
public function get bitmapFilter():BitmapFilter{
return (_bmFilter);
}
public function get point():Point{
return (_point);
}
public function update(_arg1:EPPFilterType, _arg2:Number):BitmapFilter{
return (null);
}
public function get value():Number{
return (_value);
}
public function get id():String{
return (_id);
}
public function get rect():Rectangle{
return (_rect);
}
}
}//package com.busfront.epp.controls.filter
Section 50
//EPPFilter (com.busfront.epp.controls.filter.EPPFilter)
package com.busfront.epp.controls.filter {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
import flash.geom.*;
import com.busfront.epp.display.*;
public class EPPFilter extends EPPControlGroup implements IFilter {
private var _screen:IFilterable;
public function EPPFilter(_arg1:IFilterable):void{
var _local2:Array = [null, EPPFilterEvent.FILTERED, EPPFilterEvent.UNFILTERED, EPPFilterEvent.FILTERING];
var _local3:Array = [EPPFilterEvent.APPLY, null, null];
_screen = _arg1;
super(EPPControlGroupType.FILTER, (_arg1 as EPPObject), new Array(EPPBindable.TIME, EPPBindable.TIME_REMAINING), _local3, new EPPStateUnfiltered(this), _local2);
_expectedEvents.push(EPPFilterEvent.APPLY);
}
protected function unfiltered():EPPState{
return (new EPPStateUnfiltered(this));
}
protected function filtering():EPPState{
return (new EPPStateFiltering(this));
}
public function apply(_arg1:EPPFilterType, _arg2:String=null, _arg3:Rectangle=null, _arg4:Point=null, _arg5:Number=1):EPPControlApply{
var _local6:EPPControlApply;
if (_arg1.subType == "color"){
_local6 = new EPPFilterColor(_arg1, _arg2, this, _arg3, _arg4);
};
if (_arg1.subType == "lightness"){
_local6 = new EPPFilterLightness(_arg1, _arg2, _arg5, this, _arg3, _arg4);
};
if (_local6 == null){
throw (new Error("NULL FILTER"));
};
this.controlStateAssociation.push(null, _local6);
_screen.addFilter(_local6);
return (_local6);
}
protected function filtered():EPPState{
return (new EPPStateFiltered(this));
}
override public function destroy():void{
super.destroy();
}
override public function buildState(_arg1:String):EPPState{
return (this[_arg1]());
}
}
}//package com.busfront.epp.controls.filter
Section 51
//EPPFilterColor (com.busfront.epp.controls.filter.EPPFilterColor)
package com.busfront.epp.controls.filter {
import flash.geom.*;
import flash.filters.*;
public class EPPFilterColor extends EPPControlApply {
public function EPPFilterColor(_arg1:EPPFilterType, _arg2:String, _arg3:EPPFilter, _arg4:Rectangle=null, _arg5:Point=null){
super(_arg1, _arg4, _arg5, new ColorMatrixFilter(_arg1.matrix), _arg3, _arg2);
}
}
}//package com.busfront.epp.controls.filter
Section 52
//EPPFilterLightness (com.busfront.epp.controls.filter.EPPFilterLightness)
package com.busfront.epp.controls.filter {
import com.busfront.epp.events.*;
import flash.geom.*;
import flash.filters.*;
public class EPPFilterLightness extends EPPControlApply {
public function EPPFilterLightness(_arg1:EPPFilterType, _arg2:String, _arg3:Number, _arg4:EPPFilter, _arg5:Rectangle=null, _arg6:Point=null){
super(_arg1, _arg5, _arg6, this.update(_arg1, _arg3), _arg4, _arg2, _arg3);
this.group.setState(this.group.getStateByName(EPPFilterEvent.FILTERING));
this.group.setState(this.group.getStateByName(EPPFilterEvent.FILTERED));
}
override public function update(_arg1:EPPFilterType, _arg2:Number):BitmapFilter{
var _local3:Array;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
if (_arg2 == 0){
_local3 = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0];
} else {
if (_arg1.type == "brightness"){
_local3 = [1, 0, 0, 0, _arg2, 0, 1, 0, 0, _arg2, 0, 0, 1, 0, _arg2, 0, 0, 0, 1, 0];
};
if (_arg1.type == "contrast"){
if (_arg2 < 0){
_local4 = (_arg2 * -0.011);
_local5 = (_arg2 * -0.635);
} else {
_local4 = (_arg2 * 0.11);
_local5 = (_arg2 * -0.0635);
};
_local3 = [_local4, 0, 0, 0, _local5, 0, _local4, 0, 0, _local5, 0, 0, _local4, 0, _local5, 0, 0, 0, 1, 0];
};
if (_arg1.type == "saturation"){
if (_arg2 < 0){
_local6 = (_arg2 * -0.003086);
_local7 = (_arg2 * -0.006094);
_local8 = (_arg2 * -0.00082);
_local9 = _local6;
_local10 = _local7;
_local11 = _local8;
} else {
_local6 = (_arg2 * 0.030742);
_local7 = (_arg2 * -0.018282);
_local8 = (_arg2 * -0.00246);
_local9 = (_arg2 * -0.009258);
_local10 = (_arg2 * 0.021718);
_local11 = (_arg2 * 0.03754);
};
_local12 = _local8;
_local13 = _local9;
_local14 = _local7;
_local3 = [_local6, _local7, _local8, 0, 0, _local9, _local10, _local12, 0, 0, _local13, _local14, _local11, 0, 0, 0, 0, 0, 1, 0];
};
if (_arg1.type == "hue"){
};
};
if (this.group){
this.group.setState(this.group.getStateByName(EPPFilterEvent.FILTERING));
_value = _arg2;
this.group.setState(this.group.getStateByName(EPPFilterEvent.FILTERED));
};
return (new ColorMatrixFilter(_local3));
}
}
}//package com.busfront.epp.controls.filter
Section 53
//EPPFilterType (com.busfront.epp.controls.filter.EPPFilterType)
package com.busfront.epp.controls.filter {
public class EPPFilterType {
private var _matrix:Array;
private var _type:String;
private var _subType:String;
public static const BLACK_WHITE_LIGHT:EPPFilterType = new EPPFilterType("blackWhiteLight", "color", [0.212671, 0.71516, 0.072169, 0, 0, 0.212671, 0.71516, 0.072169, 0, 0, 0.212671, 0.71516, 0.072169, 0, 0, 0, 0, 0, 1, 0]);
;
public static const CONTRAST:EPPFilterType = new EPPFilterType("contrast", "lightness");
;
public static const BLACK_WHITE:EPPFilterType = new EPPFilterType("blackWhite", "color", [0.5, 0.5, 0.5, 0, 0, 0.5, 0.5, 0.5, 0, 0, 0.5, 0.5, 0.5, 0, 0, 0, 0, 0, 1, 0]);
;
public static const BRIGHTNESS:EPPFilterType = new EPPFilterType("brightness", "lightness");
;
public static const SEPIA:EPPFilterType = new EPPFilterType("sepia", "color", [0.34, 0.33, 0.33, 0, 30, 0.33, 0.34, 0.33, 0, 20, 0.33, 0.33, 0.34, 0, 0, 0, 0, 0, 1, 0]);
;
public static const HUE:EPPFilterType = new EPPFilterType("hue", "lightness");
;
public static const SATURATION:EPPFilterType = new EPPFilterType("saturation", "lightness");
;
public static const INVERT:EPPFilterType = new EPPFilterType("invert", "color", [-1, 0, 0, 0, 0x0100, 0, -1, 0, 0, 0xFF, 0, 0, -1, 0, 0xFF, 0, 0, 0, 1, 0]);
;
public function EPPFilterType(_arg1:String, _arg2:String, _arg3:Array=null){
var _local4:Boolean;
if (((!((_arg3 == null))) && ((_arg2 == "color")))){
_matrix = _arg3;
_local4 = true;
} else {
if (_arg2 == "lightness"){
_local4 = true;
};
};
if (_local4 === false){
throw (new Error(("INVALID FILTER TYPE " + _arg1)));
};
_subType = _arg2;
_type = _arg1;
}
public function get subType():String{
return (_subType);
}
public function get matrix():Array{
return (_matrix);
}
public function get type():String{
return (_type);
}
}
}//package com.busfront.epp.controls.filter
Section 54
//EPPStateFiltered (com.busfront.epp.controls.filter.EPPStateFiltered)
package com.busfront.epp.controls.filter {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import flash.geom.*;
public class EPPStateFiltered extends EPPState implements IFilter {
public function EPPStateFiltered(_arg1:EPPControlGroup):void{
super(new EPPFilterEvent(EPPFilterEvent.FILTERED), _arg1);
}
override public function setLocker():void{
if (_controlCollection.getControlByName(EPPFilterEvent.APPLY, false) != null){
_controlCollection.getControlByName(EPPFilterEvent.APPLY).unlock();
};
}
public function apply(_arg1:EPPFilterType, _arg2:String=null, _arg3:Rectangle=null, _arg4:Point=null, _arg5:Number=1):EPPControlApply{
return (null);
}
}
}//package com.busfront.epp.controls.filter
Section 55
//EPPStateFiltering (com.busfront.epp.controls.filter.EPPStateFiltering)
package com.busfront.epp.controls.filter {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import flash.geom.*;
public class EPPStateFiltering extends EPPState implements IFilter {
public function EPPStateFiltering(_arg1:EPPControlGroup):void{
super(new EPPFilterEvent(EPPFilterEvent.FILTERING), _arg1);
}
override public function setLocker():void{
if (_controlCollection.getControlByName(EPPFilterEvent.APPLY, false) != null){
_controlCollection.getControlByName(EPPFilterEvent.APPLY).unlock();
};
}
public function apply(_arg1:EPPFilterType, _arg2:String=null, _arg3:Rectangle=null, _arg4:Point=null, _arg5:Number=1):EPPControlApply{
return (null);
}
}
}//package com.busfront.epp.controls.filter
Section 56
//EPPStateUnfiltered (com.busfront.epp.controls.filter.EPPStateUnfiltered)
package com.busfront.epp.controls.filter {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import flash.geom.*;
public class EPPStateUnfiltered extends EPPState implements IFilter {
public function EPPStateUnfiltered(_arg1:EPPControlGroup):void{
super(new EPPFilterEvent(EPPFilterEvent.UNFILTERED), _arg1);
}
override public function setLocker():void{
if (_controlCollection.getControlByName(EPPFilterEvent.APPLY, false) != null){
_controlCollection.getControlByName(EPPFilterEvent.APPLY).unlock();
};
}
public function apply(_arg1:EPPFilterType, _arg2:String=null, _arg3:Rectangle=null, _arg4:Point=null, _arg5:Number=1):EPPControlApply{
return (null);
}
}
}//package com.busfront.epp.controls.filter
Section 57
//IFilter (com.busfront.epp.controls.filter.IFilter)
package com.busfront.epp.controls.filter {
import com.busfront.epp.controls.*;
import flash.geom.*;
public interface IFilter extends IControlObserver {
function apply(_arg1:EPPFilterType, _arg2:String=null, _arg3:Rectangle=null, _arg4:Point=null, _arg5:Number=1):EPPControlApply;
}
}//package com.busfront.epp.controls.filter
Section 58
//IFilterable (com.busfront.epp.controls.filter.IFilterable)
package com.busfront.epp.controls.filter {
import com.busfront.epp.base.*;
public interface IFilterable extends IEPPObject {
function get filter():EPPFilter;
function addFilter(_arg1:EPPControlApply):void;
function removeFilter(_arg1:EPPControlApply):void;
function getFilterById(_arg1:String):EPPControlApply;
}
}//package com.busfront.epp.controls.filter
Section 59
//EPPControlCheck (com.busfront.epp.controls.loader.EPPControlCheck)
package com.busfront.epp.controls.loader {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
import flash.events.*;
import com.busfront.epp.base.media.*;
import flash.utils.*;
public class EPPControlCheck extends EPPControl implements ICheck {
public function EPPControlCheck(_arg1:EPPControlGroup):void{
super(new EPPLoaderEvent(EPPLoaderEvent.CHECK_CONNECTION), _arg1);
}
public function check():void{
var loadableObject:ILoadable;
var timeOut:Timer;
loadableObject = (_eppObject as ILoadable);
loadableObject.loader.dispatchEvent(_event);
loadableObject.loader.connection.check();
var coll:EPPCollection = (loadableObject as EPPCollection);
var occ:EPPMediaOccurence = (loadableObject as EPPMediaOccurence);
if ((((coll == null)) && ((occ == null)))){
timeOut = new Timer(EPP.epp.connectionTimeout);
with ({}) {
with ({}) {
!ERROR!.mafonc = function (_arg1:TimerEvent):void{
if ((((loadableObject.loader.stateName == EPPLoaderEvent.CHECKING)) && ((Timer(_arg1.currentTarget).currentCount == 2)))){
loadableObject.loader.connection.invalidate();
} else {
if (loadableObject.loader.stateName != EPPLoaderEvent.CHECKING){
_arg1.currentTarget.stop();
_arg1.currentTarget.removeEventListener(TimerEvent.TIMER, mafonc);
};
};
};
};
timeOut.addEventListener(TimerEvent.TIMER, function (_arg1:TimerEvent):void{
if ((((loadableObject.loader.stateName == EPPLoaderEvent.CHECKING)) && ((Timer(_arg1.currentTarget).currentCount == 2)))){
loadableObject.loader.connection.invalidate();
} else {
if (loadableObject.loader.stateName != EPPLoaderEvent.CHECKING){
_arg1.currentTarget.stop();
_arg1.currentTarget.removeEventListener(TimerEvent.TIMER, mafonc);
};
};
});
timeOut.start();
};
}
override public function exec(_arg1:Array){
var _local2:ILoadable;
if (super.exec(_arg1) == true){
_local2 = (_eppObject as ILoadable);
return (_local2.loader.state[_name]());
};
}
}
}//package com.busfront.epp.controls.loader
Section 60
//EPPControlLoad (com.busfront.epp.controls.loader.EPPControlLoad)
package com.busfront.epp.controls.loader {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.controls.player.*;
public class EPPControlLoad extends EPPControl implements ILoad {
public function EPPControlLoad(_arg1:EPPControlGroup):void{
super(new EPPLoaderEvent(EPPLoaderEvent.LOAD), _arg1);
}
override public function exec(_arg1:Array){
var _local2:ILoadable = (_eppObject as ILoadable);
if (super.exec(_arg1) == true){
return (_local2.loader.state[_name]());
};
}
public function load():void{
var _local2:IPlayable;
if ((eppObject is IPlayable)){
_local2 = (eppObject as IPlayable);
_local2.player;
};
var _local1:ILoadable = (_eppObject as ILoadable);
_local1.loader.dispatchEvent(_event);
_local1.loader.connection.load();
}
}
}//package com.busfront.epp.controls.loader
Section 61
//EPPControlPreload (com.busfront.epp.controls.loader.EPPControlPreload)
package com.busfront.epp.controls.loader {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
public class EPPControlPreload extends EPPControl implements IPreload {
public function EPPControlPreload(_arg1:EPPLoader):void{
super(new EPPLoaderEvent(EPPLoaderEvent.PRELOAD), _arg1);
}
override public function exec(_arg1:Array){
var _local2:ILoadable;
if (super.exec(_arg1) == true){
_local2 = (_eppObject as ILoadable);
return (_local2.loader.state[_name]());
};
}
public function preload():void{
var _local1:ILoadable = (_eppObject as ILoadable);
_local1.loader.dispatchEvent(_event);
_local1.loader.connection.preload();
}
}
}//package com.busfront.epp.controls.loader
Section 62
//EPPControlUnload (com.busfront.epp.controls.loader.EPPControlUnload)
package com.busfront.epp.controls.loader {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
public class EPPControlUnload extends EPPControl implements IUnload {
public function EPPControlUnload(_arg1:EPPLoader):void{
super(new EPPLoaderEvent(EPPLoaderEvent.UNLOAD), _arg1);
}
override public function exec(_arg1:Array){
var _local2:ILoadable;
if (super.exec(_arg1) == true){
_local2 = (_eppObject as ILoadable);
return (_local2.loader.state[_name]());
};
}
public function unload():void{
var _local1:ILoadable = (_eppObject as ILoadable);
_local1.loader.dispatchEvent(_event);
_local1.loader.connection.unload();
}
}
}//package com.busfront.epp.controls.loader
Section 63
//EPPLoader (com.busfront.epp.controls.loader.EPPLoader)
package com.busfront.epp.controls.loader {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
import com.busfront.epp.controls.player.*;
import com.busfront.epp.net.stream.*;
import com.busfront.epp.base.media.*;
import com.busfront.epp.base.cache.*;
import com.busfront.epp.net.connection.*;
import com.busfront.epp.display.*;
public class EPPLoader extends EPPControlGroup implements ILoader, ILoaderProperty {
protected var _tempURL:String;
private var _connection:EPPConnection;
protected var _loadableObject:ILoadable;
public function EPPLoader(_arg1:ILoadable, _arg2:String, _arg3:Boolean=false):void{
var _local4:Array;
var _local5:Array;
var _local6:EPPState;
_tempURL = _arg2;
_local4 = [EPPLoaderEvent.UNCHECKED, EPPLoaderEvent.CHECKING, EPPLoaderEvent.LOADED, EPPLoaderEvent.LOADING, EPPLoaderEvent.PRELOADED, EPPLoaderEvent.PRELOADING, EPPLoaderEvent.UNLOADABLE, EPPLoaderEvent.UNLOADED, EPPLoaderEvent.UNLOADING];
_local5 = [null, EPPLoaderEvent.CHECK_CONNECTION, null, EPPLoaderEvent.LOAD, null, EPPLoaderEvent.PRELOAD, null, null, EPPLoaderEvent.UNLOAD];
var _local7:EPPMediaOccurence = (_arg1 as EPPMediaOccurence);
var _local8:Boolean;
if (((_local7) && ((_local7.original.type == EPPObjectType.VIDEO)))){
_local8 = true;
};
if (((((((!((_arg1.autoLoadControl == null))) && ((_arg1 is ICacheable)))) && ((ICacheable(_arg1).cached == true)))) && ((_local8 == false)))){
_local6 = new EPPStateChecking(this);
} else {
_local6 = new EPPStateUnchecked(this);
};
_loadableObject = _arg1;
super(EPPControlGroupType.LOADER, (_arg1 as EPPObject), new Array(EPPBindable.BYTES_LOADED), _local5, _local6, _local4);
_expectedEvents.push(EPPLoaderEvent.CONNECTION_FAILURE, EPPLoaderEvent.CONNECTION_LOST, EPPLoaderEvent.CONNECTION_SUCCESS, EPPLoaderEvent.CHECKED);
}
private function preloaded():EPPState{
return (new EPPStatePreloaded(this));
}
private function checkBuilder():EPPControl{
return (new EPPControlCheck(this));
}
override public function buildState(_arg1:String):EPPState{
return (this[_arg1]());
}
private function loaded():EPPState{
return (new EPPStateLoaded(this));
}
public function unload():void{
var _local1:EPPControlUnload = (getControlByName(EPPLoaderEvent.UNLOAD) as EPPControlUnload);
_local1.exec(new Array());
}
public function check():void{
var _local1:EPPControlCheck = (getControlByName(EPPLoaderEvent.CHECK_CONNECTION) as EPPControlCheck);
_local1.exec(new Array());
}
public function preload():void{
var _local1:EPPControlPreload = (getControlByName(EPPLoaderEvent.PRELOAD) as EPPControlPreload);
_local1.exec(new Array());
}
private function unloading():EPPState{
return (new EPPStateUnloading(this));
}
private function unloadable():EPPState{
return (new EPPStateUnloadable(this));
}
override public function buildControl(_arg1:String):EPPControl{
return (this[(_arg1 + "Builder")]());
}
private function preloading():EPPState{
return (new EPPStatePreloading(this));
}
public function get bytesRemaining():uint{
return ((bytesTotal - bytesLoaded));
}
private function loading():EPPState{
return (new EPPStateLoading(this));
}
private function loadBuilder():EPPControl{
return (new EPPControlLoad(this));
}
override public function setState(_arg1:EPPState):void{
var _local2:EPPCacheItem;
var _local3:uint;
var _local4:uint;
super.setState(_arg1);
if ((_eppObject is EPPCacheItem)){
_local2 = (_eppObject as EPPCacheItem);
if ((((((_local2.cachedReferences.length > 0)) && ((_local2.cachedReferences[0].type == EPPObjectType.VIDEO)))) && ((((((((((_arg1 is EPPStateUnloadable)) || ((_arg1 is EPPStateUnloaded)))) || ((_arg1 is EPPStatePreloading)))) || ((_arg1 is EPPStatePreloaded)))) || ((_arg1 is EPPStateUnloading)))))){
_local3 = _local2.cachedReferences.length;
_local4 = 0;
while (_local4 < _local3) {
_local2.cachedReferences[_local4].loader.setState(_local2.cachedReferences[_local4].loader.getStateByName(_arg1.name));
_local4++;
};
};
};
}
public function get timeTotal():Number{
if ((eppObject is IPlayable)){
return (eppObject.player.duration);
};
if ((((eppObject is EPPCacheItem)) && ((EPPCacheItem(eppObject).cachedReferences[0] is IPlayable)))){
return (EPPCacheItem(eppObject).cachedReferences[0].player.duration);
};
return (0);
}
private function unloadBuilder():EPPControl{
return (new EPPControlUnload(this));
}
public function get connection():EPPConnection{
return (_connection);
}
public function get bytesLoaded():uint{
if ((((stateName == EPPLoaderEvent.LOADING)) || ((stateName == EPPLoaderEvent.LOADED)))){
return (_connection.bytesLoaded);
};
return (0);
}
public function setConnection(_arg1:EPPConnection, _arg2:Boolean=true):void{
var _local3:Namespace;
if (_connection == null){
_connection = _arg1;
if (_arg2 === true){
_local3 = EPP.epp.getRestrictedNamespace(this);
var _local4 = EPP.epp;
_local4._local3::addToSlot(_eppObject);
};
return;
};
throw (new Error("[EPP] Connection allready set."));
}
private function checking():EPPState{
return (new EPPStateChecking(this));
}
public function get alternativeBytesLoaded():Number{
if (((((_connection) && ((_connection is EPPStreamVideo)))) && (EPPStream(_connection).stream))){
if (EPPStreamVideo(_connection)._restricedbytesTotal > 0){
return (EPPStream(_connection).stream.bytesLoaded);
};
};
return (bytesLoaded);
}
private function unloaded():EPPState{
return (new EPPStateUnloaded(this));
}
public function load():void{
var _local1:EPPControlLoad = (getControlByName(EPPLoaderEvent.LOAD) as EPPControlLoad);
_local1.exec(new Array());
}
private function preloadBuilder():EPPControl{
return (new EPPControlPreload(this));
}
private function unchecked():EPPState{
return (new EPPStateUnchecked(this));
}
public function get metadata():Object{
return (connection.metaData);
}
public function get bytesTotal():uint{
if ((((((((stateName == EPPLoaderEvent.PRELOADING)) || ((stateName == EPPLoaderEvent.UNCHECKED)))) || ((stateName == EPPLoaderEvent.CHECKING)))) || ((stateName == EPPLoaderEvent.UNLOADED)))){
return (0);
};
return (_connection.bytesTotal);
}
public function get timeLoaded():Number{
var _local2:EPPMediaCollection;
var _local3:uint;
var _local4:IPlayable;
var _local5:uint;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local1:Number = 0;
if ((eppObject is EPPMediaCollection)){
_local2 = (eppObject as EPPMediaCollection);
_local3 = _local2.validChildren.length;
_local5 = 0;
while (_local5 < _local3) {
_local4 = _local2.validChildren[_local5];
if (_local4.loader.stateName == EPPLoaderEvent.LOADED){
_local1 = (_local1 + _local4.player.duration);
} else {
_local6 = (_local4.loader.bytesTotal / _local4.loader.metadata.duration);
_local7 = ((_local4.loader.bytesLoaded / _local6) - IPlayable(eppObject).player.start);
if (_local7 >= IPlayable(eppObject).player.duration){
_local1 = IPlayable(eppObject).player.duration;
} else {
if (_local7 > 0){
_local1 = (_local1 + _local7);
};
};
break;
};
_local5++;
};
return (_local1);
} else {
if ((eppObject is IPlayable)){
if (stateName == EPPLoaderEvent.LOADED){
_local1 = IPlayable(eppObject).player.duration;
} else {
_local8 = (bytesTotal / metadata.duration);
_local9 = ((bytesLoaded / _local8) - IPlayable(eppObject).player.start);
if (_local9 >= IPlayable(eppObject).player.duration){
_local1 = IPlayable(eppObject).player.duration;
} else {
if (_local9 > 0){
_local1 = (_local1 + _local9);
};
};
};
return (_local1);
} else {
if ((((eppObject is EPPCacheItem)) && ((EPPCacheItem(eppObject).cachedReferences[0] is IPlayable)))){
if (stateName == EPPLoaderEvent.LOADED){
_local1 = EPPCacheItem(eppObject).cachedReferences[0].player.duration;
} else {
_local10 = (bytesTotal / EPPCacheItem(eppObject).cachedReferences[0].player.duration);
_local11 = (bytesLoaded / _local10);
_local12 = ((_local11 - EPPCacheItem(eppObject).cachedReferences[0].player.start) - (metadata.duration - EPPCacheItem(eppObject).cachedReferences[0].player.end));
if (_local12 > 0){
_local1 = (_local1 + _local12);
};
};
return (_local1);
};
};
};
return (0);
}
public function get alternativeBytesTotal():Number{
if (((_connection) && ((_connection is EPPStreamVideo)))){
if (EPPStreamVideo(_connection)._restricedbytesTotal > 0){
return (EPPStreamVideo(_connection)._restricedbytesTotal);
};
};
return (bytesTotal);
}
}
}//package com.busfront.epp.controls.loader
Section 64
//EPPLoaderAlias (com.busfront.epp.controls.loader.EPPLoaderAlias)
package com.busfront.epp.controls.loader {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.base.cache.*;
import com.busfront.epp.net.connection.*;
public final class EPPLoaderAlias extends EPPLoader {
private var _cacheItem:EPPCacheItem;
public function EPPLoaderAlias(_arg1:ICacheable, _arg2:String):void{
_cacheItem = _arg1.cache;
super(_arg1, _arg2, true);
_cacheItem.loader.addEventListener(EPPControlGroupEvent.CHANGE_STATE, subChangeState, false, 1);
_cacheItem.loader.addEventListener(EPPLoaderEvent.LOAD, subEvent, false, 1);
_cacheItem.loader.addEventListener(EPPLoaderEvent.PRELOAD, subEvent, false, 1);
_cacheItem.loader.addEventListener(EPPLoaderEvent.PRELOADED, subEvent, false, 1);
_cacheItem.loader.addEventListener(EPPLoaderEvent.UNLOAD, subEvent, false, 1);
_cacheItem.loader.addEventListener(EPPLoaderEvent.LOADING, subEvent, false, 1);
_cacheItem.loader.addEventListener(EPPLoaderEvent.CHECKING, subEvent, false, 1);
_cacheItem.loader.addEventListener(EPPControlGroupEvent.CONTROL_LOCKED, subLock, false, 1);
_cacheItem.loader.addEventListener(EPPControlGroupEvent.CONTROL_UNLOCKED, subLock, false, 1);
_cacheItem.loader.addEventListener(EPPControlGroupEvent.ADDED_STATE, subLock, false, 1);
}
override public function get bytesTotal():uint{
return (_cacheItem.loader.bytesTotal);
}
private function subChangeState(_arg1:EPPControlGroupEvent):void{
this.dispatchEvent(_arg1);
this.dispatchEvent(new EPPLoaderEvent(_arg1.stateName));
}
private function subLock(_arg1:EPPControlGroupEvent):void{
this.dispatchEvent(_arg1);
}
override public function get controlStateAssociation():Array{
return (_cacheItem.loader.controlStateAssociation);
}
override public function get bytesLoaded():uint{
return (_cacheItem.loader.bytesLoaded);
}
override public function get authorizedControls():Array{
return (_cacheItem.loader.authorizedControls);
}
override public function get timeLoaded():Number{
return (_cacheItem.loader.timeLoaded);
}
public function get cacheItem():EPPCacheItem{
return (_cacheItem);
}
override public function get timeTotal():Number{
return (_cacheItem.loader.timeTotal);
}
override public function get state():EPPState{
return (_cacheItem.loader.state);
}
private function subEvent(_arg1:EPPLoaderEvent):void{
this.dispatchEvent(_arg1);
}
override public function get connection():EPPConnection{
return (_cacheItem.loader.connection);
}
}
}//package com.busfront.epp.controls.loader
Section 65
//EPPLoaderOccurence (com.busfront.epp.controls.loader.EPPLoaderOccurence)
package com.busfront.epp.controls.loader {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.base.media.*;
public class EPPLoaderOccurence extends EPPLoader {
private var _originalItem:IOccurable;
public function EPPLoaderOccurence(_arg1:EPPMediaOccurence):void{
_originalItem = _arg1.original;
this.setConnection(_originalItem.loader.connection, false);
super(_arg1, null, true);
_originalItem.loader.addEventListener(EPPLoaderEvent.CONNECTION_FAILURE, subEvent, false, 1);
_originalItem.loader.addEventListener(EPPLoaderEvent.CONNECTION_SUCCESS, subEvent, false, 1);
_originalItem.loader.addEventListener(EPPLoaderEvent.CHECKED, subEvent, false, 1);
_originalItem.loader.addEventListener(EPPControlGroupEvent.CHANGE_STATE, subChangeState, false, 1);
_originalItem.loader.addEventListener(EPPLoaderEvent.PRELOAD, subEvent, false, 1);
_originalItem.loader.addEventListener(EPPLoaderEvent.UNLOAD, subEvent, false, 1);
_originalItem.loader.addEventListener(EPPLoaderEvent.LOADING, subEvent, false, 1);
_originalItem.loader.addEventListener(EPPControlGroupEvent.CONTROL_LOCKED, subLock, false, 1);
_originalItem.loader.addEventListener(EPPControlGroupEvent.CONTROL_UNLOCKED, subLock, false, 1);
_originalItem.loader.addEventListener(EPPControlGroupEvent.ADDED_STATE, subLock, false, 1);
}
override public function get bytesTotal():uint{
return (_originalItem.loader.bytesTotal);
}
private function subChangeState(_arg1:EPPControlGroupEvent):void{
this.dispatchEvent(_arg1);
this.dispatchEvent(new EPPLoaderEvent(_arg1.stateName));
}
public function get originalItem():IOccurable{
return (_originalItem);
}
private function subLock(_arg1:EPPControlGroupEvent):void{
this.dispatchEvent(_arg1);
}
override public function get controlStateAssociation():Array{
return (_originalItem.loader.controlStateAssociation);
}
override public function get bytesLoaded():uint{
return (_originalItem.loader.bytesLoaded);
}
override public function get state():EPPState{
return (_originalItem.loader.state);
}
override public function get timeLoaded():Number{
return (_originalItem.loader.timeLoaded);
}
override public function get timeTotal():Number{
return (_originalItem.loader.timeTotal);
}
override public function get authorizedControls():Array{
return (_originalItem.loader.authorizedControls);
}
private function subEvent(_arg1:EPPLoaderEvent):void{
this.dispatchEvent(_arg1);
}
}
}//package com.busfront.epp.controls.loader
Section 66
//EPPStateChecking (com.busfront.epp.controls.loader.EPPStateChecking)
package com.busfront.epp.controls.loader {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
import flash.events.*;
import flash.utils.*;
public class EPPStateChecking extends EPPState implements ILoader {
private var _isFirstTimeInThisCheck:Boolean;// = false
private var _timerInit:Timer;
public function EPPStateChecking(_arg1:EPPControlGroup):void{
_timerInit = new Timer(100);
super(new EPPLoaderEvent(EPPLoaderEvent.CHECKING), _arg1);
}
override public function setLocker():void{
if (_controlCollection.getControlByName(EPPLoaderEvent.LOAD, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.LOAD).unlock();
};
if (_controlCollection.getControlByName(EPPLoaderEvent.PRELOAD, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.PRELOAD).unlock();
};
if (_controlCollection.getControlByName(EPPLoaderEvent.UNLOAD, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.UNLOAD).lock();
};
if (_controlCollection.getControlByName(EPPLoaderEvent.CHECK_CONNECTION, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.CHECK_CONNECTION).lock();
};
}
private function checkInit(_arg1:TimerEvent):void{
var _local6:uint;
var _local7:EPPLoaderEvent;
var _local8:Boolean;
var _local9:Boolean;
var _local10:Boolean;
var _local11:Boolean;
var _local12:Boolean;
var _local13:Boolean;
var _local14:Boolean;
var _local15:Boolean;
var _local16:Boolean;
var _local17:Boolean;
var _local18:Boolean;
var _local19:Boolean;
var _local20:Boolean;
var _local21:Boolean;
var _local22:Boolean;
var _local23:Boolean;
var _local2:EPPCollectionLoadable = _controlCollection.eppObject;
var _local3:Array = _local2.children;
var _local4:uint = _local3.length;
var _local5:Boolean;
if (_local4 > 0){
_local6 = 0;
while (_local6 < _local4) {
if ((((_local2.getChildAt(_local6).loader.state.name == EPPLoaderEvent.CHECKING)) || ((_local2.getChildAt(_local6).loader.state.name == EPPLoaderEvent.UNCHECKED)))){
_local5 = true;
};
_local6++;
};
if (_local5 == false){
_local7 = new EPPLoaderEvent(EPPLoaderEvent.CHECKED);
_local8 = false;
_local9 = true;
_local10 = false;
_local11 = true;
_local12 = false;
_local13 = true;
_local14 = false;
_local15 = true;
_local16 = false;
_local17 = true;
_local18 = false;
_local19 = true;
_local20 = false;
_local21 = true;
_local22 = false;
_local23 = true;
_local6 = 0;
while (_local6 < _local4) {
if (_local3[_local6].loader.state.name != EPPLoaderEvent.UNLOADABLE){
_local9 = false;
} else {
_local8 = true;
};
if (_local3[_local6].loader.state.name != EPPLoaderEvent.UNCHECKED){
_local11 = false;
} else {
_local10 = true;
};
if (_local3[_local6].loader.state.name != EPPLoaderEvent.CHECKING){
_local13 = false;
} else {
_local12 = true;
};
if (_local3[_local6].loader.state.name != EPPLoaderEvent.UNLOADED){
_local15 = false;
} else {
_local14 = true;
};
if (_local3[_local6].loader.state.name != EPPLoaderEvent.PRELOADING){
_local17 = false;
} else {
_local16 = true;
};
if (_local3[_local6].loader.state.name != EPPLoaderEvent.PRELOADED){
_local19 = false;
} else {
_local18 = true;
};
if (_local3[_local6].loader.state.name != EPPLoaderEvent.LOADING){
_local21 = false;
} else {
_local20 = true;
};
if (_local3[_local6].loader.state.name != EPPLoaderEvent.LOADED){
_local23 = false;
} else {
_local22 = true;
};
_local6++;
};
if (_local9 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNLOADABLE));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CONNECTION_FAILURE));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CHECKED));
return;
};
_timerInit.removeEventListener(TimerEvent.TIMER, checkInit);
_timerInit.stop();
if (_local12 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.CHECKING));
return;
};
if (_local14 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNLOADED));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CONNECTION_SUCCESS));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CHECKED));
return;
};
if ((((_local18 == true)) && ((_local16 == false)))){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNLOADED));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CONNECTION_SUCCESS));
_controlCollection.dispatchEvent(_local7);
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.PRELOAD));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.PRELOADED));
return;
};
if ((((((_local22 == true)) && ((_local16 == false)))) && ((_local20 == false)))){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNLOADED));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CONNECTION_SUCCESS));
_controlCollection.dispatchEvent(_local7);
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.PRELOAD));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.PRELOADED));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.LOAD));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.LOADING));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.LOADED));
return;
};
if (_local21 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNLOADED));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CONNECTION_SUCCESS));
_controlCollection.dispatchEvent(_local7);
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.PRELOAD));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.PRELOADED));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.LOAD));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.LOADING));
return;
};
if (_local17 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNLOADED));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CONNECTION_SUCCESS));
_controlCollection.dispatchEvent(_local7);
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.PRELOAD));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.PRELOADING));
return;
};
};
};
}
public function load():void{
_controlCollection.removeEventListener(EPPLoaderEvent.CONNECTION_SUCCESS, connectSuccessLoad);
_controlCollection.addEventListener(EPPLoaderEvent.CONNECTION_SUCCESS, connectSuccessLoad);
_controlCollection.removeEventListener(EPPLoaderEvent.CONNECTION_FAILURE, connectFail);
_controlCollection.addEventListener(EPPLoaderEvent.CONNECTION_FAILURE, connectFail, false, 1);
}
public function refreshCollectionState():void{
if (_timerInit.running == false){
_timerInit.addEventListener(TimerEvent.TIMER, checkInit);
_timerInit.start();
};
}
private function connectFail(_arg1:EPPLoaderEvent):void{
_controlCollection.removeEventListener(EPPLoaderEvent.CONNECTION_SUCCESS, connectSuccessLoad);
_controlCollection.removeEventListener(EPPLoaderEvent.CONNECTION_SUCCESS, connectSuccessPreload);
_controlCollection.removeEventListener(EPPLoaderEvent.CONNECTION_FAILURE, connectFail);
}
override public function destroyInternalListeners():void{
this._controlCollection.eppObject.removeEventListener(EPPLoaderEvent.CONNECTION_SUCCESS, connectSuccessPreload);
this._controlCollection.eppObject.removeEventListener(EPPLoaderEvent.CONNECTION_SUCCESS, connectSuccessLoad);
}
public function unload():void{
}
public function check():void{
}
private function connectSuccessPreload(_arg1:EPPLoaderEvent):void{
var _local2:EPPLoader;
_controlCollection.removeEventListener(EPPLoaderEvent.CONNECTION_SUCCESS, connectSuccessPreload);
_controlCollection.removeEventListener(EPPLoaderEvent.CONNECTION_FAILURE, connectFail);
if (ILoadable(_controlCollection.eppObject).autoLoadControl == EPPLoaderEvent.CHECK_CONNECTION){
_local2 = (_controlCollection as EPPLoader);
_local2.preload();
};
}
override public function destroy():void{
_timerInit.removeEventListener(TimerEvent.TIMER, checkInit);
_timerInit.stop();
destroyInternalListeners();
}
public function preload():void{
covered = true;
_controlCollection.removeEventListener(EPPLoaderEvent.CONNECTION_SUCCESS, connectSuccessPreload);
_controlCollection.addEventListener(EPPLoaderEvent.CONNECTION_SUCCESS, connectSuccessPreload, false, 1);
_controlCollection.removeEventListener(EPPLoaderEvent.CONNECTION_FAILURE, connectFail);
_controlCollection.addEventListener(EPPLoaderEvent.CONNECTION_FAILURE, connectFail, false, 1);
}
private function autoPreloaded(_arg1:EPPLoaderEvent):void{
_controlCollection.removeEventListener(EPPLoaderEvent.PRELOADED, autoPreloaded);
var _local2:EPPLoader = (_controlCollection as EPPLoader);
_local2.load();
}
private function connectSuccessLoad(_arg1:EPPLoaderEvent):void{
var _local2:EPPLoader;
_controlCollection.removeEventListener(EPPLoaderEvent.CONNECTION_FAILURE, connectFail);
_controlCollection.removeEventListener(EPPLoaderEvent.CONNECTION_SUCCESS, connectSuccessLoad);
if (ILoadable(_controlCollection.eppObject).autoLoadControl == EPPLoaderEvent.PRELOAD){
_controlCollection.removeEventListener(EPPLoaderEvent.PRELOADED, autoPreloaded);
_controlCollection.addEventListener(EPPLoaderEvent.PRELOADED, autoPreloaded, false, 1);
};
if (ILoadable(_controlCollection.eppObject).autoLoadControl == EPPLoaderEvent.CHECK_CONNECTION){
_local2 = (_controlCollection as EPPLoader);
_local2.load();
};
}
}
}//package com.busfront.epp.controls.loader
Section 67
//EPPStateLoaded (com.busfront.epp.controls.loader.EPPStateLoaded)
package com.busfront.epp.controls.loader {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
public class EPPStateLoaded extends EPPState implements ILoader {
public function EPPStateLoaded(_arg1:EPPControlGroup):void{
super(new EPPLoaderEvent(EPPLoaderEvent.LOADED), _arg1);
}
override public function setLocker():void{
if (_controlCollection.getControlByName(EPPLoaderEvent.LOAD, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.LOAD).lock();
};
if (_controlCollection.getControlByName(EPPLoaderEvent.PRELOAD, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.PRELOAD).lock();
};
if (_controlCollection.getControlByName(EPPLoaderEvent.UNLOAD, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.UNLOAD).unlock();
};
if (_controlCollection.getControlByName(EPPLoaderEvent.CHECK_CONNECTION, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.CHECK_CONNECTION).lock();
};
}
public function load():void{
}
public function refreshCollectionState():void{
var _local1:EPPCollectionLoadable = _controlCollection.eppObject;
var _local2:Array = _local1.children;
var _local3:uint = _local2.length;
var _local4:EPPLoaderEvent = new EPPLoaderEvent(EPPLoaderEvent.CHECKED);
var _local5:Boolean;
var _local6:Boolean;
var _local7:Boolean;
var _local8:Boolean;
var _local9:Boolean;
var _local10:Boolean;
var _local11:Boolean;
var _local12:Boolean;
var _local13:Boolean;
var _local14:Boolean;
var _local15:Boolean;
var _local16:Boolean;
var _local17:Boolean;
var _local18:Boolean;
var _local19:Boolean;
var _local20:Boolean;
var _local21:uint;
while (_local21 < _local3) {
if (_local2[_local21].loader.state.name != EPPLoaderEvent.UNLOADABLE){
_local6 = false;
} else {
_local5 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.UNCHECKED){
_local8 = false;
} else {
_local7 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.CHECKING){
_local10 = false;
} else {
_local9 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.UNLOADED){
_local12 = false;
} else {
_local11 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.PRELOADING){
_local14 = false;
} else {
_local13 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.PRELOADED){
_local16 = false;
} else {
_local15 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.LOADING){
_local18 = false;
} else {
_local17 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.LOADED){
_local20 = false;
} else {
_local19 = true;
};
_local21++;
};
if (_local6 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNLOADABLE));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CONNECTION_FAILURE));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CHECKED));
return;
};
if (_local7 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNCHECKED));
return;
};
if (_local9 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.CHECKING));
return;
};
if (_local11 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNLOADED));
return;
};
if (_local13 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.PRELOADING));
return;
};
if (_local15 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.PRELOADED));
return;
};
if (_local17 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.LOADING));
return;
};
}
public function preload():void{
}
public function check():void{
}
public function unload():void{
var _local1:EPPControlUnload = (_controlCollection.getControlByName(EPPLoaderEvent.UNLOAD) as EPPControlUnload);
_local1.unload();
}
}
}//package com.busfront.epp.controls.loader
Section 68
//EPPStateLoading (com.busfront.epp.controls.loader.EPPStateLoading)
package com.busfront.epp.controls.loader {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
public class EPPStateLoading extends EPPState implements ILoader {
public function EPPStateLoading(_arg1:EPPControlGroup):void{
super(new EPPLoaderEvent(EPPLoaderEvent.LOADING), _arg1);
}
override public function setLocker():void{
if (_controlCollection.getControlByName(EPPLoaderEvent.LOAD, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.LOAD).lock();
};
if (_controlCollection.getControlByName(EPPLoaderEvent.PRELOAD, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.PRELOAD).lock();
};
if (_controlCollection.getControlByName(EPPLoaderEvent.UNLOAD, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.UNLOAD).unlock();
};
if (_controlCollection.getControlByName(EPPLoaderEvent.CHECK_CONNECTION, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.CHECK_CONNECTION).lock();
};
}
public function load():void{
}
public function refreshCollectionState():void{
var _local1:EPPCollectionLoadable = _controlCollection.eppObject;
var _local2:Array = _local1.children;
var _local3:uint = _local2.length;
var _local4:EPPLoaderEvent = new EPPLoaderEvent(EPPLoaderEvent.CHECKED);
var _local5:Boolean;
var _local6:Boolean;
var _local7:Boolean;
var _local8:Boolean;
var _local9:Boolean;
var _local10:Boolean;
var _local11:Boolean;
var _local12:Boolean;
var _local13:Boolean;
var _local14:Boolean;
var _local15:Boolean;
var _local16:Boolean;
var _local17:Boolean;
var _local18:Boolean;
var _local19:Boolean;
var _local20:Boolean;
var _local21:uint;
while (_local21 < _local3) {
if (_local2[_local21].loader.state.name != EPPLoaderEvent.UNLOADABLE){
_local6 = false;
} else {
_local5 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.UNCHECKED){
_local8 = false;
} else {
_local7 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.CHECKING){
_local10 = false;
} else {
_local9 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.UNLOADED){
_local12 = false;
} else {
_local11 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.PRELOADING){
_local14 = false;
} else {
_local13 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.PRELOADED){
_local16 = false;
} else {
_local15 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.LOADING){
_local18 = false;
} else {
_local17 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.LOADED){
_local20 = false;
} else {
_local19 = true;
};
_local21++;
};
if (_local6 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNLOADABLE));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CONNECTION_FAILURE));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CHECKED));
return;
};
if (_local7 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNCHECKED));
return;
};
if (_local9 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.CHECKING));
return;
};
if (_local11 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNLOADED));
_controlCollection.dispatchEvent(_local4);
return;
};
if (_local13 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.PRELOADING));
return;
};
if ((((_local15 == true)) && ((_local17 == false)))){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.PRELOADED));
return;
};
if ((((_local19 == true)) && ((_local17 == false)))){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.LOADED));
return;
};
}
public function preload():void{
}
public function check():void{
}
public function unload():void{
var _local1:EPPControlUnload = (_controlCollection.getControlByName(EPPLoaderEvent.UNLOAD) as EPPControlUnload);
var _local2:EPPControlLoad = (_controlCollection.getControlByName(EPPLoaderEvent.LOAD) as EPPControlLoad);
_local2.destroy();
_local1.unload();
}
}
}//package com.busfront.epp.controls.loader
Section 69
//EPPStatePreloaded (com.busfront.epp.controls.loader.EPPStatePreloaded)
package com.busfront.epp.controls.loader {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
import com.busfront.epp.controls.player.*;
public class EPPStatePreloaded extends EPPState implements ILoader {
public function EPPStatePreloaded(_arg1:EPPControlGroup):void{
super(new EPPLoaderEvent(EPPLoaderEvent.PRELOADED), _arg1);
}
override public function setLocker():void{
if (_controlCollection.getControlByName(EPPLoaderEvent.LOAD, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.LOAD).unlock();
};
if (_controlCollection.getControlByName(EPPLoaderEvent.PRELOAD, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.PRELOAD).lock();
};
if (_controlCollection.getControlByName(EPPLoaderEvent.UNLOAD, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.UNLOAD).unlock();
};
if (_controlCollection.getControlByName(EPPLoaderEvent.CHECK_CONNECTION, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.CHECK_CONNECTION).lock();
};
}
public function load():void{
var _local1:EPPControlLoad = (_controlCollection.getControlByName(EPPLoaderEvent.LOAD) as EPPControlLoad);
_local1.load();
}
public function refreshCollectionState():void{
var _local1:EPPCollectionLoadable = _controlCollection.eppObject;
var _local2:Array = _local1.children;
var _local3:uint = _local2.length;
var _local4:EPPLoaderEvent = new EPPLoaderEvent(EPPLoaderEvent.CHECKED);
var _local5:Boolean;
var _local6:Boolean;
var _local7:Boolean;
var _local8:Boolean;
var _local9:Boolean;
var _local10:Boolean;
var _local11:Boolean;
var _local12:Boolean;
var _local13:Boolean;
var _local14:Boolean;
var _local15:Boolean;
var _local16:Boolean;
var _local17:Boolean;
var _local18:Boolean;
var _local19:Boolean;
var _local20:Boolean;
var _local21:Boolean;
var _local22:Boolean;
var _local23:uint;
while (_local23 < _local3) {
if (_local2[_local23].loader.state.name != EPPLoaderEvent.UNLOADABLE){
_local6 = false;
} else {
_local5 = true;
};
if (_local2[_local23].loader.state.name != EPPLoaderEvent.UNCHECKED){
_local8 = false;
} else {
_local7 = true;
};
if (_local2[_local23].loader.state.name != EPPLoaderEvent.CHECKING){
_local10 = false;
} else {
_local9 = true;
};
if (_local2[_local23].loader.state.name != EPPLoaderEvent.UNLOADED){
_local12 = false;
} else {
_local11 = true;
};
if (_local2[_local23].loader.state.name != EPPLoaderEvent.PRELOADING){
_local14 = false;
} else {
_local13 = true;
};
if (_local2[_local23].loader.state.name != EPPLoaderEvent.PRELOADED){
_local16 = false;
} else {
_local15 = true;
};
if ((((_local1 is IPlayable)) && ((_local1.getChildAt(_local1.firstValidChildIndex).player.state.name == EPPPlayerEvent.BUFFERED)))){
_local17 = true;
};
if (_local2[_local23].loader.state.name != EPPLoaderEvent.LOADING){
_local20 = false;
} else {
_local19 = true;
};
if (_local2[_local23].loader.state.name != EPPLoaderEvent.LOADED){
_local22 = false;
} else {
_local21 = true;
};
_local23++;
};
if (_local6 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNLOADABLE));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CONNECTION_FAILURE));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CHECKED));
return;
};
if (_local7 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNCHECKED));
return;
};
if (_local9 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.CHECKING));
return;
};
if (_local11 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNLOADED));
return;
};
if (_local13 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.PRELOADING));
return;
};
if (_local15 == true){
return;
};
if (_local17 == true){
_controlCollection.eppObject.player.setState(_controlCollection.eppObject.player.getStateByName(EPPPlayerEvent.BUFFERED));
return;
};
if ((((_local21 == true)) && ((_local19 == false)))){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.LOADING));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.LOADED));
return;
};
if (_local20 == true){
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.LOAD));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.LOADING));
return;
};
}
public function preload():void{
}
public function check():void{
}
public function unload():void{
var _local1:EPPControlUnload = (_controlCollection.getControlByName(EPPLoaderEvent.UNLOAD) as EPPControlUnload);
_local1.unload();
}
}
}//package com.busfront.epp.controls.loader
Section 70
//EPPStatePreloading (com.busfront.epp.controls.loader.EPPStatePreloading)
package com.busfront.epp.controls.loader {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
public class EPPStatePreloading extends EPPState implements ILoader {
public function EPPStatePreloading(_arg1:EPPControlGroup):void{
super(new EPPLoaderEvent(EPPLoaderEvent.PRELOADING), _arg1);
}
private function callBackPreload(_arg1:EPPLoaderEvent):void{
var _local2:EPPControlLoad = (_controlCollection.getControlByName(EPPLoaderEvent.LOAD) as EPPControlLoad);
_local2.load();
}
public function load():void{
covered = true;
_controlCollection.removeEventListener(EPPLoaderEvent.PRELOADED, callBackPreload);
_controlCollection.addEventListener(EPPLoaderEvent.PRELOADED, callBackPreload, false, 1);
}
public function unload():void{
var _local1:EPPControlUnload = (_controlCollection.getControlByName(EPPLoaderEvent.UNLOAD) as EPPControlUnload);
var _local2:EPPControlPreload = (_controlCollection.getControlByName(EPPLoaderEvent.PRELOAD) as EPPControlPreload);
_local2.destroy();
_local1.unload();
}
public function check():void{
}
public function preload():void{
}
override public function destroyInternalListeners():void{
_controlCollection.removeEventListener(EPPLoaderEvent.PRELOADED, callBackPreload);
}
public function refreshCollectionState():void{
var _local1:EPPCollectionLoadable = _controlCollection.eppObject;
var _local2:Array = _local1.children;
var _local3:uint = _local2.length;
var _local4:EPPLoaderEvent = new EPPLoaderEvent(EPPLoaderEvent.CHECKED);
var _local5:Boolean;
var _local6:Boolean;
var _local7:Boolean;
var _local8:Boolean;
var _local9:Boolean;
var _local10:Boolean;
var _local11:Boolean;
var _local12:Boolean;
var _local13:Boolean;
var _local14:Boolean;
var _local15:Boolean;
var _local16:Boolean;
var _local17:Boolean;
var _local18:Boolean;
var _local19:Boolean;
var _local20:Boolean;
var _local21:uint;
while (_local21 < _local3) {
if (_local2[_local21].loader.state.name != EPPLoaderEvent.UNLOADABLE){
_local6 = false;
} else {
_local5 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.UNCHECKED){
_local8 = false;
} else {
_local7 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.CHECKING){
_local10 = false;
} else {
_local9 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.UNLOADED){
_local12 = false;
} else {
_local11 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.PRELOADING){
_local14 = false;
} else {
_local13 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.PRELOADED){
_local16 = false;
} else {
_local15 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.LOADING){
_local18 = false;
} else {
_local17 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.LOADED){
_local20 = false;
} else {
_local19 = true;
};
_local21++;
};
if (_local6 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNLOADABLE));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CONNECTION_FAILURE));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CHECKED));
return;
};
if (_local7 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNCHECKED));
return;
};
if (_local9 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.CHECKING));
return;
};
if (_local11 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNLOADED));
return;
};
if ((((_local15 == true)) && ((_local13 == false)))){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.PRELOADED));
return;
};
if ((((((_local19 == true)) && ((_local13 == false)))) && ((_local17 == false)))){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.PRELOADED));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.LOAD));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.LOADING));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.LOADED));
return;
};
if (_local18 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.PRELOADED));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.LOAD));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.LOADING));
return;
};
}
override public function setLocker():void{
if (_controlCollection.getControlByName(EPPLoaderEvent.LOAD, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.LOAD).unlock();
};
if (_controlCollection.getControlByName(EPPLoaderEvent.PRELOAD, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.PRELOAD).lock();
};
if (_controlCollection.getControlByName(EPPLoaderEvent.UNLOAD, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.UNLOAD).unlock();
};
if (_controlCollection.getControlByName(EPPLoaderEvent.CHECK_CONNECTION, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.CHECK_CONNECTION).lock();
};
}
}
}//package com.busfront.epp.controls.loader
Section 71
//EPPStateUnchecked (com.busfront.epp.controls.loader.EPPStateUnchecked)
package com.busfront.epp.controls.loader {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
public class EPPStateUnchecked extends EPPState implements ILoader {
public function EPPStateUnchecked(_arg1:EPPControlGroup):void{
super(new EPPLoaderEvent(EPPLoaderEvent.UNCHECKED), _arg1);
}
override public function destroyInternalListeners():void{
_controlCollection.removeEventListener(EPPLoaderEvent.PRELOADED, reInitStreamKill);
}
private function reInitStreamKill(_arg1:EPPLoaderEvent):void{
var _local2:EPPLoader = (_controlCollection as EPPLoader);
_local2.connection.killStream = true;
}
public function load():void{
var _local1:EPPLoader;
covered = true;
if (ILoadable(_controlCollection.eppObject).autoLoadControl){
_controlCollection.removeEventListener(EPPLoaderEvent.LOADED, reInitStreamKill);
_controlCollection.addEventListener(EPPLoaderEvent.LOADED, reInitStreamKill, false, 1);
_local1 = (_controlCollection as EPPLoader);
_local1.connection.killStream = false;
} else {
_controlCollection.removeEventListener(EPPLoaderEvent.CONNECTION_SUCCESS, connectSuccessLoad);
_controlCollection.addEventListener(EPPLoaderEvent.CONNECTION_SUCCESS, connectSuccessLoad, false, 1);
};
check();
}
public function refreshCollectionState():void{
var _local1:EPPCollectionLoadable = _controlCollection.eppObject;
var _local2:Array = _local1.children;
var _local3:uint = _local2.length;
var _local4:EPPLoaderEvent = new EPPLoaderEvent(EPPLoaderEvent.CHECKED);
var _local5:Boolean;
var _local6:Boolean;
var _local7:Boolean;
var _local8:Boolean;
var _local9:Boolean;
var _local10:Boolean;
var _local11:Boolean;
var _local12:Boolean;
var _local13:Boolean;
var _local14:Boolean;
var _local15:Boolean;
var _local16:Boolean;
var _local17:Boolean;
var _local18:Boolean;
var _local19:Boolean;
var _local20:Boolean;
var _local21:uint;
while (_local21 < _local3) {
if (_local2[_local21].loader.state.name != EPPLoaderEvent.UNLOADABLE){
_local6 = false;
} else {
_local5 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.UNCHECKED){
_local8 = false;
} else {
_local7 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.CHECKING){
_local10 = false;
} else {
_local9 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.UNLOADED){
_local12 = false;
} else {
_local11 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.PRELOADING){
_local14 = false;
} else {
_local13 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.PRELOADED){
_local16 = false;
} else {
_local15 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.LOADING){
_local18 = false;
} else {
_local17 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.LOADED){
_local20 = false;
} else {
_local19 = true;
};
_local21++;
};
if (_local6 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNLOADABLE));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CONNECTION_FAILURE));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CHECKED));
return;
};
if (_local7 == true){
return;
};
if (_local11 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNLOADED));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CONNECTION_SUCCESS));
_controlCollection.dispatchEvent(_local4);
return;
};
if ((((_local15 == true)) && ((_local13 == false)))){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNLOADED));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CONNECTION_SUCCESS));
_controlCollection.dispatchEvent(_local4);
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.PRELOAD));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.PRELOADED));
return;
};
if ((((((_local19 == true)) && ((_local13 == false)))) && ((_local17 == false)))){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNLOADED));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CONNECTION_SUCCESS));
_controlCollection.dispatchEvent(_local4);
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.PRELOAD));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.PRELOADED));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.LOAD));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.LOADING));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.LOADED));
return;
};
if (_local10 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.CHECKING));
return;
};
if (_local14 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNLOADED));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CONNECTION_SUCCESS));
_controlCollection.dispatchEvent(_local4);
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.PRELOAD));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.PRELOADING));
return;
};
if (_local18 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNLOADED));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CONNECTION_SUCCESS));
_controlCollection.dispatchEvent(_local4);
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.PRELOAD));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.PRELOADED));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.LOAD));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.LOADING));
return;
};
}
public function preload():void{
var _local1:EPPLoader;
covered = true;
if (ILoadable(_controlCollection.eppObject).autoLoadControl){
_controlCollection.removeEventListener(EPPLoaderEvent.PRELOADED, reInitStreamKill);
_controlCollection.addEventListener(EPPLoaderEvent.PRELOADED, reInitStreamKill, false, 1);
_local1 = (_controlCollection as EPPLoader);
_local1.connection.killStream = false;
} else {
_controlCollection.removeEventListener(EPPLoaderEvent.CONNECTION_SUCCESS, connectSuccessPreload);
_controlCollection.addEventListener(EPPLoaderEvent.CONNECTION_SUCCESS, connectSuccessPreload, false, 1);
};
check();
}
public function unload():void{
}
public function check():void{
var _local1:EPPControlCheck = (_controlCollection.getControlByName(EPPLoaderEvent.CHECK_CONNECTION) as EPPControlCheck);
_local1.check();
}
private function connectSuccessPreload(_arg1:EPPLoaderEvent):void{
_controlCollection.removeEventListener(EPPLoaderEvent.CONNECTION_SUCCESS, connectSuccessPreload);
var _local2:EPPLoader = (_controlCollection as EPPLoader);
_local2.preload();
}
override public function setLocker():void{
if (_controlCollection.getControlByName(EPPLoaderEvent.LOAD, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.LOAD).unlock();
};
if (_controlCollection.getControlByName(EPPLoaderEvent.PRELOAD, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.PRELOAD).unlock();
};
if (_controlCollection.getControlByName(EPPLoaderEvent.UNLOAD, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.UNLOAD).lock();
};
if (_controlCollection.getControlByName(EPPLoaderEvent.CHECK_CONNECTION, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.CHECK_CONNECTION).unlock();
};
}
private function connectSuccessLoad(_arg1:EPPLoaderEvent):void{
_controlCollection.removeEventListener(EPPLoaderEvent.CONNECTION_SUCCESS, connectSuccessLoad);
var _local2:EPPLoader = (_controlCollection as EPPLoader);
_local2.load();
}
override public function destroy():void{
destroyInternalListeners();
}
}
}//package com.busfront.epp.controls.loader
Section 72
//EPPStateUnloadable (com.busfront.epp.controls.loader.EPPStateUnloadable)
package com.busfront.epp.controls.loader {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
public class EPPStateUnloadable extends EPPState implements ILoader {
public function EPPStateUnloadable(_arg1:EPPControlGroup):void{
super(new EPPLoaderEvent(EPPLoaderEvent.UNLOADABLE), _arg1);
}
public function load():void{
}
public function refreshCollectionState():void{
var _local1:EPPCollectionLoadable = _controlCollection.eppObject;
var _local2:Array = _local1.children;
var _local3:uint = _local2.length;
var _local4:EPPLoaderEvent = new EPPLoaderEvent(EPPLoaderEvent.CHECKED);
var _local5:Boolean;
var _local6:Boolean;
var _local7:Boolean;
var _local8:Boolean;
var _local9:Boolean;
var _local10:Boolean;
var _local11:Boolean;
var _local12:Boolean;
var _local13:Boolean;
var _local14:Boolean;
var _local15:Boolean;
var _local16:Boolean;
var _local17:Boolean;
var _local18:Boolean;
var _local19:Boolean;
var _local20:Boolean;
var _local21:uint;
while (_local21 < _local3) {
if (_local2[_local21].loader.state.name != EPPLoaderEvent.UNLOADABLE){
_local6 = false;
} else {
_local5 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.UNCHECKED){
_local8 = false;
} else {
_local7 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.CHECKING){
_local10 = false;
} else {
_local9 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.UNLOADED){
_local12 = false;
} else {
_local11 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.PRELOADING){
_local14 = false;
} else {
_local13 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.PRELOADED){
_local16 = false;
} else {
_local15 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.LOADING){
_local18 = false;
} else {
_local17 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.LOADED){
_local20 = false;
} else {
_local19 = true;
};
_local21++;
};
if (_local6 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNLOADABLE));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CONNECTION_FAILURE));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CHECKED));
return;
};
if (_local7 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNCHECKED));
return;
};
if (_local11 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNLOADED));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CONNECTION_SUCCESS));
_controlCollection.dispatchEvent(_local4);
return;
};
if ((((_local15 == true)) && ((_local13 == false)))){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNLOADED));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CONNECTION_SUCCESS));
_controlCollection.dispatchEvent(_local4);
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.PRELOAD));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.PRELOADED));
return;
};
if ((((((_local19 == true)) && ((_local13 == false)))) && ((_local17 == false)))){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNLOADED));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CONNECTION_SUCCESS));
_controlCollection.dispatchEvent(_local4);
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.PRELOAD));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.PRELOADED));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.LOAD));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.LOADING));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.LOADED));
return;
};
if (_local10 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.CHECKING));
return;
};
if (_local14 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNLOADED));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CONNECTION_SUCCESS));
_controlCollection.dispatchEvent(_local4);
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.PRELOAD));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.PRELOADING));
return;
};
if (_local18 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNLOADED));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CONNECTION_SUCCESS));
_controlCollection.dispatchEvent(_local4);
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.PRELOAD));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.PRELOADED));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.LOAD));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.LOADING));
return;
};
}
public function preload():void{
}
override public function setLocker():void{
if (_controlCollection.getControlByName(EPPLoaderEvent.LOAD, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.LOAD).lock();
};
if (_controlCollection.getControlByName(EPPLoaderEvent.PRELOAD, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.PRELOAD).lock();
};
if (_controlCollection.getControlByName(EPPLoaderEvent.UNLOAD, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.UNLOAD).lock();
};
if (_controlCollection.getControlByName(EPPLoaderEvent.CHECK_CONNECTION, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.CHECK_CONNECTION).lock();
};
}
public function unload():void{
}
public function check():void{
}
}
}//package com.busfront.epp.controls.loader
Section 73
//EPPStateUnloaded (com.busfront.epp.controls.loader.EPPStateUnloaded)
package com.busfront.epp.controls.loader {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
public class EPPStateUnloaded extends EPPState implements ILoader {
public function EPPStateUnloaded(_arg1:EPPControlGroup):void{
super(new EPPLoaderEvent(EPPLoaderEvent.UNLOADED), _arg1);
}
public function load():void{
covered = true;
_controlCollection.removeEventListener(EPPLoaderEvent.PRELOADED, callBackPreload2);
_controlCollection.addEventListener(EPPLoaderEvent.PRELOADED, callBackPreload2, false, 1);
preload();
}
override public function destroyInternalListeners():void{
}
public function check():void{
}
public function preload():void{
var _local1:EPPControlPreload = (_controlCollection.getControlByName(EPPLoaderEvent.PRELOAD) as EPPControlPreload);
_local1.preload();
}
private function callBackPreload2(_arg1:EPPLoaderEvent):void{
trace("CALLBACK PRELOADED");
_controlCollection.removeEventListener(EPPLoaderEvent.PRELOADED, callBackPreload2);
var _local2:EPPControlLoad = (_controlCollection.getControlByName(EPPLoaderEvent.LOAD) as EPPControlLoad);
_local2.load();
}
public function refreshCollectionState():void{
var _local1:EPPCollectionLoadable = _controlCollection.eppObject;
var _local2:Array = _local1.children;
var _local3:uint = _local2.length;
var _local4:EPPLoaderEvent = new EPPLoaderEvent(EPPLoaderEvent.CHECKED);
var _local5:Boolean;
var _local6:Boolean;
var _local7:Boolean;
var _local8:Boolean;
var _local9:Boolean;
var _local10:Boolean;
var _local11:Boolean;
var _local12:Boolean;
var _local13:Boolean;
var _local14:Boolean;
var _local15:Boolean;
var _local16:Boolean;
var _local17:Boolean;
var _local18:Boolean;
var _local19:Boolean;
var _local20:Boolean;
var _local21:uint;
while (_local21 < _local3) {
if (_local2[_local21].loader.state.name != EPPLoaderEvent.UNLOADABLE){
_local6 = false;
} else {
_local5 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.UNCHECKED){
_local8 = false;
} else {
_local7 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.CHECKING){
_local10 = false;
} else {
_local9 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.UNLOADED){
_local12 = false;
} else {
_local11 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.PRELOADING){
_local14 = false;
} else {
_local13 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.PRELOADED){
_local16 = false;
} else {
_local15 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.LOADING){
_local18 = false;
} else {
_local17 = true;
};
if (_local2[_local21].loader.state.name != EPPLoaderEvent.LOADED){
_local20 = false;
} else {
_local19 = true;
};
_local21++;
};
if (_local6 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNLOADABLE));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CONNECTION_FAILURE));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CHECKED));
return;
};
if (_local7 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.UNCHECKED));
return;
};
if (_local9 == true){
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.CHECKING));
return;
};
if (_local11 == true){
return;
};
if ((((_local15 == true)) && ((_local13 == false)))){
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.PRELOAD));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.PRELOADED));
return;
};
if ((((((_local19 == true)) && ((_local13 == false)))) && ((_local17 == false)))){
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.PRELOAD));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.PRELOADED));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.LOAD));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.LOADING));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.LOADED));
return;
};
if (_local14 == true){
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.PRELOAD));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.PRELOADING));
return;
};
if (_local18 == true){
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.PRELOAD));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.PRELOADED));
_controlCollection.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.LOAD));
_controlCollection.setState(_controlCollection.getStateByName(EPPLoaderEvent.LOADING));
return;
};
}
override public function setLocker():void{
if (_controlCollection.getControlByName(EPPLoaderEvent.LOAD, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.LOAD).unlock();
};
if (_controlCollection.getControlByName(EPPLoaderEvent.PRELOAD, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.PRELOAD).unlock();
};
if (_controlCollection.getControlByName(EPPLoaderEvent.UNLOAD, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.UNLOAD).lock();
};
if (_controlCollection.getControlByName(EPPLoaderEvent.CHECK_CONNECTION, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.CHECK_CONNECTION).lock();
};
}
public function unload():void{
}
}
}//package com.busfront.epp.controls.loader
Section 74
//EPPStateUnloading (com.busfront.epp.controls.loader.EPPStateUnloading)
package com.busfront.epp.controls.loader {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
public class EPPStateUnloading extends EPPState implements ILoader {
public function EPPStateUnloading(_arg1:EPPControlGroup):void{
super(new EPPLoaderEvent(EPPLoaderEvent.UNLOADING), _arg1);
}
override public function setLocker():void{
if (_controlCollection.getControlByName(EPPLoaderEvent.LOAD, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.LOAD).lock();
};
if (_controlCollection.getControlByName(EPPLoaderEvent.PRELOAD, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.PRELOAD).lock();
};
if (_controlCollection.getControlByName(EPPLoaderEvent.UNLOAD, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.UNLOAD).lock();
};
if (_controlCollection.getControlByName(EPPLoaderEvent.CHECK_CONNECTION, false) != null){
_controlCollection.getControlByName(EPPLoaderEvent.CHECK_CONNECTION).lock();
};
}
public function load():void{
}
public function refreshCollectionState():void{
}
public function preload():void{
}
public function check():void{
}
public function unload():void{
}
}
}//package com.busfront.epp.controls.loader
Section 75
//ICheck (com.busfront.epp.controls.loader.ICheck)
package com.busfront.epp.controls.loader {
import com.busfront.epp.controls.*;
public interface ICheck extends IControlObserver {
function check():void;
}
}//package com.busfront.epp.controls.loader
Section 76
//ILoad (com.busfront.epp.controls.loader.ILoad)
package com.busfront.epp.controls.loader {
import com.busfront.epp.controls.*;
public interface ILoad extends IControlObserver {
function load():void;
}
}//package com.busfront.epp.controls.loader
Section 77
//ILoadable (com.busfront.epp.controls.loader.ILoadable)
package com.busfront.epp.controls.loader {
import com.busfront.epp.base.*;
public interface ILoadable extends IEPPObject {
function get autoLoadControl():String;
function get loader():EPPLoader;
function set autoLoadControl(_arg1:String):void;
}
}//package com.busfront.epp.controls.loader
Section 78
//ILoader (com.busfront.epp.controls.loader.ILoader)
package com.busfront.epp.controls.loader {
import com.busfront.epp.controls.*;
public interface ILoader extends IControlObserver {
function load():void;
function check():void;
function preload():void;
function unload():void;
function refreshCollectionState():void;
}
}//package com.busfront.epp.controls.loader
Section 79
//ILoaderProperty (com.busfront.epp.controls.loader.ILoaderProperty)
package com.busfront.epp.controls.loader {
public interface ILoaderProperty {
function get bytesLoaded():uint;
function get timeLoaded():Number;
function get timeTotal():Number;
function get bytesTotal():uint;
function get bytesRemaining():uint;
}
}//package com.busfront.epp.controls.loader
Section 80
//IPreload (com.busfront.epp.controls.loader.IPreload)
package com.busfront.epp.controls.loader {
import com.busfront.epp.controls.*;
import com.busfront.epp.controls.loader.*;
interface IPreload extends IControlObserver {
function preload():void;
}
}//package com.busfront.epp.controls.loader
Section 81
//IUnload (com.busfront.epp.controls.loader.IUnload)
package com.busfront.epp.controls.loader {
import com.busfront.epp.controls.*;
public interface IUnload extends IControlObserver {
function unload():void;
}
}//package com.busfront.epp.controls.loader
Section 82
//EPPControlMute (com.busfront.epp.controls.mixer.EPPControlMute)
package com.busfront.epp.controls.mixer {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
public class EPPControlMute extends EPPControl implements IMute {
public function EPPControlMute(_arg1:EPPControlGroup):void{
super(new EPPMixerEvent(EPPMixerEvent.MUTE), _arg1);
}
public function mute():void{
var _local1:IMixable = (_eppObject as IMixable);
_local1.mixer.dispatchEvent(_event);
_local1.mixer.channel.mute();
}
override public function exec(_arg1:Array){
var _local2:IMixable;
if (super.exec(_arg1) == true){
_local2 = (_eppObject as IMixable);
return (_local2.mixer.state[_name]());
};
}
}
}//package com.busfront.epp.controls.mixer
Section 83
//EPPControlPan (com.busfront.epp.controls.mixer.EPPControlPan)
package com.busfront.epp.controls.mixer {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
public class EPPControlPan extends EPPControl implements IPan {
public function EPPControlPan(_arg1:EPPControlGroup):void{
super(new EPPMixerEvent(EPPMixerEvent.PAN), _arg1);
var _local2:Array = new Array();
_local2["name"] = "pan";
_local2["type"] = "*";
_args.push(_local2);
_specProp = "pan";
}
override public function exec(_arg1:Array){
var _local2:IMixable;
if (super.exec(_arg1) == true){
_local2 = (_eppObject as IMixable);
return ((_local2.mixer.state[_name] = _arg1[0]));
};
}
public function set pan(_arg1):void{
var _local2:IMixable = (_eppObject as IMixable);
_local2.mixer.dispatchEvent(_event);
_local2.mixer.channel.pan = _arg1;
}
}
}//package com.busfront.epp.controls.mixer
Section 84
//EPPControlUnmute (com.busfront.epp.controls.mixer.EPPControlUnmute)
package com.busfront.epp.controls.mixer {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
public class EPPControlUnmute extends EPPControl implements IUnmute {
public function EPPControlUnmute(_arg1:EPPControlGroup):void{
super(new EPPMixerEvent(EPPMixerEvent.UNMUTE), _arg1);
}
override public function exec(_arg1:Array){
var _local2:IMixable;
if (super.exec(_arg1) == true){
_local2 = (_eppObject as IMixable);
return (_local2.mixer.state[_name]());
};
}
public function unmute():void{
var _local1:IMixable = (_eppObject as IMixable);
_local1.mixer.dispatchEvent(_event);
_local1.mixer.channel.unmute();
}
}
}//package com.busfront.epp.controls.mixer
Section 85
//EPPControlVolume (com.busfront.epp.controls.mixer.EPPControlVolume)
package com.busfront.epp.controls.mixer {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
public class EPPControlVolume extends EPPControl implements IVolume {
public function EPPControlVolume(_arg1:EPPControlGroup):void{
super(new EPPMixerEvent(EPPMixerEvent.VOLUME), _arg1);
var _local2:Array = new Array();
_local2["name"] = "volume";
_local2["type"] = "*";
_args.push(_local2);
_specProp = "volume";
}
override public function exec(_arg1:Array){
var _local2:IMixable;
if (super.exec(_arg1) == true){
_local2 = (_eppObject as IMixable);
return ((_local2.mixer.state[_name] = _arg1[0]));
};
}
public function set volume(_arg1):void{
var _local2:IMixable = (_eppObject as IMixable);
_local2.mixer.dispatchEvent(_event);
_local2.mixer.channel.volume = _arg1;
}
}
}//package com.busfront.epp.controls.mixer
Section 86
//EPPMixer (com.busfront.epp.controls.mixer.EPPMixer)
package com.busfront.epp.controls.mixer {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
import com.busfront.epp.controls.player.*;
import com.busfront.epp.net.channel.sound.*;
import com.busfront.epp.display.*;
public class EPPMixer extends EPPControlGroup implements IMixer, IMixerProperty {
private var _channel:EPPSoundChannel;
private var _media:IPlayable;
public function EPPMixer(_arg1:IPlayable):void{
var _local4:EPPState;
var _local2:Array = [EPPMixerEvent.UNVOLUMABLE, EPPMixerEvent.UNVOLUMED, EPPMixerEvent.VOLUMED, EPPMixerEvent.UNMUTED, EPPMixerEvent.VOLUMEING, EPPMixerEvent.MUTED, null];
var _local3:Array = [null, null, null, EPPMixerEvent.UNMUTE, EPPMixerEvent.VOLUME, EPPMixerEvent.MUTE, EPPMixerEvent.PAN];
if ((((((_arg1.loader.state.name == EPPLoaderEvent.UNCHECKED)) || ((_arg1.loader.state.name == EPPLoaderEvent.CHECKING)))) || ((_arg1.loader.state.name == EPPLoaderEvent.UNLOADABLE)))){
_local4 = new EPPStateUnvolumable(this);
} else {
_local4 = new EPPStateUnvolumed(this);
};
super(EPPControlGroupType.MIXER, (_arg1 as EPPObject), new Array(EPPBindable.VOLUME), _local3, _local4, _local2);
_media = _arg1;
_media.loader.addEventListener(EPPLoaderEvent.UNLOADED, interuptPlayer, false, 1);
}
public function set pan(_arg1):void{
getControlByName(EPPMixerEvent.PAN).exec([_arg1]);
}
private function muteBuilder():EPPControl{
return (new EPPControlMute(this));
}
public function get channel():EPPSoundChannel{
if (_channel == null){
_channel = _media.player.channel.createSoundChannel();
};
return (_channel);
}
private function unmuteBuilder():EPPControl{
return (new EPPControlUnmute(this));
}
private function volumed():EPPState{
return (new EPPStateVolumed(this));
}
private function unvolumable():EPPState{
return (new EPPStateUnvolumable(this));
}
override public function buildControl(_arg1:String):EPPControl{
return (this[(_arg1 + "Builder")]());
}
override public function buildState(_arg1:String):EPPState{
return (this[_arg1]());
}
private function unmuted():EPPState{
return (new EPPStateUnmuted(this));
}
private function volumeing():EPPState{
return (new EPPStateVolumeing(this));
}
private function unvolumed():EPPState{
return (new EPPStateUnvolumed(this));
}
public function mute():void{
getControlByName(EPPMixerEvent.MUTE).exec([]);
}
private function interuptPlayer(_arg1:EPPLoaderEvent):void{
if (state.name != EPPMixerEvent.UNVOLUMED){
channel.clear();
setState(getStateByName(EPPMixerEvent.UNVOLUMED));
};
}
public function get volume():Number{
return (channel.volume);
}
public function get pan():Number{
return (channel.pan);
}
private function volumeBuilder():EPPControl{
return (new EPPControlVolume(this));
}
private function muted():EPPState{
return (new EPPStateMuted(this));
}
public function set volume(_arg1):void{
getControlByName(EPPMixerEvent.VOLUME).exec([_arg1]);
}
public function unmute():void{
getControlByName(EPPMixerEvent.UNMUTE).exec([]);
}
private function panBuilder():EPPControl{
return (new EPPControlPan(this));
}
}
}//package com.busfront.epp.controls.mixer
Section 87
//EPPStateMuted (com.busfront.epp.controls.mixer.EPPStateMuted)
package com.busfront.epp.controls.mixer {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
public class EPPStateMuted extends EPPState implements IMixer {
public function EPPStateMuted(_arg1:EPPControlGroup):void{
super(new EPPMixerEvent(EPPMixerEvent.MUTED), _arg1);
}
public function mute():void{
var _local1:EPPControlMute;
if (_controlCollection.state != this){
_local1 = (_controlCollection.getControlByName(EPPMixerEvent.MUTE) as EPPControlMute);
_local1.mute();
};
}
public function unmute():void{
var _local1:EPPControlUnmute = (_controlCollection.getControlByName(EPPMixerEvent.UNMUTE) as EPPControlUnmute);
_local1.unmute();
}
public function set volume(_arg1):void{
var _local2:EPPControlVolume = (_controlCollection.getControlByName(EPPMixerEvent.VOLUME) as EPPControlVolume);
_local2.volume = _arg1;
}
public function set pan(_arg1):void{
var _local2:EPPControlPan = (_controlCollection.getControlByName(EPPMixerEvent.PAN) as EPPControlPan);
_local2.pan = _arg1;
}
override public function setLocker():void{
_controlCollection.getControlByName(EPPMixerEvent.MUTE).lock();
if (_controlCollection.getControlByName(EPPMixerEvent.UNMUTE, false) != null){
_controlCollection.getControlByName(EPPMixerEvent.UNMUTE).unlock();
};
if (_controlCollection.getControlByName(EPPMixerEvent.VOLUME, false) != null){
_controlCollection.getControlByName(EPPMixerEvent.VOLUME).unlock();
};
}
}
}//package com.busfront.epp.controls.mixer
Section 88
//EPPStateUnmuted (com.busfront.epp.controls.mixer.EPPStateUnmuted)
package com.busfront.epp.controls.mixer {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
public class EPPStateUnmuted extends EPPState implements IMixer {
public function EPPStateUnmuted(_arg1:EPPControlGroup):void{
super(new EPPMixerEvent(EPPMixerEvent.UNMUTED), _arg1);
}
public function mute():void{
var _local1:EPPControlMute = (_controlCollection.getControlByName(EPPMixerEvent.MUTE) as EPPControlMute);
_local1.mute();
}
public function unmute():void{
var _local1:EPPControlUnmute;
if (_controlCollection.state != this){
_local1 = (_controlCollection.getControlByName(EPPMixerEvent.UNMUTE) as EPPControlUnmute);
_local1.unmute();
};
}
public function set volume(_arg1):void{
var _local2:EPPControlVolume = (_controlCollection.getControlByName(EPPMixerEvent.VOLUME) as EPPControlVolume);
_local2.volume = _arg1;
}
public function set pan(_arg1):void{
var _local2:EPPControlPan = (_controlCollection.getControlByName(EPPMixerEvent.PAN) as EPPControlPan);
_local2.pan = _arg1;
}
override public function setLocker():void{
if (_controlCollection.getControlByName(EPPMixerEvent.MUTE, false) != null){
_controlCollection.getControlByName(EPPMixerEvent.MUTE).unlock();
};
if (_controlCollection.getControlByName(EPPMixerEvent.UNMUTE, false) != null){
_controlCollection.getControlByName(EPPMixerEvent.UNMUTE).lock();
};
if (_controlCollection.getControlByName(EPPMixerEvent.VOLUME, false) != null){
_controlCollection.getControlByName(EPPMixerEvent.VOLUME).unlock();
};
}
}
}//package com.busfront.epp.controls.mixer
Section 89
//EPPStateUnvolumable (com.busfront.epp.controls.mixer.EPPStateUnvolumable)
package com.busfront.epp.controls.mixer {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
public class EPPStateUnvolumable extends EPPState implements IMixer {
public function EPPStateUnvolumable(_arg1:EPPControlGroup):void{
super(new EPPMixerEvent(EPPMixerEvent.UNVOLUMABLE), _arg1);
}
public function mute():void{
}
public function unmute():void{
}
public function set volume(_arg1):void{
}
public function set pan(_arg1):void{
}
override public function setLocker():void{
if (_controlCollection.getControlByName(EPPMixerEvent.MUTE, false) != null){
_controlCollection.getControlByName(EPPMixerEvent.MUTE).lock();
};
if (_controlCollection.getControlByName(EPPMixerEvent.UNMUTE, false) != null){
_controlCollection.getControlByName(EPPMixerEvent.UNMUTE).lock();
};
if (_controlCollection.getControlByName(EPPMixerEvent.VOLUME, false) != null){
_controlCollection.getControlByName(EPPMixerEvent.VOLUME).lock();
};
}
}
}//package com.busfront.epp.controls.mixer
Section 90
//EPPStateUnvolumed (com.busfront.epp.controls.mixer.EPPStateUnvolumed)
package com.busfront.epp.controls.mixer {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
public class EPPStateUnvolumed extends EPPState implements IMixer {
public function EPPStateUnvolumed(_arg1:EPPControlGroup):void{
super(new EPPMixerEvent(EPPMixerEvent.UNVOLUMED), _arg1);
}
public function mute():void{
var _local1:EPPControlMute = (_controlCollection.getControlByName(EPPMixerEvent.MUTE) as EPPControlMute);
_local1.mute();
}
public function unmute():void{
}
public function set volume(_arg1):void{
var _local2:EPPControlVolume = (_controlCollection.getControlByName(EPPMixerEvent.VOLUME) as EPPControlVolume);
_local2.volume = _arg1;
}
public function set pan(_arg1):void{
var _local2:EPPControlPan = (_controlCollection.getControlByName(EPPMixerEvent.PAN) as EPPControlPan);
_local2.pan = _arg1;
}
override public function setLocker():void{
if (_controlCollection.getControlByName(EPPMixerEvent.MUTE, false) != null){
_controlCollection.getControlByName(EPPMixerEvent.MUTE).unlock();
};
if (_controlCollection.getControlByName(EPPMixerEvent.UNMUTE, false) != null){
_controlCollection.getControlByName(EPPMixerEvent.UNMUTE).lock();
};
if (_controlCollection.getControlByName(EPPMixerEvent.VOLUME, false) != null){
_controlCollection.getControlByName(EPPMixerEvent.VOLUME).unlock();
};
}
}
}//package com.busfront.epp.controls.mixer
Section 91
//EPPStateVolumed (com.busfront.epp.controls.mixer.EPPStateVolumed)
package com.busfront.epp.controls.mixer {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
public class EPPStateVolumed extends EPPState implements IMixer {
public function EPPStateVolumed(_arg1:EPPControlGroup):void{
super(new EPPMixerEvent(EPPMixerEvent.VOLUMED), _arg1);
}
public function mute():void{
var _local1:EPPControlMute = (_controlCollection.getControlByName(EPPMixerEvent.MUTE) as EPPControlMute);
_local1.mute();
}
public function unmute():void{
}
public function set volume(_arg1):void{
var _local2:EPPControlVolume = (_controlCollection.getControlByName(EPPMixerEvent.VOLUME) as EPPControlVolume);
_local2.volume = _arg1;
}
public function set pan(_arg1):void{
var _local2:EPPControlPan = (_controlCollection.getControlByName(EPPMixerEvent.PAN) as EPPControlPan);
_local2.pan = _arg1;
}
override public function setLocker():void{
if (_controlCollection.getControlByName(EPPMixerEvent.MUTE, false) != null){
_controlCollection.getControlByName(EPPMixerEvent.MUTE).unlock();
};
if (_controlCollection.getControlByName(EPPMixerEvent.UNMUTE, false) != null){
_controlCollection.getControlByName(EPPMixerEvent.UNMUTE).lock();
};
if (_controlCollection.getControlByName(EPPMixerEvent.VOLUME, false) != null){
_controlCollection.getControlByName(EPPMixerEvent.VOLUME).unlock();
};
}
}
}//package com.busfront.epp.controls.mixer
Section 92
//EPPStateVolumeing (com.busfront.epp.controls.mixer.EPPStateVolumeing)
package com.busfront.epp.controls.mixer {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
public class EPPStateVolumeing extends EPPState implements IMixer {
public function EPPStateVolumeing(_arg1:EPPControlGroup):void{
super(new EPPMixerEvent(EPPMixerEvent.VOLUMEING), _arg1);
}
public function mute():void{
var _local1:EPPControlMute = (_controlCollection.getControlByName(EPPMixerEvent.MUTE) as EPPControlMute);
_local1.mute();
}
public function unmute():void{
}
public function set volume(_arg1):void{
var _local2:EPPMixer = (_controlCollection as EPPMixer);
if (_local2.volume == 0){
_controlCollection.dispatchEvent(new EPPMixerEvent(EPPMixerEvent.UNMUTED));
};
var _local3:EPPControlVolume = (_controlCollection.getControlByName(EPPMixerEvent.VOLUME) as EPPControlVolume);
_local3.volume = _arg1;
}
public function set pan(_arg1):void{
var _local2:EPPControlPan = (_controlCollection.getControlByName(EPPMixerEvent.PAN) as EPPControlPan);
_local2.pan = _arg1;
}
override public function setLocker():void{
if (_controlCollection.getControlByName(EPPMixerEvent.MUTE, false) != null){
_controlCollection.getControlByName(EPPMixerEvent.MUTE).unlock();
};
if (_controlCollection.getControlByName(EPPMixerEvent.UNMUTE, false) != null){
_controlCollection.getControlByName(EPPMixerEvent.UNMUTE).lock();
};
if (_controlCollection.getControlByName(EPPMixerEvent.VOLUME, false) != null){
_controlCollection.getControlByName(EPPMixerEvent.VOLUME).unlock();
};
}
}
}//package com.busfront.epp.controls.mixer
Section 93
//IMixable (com.busfront.epp.controls.mixer.IMixable)
package com.busfront.epp.controls.mixer {
import com.busfront.epp.controls.player.*;
public interface IMixable extends IPlayable {
function get mixer():EPPMixer;
}
}//package com.busfront.epp.controls.mixer
Section 94
//IMixer (com.busfront.epp.controls.mixer.IMixer)
package com.busfront.epp.controls.mixer {
import com.busfront.epp.controls.*;
import com.busfront.epp.controls.mixer.*;
interface IMixer extends IControlObserver {
function mute():void;
function unmute():void;
}
}//package com.busfront.epp.controls.mixer
Section 95
//IMixerProperty (com.busfront.epp.controls.mixer.IMixerProperty)
package com.busfront.epp.controls.mixer {
public interface IMixerProperty {
function set pan(_arg1):void;
function get volume():Number;
function set volume(_arg1):void;
function get pan():Number;
}
}//package com.busfront.epp.controls.mixer
Section 96
//IMute (com.busfront.epp.controls.mixer.IMute)
package com.busfront.epp.controls.mixer {
import com.busfront.epp.controls.*;
import com.busfront.epp.controls.mixer.*;
interface IMute extends IControlObserver {
function mute():void;
}
}//package com.busfront.epp.controls.mixer
Section 97
//IPan (com.busfront.epp.controls.mixer.IPan)
package com.busfront.epp.controls.mixer {
import com.busfront.epp.controls.*;
import com.busfront.epp.controls.mixer.*;
interface IPan extends IControlObserver {
function set pan(_arg1):void;
}
}//package com.busfront.epp.controls.mixer
Section 98
//IUnmute (com.busfront.epp.controls.mixer.IUnmute)
package com.busfront.epp.controls.mixer {
import com.busfront.epp.controls.*;
import com.busfront.epp.controls.mixer.*;
interface IUnmute extends IControlObserver {
function unmute():void;
}
}//package com.busfront.epp.controls.mixer
Section 99
//IVolume (com.busfront.epp.controls.mixer.IVolume)
package com.busfront.epp.controls.mixer {
import com.busfront.epp.controls.*;
import com.busfront.epp.controls.mixer.*;
interface IVolume extends IControlObserver {
function set volume(_arg1):void;
}
}//package com.busfront.epp.controls.mixer
Section 100
//EPPControlJumpToNext (com.busfront.epp.controls.player.EPPControlJumpToNext)
package com.busfront.epp.controls.player {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.base.media.*;
public class EPPControlJumpToNext extends EPPControl implements IJump {
public function EPPControlJumpToNext(_arg1:EPPPlayer):void{
super(new EPPPlayerCollectionEvent(EPPPlayerCollectionEvent.JUMP_TO_NEXT), _arg1);
}
override public function exec(_arg1:Array){
if (this.locked === false){
jump();
};
}
override public function destroy():void{
}
public function jump():void{
var _local1:EPPMediaCollection = (_eppObject as EPPMediaCollection);
_local1.playerCollection.dispatchEvent(_event);
_local1.playerCollection.currentChild = (_local1.playerCollection.currentIndex + 1);
if ((((_local1.player.stateName == EPPPlayerEvent.PLAYING)) && (!((_local1.playerCollection.currentChild.player.stateName == EPPPlayerEvent.PLAYING))))){
_local1.playerCollection.currentChild.player.play();
};
}
}
}//package com.busfront.epp.controls.player
Section 101
//EPPControlJumpToPrevious (com.busfront.epp.controls.player.EPPControlJumpToPrevious)
package com.busfront.epp.controls.player {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.base.media.*;
public class EPPControlJumpToPrevious extends EPPControl implements IJump {
public function EPPControlJumpToPrevious(_arg1:EPPPlayer):void{
super(new EPPPlayerCollectionEvent(EPPPlayerCollectionEvent.JUMP_TO_PREVIOUS), _arg1);
}
override public function exec(_arg1:Array){
if (this.locked === false){
jump();
};
}
override public function destroy():void{
}
public function jump():void{
var _local1:EPPMediaCollection = (_eppObject as EPPMediaCollection);
_local1.playerCollection.dispatchEvent(_event);
_local1.playerCollection.currentChild = (_local1.playerCollection.currentIndex - 1);
if ((((_local1.player.stateName == EPPPlayerEvent.PLAYING)) && (!((_local1.playerCollection.currentChild.player.stateName == EPPPlayerEvent.PLAYING))))){
_local1.playerCollection.currentChild.player.play();
};
}
}
}//package com.busfront.epp.controls.player
Section 102
//EPPControlPause (com.busfront.epp.controls.player.EPPControlPause)
package com.busfront.epp.controls.player {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
public class EPPControlPause extends EPPControl implements IPause {
public function EPPControlPause(_arg1:EPPPlayer):void{
super(new EPPPlayerEvent(EPPPlayerEvent.PAUSE), _arg1);
}
override public function exec(_arg1:Array){
var _local2:IPlayable;
if (super.exec(_arg1) == true){
_local2 = (_eppObject as IPlayable);
return (_local2.player.state[_name]());
};
}
public function pause():void{
var _local1:IPlayable = (_eppObject as IPlayable);
_local1.player.dispatchEvent(_event);
_local1.player.channel.pause();
}
}
}//package com.busfront.epp.controls.player
Section 103
//EPPControlPlay (com.busfront.epp.controls.player.EPPControlPlay)
package com.busfront.epp.controls.player {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
public class EPPControlPlay extends EPPControl implements IPlay {
public function EPPControlPlay(_arg1:EPPPlayer){
super(new EPPPlayerEvent(EPPPlayerEvent.PLAY), _arg1);
}
override public function exec(_arg1:Array){
var _local2:IPlayable;
if (super.exec(_arg1) == true){
_local2 = (_eppObject as IPlayable);
return (_local2.player.state[_name](_arg1));
};
}
public function play(... _args):void{
var _local2:IPlayable = (_eppObject as IPlayable);
_local2.player.dispatchEvent(_event);
if (_args[0] != undefined){
_local2.player.channel.play(("" + _args[0]));
return;
};
_local2.player.channel.play();
}
}
}//package com.busfront.epp.controls.player
Section 104
//EPPControlRate (com.busfront.epp.controls.player.EPPControlRate)
package com.busfront.epp.controls.player {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
public class EPPControlRate extends EPPControl implements IRate {
private var _lastSeekPoint:Number;// = -1
public function EPPControlRate(_arg1:EPPPlayer):void{
super(new EPPPlayerEvent(EPPPlayerEvent.RATE), _arg1);
var _local2:Array = new Array();
_local2["name"] = "rate";
_local2["type"] = "*";
_args.push(_local2);
_specProp = "rate";
}
public function set rate(_arg1):void{
var _local2:IPlayable = (_eppObject as IPlayable);
if (_local2.player.state.name != EPPPlayerEvent.RATEING){
_local2.player.dispatchEvent(_event);
};
_local2.player.channel.rate = _arg1;
}
override public function exec(_arg1:Array){
var _local2:IPlayable;
if (super.exec(_arg1) == true){
_local2 = (_eppObject as IPlayable);
return ((_local2.player.state[_name] = _arg1[0]));
};
}
override public function destroy():void{
}
}
}//package com.busfront.epp.controls.player
Section 105
//EPPControlSeek (com.busfront.epp.controls.player.EPPControlSeek)
package com.busfront.epp.controls.player {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
public class EPPControlSeek extends EPPControl implements ISeek {
private var _lastSeekPoint:Number;// = -1
public function EPPControlSeek(_arg1:EPPPlayer):void{
super(new EPPPlayerEvent(EPPPlayerEvent.SEEK), _arg1);
var _local2:Array = new Array();
_local2["name"] = "seconds";
_local2["type"] = "*";
_args.push(_local2);
_specProp = "time";
}
override public function exec(_arg1:Array){
var _local2:IPlayable;
if (super.exec(_arg1) == true){
_local2 = (_eppObject as IPlayable);
return (_local2.player.state[_name](_arg1[0]));
};
}
public function seek(_arg1):void{
var _local2:IPlayable = (_eppObject as IPlayable);
if (_local2.player.state.name != EPPPlayerEvent.SEEKING){
_local2.player.dispatchEvent(_event);
};
_local2.player.channel.seek(_arg1);
}
override public function destroy():void{
}
}
}//package com.busfront.epp.controls.player
Section 106
//EPPControlStop (com.busfront.epp.controls.player.EPPControlStop)
package com.busfront.epp.controls.player {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
public class EPPControlStop extends EPPControl implements IStop {
public function EPPControlStop(_arg1:EPPPlayer):void{
super(new EPPPlayerEvent(EPPPlayerEvent.STOP), _arg1);
}
override public function exec(_arg1:Array){
var _local2:IPlayable;
if (super.exec(_arg1) == true){
_local2 = (_eppObject as IPlayable);
return (_local2.player.state[_name]());
};
}
public function stop():void{
var _local1:IPlayable = (_eppObject as IPlayable);
_local1.player.dispatchEvent(_event);
_local1.player.channel.stop();
_local1.player.clearScreens();
}
override public function destroy():void{
}
}
}//package com.busfront.epp.controls.player
Section 107
//EPPCuepoint (com.busfront.epp.controls.player.EPPCuepoint)
package com.busfront.epp.controls.player {
public class EPPCuepoint {
private var _media:IPlayable;
private var _parameters:Object;
private var _time:Number;
private var _name:String;
private var _type:String;
public var _dispatched:Boolean;// = false
public function EPPCuepoint(_arg1:String, _arg2:Number, _arg3:Object, _arg4:String, _arg5:IPlayable){
_name = _arg1;
_time = _arg2;
_parameters = _arg3;
_type = _arg4;
_media = _arg5;
}
public function get parameters():Object{
return (_parameters);
}
public function get name():String{
return (_name);
}
public function get time():Number{
return (_time);
}
public function set time(_arg1:Number):void{
_time = _arg1;
}
public function set parameters(_arg1:Object):void{
_parameters = _arg1;
}
public function get type():String{
return (_type);
}
}
}//package com.busfront.epp.controls.player
Section 108
//EPPPlayer (com.busfront.epp.controls.player.EPPPlayer)
package com.busfront.epp.controls.player {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
import com.busfront.epp.base.screen.*;
import flash.display.*;
import com.busfront.epp.net.stream.*;
import com.busfront.epp.base.media.*;
import com.busfront.epp.net.channel.*;
import com.busfront.epp.base.cache.*;
import com.busfront.epp.display.*;
public class EPPPlayer extends EPPControlGroup implements IPlayer, IPlayerProperty {
protected var _loop:uint;// = 0
protected var _endTime:Number;// = -1
protected var _loopRestart:Boolean;// = false
private var _channel:EPPChannel;
protected var _screens:Array;
protected var _loopCount:uint;// = 0
protected var _startTime:Number;// = 0
private var _cuepoints:Array;
private var _media:IPlayable;
public function EPPPlayer(_arg1:IPlayable):void{
var _local4:EPPState;
_screens = new Array();
_cuepoints = new Array();
var _local2:Array = [EPPPlayerEvent.BUFFERED, EPPPlayerEvent.BUFFERING, EPPPlayerEvent.PAUSED, EPPPlayerEvent.PLAYED, EPPPlayerEvent.PLAYING, EPPPlayerEvent.SEEKING, EPPPlayerEvent.STOPPING, EPPPlayerEvent.STOPPED, EPPPlayerEvent.UNPLAYABLE, EPPPlayerEvent.UNPLAYED, null];
var _local3:Array = [null, null, EPPPlayerEvent.PAUSE, null, EPPPlayerEvent.PLAY, EPPPlayerEvent.SEEK, EPPPlayerEvent.STOP, null, null, EPPPlayerEvent.RATE];
_media = _arg1;
if ((((((_arg1.loader.stateName == EPPLoaderEvent.UNCHECKED)) || ((_arg1.loader.stateName == EPPLoaderEvent.CHECKING)))) || ((_arg1.loader.stateName == EPPLoaderEvent.UNLOADABLE)))){
_local4 = new EPPStateUnplayable(this);
} else {
if (_arg1.loader.stateName == EPPLoaderEvent.LOADED){
_local4 = new EPPStateBuffered(this);
} else {
if ((((_arg1 is EPPMediaOccurence)) && ((_arg1.loader.stateName == EPPLoaderEvent.LOADING)))){
if (EPPMediaOccurence(_arg1).original.player.stateName == EPPPlayerEvent.BUFFERING){
_local4 = new EPPStateBuffering(this);
} else {
_local4 = new EPPStateBuffered(this);
};
} else {
_local4 = new EPPStateUnplayed(this);
};
};
};
super(EPPControlGroupType.PLAYER, (_arg1 as EPPObject), new Array(EPPBindable.TIME, EPPBindable.TIME_REMAINING), _local3, _local4, _local2);
_expectedEvents.push(EPPPlayerEvent.SEEKED, EPPCuePointEvent.CUE_POINT, EPPPlayerEvent.RATED);
_arg1.loader.addEventListener(EPPLoaderEvent.UNLOADED, interuptPlayer, false, 1);
_arg1.loader.addEventListener(EPPLoaderEvent.LOAD, becomeBuffering, false, 1);
_channel = stream.createChannel(_arg1);
createScreen();
this.addEventListener(EPPPlayerEvent.PLAY, addPlayedListeners);
}
public function get stream():EPPStream{
var _local2:EPPMediaOccurence;
var _local3:ICacheable;
var _local1:Boolean;
if ((_media is EPPVideo)){
_local1 = true;
} else {
if ((_media is EPPMediaOccurence)){
_local2 = (_media as EPPMediaOccurence);
if (_local2.original.type == EPPObjectType.VIDEO){
_local1 = true;
};
};
};
if ((((_media is ICacheable)) && ((_local1 == false)))){
_local3 = (_media as ICacheable);
if (_local3.cached === true){
return ((_local3.cache.loader.connection as EPPStream));
};
} else {
if ((_media is EPPMediaOccurence)){
return ((EPPMediaOccurence(_media).loader.connection as EPPStream));
};
};
return ((_media.loader.connection as EPPStream));
}
override public function destroy():void{
clearScreens();
_media.loader.removeEventListener(EPPLoaderEvent.UNLOADED, interuptPlayer);
_media.loader.removeEventListener(EPPLoaderEvent.LOAD, becomeBuffering);
_media.loader.removeEventListener(EPPLoaderEvent.LOADED, waitBuffer);
_media.loader.removeEventListener(EPPLoaderEvent.LOADING, waitBuffer);
_media.loader.addEventListener(EPPLoaderEvent.PRELOADED, checkCuePointsValidity, false, 1);
removeEventListener(EPPPlayerEvent.PLAYING, checkCuePoint);
super.destroy();
}
public function stop():void{
getControlByName(EPPPlayerEvent.STOP).exec(null);
}
public function get cuePoints():Array{
var _local1:uint = _cuepoints.length;
var _local2:Array = new Array();
var _local3:uint;
while (_local3 < _local1) {
_local2.push(_cuepoints[_local3]);
_local3++;
};
return (_local2);
}
public function get screens():Array{
return (_screens);
}
public function get channel():EPPChannel{
return (_channel);
}
public function addCuepoint(_arg1:String, _arg2:Number, _arg3:Object=null, _arg4:String="navigation"):EPPCuepoint{
var _local5:EPPCuepoint;
if (_cuepoints.length == 0){
if (duration == 0){
_media.loader.removeEventListener(EPPLoaderEvent.PRELOADED, checkCuePointsValidity);
_media.loader.addEventListener(EPPLoaderEvent.PRELOADED, checkCuePointsValidity, false, 1);
};
addEventListener(EPPPlayerEvent.PLAYING, checkCuePoint, false, 1);
};
if ((((duration > 0)) && ((((_arg2 < 0)) || ((_arg2 > duration)))))){
} else {
_local5 = new EPPCuepoint(_arg1, _arg2, _arg3, _arg4, _media);
_cuepoints.push(_local5);
};
return (_local5);
}
private function createScreen():void{
var _local4:EPPScreen;
var _local5:EPPMediaOccurence;
var _local1:Boolean;
var _local2:Boolean;
var _local3:Boolean;
if ((_eppObject is EPPVideo)){
_local1 = true;
} else {
if ((_eppObject is EPPMediaOccurence)){
_local5 = (_eppObject as EPPMediaOccurence);
if ((_local5.original is EPPVideo)){
_local1 = true;
};
if ((_local5.original is EPPImage)){
_local2 = true;
};
if ((_local5.original is EPPPlaylist)){
_local3 = true;
};
} else {
if ((_eppObject is EPPMediaCollection)){
_local3 = true;
} else {
if ((_eppObject is EPPAudio)){
} else {
_local2 = true;
};
};
};
};
if (_local1 === true){
_local4 = new EPPScreenVideo(this);
} else {
if (_local3 === true){
_local4 = new EPPScreenMediaCollection(this);
} else {
if (_local2 === true){
_local4 = new EPPScreenBitmap(this);
};
};
};
if (_local4){
_local4.media = (_eppObject as IPlayable);
_screens.push(_local4);
};
}
public function get duration():Number{
if ((end - start) > 0){
return (((end - start) / rate));
};
return (0);
}
private function waitBuffer(_arg1:EPPLoaderEvent):void{
var _local2:EPPChannelVideo;
if (stream.bufferPercent == 100){
if (_channel.channel == null){
channel.createChannel();
};
_local2 = (channel as EPPChannelVideo);
if (_local2 == null){
eppObject.player.setState(eppObject.player.getStateByName(EPPPlayerEvent.BUFFERED));
_arg1.target.removeEventListener(EPPLoaderEvent.LOADING, waitBuffer);
_arg1.target.removeEventListener(EPPLoaderEvent.LOADED, waitBuffer);
};
};
}
public function hasScreenClip(_arg1:DisplayObject):Boolean{
var _local2:Boolean;
var _local3:uint = _screens.length;
var _local4:uint = 1;
while (_local4 < _local3) {
if (_screens[_local4].display === _arg1){
_local2 = true;
break;
};
_local4++;
};
return (_local2);
}
public function removeScreen(_arg1:EPPScreenGeneric):Boolean{
var _local4:Array;
var _local2:uint = _screens.length;
var _local3:uint;
while (_local3 < _local2) {
if (_screens[_local3] == _arg1){
_screens[_local3].clear();
_screens[_local3].destroy();
_local4 = _screens.splice(_local3, 1);
return (true);
};
_local3++;
};
throw (new Error("EPP This screen cannot be removed."));
}
public function get alternativeTime():Number{
if (((stream) && ((stream is EPPStreamVideo)))){
if ((((EPPStreamVideo(stream)._alternativeValue > 0)) && ((time > 0)))){
return ((time - (EPPStreamVideo(stream)._alternativeValue / 1000)));
};
if ((((time == 0)) && ((EPPStreamVideo(stream)._alternativeValue > 0)))){
return ((duration - (EPPStreamVideo(stream)._alternativeValue / 1000)));
};
};
return (time);
}
private function becomeBuffering(_arg1:EPPLoaderEvent):void{
var _local2:EPPChannelVideo = (channel as EPPChannelVideo);
if (_local2 == null){
setState(getStateByName(EPPPlayerEvent.BUFFERING));
};
if ((channel is EPPChannelImage)){
_arg1.currentTarget.addEventListener(EPPLoaderEvent.LOADED, waitBuffer, false, 1);
} else {
_arg1.currentTarget.addEventListener(EPPLoaderEvent.LOADING, waitBuffer, false, 1);
_arg1.currentTarget.addEventListener(EPPLoaderEvent.LOADED, waitBuffer, false, 1);
};
}
private function interuptPlayer(_arg1:EPPLoaderEvent):void{
if (stateName != EPPPlayerEvent.UNPLAYED){
clearScreens();
channel.clear();
setState(getStateByName(EPPPlayerEvent.UNPLAYED));
};
}
private function checkCuePointsValidity(_arg1:EPPLoaderEvent):void{
if (_arg1 != null){
_media.loader.removeEventListener(EPPLoaderEvent.PRELOADED, checkCuePointsValidity);
};
var _local2:uint = _cuepoints.length;
var _local3:uint;
while (_local3 < _local2) {
if ((((_cuepoints[_local3].time < 0)) || ((_cuepoints[_local3].time > duration)))){
removeCuePoint(_cuepoints[_local3]);
checkCuePointsValidity(null);
break;
};
_local3++;
};
}
protected function buffering():EPPState{
return (new EPPStateBuffering(this));
}
public function get loop():int{
return (_loop);
}
protected function seekBuilder():EPPControl{
return (new EPPControlSeek(this));
}
public function get timeRemaining():Number{
if (time <= duration){
return ((duration - time));
};
return (0);
}
protected function rateBuilder():EPPControl{
return (new EPPControlRate(this));
}
private function isPlayed(_arg1:EPPPlayerEvent):void{
var _local2:IPlayableCollection;
var _local3:Boolean;
var _local4:EPPMediaCollection;
if ((this._media is IPlayableCollection)){
_local2 = (this._media as IPlayableCollection);
_local3 = false;
if ((_local2.parent is EPPCollectionLibrary)){
_local4 = (_local2.parent as EPPMediaCollection);
if (_local4.player.stateName == EPPPlayerEvent.UNPLAYED){
_local3 = true;
};
};
if ((((_local2.player.loop > 0)) && ((_local3 == true)))){
if (_loopCount < _local2.player.loop){
_loopRestart = true;
play(0);
_loopRestart = false;
_loopCount = (_loopCount + 1);
};
};
} else {
if (loop > 0){
if (loopCount < loop){
_loopRestart = true;
play(0);
_loopRestart = false;
_loopCount = (loopCount + 1);
};
} else {
if (loop == -1){
_loopRestart = true;
play(0);
_loopRestart = false;
_loopCount = (loopCount + 1);
};
};
};
}
public function hasScreen(_arg1:EPPScreen):Boolean{
var _local2:Boolean;
var _local3:uint = _screens.length;
var _local4:uint;
while (_local4 < _local3) {
if (_screens[_local4] === _arg1){
_local2 = true;
break;
};
_local4++;
};
return (_local2);
}
override public function buildControl(_arg1:String):EPPControl{
return (this[(_arg1 + "Builder")]());
}
protected function paused():EPPState{
return (new EPPStatePaused(this));
}
public function set end(_arg1:Number):void{
if (_arg1 < _startTime){
throw (new Error("[EPP] end time must be bigger than start time."));
};
_endTime = _arg1;
}
protected function stopBuilder():EPPControl{
return (new EPPControlStop(this));
}
public function play(... _args):void{
getControlByName(EPPPlayerEvent.PLAY).exec(_args);
if ((((_loopRestart == false)) && ((time == 0)))){
_loopCount = 0;
};
}
protected function unplayable():EPPState{
return (new EPPStateUnplayable(this));
}
public function set rate(_arg1):void{
getControlByName(EPPPlayerEvent.RATE).exec([_arg1]);
}
public function removeCuePoint(_arg1:EPPCuepoint):void{
var _local2:uint = _cuepoints.length;
var _local3:uint;
while (_local3 < _local2) {
if (_cuepoints[_local3] == _arg1){
_cuepoints.splice(_local3, 1);
break;
};
_local3++;
};
if (_cuepoints.length == 0){
removeEventListener(EPPPlayerEvent.PLAYING, checkCuePoint);
_media.loader.removeEventListener(EPPLoaderEvent.PRELOADED, checkCuePointsValidity);
_media.loader.addEventListener(EPPLoaderEvent.PRELOADED, checkCuePointsValidity, false, 1);
};
}
override public function buildState(_arg1:String):EPPState{
return (this[_arg1]());
}
private function checkCuePoint(_arg1:EPPPlayerEvent):void{
var _local2:uint = _cuepoints.length;
var _local3:uint;
while (_local3 < _local2) {
if (time < _cuepoints[_local3].time){
_cuepoints[_local3]._dispatched = false;
};
if (time >= _cuepoints[_local3].time){
if (_cuepoints[_local3]._dispatched === false){
_cuepoints[_local3]._dispatched = true;
dispatchEvent(new EPPCuePointEvent(EPPCuePointEvent.CUE_POINT, _cuepoints[_local3]));
break;
};
};
_local3++;
};
}
protected function playing():EPPState{
return (new EPPStatePlaying(this));
}
private function addPlayedListeners(_arg1:EPPPlayerEvent):void{
removeEventListener(EPPPlayerEvent.PLAYED, isPlayed);
addEventListener(EPPPlayerEvent.PLAYED, isPlayed, false, 1);
}
public function get time():Number{
if (((channel) && (((channel.time - start) > 0)))){
return ((channel.time - start));
};
return (0);
}
protected function unplayed():EPPState{
return (new EPPStateUnplayed(this));
}
public function set loop(_arg1:int):void{
_loop = _arg1;
}
public function get alternativeTimeTotal():Number{
if (((stream) && ((stream is EPPStreamVideo)))){
if (EPPStreamVideo(stream)._alternativeValue > 0){
return ((duration - (EPPStreamVideo(stream)._alternativeValue / 1000)));
};
};
return (duration);
}
public function get loopCount():int{
return (_loopCount);
}
public function set start(_arg1:Number):void{
if (_arg1 < 0){
throw (new Error("[EPP] end time must be bigger than start time."));
};
_startTime = _arg1;
}
protected function playBuilder():EPPControl{
return (new EPPControlPlay(this));
}
public function get end():Number{
if (_endTime == -1){
return (stream.duration);
};
return (_endTime);
}
protected function pauseBuilder():EPPControl{
return (new EPPControlPause(this));
}
protected function buffered():EPPState{
return (new EPPStateBuffered(this));
}
public function get rate():Number{
return (channel.rate);
}
public function getScreen(_arg1:DisplayObject):EPPScreen{
var _local2:uint = _screens.length;
var _local3:uint;
while (_local3 < _local2) {
if (_screens[_local3].display == _arg1){
return (_screens[_local3]);
};
_local3++;
};
return (null);
}
protected function played():EPPState{
return (new EPPStatePlayed(this));
}
public function addScreen(_arg1:DisplayObject, _arg2:EPPScreenScale=null):EPPScreenGeneric{
if ((_eppObject is EPPAudio)){
return (null);
};
if ((((_eppObject is EPPMediaOccurence)) && ((EPPMediaOccurence(_eppObject).original.type == EPPObjectType.AUDIO)))){
return (null);
};
if (hasScreenClip(_arg1) === true){
throw (new Error((("EPP This screen clip " + _arg1) + " is allready defined for this media.")));
};
var _local3:DisplayObjectContainer = (_arg1 as DisplayObjectContainer);
if (_local3 == null){
throw (new Error("EPP the display object must be a DisplayObjectContainer."));
};
var _local4:EPPScreenGeneric = new EPPScreenGeneric(this, _local3, _arg2);
_local4.media = (_eppObject as IPlayable);
_screens.push(_local4);
_local4.refreshScreen();
return (_local4);
}
protected function stopped():EPPState{
return (new EPPStateStopped(this));
}
public function get start():Number{
return (_startTime);
}
public function pause():void{
getControlByName(EPPPlayerEvent.PAUSE).exec(null);
}
public function seek(_arg1):void{
var _local2:Array = new Array();
_local2.push(_arg1);
getControlByName(EPPPlayerEvent.SEEK).exec(_local2);
}
protected function seeking():EPPState{
return (new EPPStateSeeking(this));
}
public function clearScreens():void{
var _local1:uint = _screens.length;
var _local2:uint;
while (_local2 < _local1) {
_screens[_local2].clear();
_local2++;
};
}
protected function stopping():EPPState{
return (new EPPStateStopping(this));
}
public function notifyScreens():void{
var _local1:uint = _screens.length;
var _local2:uint;
while (_local2 < _local1) {
_screens[_local2].attachStream();
_local2++;
};
}
}
}//package com.busfront.epp.controls.player
Section 109
//EPPPlayerCollection (com.busfront.epp.controls.player.EPPPlayerCollection)
package com.busfront.epp.controls.player {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.base.media.*;
import com.busfront.epp.net.channel.*;
public final class EPPPlayerCollection extends EPPPlayer implements IPlayerCollectionProperty {
protected var _currentChild:uint;// = 0
protected var _continuousPlayEnabled:Boolean;// = true
protected var _randomPlayEnabled:Boolean;// = false
private var _collection:EPPMediaCollection;
public function EPPPlayerCollection(_arg1:EPPMediaCollection){
super(_arg1);
this.authorizedControls.push(EPPPlayerCollectionEvent.JUMP_TO_NEXT);
this.authorizedStates.push(null);
this.authorizedControls.push(EPPPlayerCollectionEvent.JUMP_TO_PREVIOUS);
this.authorizedStates.push(null);
_expectedEvents.push(EPPPlayerCollectionEvent.JUMP_TO_NEXT, EPPPlayerCollectionEvent.JUMP_TO_PREVIOUS, EPPPlayerCollectionEvent.CURRENT_CHANGE);
_collection = _arg1;
}
public function set continuousPlayEnabled(_arg1:Boolean):void{
_continuousPlayEnabled = _arg1;
}
public function set currentChild(_arg1:uint):void{
var _local3:uint;
var _local4:uint;
var _local5:uint;
if ((((state.name == EPPPlayerEvent.UNPLAYED)) || ((state.name == EPPPlayerEvent.UNPLAYABLE)))){
_currentChild = _arg1;
return;
};
if (currentChild != null){
if (_currentChild == _arg1){
return;
};
};
if (_collection.getChildAt(_arg1).loader.state.name == EPPLoaderEvent.UNLOADABLE){
if (_arg1 > _currentChild){
currentChild = (_arg1 + 1);
} else {
currentChild = (_arg1 - 1);
};
return;
};
if (currentChild == null){
return;
};
if (_arg1 == _collection.firstValidChildIndex){
getControlByName(EPPPlayerCollectionEvent.JUMP_TO_PREVIOUS).lock();
} else {
if (getControlByName(EPPPlayerCollectionEvent.JUMP_TO_PREVIOUS).locked == true){
getControlByName(EPPPlayerCollectionEvent.JUMP_TO_PREVIOUS).unlock();
};
};
if (_arg1 == _collection.lastValidChildIndex){
getControlByName(EPPPlayerCollectionEvent.JUMP_TO_NEXT).lock();
} else {
if (getControlByName(EPPPlayerCollectionEvent.JUMP_TO_NEXT).locked == true){
getControlByName(EPPPlayerCollectionEvent.JUMP_TO_NEXT).unlock();
};
};
if (continuousPlayEnabled == true){
_local3 = 0;
while (_local3 < length) {
_collection.getChildAt(_local3).player.removeEventListener(EPPPlayerEvent.PLAYED, EPPChannelCollection(_collection.player.channel).playedItem);
_local3++;
};
};
if (_arg1 > currentChild.order){
_local4 = currentChild.order;
while (_local4 < _arg1) {
if (_collection.getChildAt(_local4).player.state.name != EPPPlayerEvent.PLAYED){
_collection.getChildAt(_local4).player.channel._dontChangeState = false;
_collection.getChildAt(_local4).player.seek(_collection.getChildAt(_local4).player.duration);
};
_local4++;
};
} else {
if (_arg1 < currentChild.order){
_local5 = (_collection.length - 1);
while (_local5 > _arg1) {
_collection.getChildAt(_local5).player.pause();
_collection.getChildAt(_local5).player.channel._lastState = _collection.getChildAt(_local5).player.getStateByName(EPPPlayerEvent.PAUSED);
_collection.getChildAt(_local5).player.channel._dontChangeState = false;
_collection.getChildAt(_local5).player.seek(0);
_local5--;
};
};
};
var _local2:EPPPlayerCollectionEvent = new EPPPlayerCollectionEvent(EPPPlayerCollectionEvent.CURRENT_CHANGE);
_local2.previousChildIndex = _currentChild;
clearScreens();
_currentChild = _arg1;
if (continuousPlayEnabled == true){
currentChild.player.addEventListener(EPPPlayerEvent.PLAYED, EPPChannelCollection(_collection.player.channel).playedItem, false, 1);
};
dispatchEvent(_local2);
clearScreens();
notifyScreens();
}
override public function buildControl(_arg1:String):EPPControl{
return (this[(_arg1 + "Builder")]());
}
public function set randomPlayEnabled(_arg1:Boolean):void{
_randomPlayEnabled = _arg1;
}
private function jumpToPreviousBuilder():EPPControl{
return (new EPPControlJumpToPrevious(this));
}
public function get continuousPlayEnabled():Boolean{
return (_continuousPlayEnabled);
}
public function jumpToPrevious():void{
getControlByName(EPPPlayerCollectionEvent.JUMP_TO_PREVIOUS).exec(null);
}
public function get currentChild(){
if (length == 0){
throw (new Error("[EPP] Playable Collection is empty do current child available for the moment."));
};
return (_eppObject._key::_children[_currentChild]);
}
public function get realChild(){
if (length == 0){
throw (new Error("[EPP] Playable Collection is empty do current child available for the moment."));
};
if ((currentChild is EPPPlaylist)){
return (EPPPlaylist(currentChild).playerCollection.realChild);
};
return (currentChild);
}
private function jumpToNextBuilder():EPPControl{
return (new EPPControlJumpToNext(this));
}
public function get currentIndex():uint{
return (_currentChild);
}
public function get randomPlayEnabled():Boolean{
return (_randomPlayEnabled);
}
public function jumpToNext():void{
getControlByName(EPPPlayerCollectionEvent.JUMP_TO_NEXT).exec(null);
}
}
}//package com.busfront.epp.controls.player
Section 110
//EPPStateBuffered (com.busfront.epp.controls.player.EPPStateBuffered)
package com.busfront.epp.controls.player {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
public class EPPStateBuffered extends EPPState implements IPlayer {
public function EPPStateBuffered(_arg1:EPPControlGroup):void{
super(new EPPPlayerEvent(EPPPlayerEvent.BUFFERED), _arg1);
}
public function set rate(_arg1):void{
var _local2:EPPControlRate = (_controlCollection.getControlByName(EPPPlayerEvent.RATE) as EPPControlRate);
_local2.rate = _arg1;
}
public function stop():void{
}
public function refreshCollectionState():void{
}
public function play(... _args):void{
var _local2:EPPControlPlay = (_controlCollection.getControlByName(EPPPlayerEvent.PLAY) as EPPControlPlay);
_local2.play(_args[0]);
}
public function pause():void{
}
public function seek(_arg1):void{
var _local2:EPPControlSeek = (_controlCollection.getControlByName(EPPPlayerEvent.SEEK) as EPPControlSeek);
_local2.seek(_arg1);
}
override public function setLocker():void{
if (_controlCollection.getControlByName(EPPPlayerEvent.PLAY, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.PLAY).unlock();
};
if (_controlCollection.getControlByName(EPPPlayerEvent.PAUSE, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.PAUSE).lock();
};
if (_controlCollection.getControlByName(EPPPlayerEvent.STOP, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.STOP).lock();
};
if (_controlCollection.getControlByName(EPPPlayerEvent.SEEK, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.SEEK).unlock();
};
}
}
}//package com.busfront.epp.controls.player
Section 111
//EPPStateBuffering (com.busfront.epp.controls.player.EPPStateBuffering)
package com.busfront.epp.controls.player {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
public class EPPStateBuffering extends EPPState implements IPlayer {
private var _playArgs:Number;
public function EPPStateBuffering(_arg1:EPPControlGroup):void{
super(new EPPPlayerEvent(EPPPlayerEvent.BUFFERING), _arg1);
}
override public function setLocker():void{
if (_controlCollection.getControlByName(EPPPlayerEvent.PLAY, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.PLAY).unlock();
};
if (_controlCollection.getControlByName(EPPPlayerEvent.PAUSE, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.PAUSE).unlock();
};
if (_controlCollection.getControlByName(EPPPlayerEvent.STOP, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.STOP).lock();
};
if (_controlCollection.getControlByName(EPPPlayerEvent.SEEK, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.SEEK).lock();
};
}
public function stop():void{
}
private function callBackBuffered(_arg1:EPPPlayerEvent):void{
_controlCollection.removeEventListener(EPPPlayerEvent.BUFFERED, callBackBuffered);
var _local2:EPPControlPlay = (_controlCollection.getControlByName(EPPPlayerEvent.PLAY) as EPPControlPlay);
if (_playArgs){
_local2.play(_playArgs);
return;
};
_local2.play();
}
public function seek(_arg1):void{
var _local2:EPPControlSeek = (_controlCollection.getControlByName(EPPPlayerEvent.SEEK) as EPPControlSeek);
_local2.seek(_arg1);
}
override public function destroyInternalListeners():void{
_controlCollection.removeEventListener(EPPPlayerEvent.BUFFERED, callBackBuffered);
}
public function play(... _args):void{
covered = true;
_playArgs = _args[0];
_controlCollection.removeEventListener(EPPPlayerEvent.BUFFERED, callBackBuffered);
_controlCollection.addEventListener(EPPPlayerEvent.BUFFERED, callBackBuffered, false, 1);
}
public function pause():void{
var _local1:EPPControlPause = (_controlCollection.getControlByName(EPPPlayerEvent.PAUSE) as EPPControlPause);
_local1.pause();
}
public function refreshCollectionState():void{
}
}
}//package com.busfront.epp.controls.player
Section 112
//EPPStatePaused (com.busfront.epp.controls.player.EPPStatePaused)
package com.busfront.epp.controls.player {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
public class EPPStatePaused extends EPPState implements IPlayer {
public function EPPStatePaused(_arg1:EPPControlGroup):void{
super(new EPPPlayerEvent(EPPPlayerEvent.PAUSED), _arg1);
}
public function set rate(_arg1):void{
var _local2:EPPControlRate = (_controlCollection.getControlByName(EPPPlayerEvent.RATE) as EPPControlRate);
_local2.rate = _arg1;
}
public function stop():void{
var _local1:EPPControlStop = (_controlCollection.getControlByName(EPPPlayerEvent.STOP) as EPPControlStop);
_local1.stop();
}
public function play(... _args):void{
var _local2:EPPControlPlay = (_controlCollection.getControlByName(EPPPlayerEvent.PLAY) as EPPControlPlay);
_local2.play(_args[0]);
}
public function pause():void{
}
public function refreshCollectionState():void{
}
override public function setLocker():void{
if (_controlCollection.getControlByName(EPPPlayerEvent.PLAY, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.PLAY).unlock();
};
if (_controlCollection.getControlByName(EPPPlayerEvent.PAUSE, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.PAUSE).lock();
};
if (_controlCollection.getControlByName(EPPPlayerEvent.STOP, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.STOP).unlock();
};
if (_controlCollection.getControlByName(EPPPlayerEvent.SEEK, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.SEEK).unlock();
};
}
public function seek(_arg1):void{
var _local2:EPPControlSeek = (_controlCollection.getControlByName(EPPPlayerEvent.SEEK) as EPPControlSeek);
_local2.seek(_arg1);
}
}
}//package com.busfront.epp.controls.player
Section 113
//EPPStatePlayed (com.busfront.epp.controls.player.EPPStatePlayed)
package com.busfront.epp.controls.player {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
public class EPPStatePlayed extends EPPState implements IPlayer {
public function EPPStatePlayed(_arg1:EPPControlGroup):void{
super(new EPPPlayerEvent(EPPPlayerEvent.PLAYED), _arg1);
}
public function set rate(_arg1):void{
var _local2:EPPControlRate = (_controlCollection.getControlByName(EPPPlayerEvent.RATE) as EPPControlRate);
_local2.rate = _arg1;
}
public function stop():void{
var _local1:EPPControlStop = (_controlCollection.getControlByName(EPPPlayerEvent.STOP) as EPPControlStop);
_local1.stop();
}
public function play(... _args):void{
var _local2:Number = 0;
if (_args[0] != ""){
if (_args.length > 0){
_local2 = _args[0];
};
};
var _local3:EPPControlPlay = (_controlCollection.getControlByName(EPPPlayerEvent.PLAY) as EPPControlPlay);
_local3.play(_local2);
}
public function refreshCollectionState():void{
}
override public function setLocker():void{
if (_controlCollection.getControlByName(EPPPlayerEvent.PLAY, false) != null){
trace("unlock play");
_controlCollection.getControlByName(EPPPlayerEvent.PLAY).unlock();
};
if (_controlCollection.getControlByName(EPPPlayerEvent.PAUSE, false) != null){
trace("lock pause");
_controlCollection.getControlByName(EPPPlayerEvent.PAUSE).lock();
};
if (_controlCollection.getControlByName(EPPPlayerEvent.STOP, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.STOP).unlock();
};
if (_controlCollection.getControlByName(EPPPlayerEvent.SEEK, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.SEEK).unlock();
};
}
public function pause():void{
}
public function seek(_arg1):void{
var _local2:EPPControlSeek = (_controlCollection.getControlByName(EPPPlayerEvent.SEEK) as EPPControlSeek);
_local2.seek(_arg1);
}
}
}//package com.busfront.epp.controls.player
Section 114
//EPPStatePlaying (com.busfront.epp.controls.player.EPPStatePlaying)
package com.busfront.epp.controls.player {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
public class EPPStatePlaying extends EPPState implements IPlayer {
public function EPPStatePlaying(_arg1:EPPControlGroup):void{
super(new EPPPlayerEvent(EPPPlayerEvent.PLAYING), _arg1);
}
public function set rate(_arg1):void{
var _local2:EPPControlRate = (_controlCollection.getControlByName(EPPPlayerEvent.RATE) as EPPControlRate);
_local2.rate = _arg1;
}
public function stop():void{
var _local1:EPPControlStop = (_controlCollection.getControlByName(EPPPlayerEvent.STOP) as EPPControlStop);
_local1.stop();
}
public function play(... _args):void{
}
public function refreshCollectionState():void{
}
override public function setLocker():void{
if (_controlCollection.getControlByName(EPPPlayerEvent.PLAY, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.PLAY).lock();
};
if (_controlCollection.getControlByName(EPPPlayerEvent.PAUSE, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.PAUSE).unlock();
};
if (_controlCollection.getControlByName(EPPPlayerEvent.STOP, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.STOP).unlock();
};
if (_controlCollection.getControlByName(EPPPlayerEvent.SEEK, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.SEEK).unlock();
};
}
public function pause():void{
var _local1:EPPControlPause = (_controlCollection.getControlByName(EPPPlayerEvent.PAUSE) as EPPControlPause);
_local1.pause();
}
public function seek(_arg1):void{
var _local2:EPPControlSeek = (_controlCollection.getControlByName(EPPPlayerEvent.SEEK) as EPPControlSeek);
_local2.seek(_arg1);
}
}
}//package com.busfront.epp.controls.player
Section 115
//EPPStateSeeking (com.busfront.epp.controls.player.EPPStateSeeking)
package com.busfront.epp.controls.player {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
public class EPPStateSeeking extends EPPState implements IPlayer {
public function EPPStateSeeking(_arg1:EPPControlGroup):void{
super(new EPPPlayerEvent(EPPPlayerEvent.SEEKING), _arg1);
}
public function stop():void{
}
public function play(... _args):void{
}
public function refreshCollectionState():void{
}
public function seek(_arg1):void{
var _local2:EPPControlSeek = (_controlCollection.getControlByName(EPPPlayerEvent.SEEK) as EPPControlSeek);
_local2.seek(_arg1);
}
override public function setLocker():void{
if (_controlCollection.getControlByName(EPPPlayerEvent.PLAY, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.PLAY).lock();
};
if (_controlCollection.getControlByName(EPPPlayerEvent.PAUSE, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.PAUSE).lock();
};
if (_controlCollection.getControlByName(EPPPlayerEvent.STOP, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.STOP).lock();
};
if (_controlCollection.getControlByName(EPPPlayerEvent.SEEK, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.SEEK).unlock();
};
}
public function pause():void{
}
}
}//package com.busfront.epp.controls.player
Section 116
//EPPStateStopped (com.busfront.epp.controls.player.EPPStateStopped)
package com.busfront.epp.controls.player {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
public class EPPStateStopped extends EPPState implements IPlayer {
public function EPPStateStopped(_arg1:EPPControlGroup):void{
super(new EPPPlayerEvent(EPPPlayerEvent.STOPPED), _arg1);
}
public function set rate(_arg1):void{
var _local2:EPPControlRate = (_controlCollection.getControlByName(EPPPlayerEvent.RATE) as EPPControlRate);
_local2.rate = _arg1;
}
public function stop():void{
var _local1:EPPControlStop = (_controlCollection.getControlByName(EPPPlayerEvent.STOP) as EPPControlStop);
_local1.stop();
}
public function play(... _args):void{
var _local2:EPPControlPlay = (_controlCollection.getControlByName(EPPPlayerEvent.PLAY) as EPPControlPlay);
_local2.play(_args[0]);
}
public function pause():void{
}
public function seek(_arg1):void{
var _local2:EPPControlSeek = (_controlCollection.getControlByName(EPPPlayerEvent.SEEK) as EPPControlSeek);
_local2.seek(_arg1);
}
override public function setLocker():void{
if (_controlCollection.getControlByName(EPPPlayerEvent.PLAY, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.PLAY).unlock();
};
if (_controlCollection.getControlByName(EPPPlayerEvent.PAUSE, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.PAUSE).lock();
};
if (_controlCollection.getControlByName(EPPPlayerEvent.STOP, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.STOP).lock();
};
if (_controlCollection.getControlByName(EPPPlayerEvent.SEEK, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.SEEK).unlock();
};
}
public function refreshCollectionState():void{
}
}
}//package com.busfront.epp.controls.player
Section 117
//EPPStateStopping (com.busfront.epp.controls.player.EPPStateStopping)
package com.busfront.epp.controls.player {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
public class EPPStateStopping extends EPPState implements IPlayer {
private var _stockedArgSeek:Number;
private var _stockedArgs:Array;
public function EPPStateStopping(_arg1:EPPControlGroup):void{
super(new EPPPlayerEvent(EPPPlayerEvent.STOPPING), _arg1);
}
override public function setLocker():void{
if (_controlCollection.getControlByName(EPPPlayerEvent.PLAY, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.PLAY).unlock();
};
if (_controlCollection.getControlByName(EPPPlayerEvent.PAUSE, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.PAUSE).lock();
};
if (_controlCollection.getControlByName(EPPPlayerEvent.STOP, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.STOP).lock();
};
if (_controlCollection.getControlByName(EPPPlayerEvent.SEEK, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.SEEK).unlock();
};
}
public function stop():void{
}
public function seek(_arg1):void{
_stockedArgSeek = _arg1;
_controlCollection.removeEventListener(EPPPlayerEvent.STOPPED, reportPlay);
_controlCollection.removeEventListener(EPPPlayerEvent.STOPPED, reportSeek);
_controlCollection.addEventListener(EPPPlayerEvent.STOPPED, reportSeek);
}
private function reportPlay(_arg1:EPPPlayerEvent):void{
_controlCollection.removeEventListener(EPPPlayerEvent.STOPPED, reportPlay);
var _local2:EPPControlPlay = (_controlCollection.getControlByName(EPPPlayerEvent.PLAY) as EPPControlPlay);
if (_stockedArgs[0]){
_local2.play(_stockedArgs[0]);
return;
};
_local2.play();
}
private function reportSeek(_arg1:EPPPlayerEvent):void{
_controlCollection.removeEventListener(EPPPlayerEvent.STOPPED, reportSeek);
var _local2:EPPControlSeek = (_controlCollection.getControlByName(EPPPlayerEvent.SEEK) as EPPControlSeek);
_local2.seek(_stockedArgSeek);
}
public function play(... _args):void{
_stockedArgs = _args;
_controlCollection.removeEventListener(EPPPlayerEvent.STOPPED, reportPlay);
_controlCollection.removeEventListener(EPPPlayerEvent.STOPPED, reportSeek);
_controlCollection.addEventListener(EPPPlayerEvent.STOPPED, reportPlay);
}
public function pause():void{
}
public function refreshCollectionState():void{
}
}
}//package com.busfront.epp.controls.player
Section 118
//EPPStateUnplayable (com.busfront.epp.controls.player.EPPStateUnplayable)
package com.busfront.epp.controls.player {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
public class EPPStateUnplayable extends EPPState implements IPlayer {
private var _playArgs:Number;
public function EPPStateUnplayable(_arg1:EPPControlGroup):void{
super(new EPPPlayerEvent(EPPPlayerEvent.UNPLAYABLE), _arg1);
}
override public function setLocker():void{
if (_controlCollection.getControlByName(EPPPlayerEvent.PLAY, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.PLAY).lock();
};
if (_controlCollection.getControlByName(EPPPlayerEvent.PAUSE, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.PAUSE).lock();
};
if (_controlCollection.getControlByName(EPPPlayerEvent.STOP, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.STOP).lock();
};
if (_controlCollection.getControlByName(EPPPlayerEvent.SEEK, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.SEEK).lock();
};
}
public function stop():void{
_controlCollection.removeEventListener(EPPPlayerEvent.UNPLAYED, restartPlay);
}
private function restartPlay(_arg1:EPPPlayerEvent):void{
_controlCollection.removeEventListener(EPPPlayerEvent.UNPLAYED, restartPlay);
var _local2:EPPPlayer = (_controlCollection as EPPPlayer);
_local2.play(_playArgs);
}
public function set rate(_arg1):void{
var _local2:EPPControlRate = (_controlCollection.getControlByName(EPPPlayerEvent.RATE) as EPPControlRate);
_local2.rate = _arg1;
}
public function play(... _args):void{
covered = true;
_playArgs = _args[0];
_controlCollection.addEventListener(EPPPlayerEvent.UNPLAYED, restartPlay);
}
public function pause():void{
_controlCollection.removeEventListener(EPPPlayerEvent.UNPLAYED, restartPlay);
}
public function refreshCollectionState():void{
}
public function seek(_arg1):void{
}
}
}//package com.busfront.epp.controls.player
Section 119
//EPPStateUnplayed (com.busfront.epp.controls.player.EPPStateUnplayed)
package com.busfront.epp.controls.player {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.controls.loader.*;
public class EPPStateUnplayed extends EPPState implements IPlayer {
private var _stockArgs:Array;
public function EPPStateUnplayed(_arg1:EPPControlGroup):void{
super(new EPPPlayerEvent(EPPPlayerEvent.UNPLAYED), _arg1);
}
public function set rate(_arg1):void{
var _local2:EPPControlRate = (_controlCollection.getControlByName(EPPPlayerEvent.RATE) as EPPControlRate);
_local2.rate = _arg1;
}
public function stop():void{
}
public function play(... _args):void{
covered = true;
_controlCollection.removeEventListener(EPPPlayerEvent.BUFFERED, callBackload);
_controlCollection.addEventListener(EPPPlayerEvent.BUFFERED, callBackload, false, 1);
var _local2:ILoadable = (_controlCollection.eppObject as ILoadable);
_stockArgs = _args;
_local2.loader.load();
}
public function callBackSeek(_arg1:EPPPlayerEvent):void{
_controlCollection.removeEventListener(EPPPlayerEvent.BUFFERED, callBackload);
_controlCollection.removeEventListener(EPPPlayerEvent.BUFFERED, callBackSeek);
var _local2:EPPPlayer = (_controlCollection as EPPPlayer);
_local2.seek(_stockArgs[0]);
}
public function seek(_arg1):void{
covered = true;
_controlCollection.removeEventListener(EPPPlayerEvent.BUFFERED, callBackSeek);
_controlCollection.addEventListener(EPPPlayerEvent.BUFFERED, callBackSeek, false, 1);
var _local3:ILoadable = (_controlCollection.eppObject as ILoadable);
_stockArgs = arguments;
_local3.loader.load();
}
public function callBackload(_arg1:EPPPlayerEvent):void{
_controlCollection.removeEventListener(EPPPlayerEvent.BUFFERED, callBackSeek);
_controlCollection.removeEventListener(EPPPlayerEvent.BUFFERED, callBackload);
var _local2:EPPPlayer = (_controlCollection as EPPPlayer);
if (_stockArgs[0] != ""){
if (_stockArgs.length > 0){
_local2.play(Number(_stockArgs[0]));
return;
};
};
_local2.play();
}
override public function destroyInternalListeners():void{
_controlCollection.removeEventListener(EPPPlayerEvent.BUFFERED, callBackload);
_controlCollection.removeEventListener(EPPPlayerEvent.BUFFERED, callBackSeek);
}
public function pause():void{
}
override public function setLocker():void{
if (_controlCollection.getControlByName(EPPPlayerEvent.PLAY, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.PLAY).unlock();
};
if (_controlCollection.getControlByName(EPPPlayerEvent.PAUSE, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.PAUSE).lock();
};
if (_controlCollection.getControlByName(EPPPlayerEvent.STOP, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.STOP).lock();
};
if (_controlCollection.getControlByName(EPPPlayerEvent.SEEK, false) != null){
_controlCollection.getControlByName(EPPPlayerEvent.SEEK).unlock();
};
}
public function refreshCollectionState():void{
}
}
}//package com.busfront.epp.controls.player
Section 120
//IJump (com.busfront.epp.controls.player.IJump)
package com.busfront.epp.controls.player {
import com.busfront.epp.controls.*;
import com.busfront.epp.controls.player.*;
interface IJump extends IControlObserver {
function jump():void;
}
}//package com.busfront.epp.controls.player
Section 121
//IPause (com.busfront.epp.controls.player.IPause)
package com.busfront.epp.controls.player {
import com.busfront.epp.controls.*;
import com.busfront.epp.controls.player.*;
interface IPause extends IControlObserver {
function pause():void;
}
}//package com.busfront.epp.controls.player
Section 122
//IPlay (com.busfront.epp.controls.player.IPlay)
package com.busfront.epp.controls.player {
import com.busfront.epp.controls.*;
import com.busfront.epp.controls.player.*;
interface IPlay extends IControlObserver {
function play(... _args):void;
}
}//package com.busfront.epp.controls.player
Section 123
//IPlayable (com.busfront.epp.controls.player.IPlayable)
package com.busfront.epp.controls.player {
import com.busfront.epp.controls.loader.*;
public interface IPlayable extends ILoadable {
function get player():EPPPlayer;
}
}//package com.busfront.epp.controls.player
Section 124
//IPlayableCollection (com.busfront.epp.controls.player.IPlayableCollection)
package com.busfront.epp.controls.player {
import com.busfront.epp.controls.mixer.*;
public interface IPlayableCollection extends IMixable {
function get playerCollection():EPPPlayerCollection;
}
}//package com.busfront.epp.controls.player
Section 125
//IPlayer (com.busfront.epp.controls.player.IPlayer)
package com.busfront.epp.controls.player {
import com.busfront.epp.controls.*;
public interface IPlayer extends IControlObserver {
function stop():void;
function play(... _args):void;
function pause():void;
function seek(_arg1):void;
function refreshCollectionState():void;
}
}//package com.busfront.epp.controls.player
Section 126
//IPlayerCollectionProperty (com.busfront.epp.controls.player.IPlayerCollectionProperty)
package com.busfront.epp.controls.player {
public interface IPlayerCollectionProperty extends IPlayerProperty {
function jumpToPrevious():void;
function get currentChild();
function set randomPlayEnabled(_arg1:Boolean):void;
function set currentChild(_arg1:uint):void;
function get currentIndex():uint;
function get randomPlayEnabled():Boolean;
function set continuousPlayEnabled(_arg1:Boolean):void;
function jumpToNext():void;
function get continuousPlayEnabled():Boolean;
}
}//package com.busfront.epp.controls.player
Section 127
//IPlayerProperty (com.busfront.epp.controls.player.IPlayerProperty)
package com.busfront.epp.controls.player {
import com.busfront.epp.base.screen.*;
import flash.display.*;
public interface IPlayerProperty {
function get rate():Number;
function removeCuePoint(_arg1:EPPCuepoint):void;
function get start():Number;
function get loop():int;
function get cuePoints():Array;
function hasScreen(_arg1:EPPScreen):Boolean;
function set rate(_arg1):void;
function set loop(_arg1:int):void;
function getScreen(_arg1:DisplayObject):EPPScreen;
function get loopCount():int;
function addScreen(_arg1:DisplayObject, _arg2:EPPScreenScale=null):EPPScreenGeneric;
function get timeRemaining():Number;
function set start(_arg1:Number):void;
function get duration():Number;
function set end(_arg1:Number):void;
function get end():Number;
function get time():Number;
function hasScreenClip(_arg1:DisplayObject):Boolean;
function addCuepoint(_arg1:String, _arg2:Number, _arg3:Object=null, _arg4:String="navigation"):EPPCuepoint;
}
}//package com.busfront.epp.controls.player
Section 128
//IRate (com.busfront.epp.controls.player.IRate)
package com.busfront.epp.controls.player {
import com.busfront.epp.controls.*;
import com.busfront.epp.controls.player.*;
interface IRate extends IControlObserver {
function set rate(_arg1):void;
}
}//package com.busfront.epp.controls.player
Section 129
//ISeek (com.busfront.epp.controls.player.ISeek)
package com.busfront.epp.controls.player {
import com.busfront.epp.controls.*;
import com.busfront.epp.controls.player.*;
interface ISeek extends IControlObserver {
function seek(_arg1):void;
}
}//package com.busfront.epp.controls.player
Section 130
//IStop (com.busfront.epp.controls.player.IStop)
package com.busfront.epp.controls.player {
import com.busfront.epp.controls.*;
import com.busfront.epp.controls.player.*;
interface IStop extends IControlObserver {
function stop():void;
}
}//package com.busfront.epp.controls.player
Section 131
//EPPControlExportFeed (com.busfront.epp.controls.publisher.EPPControlExportFeed)
package com.busfront.epp.controls.publisher {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.base.feed.*;
import com.busfront.epp.base.feed.adapter.*;
public class EPPControlExportFeed extends EPPControl implements IExport {
public function EPPControlExportFeed(_arg1:EPPPublisher){
super(new EPPPublisherEvent(EPPPublisherEvent.EXPORT), _arg1);
var _local2:Array = new Array();
_local2["name"] = "parser";
_local2["type"] = "EPPParser";
_args.push(_local2);
}
override public function exec(_arg1:Array){
var _local2:IPublishable;
if (super.exec(_arg1) == true){
_local2 = (_eppObject as IPublishable);
return (_local2.publisher.state[_name](_arg1[0]));
};
}
public function exportFeed(_arg1:EPPParser):EPPFeed{
var _local2:IPublishable = (_eppObject as IPublishable);
_local2.publisher.dispatchEvent(_event);
return (_arg1.adapter.exportFeed((_eppObject as IPublishable)));
}
}
}//package com.busfront.epp.controls.publisher
Section 132
//EPPControlImportFeed (com.busfront.epp.controls.publisher.EPPControlImportFeed)
package com.busfront.epp.controls.publisher {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.base.feed.*;
public class EPPControlImportFeed extends EPPControl implements IImport {
public function EPPControlImportFeed(_arg1:EPPPublisher){
super(new EPPPublisherEvent(EPPPublisherEvent.IMPORT), _arg1);
var _local2:Array = new Array();
_local2["name"] = "feed";
_local2["type"] = "EPPFeed";
_args.push(_local2);
}
override public function exec(_arg1:Array){
var _local2:IPublishable;
if (super.exec(_arg1) == true){
_local2 = (_eppObject as IPublishable);
return (_local2.publisher.state[_name](_arg1[0]));
};
}
public function importFeed(_arg1:EPPFeed):void{
var _local2:IPublishable = (_eppObject as IPublishable);
_local2.publisher.dispatchEvent(_event);
_arg1.parser.adapter.importFeed((_eppObject as IPublishable));
}
}
}//package com.busfront.epp.controls.publisher
Section 133
//EPPPublisher (com.busfront.epp.controls.publisher.EPPPublisher)
package com.busfront.epp.controls.publisher {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
import com.busfront.epp.base.feed.*;
import com.busfront.epp.base.feed.adapter.*;
import com.busfront.epp.net.channel.*;
import com.busfront.epp.display.*;
public class EPPPublisher extends EPPControlGroup implements IPublisher {
protected var _loop:uint;// = 0
private var _channel:EPPChannel;
protected var _screens:Array;
protected var _endTime:Number;
protected var _loopRestart:Boolean;// = false
protected var _startTime:Number;// = 0
protected var _feeds:Array;
private var _publishable:IPublishable;
public function EPPPublisher(_arg1:IPublishable):void{
var _local4:EPPState;
_screens = new Array();
_feeds = new Array();
var _local2:Array = [EPPPublisherEvent.UNPUBLISHABLE, EPPPublisherEvent.PUBLISHABLE];
var _local3:Array = [EPPPublisherEvent.EXPORT, EPPPublisherEvent.IMPORT];
_publishable = _arg1;
if ((((_publishable.loader.state.name == EPPLoaderEvent.UNCHECKED)) || ((_publishable.loader.state.name == EPPLoaderEvent.UNLOADABLE)))){
_local4 = new EPPStateUnpublishable(this);
} else {
_local4 = new EPPStatePublishable(this);
};
super(EPPControlGroupType.PUBLISHER, (_publishable as EPPObject), new Array(EPPBindable.TIME, EPPBindable.TIME_REMAINING), _local3, _local4, _local2);
this._expectedEvents.push(EPPPublisherEvent.IMPORT, EPPPublisherEvent.IMPORTED, EPPPublisherItemEvent.ITEM_IMPORTED, EPPPublisherItemEvent.ITEM_IMPORT_FAIL);
_publishable.loader.addEventListener(EPPLoaderEvent.LOADED, becomePublishable, false, 1);
_publishable.loader.addEventListener(EPPLoaderEvent.UNLOADED, becomeUnpublishable, false, 1);
}
override public function buildState(_arg1:String):EPPState{
return (this[_arg1]());
}
public function get feeds():Array{
var _local1:Array = new Array();
var _local2:uint = _feeds.length;
var _local3:uint;
while (_local3 < _local2) {
_local1.push(_feeds[_local3]);
_local3++;
};
return (_local1);
}
public function hasFeed():Boolean{
if (_feeds.length > 0){
return (true);
};
return (false);
}
override public function buildControl(_arg1:String):EPPControl{
return (this[(_arg1 + "Builder")]());
}
private function exportFeedBuilder():EPPControl{
return (new EPPControlExportFeed(this));
}
private function becomePublishable(_arg1:EPPLoaderEvent):void{
setState(getStateByName(EPPPublisherEvent.PUBLISHABLE));
}
private function becomeUnpublishable(_arg1:EPPLoaderEvent):void{
setState(getStateByName(EPPPublisherEvent.UNPUBLISHABLE));
}
private function unpublishable():EPPState{
return (new EPPStateUnpublishable(this));
}
public function exportFeed(_arg1:EPPParser):EPPFeed{
return (getControlByName(EPPPublisherEvent.EXPORT).exec([_arg1]));
}
private function publishable():EPPState{
return (new EPPStatePublishable(this));
}
public function importFeed(_arg1:EPPFeed):void{
_feeds.push(_arg1);
getControlByName(EPPPublisherEvent.IMPORT).exec([_arg1]);
}
private function importFeedBuilder():EPPControl{
return (new EPPControlImportFeed(this));
}
}
}//package com.busfront.epp.controls.publisher
Section 134
//EPPStatePublishable (com.busfront.epp.controls.publisher.EPPStatePublishable)
package com.busfront.epp.controls.publisher {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.base.feed.*;
import com.busfront.epp.base.feed.adapter.*;
public class EPPStatePublishable extends EPPState implements IPublisher {
public function EPPStatePublishable(_arg1:EPPPublisher){
super(new EPPPublisherEvent(EPPPublisherEvent.PUBLISHABLE), _arg1);
}
public function exportFeed(_arg1:EPPParser):EPPFeed{
var _local2:EPPControlExportFeed = (_controlCollection.getControlByName(EPPPublisherEvent.EXPORT) as EPPControlExportFeed);
return (_local2.exportFeed(_arg1));
}
override public function setLocker():void{
if (_controlCollection.getControlByName(EPPPublisherEvent.IMPORT, false) != null){
_controlCollection.getControlByName(EPPPublisherEvent.IMPORT).unlock();
};
if (_controlCollection.getControlByName(EPPPublisherEvent.EXPORT, false) != null){
_controlCollection.getControlByName(EPPPublisherEvent.EXPORT).unlock();
};
}
public function importFeed(_arg1:EPPFeed):void{
var _local2:EPPControlImportFeed = (_controlCollection.getControlByName(EPPPublisherEvent.IMPORT) as EPPControlImportFeed);
_local2.importFeed(_arg1);
}
}
}//package com.busfront.epp.controls.publisher
Section 135
//EPPStateUnpublishable (com.busfront.epp.controls.publisher.EPPStateUnpublishable)
package com.busfront.epp.controls.publisher {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.base.feed.*;
import com.busfront.epp.base.feed.adapter.*;
public class EPPStateUnpublishable extends EPPState implements IPublisher {
public function EPPStateUnpublishable(_arg1:EPPPublisher){
super(new EPPPublisherEvent(EPPPublisherEvent.UNPUBLISHABLE), _arg1);
}
public function exportFeed(_arg1:EPPParser):EPPFeed{
return (null);
}
override public function setLocker():void{
if (_controlCollection.getControlByName(EPPPublisherEvent.IMPORT, false) != null){
_controlCollection.getControlByName(EPPPublisherEvent.IMPORT).unlock();
};
if (_controlCollection.getControlByName(EPPPublisherEvent.EXPORT, false) != null){
_controlCollection.getControlByName(EPPPublisherEvent.EXPORT).lock();
};
}
public function importFeed(_arg1:EPPFeed):void{
var _local2:EPPControlImportFeed = (_controlCollection.getControlByName(EPPPublisherEvent.IMPORT) as EPPControlImportFeed);
_local2.importFeed(_arg1);
}
}
}//package com.busfront.epp.controls.publisher
Section 136
//IExport (com.busfront.epp.controls.publisher.IExport)
package com.busfront.epp.controls.publisher {
import com.busfront.epp.controls.*;
import com.busfront.epp.base.feed.*;
import com.busfront.epp.base.feed.adapter.*;
public interface IExport extends IControlObserver {
function exportFeed(_arg1:EPPParser):EPPFeed;
}
}//package com.busfront.epp.controls.publisher
Section 137
//IImport (com.busfront.epp.controls.publisher.IImport)
package com.busfront.epp.controls.publisher {
import com.busfront.epp.controls.*;
import com.busfront.epp.base.feed.*;
public interface IImport extends IControlObserver {
function importFeed(_arg1:EPPFeed):void;
}
}//package com.busfront.epp.controls.publisher
Section 138
//IPublishable (com.busfront.epp.controls.publisher.IPublishable)
package com.busfront.epp.controls.publisher {
import com.busfront.epp.controls.player.*;
public interface IPublishable extends IPlayableCollection {
function get publisher():EPPPublisher;
}
}//package com.busfront.epp.controls.publisher
Section 139
//IPublisher (com.busfront.epp.controls.publisher.IPublisher)
package com.busfront.epp.controls.publisher {
import com.busfront.epp.controls.*;
import com.busfront.epp.base.feed.*;
import com.busfront.epp.base.feed.adapter.*;
public interface IPublisher extends IControlObserver {
function exportFeed(_arg1:EPPParser):EPPFeed;
function importFeed(_arg1:EPPFeed):void;
}
}//package com.busfront.epp.controls.publisher
Section 140
//EPPControl (com.busfront.epp.controls.EPPControl)
package com.busfront.epp.controls {
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
import flash.events.*;
import com.busfront.epp.display.reporter.*;
public class EPPControl extends EPPControlObject {
public var _reporter:EPPReporter;
protected var _argsValue:Array;
protected var _group:EPPControlGroup;
protected var _event:Event;
protected var _specProp:String;
protected var _argumentKey:String;
protected var _observers:Array;
protected var _locked:Boolean;// = false
protected var _args:Array;
public function EPPControl(_arg1:Event, _arg2:EPPControlGroup):void{
var _local3:EPPObject;
_args = new Array();
_argsValue = new Array();
_observers = new Array();
if (_arg2 != null){
_local3 = _arg2.eppObject;
};
super(_arg1.type, _local3);
_expectedEvents.push(EPPControllerEvent.LOCKED, EPPControllerEvent.UNLOCKED, "updating", "updated");
_event = _arg1;
_group = _arg2;
}
public function destroy():void{
deleteObservers();
}
protected function withArgs(... _args):EPPControl{
var _local2:Array = new Array();
_argsValue = new Array();
var _local3:uint = _args.length;
var _local4:uint = _args.length;
if (_local3 != _local4){
throw (new Error((((("[EPP] ERROR withArgs " + _local3) + " gived ") + _local4) + " attendus")));
};
var _local5:uint;
while (_local5 < _local3) {
_argsValue.push(_args[_local5]);
_local5++;
};
return (this);
}
public function unlock():void{
var _local1:EPPControllerEvent;
if (_locked == true){
_local1 = new EPPControllerEvent(EPPControllerEvent.UNLOCKED);
dispatchEvent(_local1);
_locked = false;
};
}
public function get locked():Boolean{
return (_locked);
}
public function initialize():void{
}
override public function exec(_arg1:Array){
if (((((!(_arg1)) && ((_args.length == 0)))) || ((_arg1.length == _args.length)))){
return (true);
};
if (name == EPPPlayerEvent.PLAY){
return (true);
};
throw (new Error((((((("[EPP] EPPControl invalid arguments count for control " + name) + ". ") + _arg1.length) + " arguments gived, ") + _args.length) + " expected")));
}
override public function notifyObservers():void{
var _local3:Array;
var _local4:*;
var _local1:uint = _observers.length;
var _local2:uint;
while (_local2 < _local1) {
if ((((_observers[_local2].args.length > 0)) && (!((_argumentKey == null))))){
_local3 = new Array();
_local4 = this[_argumentKey];
_local3.push(_local4);
} else {
_local3 = new Array();
};
_observers[_local2].exec(_local3);
_local2++;
};
}
override public function addObserver(_arg1:IControlObserver):Boolean{
if (_arg1 == null){
return (false);
};
var _local2:Number = _observers.length;
var _local3:Number = 0;
while (_local3 < _local2) {
if (_observers[_local3] == _arg1){
return (false);
};
_local3++;
};
_observers.push(_arg1);
return (true);
}
override public function deleteObserver(_arg1:IControlObserver):Boolean{
var _local2:Number = _observers.length;
var _local3:Number = 0;
while (_local3 < _local2) {
if (_observers[_local3] == _arg1){
_observers.splice(_local3, 1);
return (true);
};
_local3++;
};
return (false);
}
public function get args():Array{
return (_args);
}
public function lock():void{
var _local1:EPPControllerEvent;
if (_locked == false){
_local1 = new EPPControllerEvent(EPPControllerEvent.LOCKED);
dispatchEvent(_local1);
_locked = true;
};
}
public function get argsValue():Array{
return (_argsValue);
}
override public function deleteObservers():Boolean{
_observers.splice(0, _observers.length);
return (true);
}
public function get specProp():String{
return (_specProp);
}
public function get group():EPPControlGroup{
return (_group);
}
}
}//package com.busfront.epp.controls
Section 141
//EPPControlGroup (com.busfront.epp.controls.EPPControlGroup)
package com.busfront.epp.controls {
import com.busfront.epp.events.*;
import com.busfront.epp.display.controller.*;
import com.busfront.epp.base.*;
import com.busfront.epp.controls.filter.*;
import com.busfront.epp.controls.loader.*;
import com.busfront.epp.base.media.*;
import com.busfront.epp.base.cache.*;
import com.busfront.epp.display.reporter.*;
public class EPPControlGroup extends EPPControlObject {
private var _bindableProperties:Array;
private var _authorizedControls:Array;
public var _controllers:Array;
private var _authorizedStates:Array;
private var _type:EPPControlGroupType;
private var _controlStateAssociation:Array;
private var _currentState:EPPState;
public var _reporters:Array;
public function EPPControlGroup(_arg1:EPPControlGroupType, _arg2:EPPObject, _arg3:Array=null, _arg4:Array=null, _arg5:EPPState=null, _arg6:Array=null):void{
_controlStateAssociation = new Array();
_authorizedStates = new Array();
_authorizedControls = new Array();
_bindableProperties = new Array();
_controllers = new Array();
_reporters = new Array();
super(_arg1.type, _arg2);
var _local7:Array = _expectedEvents.concat(_arg4);
_type = _arg1;
_expectedEvents = _local7.concat(_arg6);
_expectedEvents.push(EPPControlGroupEvent.ADDED_STATE, EPPControlGroupEvent.CHANGE_STATE, EPPControlGroupEvent.CONTROL_LOCKED, EPPControlGroupEvent.CONTROL_UNLOCKED);
if (_arg3 != null){
_bindableProperties = _arg3;
};
if (_arg4 != null){
_authorizedControls = _arg4;
};
if (_arg6 != null){
_authorizedStates = _arg6;
};
if (_arg5){
addState(_arg5);
setState(_arg5);
};
}
public function removeController(_arg1:EPPController):Boolean{
var _local4:EPPController;
var _local2:uint = _controllers.length;
var _local3:uint;
while (_local3 < _local2) {
if (_controllers[_local3] == _arg1){
_local4 = _controllers.splice(_local3, 1)[0];
_local4.destroy();
return (true);
};
_local3++;
};
return (false);
}
public function destroy():void{
var _local1:uint = this.controlStateAssociation.length;
this.deleteObservers();
var _local2:uint;
while (_local2 < _local1) {
if (controlStateAssociation[_local2].state){
controlStateAssociation[_local2].state.destroy();
};
if (controlStateAssociation[_local2].control){
controlStateAssociation[_local2].control.destroy();
};
delete controlStateAssociation[_local2].state;
delete controlStateAssociation[_local2].control;
_local2++;
};
_controlStateAssociation = new Array();
removeControllers();
removeReporters();
}
public function addControl(_arg1:EPPControl):void{
var _local3:Boolean;
var _local5:Array;
var _local6:EPPLoaderAlias;
var _local2:uint = authorizedControls.length;
var _local4:uint;
while (_local4 < _local2) {
_local3 = false;
if (authorizedControls[_local4] == _arg1.name){
_local5 = new Array();
_local5["control"] = _arg1;
if (authorizedStates[_local4] != null){
if ((this is EPPLoaderAlias)){
_local6 = (this as EPPLoaderAlias);
_local5["state"] = _local6.cacheItem.loader.buildState(authorizedStates[_local4]);
} else {
_local5["state"] = buildState(authorizedStates[_local4]);
_local3 = true;
};
} else {
_local5["state"] = null;
};
_controlStateAssociation.push(_local5);
if (_local3 == true){
dispatchAddedState(_local5["state"]);
};
return;
};
_local4++;
};
}
public function getStateByName(_arg1:String, _arg2:Boolean=true):EPPState{
var _local6:EPPState;
var _local7:ICacheable;
var _local3:int = controlStateAssociation.length;
var _local4:int;
while (_local4 < _local3) {
if (((!((controlStateAssociation[_local4].state == null))) && ((controlStateAssociation[_local4].state.name == _arg1)))){
return (controlStateAssociation[_local4].state);
};
_local4++;
};
var _local5:uint = authorizedStates.length;
_local4 = 0;
while (_local4 < _local5) {
if (authorizedStates[_local4] == _arg1){
if (_arg2 === true){
if ((this is EPPLoaderAlias)){
_local7 = (_eppObject as ICacheable);
_local6 = _local7.cache.loader.buildState(_arg1);
} else {
_local6 = buildState(_arg1);
};
addState(_local6);
return (_local6);
} else {
return (null);
};
};
_local4++;
};
throw (new Error((((("[EPP] the state " + _arg1) + " doesn't exist for ") + this) + " control group.")));
}
public function removeReporter(_arg1:EPPReporter):Boolean{
var _local4:EPPReporter;
var _local2:uint = _reporters.length;
var _local3:uint;
while (_local3 < _local2) {
if (_reporters[_local3] == _arg1){
_local4 = _reporters.splice(_local3, 1)[0];
_local4.destroy();
return (true);
};
_local3++;
};
return (false);
}
public function refreshCollectionState():void{
}
public function buildState(_arg1:String):EPPState{
return (null);
}
private function dispatchAddedState(_arg1:EPPState):void{
var _local2:EPPControlGroupEvent = new EPPControlGroupEvent(EPPControlGroupEvent.ADDED_STATE, _arg1);
dispatchEvent(_local2);
}
public function removeReporters():void{
var _local1:uint = _reporters.length;
var _local2:uint;
while (_local2 < _local1) {
_reporters[_local2].destroy();
_local2++;
};
}
public function setState(_arg1:EPPState):void{
var _local2:String;
var _local3:EPPControlGroupEvent;
if (((!((_arg1 == null))) || (!((_arg1 == _currentState))))){
if (_currentState != null){
_currentState.destroyListener();
_local2 = new String(_currentState.name);
};
_currentState = _arg1;
_currentState.setLocker();
_currentState.notifyObservers();
_local3 = new EPPControlGroupEvent(EPPControlGroupEvent.CHANGE_STATE, _currentState);
dispatchEvent(_local3);
dispatchEvent(_arg1.event);
};
}
public function get state():EPPState{
return (_currentState);
}
public function buildControl(_arg1:String):EPPControl{
return (null);
}
public function get groupType():EPPControlGroupType{
return (_type);
}
public function addController(_arg1:EPPControlUI, _arg2:String, _arg3:Object=null):EPPController{
var _local4:EPPController = new EPPController(_arg1, getControlByName(_arg2, true, _arg3), _arg3);
_controllers.push(_local4);
return (_local4);
}
public function getControlByName(_arg1:String, _arg2:Boolean=true, _arg3:Object=null):EPPControl{
var _local7:EPPControl;
var _local8:EPPMediaOccurence;
var _local9:ICacheable;
var _local4:int = controlStateAssociation.length;
var _local5:int;
while (_local5 < _local4) {
if (((!((controlStateAssociation[_local5].control == null))) && ((controlStateAssociation[_local5].control.name == _arg1)))){
return (controlStateAssociation[_local5].control);
};
_local5++;
};
var _local6:uint = authorizedControls.length;
_local5 = 0;
while (_local5 < _local6) {
if (authorizedControls[_local5] == _arg1){
if (_arg2 === true){
if ((this is EPPLoaderOccurence)){
_local8 = (_eppObject as EPPMediaOccurence);
_local7 = _local8.original.loader.getControlByName(_arg1);
} else {
if ((this is EPPLoaderAlias)){
_local9 = (_eppObject as ICacheable);
_local7 = _local9.cache.loader.getControlByName(_arg1);
} else {
if ((((((this is EPPFilter)) && ((_arg1 == EPPFilterEvent.APPLY)))) && (!((_arg3 == null))))){
_local7 = this.eppObject.getFilterById(_arg3);
} else {
_local7 = buildControl(_arg1);
};
};
};
addControl(_local7);
_local7.group.state.setLocker();
return (_local7);
} else {
return (null);
};
};
_local5++;
};
throw (new Error((((("[EPP] the control " + _arg1) + " doesn't exist for ") + this) + " control group.")));
}
public function addReporter(_arg1:EPPReportUI):EPPReporter{
var _local2:EPPReporter = new EPPReporter(_arg1, this);
_reporters.push(_local2);
return (_local2);
}
public function get controlStateAssociation():Array{
var _local1:uint = _controlStateAssociation.length;
var _local2:Array = new Array();
var _local3:uint;
while (_local3 < _local1) {
_local2.push(_controlStateAssociation[_local3]);
_local3++;
};
return (_local2);
}
public function get authorizedControls():Array{
var _local1:ICacheable;
if ((this is EPPLoaderAlias)){
_local1 = (_eppObject as ICacheable);
return (_local1.cache.loader.authorizedControls);
};
return (_authorizedControls);
}
public function removeControllers():void{
var _local1:uint = _controllers.length;
var _local2:uint;
while (_local2 < _local1) {
_controllers[_local2].destroy();
_local2++;
};
}
public function get stateName():String{
return (state.name);
}
public function get authorizedStates():Array{
var _local1:ICacheable;
if ((this is EPPLoaderAlias)){
_local1 = (_eppObject as ICacheable);
return (_local1.cache.loader.authorizedStates);
};
return (_authorizedStates);
}
public function addState(_arg1:EPPState):void{
var _local5:Array;
var _local6:EPPLoaderAlias;
var _local2:uint = controlStateAssociation.length;
var _local3:uint = authorizedStates.length;
var _local4:uint;
while (_local4 < _local3) {
if (authorizedStates[_local4] == _arg1.name){
_local5 = new Array();
_local5["state"] = _arg1;
if (authorizedControls[_local4] != null){
if ((this is EPPLoaderAlias)){
_local6 = (this as EPPLoaderAlias);
_local5["control"] = _local6.cacheItem.loader.buildControl(authorizedControls[_local4]);
} else {
_local5["control"] = buildControl(authorizedControls[_local4]);
};
} else {
_local5["control"] = null;
};
_controlStateAssociation.push(_local5);
dispatchAddedState(_arg1);
return;
};
_local4++;
};
}
}
}//package com.busfront.epp.controls
Section 142
//EPPControlGroupType (com.busfront.epp.controls.EPPControlGroupType)
package com.busfront.epp.controls {
public final class EPPControlGroupType {
private var _type:String;
public static const PLAYER:EPPControlGroupType = new EPPControlGroupType("player");
;
public static const LOADER:EPPControlGroupType = new EPPControlGroupType("loader");
;
public static const MIXER:EPPControlGroupType = new EPPControlGroupType("mixer");
;
public static const PUBLISHER:EPPControlGroupType = new EPPControlGroupType("publisher");
;
public static const FILTER:EPPControlGroupType = new EPPControlGroupType("filter");
;
public function EPPControlGroupType(_arg1:String){
_type = _arg1;
if (((((((((!((_type == "filter"))) && (!((_type == "loader"))))) && (!((_type == "player"))))) && (!((_type == "mixer"))))) && (!((_type == "publisher"))))){
throw (new Error((("[EPP] EPPcontrolGrouptype " + _arg1) + " is not defined.")));
};
}
public function get type():String{
return (_type);
}
}
}//package com.busfront.epp.controls
Section 143
//EPPControlObject (com.busfront.epp.controls.EPPControlObject)
package com.busfront.epp.controls {
import com.busfront.epp.base.*;
import flash.events.*;
public class EPPControlObject extends EventDispatcher implements IControl {
protected var _key:Namespace;
protected var _eppObject:EPPObject;
protected var _expectedEvents:Array;
protected var _name:String;
public function EPPControlObject(_arg1:String, _arg2:EPPObject):void{
_expectedEvents = new Array();
super();
_name = _arg1;
_eppObject = _arg2;
if (_eppObject){
_key = _arg2.getRestrictedNamespace(this);
} else {
_key = EPP.epp.getRestrictedNamespace(this);
};
}
public function deleteObserver(_arg1:IControlObserver):Boolean{
return (false);
}
public function get eppObject(){
return (_eppObject);
}
public function get name():String{
return (_name);
}
override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
var _local6:uint = _expectedEvents.length;
var _local7:uint;
while (_local7 < _local6) {
if (_arg1 == _expectedEvents[_local7]){
super.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
return;
};
_local7++;
};
throw (new Error((((("[EPP] Unexpected event " + _arg1) + " on ") + this) + ".")));
}
public function deleteObservers():Boolean{
return (false);
}
public function addObserver(_arg1:IControlObserver):Boolean{
return (false);
}
public function exec(_arg1:Array){
}
public function notifyObservers():void{
}
}
}//package com.busfront.epp.controls
Section 144
//EPPState (com.busfront.epp.controls.EPPState)
package com.busfront.epp.controls {
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
import com.busfront.epp.controls.player.*;
import flash.events.*;
import com.busfront.epp.utils.*;
public class EPPState implements IControlObserver {
private var _event:Event;
protected var _controlCollection:EPPControlGroup;
protected var _observers:Array;
protected var _key:Namespace;
protected var _locked:Boolean;
protected var _name:String;
protected var _undercover:Boolean;// = false
public function EPPState(_arg1:Event, _arg2:EPPControlGroup):void{
_observers = new Array();
super();
_event = _arg1;
_name = _arg1.type;
_controlCollection = _arg2;
_key = EPP.epp.getRestrictedNamespace(this);
}
public function setLocker():void{
}
public function get name():String{
return (_name);
}
public function destroyListener():void{
this._controlCollection.removeEventListener(this._name, callBackNotify);
if (covered == false){
destroyInternalListeners();
} else {
covered = false;
};
}
public function callBackNotify(_arg1:Event):void{
notifyView();
}
public function get covered():Boolean{
return (_undercover);
}
public function get event():Event{
return (_event);
}
public function get observers():Array{
return (_observers);
}
public function deleteObserver(_arg1:IControlObserver):Boolean{
var _local2:Number = _observers.length;
var _local3:Number = 0;
while (_local3 < _local2) {
if (_observers[_local3] == _arg1){
_observers.splice(_local3, 1);
return (true);
};
_local3++;
};
return (false);
}
public function notifyObservers():void{
this._controlCollection.addEventListener(this._name, callBackNotify, false, 1);
}
public function addObserver(_arg1:IControlObserver):Boolean{
if (_arg1 == null){
return (false);
};
var _local2:Number = _observers.length;
var _local3:Number = 0;
while (_local3 < _local2) {
if (_observers[_local3] == _arg1){
};
_local3++;
};
_observers.push(_arg1);
return (true);
}
public function set covered(_arg1:Boolean):void{
_undercover = _arg1;
}
public function destroyInternalListeners():void{
}
protected function notifyView():void{
var _local3:uint;
var _local4:Array;
var _local5:uint;
if ((((this.name == EPPLoaderEvent.PRELOADED)) && ((this._controlCollection.eppObject is IPlayable)))){
this._controlCollection.eppObject.player.state.notifyView();
};
var _local1:uint = _observers.length;
var _local2:uint;
while (_local2 < _local1) {
_local3 = _observers[_local2].argsValue.length;
_local4 = new Array();
_local5 = 0;
while (_local5 < _local3) {
_local4.push(EPPString.decodeArguments(_observers[_local2].argsValue[_local5], _controlCollection));
_local5++;
};
_observers[_local2].exec(_local4);
_local2++;
};
}
public function deleteObservers():Boolean{
_observers.splice(0, _observers.length);
return (true);
}
public function destroy():void{
destroyInternalListeners();
destroyListener();
}
public function notifyObserver(_arg1:IControlObserver):void{
var _local4:uint;
var _local5:Array;
var _local6:uint;
var _local2:Number = _observers.length;
var _local3:Number = 0;
while (_local3 < _local2) {
if (_observers[_local3] == _arg1){
_local4 = _observers[_local3].argsValue.length;
_local5 = new Array();
_local6 = 0;
while (_local6 < _local4) {
_local5.push(EPPString.decodeArguments(_observers[_local3].argsValue[_local6], this._controlCollection));
_local6++;
};
_observers[_local3].exec(_local5);
};
_local3++;
};
}
}
}//package com.busfront.epp.controls
Section 145
//IControl (com.busfront.epp.controls.IControl)
package com.busfront.epp.controls {
public interface IControl extends IControlObserver {
function exec(_arg1:Array);
}
}//package com.busfront.epp.controls
Section 146
//IControlObserver (com.busfront.epp.controls.IControlObserver)
package com.busfront.epp.controls {
public interface IControlObserver {
function deleteObserver(_arg1:IControlObserver):Boolean;
function deleteObservers():Boolean;
function addObserver(_arg1:IControlObserver):Boolean;
}
}//package com.busfront.epp.controls
Section 147
//EPPController (com.busfront.epp.display.controller.EPPController)
package com.busfront.epp.display.controller {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
public final class EPPController {
private var _params:Object;
private var _uiControl:EPPControlUI;
private var _objectControl:EPPControl;
public function EPPController(_arg1:EPPControlUI, _arg2:EPPControl, _arg3:Object){
_params = _arg3;
_uiControl = _arg1;
_objectControl = _arg2;
_objectControl.addEventListener(EPPControllerEvent.LOCKED, deactivate, false, 1);
_objectControl.addEventListener(EPPControllerEvent.UNLOCKED, activate, false, 1);
init();
_uiControl.controller = this;
_uiControl.initialize();
_uiControl.addObserver(_objectControl);
}
public function destroy():void{
_objectControl.removeEventListener(EPPControllerEvent.LOCKED, deactivate);
_objectControl.removeEventListener(EPPControllerEvent.UNLOCKED, activate);
_uiControl.destroy();
_uiControl.deleteObserver(_objectControl);
}
public function get uiControl():EPPControl{
return (_uiControl);
}
private function init():void{
var _local1:EPPControlGroupEvent;
var _local2:EPPState;
var _local3:*;
if ((_uiControl is EPPControlUIDisplay)){
_local3 = EPPControlUIDisplay(_uiControl).clip;
} else {
_local3 = null;
};
if (_objectControl.group != null){
_local2 = _objectControl.group.state;
};
if (_objectControl.locked == false){
_local1 = new EPPControlGroupEvent(EPPControlGroupEvent.CONTROL_UNLOCKED, _local2, _local3);
} else {
_local1 = new EPPControlGroupEvent(EPPControlGroupEvent.CONTROL_LOCKED, _local2, _local3);
};
_objectControl.group.dispatchEvent(_local1);
}
private function activate(_arg1:EPPControllerEvent):void{
var _local2:EPPState;
var _local3:*;
if ((_uiControl is EPPControlUIDisplay)){
_local3 = EPPControlUIDisplay(_uiControl).clip;
} else {
_local3 = null;
};
if (_objectControl.group != null){
_local2 = _objectControl.group.state;
};
var _local4:EPPControlGroupEvent = new EPPControlGroupEvent(EPPControlGroupEvent.CONTROL_UNLOCKED, _local2, _local3);
_objectControl.group.dispatchEvent(_local4);
}
private function deactivate(_arg1:EPPControllerEvent):void{
var _local2:EPPState;
var _local3:*;
if ((_uiControl is EPPControlUIDisplay)){
_local3 = EPPControlUIDisplay(_uiControl).clip;
} else {
_local3 = null;
};
if (_objectControl.group != null){
_local2 = _objectControl.group.state;
};
var _local4:EPPControlGroupEvent = new EPPControlGroupEvent(EPPControlGroupEvent.CONTROL_LOCKED, _local2, _local3);
_objectControl.group.dispatchEvent(_local4);
}
public function get objectControl():EPPControl{
return (_objectControl);
}
}
}//package com.busfront.epp.display.controller
Section 148
//EPPControlMouse (com.busfront.epp.display.controller.EPPControlMouse)
package com.busfront.epp.display.controller {
import com.busfront.epp.base.*;
import flash.geom.*;
import flash.events.*;
import com.busfront.epp.display.reporter.*;
public class EPPControlMouse extends EPPControlUIDisplay {
protected var _reportBar:EPPReportBar;
protected var _maxWidth:Number;// = -1
protected var _percent:Number;
protected var _eventType:String;
private var _direction:String;
public function EPPControlMouse(_arg1, _arg2:String, _arg3:String="horizontal"){
super(_arg1);
_direction = _arg3;
if (!_arg1){
throw (new Error("[EPP] Passed argument 'clip' is 'null'."));
};
if (EPP.epp._key::_stage == null){
throw (new Error("[EPP] Stage is not set on 'EPP' Class."));
};
if ((_arg1 is EPPReportBar)){
_reportBar = _arg1;
_maxWidth = _reportBar.defaultClipWidth;
_reportBar.addEventListener("updated", upded);
};
_argumentKey = "percent";
_eventType = _arg2;
}
protected function execBehavior(_arg1:MouseEvent):void{
if (_eventType == MouseEvent.MOUSE_UP){
EPP.epp._key::_stage.removeEventListener(_eventType, execBehavior);
_clip.addEventListener(MouseEvent.MOUSE_DOWN, listenToMouseUp);
};
exec(new Array());
}
public function get percent():String{
return ((_percent + "%"));
}
private function upded(_arg1:Event):void{
_maxWidth = _reportBar.defaultClipWidth;
}
private function getNextProgramGlobal(_arg1):Point{
var _local2:Number = _arg1.x;
var _local3:Number = _arg1.y;
var _local4:* = _arg1.parent;
while (_local4 != EPP.epp._key::_stage) {
_local2 = (_local2 + _local4.x);
_local3 = (_local3 + _local4.y);
_local4 = _local4.parent;
};
var _local5:Point = new Point(_local2, _local3);
return (_local5);
}
override public function initialize():void{
if (_eventType == MouseEvent.MOUSE_UP){
_clip.addEventListener(MouseEvent.MOUSE_DOWN, listenToMouseUp);
} else {
_clip.addEventListener(_eventType, execBehavior);
};
if (_maxWidth == -1){
_maxWidth = _clip.width;
};
_percent = 0;
}
override public function exec(_arg1:Array){
if (super.exec(_arg1) == true){
return (MOUSE());
};
}
public function MOUSE():Boolean{
var _local1:Point = getNextProgramGlobal(_clip);
if (_direction == "vertical"){
_percent = Math.abs(((EPP.epp._key::_stage.mouseY - _local1.y) / _maxWidth));
this.notifyObservers();
return (true);
};
_percent = ((EPP.epp._key::_stage.mouseX - _local1.x) / _maxWidth);
this.notifyObservers();
return (true);
}
override public function destroy():void{
_clip.removeEventListener(_eventType, execBehavior);
if (_reportBar){
_reportBar.removeEventListener("updated", upded);
_reportBar = null;
};
}
private function listenToMouseUp(_arg1:MouseEvent):void{
_arg1.currentTarget.removeEventListener(MouseEvent.MOUSE_DOWN, listenToMouseUp);
EPP.epp._key::_stage.addEventListener(_eventType, execBehavior);
}
}
}//package com.busfront.epp.display.controller
Section 149
//EPPControlUI (com.busfront.epp.display.controller.EPPControlUI)
package com.busfront.epp.display.controller {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
public class EPPControlUI extends EPPControl {
protected var _controller:EPPController;
public function EPPControlUI(){
super(new EPPControllerEvent(EPPControllerEvent.CONTROLLER_CALL), null);
}
public function set controller(_arg1:EPPController):void{
_controller = _arg1;
}
public function get controller():EPPController{
return (_controller);
}
}
}//package com.busfront.epp.display.controller
Section 150
//EPPControlUIDisplay (com.busfront.epp.display.controller.EPPControlUIDisplay)
package com.busfront.epp.display.controller {
import flash.display.*;
import com.busfront.epp.display.reporter.*;
public class EPPControlUIDisplay extends EPPControlUI {
protected var _clip;
public function EPPControlUIDisplay(_arg1){
if ((((((_arg1 is EPPReportBar)) || ((_arg1 is Sprite)))) || (!((_arg1.htmlText == undefined))))){
} else {
throw (new Error((("[EPP] Passed argument 'clip' type " + _arg1) + " is not supported (Sprite or EPPReportBar only).")));
};
if ((_arg1 is EPPReportBar)){
_clip = EPPReportBar(_arg1).clip;
} else {
if ((_arg1 is Sprite)){
_clip = _arg1;
};
};
}
public function get clip(){
return (_clip);
}
}
}//package com.busfront.epp.display.controller
Section 151
//EPPReportBar (com.busfront.epp.display.reporter.EPPReportBar)
package com.busfront.epp.display.reporter {
import com.busfront.epp.events.*;
import flash.display.*;
import com.busfront.epp.controls.player.*;
import flash.events.*;
import com.busfront.epp.base.media.*;
import com.busfront.epp.display.*;
public class EPPReportBar extends EPPReportSprite {
private var _bindableArgs:EPPBindable;
private var _defaultClipWidth:Number;
public function EPPReportBar(_arg1:Sprite, _arg2:EPPBindable){
_defaultClipWidth = _arg1.width;
super(_arg1);
if (_arg1.width == 0){
throw (new Error("[EPP] Passed argument 'clip' width is 0."));
};
_bindableArgs = _arg2;
var _local3:Object = {name:"current", type:"int"};
var _local4:Object = {name:"total", type:"int"};
_args.push(_local3, _local4);
withArgs(_arg2.props[0], _arg2.props[1]);
}
override public function exec(_arg1:Array){
if (super.exec(_arg1) == true){
return (BAR(_arg1[0], _arg1[1]));
};
}
public function BAR(_arg1:Number, _arg2:Number):Boolean{
var _local3:EPPMediaCollection;
var _local4:IPlayable;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:uint;
var _local9:Number;
var _local10:IPlayable;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
if (_arg2 == 0){
clip.width = 0;
} else {
if (((!((_arg2 == 0))) && (!((_arg1 == 0))))){
if ((((((_bindableArgs.props[0] == "<#bytesLoaded#>")) && ((this._reporter.controlCollection.eppObject is EPPMediaCollection)))) && ((_arg1 > 0)))){
_local3 = (this._reporter.controlCollection.eppObject as EPPMediaCollection);
_local7 = 0;
_local8 = 0;
while (_local8 < _local3.length) {
_local4 = _local3.getChildAt(_local8);
_local5 = (_local4.player.duration / _local3.player.duration);
_local6 = (_local4.loader.bytesLoaded / _local4.loader.bytesTotal);
_local7 = (_local7 + ((_local5 * _defaultClipWidth) * _local6));
if (_local4.loader.stateName == EPPLoaderEvent.LOADING){
break;
};
_local8++;
};
clip.width = _local7;
} else {
if ((this._reporter.controlCollection.eppObject is IPlayable)){
_local10 = this._reporter.controlCollection.eppObject;
if (((!((_local10.loader.metadata == null))) && ((_bindableArgs.props[0] == "<#bytesLoaded#>")))){
if (_local10.player.duration != _local10.loader.metadata.duration){
if (_local10.player.start == 0){
_local11 = (_local10.player.duration / _local10.loader.metadata.duration);
_arg2 = (_arg2 * _local11);
if (_arg1 > _arg2){
_arg1 = _arg2;
};
} else {
_local12 = (_arg1 / _arg2);
if ((_local10.loader.metadata.duration - _local10.player.start) == _local10.player.duration){
_local11 = (_local10.player.start / _local10.loader.metadata.duration);
_local13 = (_local10.player.duration / _local10.loader.metadata.duration);
if (_local11 >= _local12){
_arg1 = 0;
} else {
_arg1 = (_arg1 - (_arg2 * _local11));
};
_arg2 = (_arg2 * _local13);
if (_arg1 > _arg2){
_arg1 = _arg2;
};
} else {
_local11 = (_local10.player.start / _local10.loader.metadata.duration);
_local14 = (_local10.player.duration / _local10.loader.metadata.duration);
if (_local11 >= _local12){
_arg1 = 0;
} else {
_arg1 = (_arg1 - (_arg2 * _local11));
};
_arg2 = (_arg2 * _local14);
if (_arg1 > _arg2){
_arg1 = _arg2;
};
};
};
};
};
};
_local9 = ((_arg1 / _arg2) * _defaultClipWidth);
clip.width = _local9;
};
} else {
clip.width = 0;
};
};
return (true);
}
public function get bindableArgs():EPPBindable{
return (_bindableArgs);
}
public function get defaultClipWidth():Number{
return (_defaultClipWidth);
}
override public function initialize():void{
}
public function set defaultClipWidth(_arg1:Number):void{
this.dispatchEvent(new Event("updating"));
var _local2:Number = (clip.width / _defaultClipWidth);
_defaultClipWidth = _arg1;
this.dispatchEvent(new Event("updated"));
}
}
}//package com.busfront.epp.display.reporter
Section 152
//EPPReporter (com.busfront.epp.display.reporter.EPPReporter)
package com.busfront.epp.display.reporter {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
public final class EPPReporter {
private var _controlCollection:EPPControlGroup;
private var _skinBehavior:EPPControl;
public function EPPReporter(_arg1:EPPControl, _arg2:EPPControlGroup){
_skinBehavior = _arg1;
_controlCollection = _arg2;
var _local3:uint = _controlCollection.controlStateAssociation.length;
_arg1._reporter = this;
_arg1.initialize();
var _local4:uint;
while (_local4 < _local3) {
if (_controlCollection.controlStateAssociation[_local4].state != null){
_controlCollection.controlStateAssociation[_local4].state.addObserver(_arg1);
};
_local4++;
};
_controlCollection.state.notifyObserver(_arg1);
_controlCollection.removeEventListener(EPPControlGroupEvent.ADDED_STATE, addState);
_controlCollection.addEventListener(EPPControlGroupEvent.ADDED_STATE, addState, false, 1);
if (((!((_controlCollection.state == null))) && ((_controlCollection.stateName == EPPLoaderEvent.LOADING)))){
_controlCollection.addEventListener(EPPLoaderEvent.LOADING, _controlCollection.state.callBackNotify, false, 1);
};
}
private function addState(_arg1:EPPControlGroupEvent):void{
_controlCollection.getStateByName(_arg1.stateName, false).addObserver(_skinBehavior);
_controlCollection.getStateByName(_arg1.stateName, false).notifyObserver(_skinBehavior);
if (_controlCollection.controlStateAssociation.length == _controlCollection.authorizedStates.length){
_controlCollection.removeEventListener(EPPControlGroupEvent.ADDED_STATE, addState);
};
}
public function get controlCollection():EPPControlGroup{
return (_controlCollection);
}
public function destroy():void{
var _local1:uint = _controlCollection.controlStateAssociation.length;
var _local2:uint;
while (_local2 < _local1) {
if (_controlCollection.controlStateAssociation[_local2].state){
_controlCollection.controlStateAssociation[_local2].state.destroyListener();
_controlCollection.controlStateAssociation[_local2].state.deleteObserver(skinBehavior);
};
_local2++;
};
_controlCollection.removeEventListener(EPPControlGroupEvent.ADDED_STATE, addState);
}
public function get skinBehavior():EPPControl{
return (_skinBehavior);
}
}
}//package com.busfront.epp.display.reporter
Section 153
//EPPReportSprite (com.busfront.epp.display.reporter.EPPReportSprite)
package com.busfront.epp.display.reporter {
import flash.display.*;
public class EPPReportSprite extends EPPReportUI {
private var _clip:Sprite;
public function EPPReportSprite(_arg1:Sprite){
_clip = _arg1;
if (_arg1 == null){
throw (new Error("[EPP] Gived argument 'clip' is 'null'."));
};
}
public function get clip():Sprite{
return (_clip);
}
}
}//package com.busfront.epp.display.reporter
Section 154
//EPPReportUI (com.busfront.epp.display.reporter.EPPReportUI)
package com.busfront.epp.display.reporter {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
public class EPPReportUI extends EPPControl {
public function EPPReportUI(){
super(new EPPReporterEvent(EPPReporterEvent.REPORTER_UPDATE), null);
}
}
}//package com.busfront.epp.display.reporter
Section 155
//EPPBindable (com.busfront.epp.display.EPPBindable)
package com.busfront.epp.display {
import com.busfront.epp.controls.*;
public class EPPBindable {
private var _props:Array;
public static const RATE:EPPBindable = new EPPBindable("<#rate#>", 100, EPPControlGroupType.PLAYER);
;
public static const VOLUME:EPPBindable = new EPPBindable("<#volume#>", 1, EPPControlGroupType.MIXER);
;
public static const TIME_REMAINING:EPPBindable = new EPPBindable("<#timeRemaining#>", 0, EPPControlGroupType.PLAYER);
;
public static const BYTES_REMAINING:EPPBindable = new EPPBindable("<#bytesRemaining#>", 0, EPPControlGroupType.LOADER);
;
public static const ALTERNATIVE_BYTES_LOADED:EPPBindable = new EPPBindable("<#alternativeBytesLoaded#>", "<#alternativeBytesTotal#>", EPPControlGroupType.LOADER);
;
public static const TIME:EPPBindable = new EPPBindable("<#time#>", "<#duration#>", EPPControlGroupType.PLAYER);
;
public static const TIME_LOADED:EPPBindable = new EPPBindable("<#timeLoaded#>", "<#timeTotal#>", EPPControlGroupType.LOADER);
;
public static const FILTER:EPPBindable = new EPPBindable("<#filter#>", 100, EPPControlGroupType.FILTER);
;
public static const BYTES_LOADED:EPPBindable = new EPPBindable("<#bytesLoaded#>", "<#bytesTotal#>", EPPControlGroupType.LOADER);
;
public static const PAN:EPPBindable = new EPPBindable("<#pan#>", 1, EPPControlGroupType.MIXER);
;
public static const ALTERNATIVE_TIME:EPPBindable = new EPPBindable("<#alternativeTime#>", "<#alternativeTimeTotal#>", EPPControlGroupType.PLAYER);
;
public function EPPBindable(... _args){
_props = _args;
}
public function get props():Array{
return (_props);
}
public function get group():String{
return (_props[2].type);
}
}
}//package com.busfront.epp.display
Section 156
//EPPControlGroupEvent (com.busfront.epp.events.EPPControlGroupEvent)
package com.busfront.epp.events {
import com.busfront.epp.controls.*;
import flash.events.*;
public class EPPControlGroupEvent extends Event {
private var _clipTarget;
private var _state:EPPState;
public static const ADDED_STATE:String = "addedState";
public static const CONTROL_UNLOCKED:String = "controlUnlocked";
public static const CHANGE_STATE:String = "changeState";
public static const CONTROL_LOCKED:String = "controlLocked";
public function EPPControlGroupEvent(_arg1:String, _arg2:EPPState, _arg3=null, _arg4:Boolean=false, _arg5:Boolean=false){
_state = _arg2;
_clipTarget = _arg3;
super(_arg1, _arg4, _arg5);
}
public function get clipTarget(){
return (_clipTarget);
}
public function get stateName():String{
return (_state.name);
}
override public function clone():Event{
var _local1:EPPControlGroupEvent = new EPPControlGroupEvent(type, _state, clipTarget, bubbles, cancelable);
return (_local1);
}
}
}//package com.busfront.epp.events
Section 157
//EPPControllerEvent (com.busfront.epp.events.EPPControllerEvent)
package com.busfront.epp.events {
import flash.events.*;
public class EPPControllerEvent extends Event {
public static const CONTROLLER_CALL:String = "onControllerCall";
public static const UNLOCKED:String = "unlocked";
public static const LOCKED:String = "locked";
public function EPPControllerEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function clone():Event{
return (new EPPControllerEvent(type, bubbles, cancelable));
}
}
}//package com.busfront.epp.events
Section 158
//EPPCuePointEvent (com.busfront.epp.events.EPPCuePointEvent)
package com.busfront.epp.events {
import com.busfront.epp.controls.player.*;
import flash.events.*;
public class EPPCuePointEvent extends Event {
private var _cuePoint:EPPCuepoint;
public static const CUE_POINT:String = "cuePoint";
public function EPPCuePointEvent(_arg1:String, _arg2:EPPCuepoint, _arg3:Boolean=false, _arg4:Boolean=false){
_cuePoint = _arg2;
super(_arg1, _arg3, _arg4);
}
public function get cuePoint():EPPCuepoint{
return (_cuePoint);
}
override public function clone():Event{
return (new EPPCuePointEvent(type, cuePoint, bubbles, cancelable));
}
}
}//package com.busfront.epp.events
Section 159
//EPPEvent (com.busfront.epp.events.EPPEvent)
package com.busfront.epp.events {
import com.busfront.epp.base.*;
import flash.events.*;
public class EPPEvent extends Event {
private var _itemObject:EPPObject;
public static const ADDED:String = "added";
public static const REMOVED_ITEM:String = "removedItem";
public static const ADDED_ITEM:String = "addedItem";
public static const REMOVED:String = "removed";
public function EPPEvent(_arg1:String, _arg2:EPPObject, _arg3:Boolean=false, _arg4:Boolean=false){
super(_arg1, _arg3, _arg4);
_itemObject = _arg2;
}
public function get eppObject(){
return (_itemObject);
}
override public function clone():Event{
return (new EPPEvent(type, eppObject, bubbles, cancelable));
}
}
}//package com.busfront.epp.events
Section 160
//EPPFilterEvent (com.busfront.epp.events.EPPFilterEvent)
package com.busfront.epp.events {
import flash.events.*;
public class EPPFilterEvent extends Event {
public static const UNFILTERED:String = "unfiltered";
public static const APPLY:String = "apply";
public static const FILTERED:String = "filtered";
public static const FILTERING:String = "filtering";
public function EPPFilterEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function clone():Event{
return (new EPPFilterEvent(type, bubbles, cancelable));
}
}
}//package com.busfront.epp.events
Section 161
//EPPLoaderEvent (com.busfront.epp.events.EPPLoaderEvent)
package com.busfront.epp.events {
import flash.events.*;
public class EPPLoaderEvent extends Event {
public static const CONNECTION_SUCCESS:String = "connectionSuccess";
public static const LOADED:String = "loaded";
public static const CHECKED:String = "checked";
public static const PRELOADED:String = "preloaded";
public static const CONNECTION_FAILURE:String = "connectionFailure";
public static const CHECK_CONNECTION:String = "check";
public static const UNLOADABLE:String = "unloadable";
public static const CHECKING:String = "checking";
public static const LOADING:String = "loading";
public static const UNCHECKED:String = "unchecked";
public static const UNLOADED:String = "unloaded";
public static const UNLOADING:String = "unloading";
public static const CONNECTION_LOST:String = "connectionLost";
public static const LOAD:String = "load";
public static const PRELOAD:String = "preload";
public static const PRELOADING:String = "preloading";
public static const UNLOAD:String = "unload";
public function EPPLoaderEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function clone():Event{
return (new EPPLoaderEvent(type, bubbles, cancelable));
}
}
}//package com.busfront.epp.events
Section 162
//EPPMixerEvent (com.busfront.epp.events.EPPMixerEvent)
package com.busfront.epp.events {
import flash.events.*;
public class EPPMixerEvent extends Event {
public static const MUTE:String = "mute";
public static const VOLUMEING:String = "volumeing";
public static const VOLUMED:String = "volumed";
public static const MUTED:String = "muted";
public static const UNVOLUMABLE:String = "unvolumable";
public static const UNVOLUMED:String = "unvolumed";
public static const UNMUTED:String = "unmuted";
public static const UNMUTE:String = "unmute";
public static const VOLUME:String = "volume";
public static const PAN:String = "pan";
public function EPPMixerEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function clone():Event{
return (new EPPMixerEvent(type, bubbles, cancelable));
}
}
}//package com.busfront.epp.events
Section 163
//EPPPlayerCollectionEvent (com.busfront.epp.events.EPPPlayerCollectionEvent)
package com.busfront.epp.events {
import flash.events.*;
public class EPPPlayerCollectionEvent extends Event {
public var previousChildIndex:uint;
public static const JUMP_TO_NEXT:String = "jumpToNext";
public static const JUMP_TO_PREVIOUS:String = "jumpToPrevious";
public static const CURRENT_CHANGE:String = "currentChange";
public function EPPPlayerCollectionEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function clone():Event{
return (new EPPPlayerCollectionEvent(type, bubbles, cancelable));
}
}
}//package com.busfront.epp.events
Section 164
//EPPPlayerEvent (com.busfront.epp.events.EPPPlayerEvent)
package com.busfront.epp.events {
import flash.events.*;
public class EPPPlayerEvent extends Event {
public static const STOP:String = "stop";
public static const BUFFERING:String = "buffering";
public static const SEEKING:String = "seeking";
public static const PLAYING:String = "playing";
public static const PLAYED:String = "played";
public static const PAUSE:String = "pause";
public static const SEEKED:String = "seeked";
public static const BUFFERED:String = "buffered";
public static const RATE:String = "rate";
public static const RATED:String = "rated";
public static const UNPLAYABLE:String = "unplayable";
public static const RATEING:String = "rateing";
public static const STOPPED:String = "stopped";
public static const UNPLAYED:String = "unplayed";
public static const STOPPING:String = "stopping";
public static const PAUSED:String = "paused";
public static const SEEK:String = "seek";
public static const PLAY:String = "play";
public function EPPPlayerEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function clone():Event{
return (new EPPPlayerEvent(type, bubbles, cancelable));
}
}
}//package com.busfront.epp.events
Section 165
//EPPPublisherEvent (com.busfront.epp.events.EPPPublisherEvent)
package com.busfront.epp.events {
import flash.events.*;
public class EPPPublisherEvent extends Event {
public static const UNPUBLISHABLE:String = "unpublishable";
public static const EXPORT:String = "exportFeed";
public static const IMPORT:String = "importFeed";
public static const PUBLISHABLE:String = "publishable";
public static const IMPORTED:String = "importedFeed";
public function EPPPublisherEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function clone():Event{
return (new EPPPublisherEvent(type, bubbles, cancelable));
}
}
}//package com.busfront.epp.events
Section 166
//EPPPublisherItemEvent (com.busfront.epp.events.EPPPublisherItemEvent)
package com.busfront.epp.events {
import com.busfront.epp.base.*;
import flash.events.*;
public class EPPPublisherItemEvent extends Event {
private var _url:String;
private var _itemObject:EPPObject;
private var _mediaType:String;
public static const ITEM_IMPORT_FAIL:String = "itemImportFail";
public static const ITEM_IMPORTED:String = "itemImported";
public function EPPPublisherItemEvent(_arg1:String, _arg2:String, _arg3:String, _arg4:EPPObject, _arg5:Boolean=false, _arg6:Boolean=false){
super(_arg1, _arg5, _arg6);
_url = _arg2;
_mediaType = _arg3;
_itemObject = _arg4;
}
public function get eppObject(){
return (_itemObject);
}
public function get mediaType():String{
return (_mediaType);
}
public function get url():String{
return (_url);
}
override public function clone():Event{
return (new EPPPublisherItemEvent(type, url, mediaType, eppObject, bubbles, cancelable));
}
}
}//package com.busfront.epp.events
Section 167
//EPPReporterEvent (com.busfront.epp.events.EPPReporterEvent)
package com.busfront.epp.events {
import flash.events.*;
public class EPPReporterEvent extends Event {
public static const REPORTER_UPDATE:String = "onReporterUpdate";
public function EPPReporterEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function clone():Event{
return (new EPPReporterEvent(type, bubbles, cancelable));
}
}
}//package com.busfront.epp.events
Section 168
//EPPScreenEvent (com.busfront.epp.events.EPPScreenEvent)
package com.busfront.epp.events {
import flash.display.*;
import flash.events.*;
public class EPPScreenEvent extends Event {
private var _bitmapData:BitmapData;
public static const PRINT_START:String = "printStart";
public static const PRINT_PIXEL:String = "printPixel";
public static const PRINT_UPDATE:String = "printUpdate";
public static const PRINT_STOP:String = "printStop";
public function EPPScreenEvent(_arg1:String, _arg2:BitmapData, _arg3:Boolean=false, _arg4:Boolean=false){
_bitmapData = _arg2;
super(_arg1, _arg3, _arg4);
}
public function get bitmapData():BitmapData{
return (_bitmapData);
}
override public function clone():Event{
return (new EPPScreenEvent(type, bitmapData, bubbles, cancelable));
}
}
}//package com.busfront.epp.events
Section 169
//EPPSlotEvent (com.busfront.epp.events.EPPSlotEvent)
package com.busfront.epp.events {
import com.busfront.epp.base.*;
import flash.events.*;
public class EPPSlotEvent extends EPPEvent {
private var _index:uint;
public static const SLOT_IN:String = "slotIn";
public static const SLOT_EMPTY:String = "slotEmpty";
public static const SLOT_OUT:String = "slotOut";
public function EPPSlotEvent(_arg1:String, _arg2:EPPObject, _arg3:uint=0, _arg4:Boolean=false, _arg5:Boolean=false){
_index = _arg3;
super(_arg1, _arg2, _arg4, _arg5);
}
public function get index():uint{
return (_index);
}
override public function clone():Event{
return (new EPPSlotEvent(type, eppObject, _index, bubbles, cancelable));
}
}
}//package com.busfront.epp.events
Section 170
//EPPStreamEvent (com.busfront.epp.events.EPPStreamEvent)
package com.busfront.epp.events {
import flash.events.*;
public class EPPStreamEvent extends Event {
private var _data:Object;
public static const XMPDATA:String = "XmpData";
public static const TEXTDATA:String = "TextData";
public static const COMPLETE:String = "Complete";
public static const IMAGEDATA:String = "ImageData";
public static const METADATA:String = "MetaData";
public function EPPStreamEvent(_arg1:String, _arg2:Object=null, _arg3:Boolean=false, _arg4:Boolean=false){
super(_arg1, _arg3, _arg4);
_data = _arg2;
}
public function get data():Object{
return (_data);
}
override public function clone():Event{
return (new EPPStreamEvent(type, bubbles, cancelable));
}
}
}//package com.busfront.epp.events
Section 171
//EPPSWFEvent (com.busfront.epp.events.EPPSWFEvent)
package com.busfront.epp.events {
import flash.events.*;
public class EPPSWFEvent extends Event {
public static const INIT:String = "init";
public function EPPSWFEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function clone():Event{
return (new EPPSWFEvent(type, bubbles, cancelable));
}
}
}//package com.busfront.epp.events
Section 172
//EPPSoundChannel (com.busfront.epp.net.channel.sound.EPPSoundChannel)
package com.busfront.epp.net.channel.sound {
import com.busfront.epp.controls.*;
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
import flash.events.*;
import com.busfront.epp.controls.mixer.*;
import com.busfront.epp.base.media.*;
import flash.utils.*;
import flash.media.*;
public class EPPSoundChannel implements ISoundChannel {
protected var _volumeMuted:Number;
protected var _volumeTimer:Timer;
protected var _mediaMixable:IMixable;
public var _lastState:EPPState;
protected var _pan:Number;// = 0.5
protected var _stream;
protected var _volumeMax:Number;// = 1
public var _dontChangeState:Boolean;// = false
protected var _volume:Number;// = 1
public function EPPSoundChannel(_arg1:IMixable){
_mediaMixable = _arg1;
}
private function startoPlaySetVolume(_arg1:EPPPlayerEvent):void{
_mediaMixable.player.removeEventListener(EPPPlayerEvent.PLAYING, startoPlaySetVolume);
volume = _volume;
}
private function timerVolumeing(_arg1:TimerEvent):void{
_mediaMixable.mixer.dispatchEvent(_mediaMixable.mixer.getStateByName(EPPMixerEvent.VOLUMEING).event);
}
public function clear():void{
_volume = 1;
_volumeMuted = 0;
_lastState = null;
_dontChangeState = false;
}
private function destroy():void{
if (_volumeTimer){
_volumeTimer.stop();
_volumeTimer.removeEventListener(TimerEvent.TIMER, timerVolumeing);
_volumeTimer = null;
};
}
public function mute():void{
var _local1:SoundTransform;
if (_stream){
trace("yo j'ai un stream ");
_local1 = _stream.soundTransform;
_volumeMuted = _local1.volume;
_local1.volume = 0;
_stream.soundTransform = _local1;
} else {
trace("bof j'ai pas de stream");
_volumeMuted = _volume;
};
trace(("just muted video _volumeMuted -> " + _volumeMuted));
volume = 0;
_mediaMixable.mixer.setState(_mediaMixable.mixer.getStateByName(EPPMixerEvent.MUTED));
}
public function get volume():Number{
return (_volume);
}
public function get pan():Number{
return (_pan);
}
public function unmute():void{
var _local1:SoundTransform;
if (_stream){
_local1 = _stream.soundTransform;
_local1.volume = _volumeMuted;
_volumeMuted = _local1.volume;
_stream.soundTransform = _local1;
volume = _volumeMuted;
} else {
volume = _volumeMuted;
_volumeMuted = _volume;
};
trace(("just unmuted video _volumeMuted -> " + _volumeMuted));
trace(("just unmuted video volume -> " + volume));
_mediaMixable.mixer.setState(_mediaMixable.mixer.getStateByName(EPPMixerEvent.UNMUTED));
}
public function set pan(_arg1):void{
var _local5:Number;
var _local6:SoundTransform;
var _local2:String = String(_arg1);
var _local3:Array = _local2.split("%");
var _local4:Number = Number(_local3[0]);
_pan = _local4;
if (_pan > 1){
_pan = 1;
};
if (_pan < 0){
_pan = 0;
};
if (_pan < 0.5){
_local5 = (_pan * 2);
_local5 = (-1 + _pan);
} else {
if (_pan == 0.5){
_local5 = 0;
} else {
_local5 = (1 - ((1 - _pan) * 2));
};
};
if (_stream != null){
_local6 = _stream.soundTransform;
_local6.pan = _local5;
_stream.soundTransform = _local6;
};
}
public function set volume(_arg1):void{
var _local5:SoundTransform;
var _local6:uint;
var _local7:uint;
var _local8:EPPObject;
if (_mediaMixable.mixer.state.name != EPPMixerEvent.VOLUMEING){
_lastState = _mediaMixable.mixer.state;
_mediaMixable.mixer.setState(_mediaMixable.mixer.getStateByName(EPPMixerEvent.VOLUMEING));
if (this._dontChangeState == true){
if (_volumeTimer == null){
_volumeTimer = new Timer(100);
};
_volumeTimer.addEventListener(TimerEvent.TIMER, timerVolumeing);
_volumeTimer.start();
};
};
var _local2:String = String(_arg1);
var _local3:Array = _local2.split("%");
var _local4:Number = Number(_local3[0]);
_volume = _local4;
if (_stream != null){
_local5 = _stream.soundTransform;
if (_local4 <= 0){
_mediaMixable.mixer.setState(_mediaMixable.mixer.getStateByName(EPPMixerEvent.MUTED));
_local5.volume = 0;
_stream.soundTransform = _local5;
} else {
_volumeMuted = _local4;
_local5.volume = (_local4 * _volumeMax);
_stream.soundTransform = _local5;
if (_dontChangeState == false){
_mediaMixable.mixer.setState(_mediaMixable.mixer.getStateByName(EPPMixerEvent.VOLUMED));
destroy();
};
};
} else {
if ((_mediaMixable is EPPMediaCollection)){
if (_local4 <= 0){
_mediaMixable.mixer.setState(_mediaMixable.mixer.getStateByName(EPPMixerEvent.MUTED));
_local4 = 0;
};
_local6 = EPPMediaCollection(_mediaMixable).length;
while (_local7 < _local6) {
_local8 = EPPMediaCollection(_mediaMixable).getChildAt(_local7);
if ((_local8 is IMixable)){
IMixable(_local8).mixer.channel._volumeMax = (_volume * _volumeMax);
IMixable(_local8).mixer.volume = IMixable(_local8).mixer.channel._volume;
};
_local7++;
};
if (_dontChangeState == false){
_mediaMixable.mixer.setState(_mediaMixable.mixer.getStateByName(EPPMixerEvent.VOLUMED));
destroy();
};
} else {
_mediaMixable.player.removeEventListener(EPPPlayerEvent.PLAYING, startoPlaySetVolume);
_mediaMixable.player.addEventListener(EPPPlayerEvent.PLAYING, startoPlaySetVolume, false, 1);
};
};
}
}
}//package com.busfront.epp.net.channel.sound
Section 173
//EPPSoundChannelAudio (com.busfront.epp.net.channel.sound.EPPSoundChannelAudio)
package com.busfront.epp.net.channel.sound {
import com.busfront.epp.controls.mixer.*;
public class EPPSoundChannelAudio extends EPPSoundChannel {
public function EPPSoundChannelAudio(_arg1:IMixable){
super(_arg1);
}
override public function unmute():void{
_stream = _mediaMixable.player.channel.channel;
super.unmute();
}
override public function set volume(_arg1):void{
_stream = _mediaMixable.player.channel.channel;
super.volume = _arg1;
}
override public function mute():void{
_stream = _mediaMixable.player.channel.channel;
super.mute();
}
override public function set pan(_arg1):void{
_stream = _mediaMixable.player.channel.channel;
super.pan = _arg1;
}
}
}//package com.busfront.epp.net.channel.sound
Section 174
//EPPSoundChannelCollection (com.busfront.epp.net.channel.sound.EPPSoundChannelCollection)
package com.busfront.epp.net.channel.sound {
import com.busfront.epp.controls.mixer.*;
public class EPPSoundChannelCollection extends EPPSoundChannel {
public function EPPSoundChannelCollection(_arg1:IMixable){
super(_arg1);
}
}
}//package com.busfront.epp.net.channel.sound
Section 175
//EPPSoundChannelVideo (com.busfront.epp.net.channel.sound.EPPSoundChannelVideo)
package com.busfront.epp.net.channel.sound {
import com.busfront.epp.controls.mixer.*;
public class EPPSoundChannelVideo extends EPPSoundChannel {
public function EPPSoundChannelVideo(_arg1:IMixable){
super(_arg1);
}
override public function mute():void{
_stream = _mediaMixable.player.stream.stream;
super.mute();
}
override public function unmute():void{
_stream = _mediaMixable.player.stream.stream;
super.unmute();
}
override public function set volume(_arg1):void{
_stream = _mediaMixable.player.stream.stream;
super.volume = _arg1;
}
override public function set pan(_arg1):void{
_stream = _mediaMixable.player.channel.channel;
super.pan = _arg1;
}
}
}//package com.busfront.epp.net.channel.sound
Section 176
//ISoundChannel (com.busfront.epp.net.channel.sound.ISoundChannel)
package com.busfront.epp.net.channel.sound {
public interface ISoundChannel {
function get volume():Number;
function unmute():void;
function set volume(_arg1):void;
function mute():void;
function set pan(_arg1):void;
function get pan():Number;
}
}//package com.busfront.epp.net.channel.sound
Section 177
//EPPChannel (com.busfront.epp.net.channel.EPPChannel)
package com.busfront.epp.net.channel {
import com.busfront.epp.controls.*;
import com.busfront.epp.controls.player.*;
import com.busfront.epp.net.channel.sound.*;
import com.busfront.epp.net.stream.*;
import flash.utils.*;
public class EPPChannel implements IChannel {
protected var _mediaObject:IPlayable;
private var _rated:Boolean;// = false
protected var _eppStream:EPPStream;
protected var _timerPlaying:Timer;
protected var _playPosition:Number;// = 0
public var _lastState:EPPState;
protected var _time:Number;// = 0
public var _dontChangeState:Boolean;// = false
protected var _virtualTime:Number;// = 0
protected var _rate:Number;// = 1
public function EPPChannel(_arg1:EPPStream, _arg2:IPlayable){
_eppStream = _arg1;
_mediaObject = _arg2;
}
public function set rate(_arg1):void{
if (_rated === false){
_rated = true;
initRating();
};
_rate = _arg1;
}
public function stop():void{
throw (new Error("NO OVERRIDE"));
}
public function get channel(){
return (null);
}
protected function initRating():void{
}
public function destroyPlay():void{
throw (new Error("NO OVERRIDE"));
}
public function get time():Number{
return (_time);
}
public function createSoundChannel():EPPSoundChannel{
throw (new Error("MEDIA IS NOT MIXABLE"));
}
public function seek(_arg1):void{
throw (new Error("NO OVERRIDE"));
}
public function get rate():Number{
return (_rate);
}
public function createChannel():void{
}
public function clear():void{
_time = 0;
}
public function play(... _args):void{
}
public function pause():void{
throw (new Error("NO OVERRIDE"));
}
}
}//package com.busfront.epp.net.channel
Section 178
//EPPChannelAudio (com.busfront.epp.net.channel.EPPChannelAudio)
package com.busfront.epp.net.channel {
import com.busfront.epp.events.*;
import com.busfront.epp.controls.player.*;
import com.busfront.epp.net.channel.sound.*;
import flash.events.*;
import com.busfront.epp.net.stream.*;
import com.busfront.epp.controls.mixer.*;
import com.busfront.epp.base.media.*;
import flash.utils.*;
import flash.media.*;
public class EPPChannelAudio extends EPPChannel {
private const BLOCK_SIZE:int = 0x0C00;
private var _tryToTimerr:Timer;
private var _ratePosition:Number;
private var _rateSound:Sound;
private var _tryToTimer:Timer;
private var _rateTarget:ByteArray;
private var _channelAudio:SoundChannel;
public function EPPChannelAudio(_arg1:EPPStreamAudio, _arg2:IPlayable){
super(_arg1, _arg2);
}
private function tryToPause(_arg1:TimerEvent):void{
_tryToTimer.stop();
_tryToTimer.removeEventListener(TimerEvent.TIMER, tryToPause);
_tryToTimer = null;
pause();
}
private function soundCompleteHandler(_arg1:Event):void{
destroyPlay();
_channelAudio.stop();
_mediaObject.player.setState(_mediaObject.player.getStateByName(EPPPlayerEvent.PLAYED));
}
override public function stop():void{
if (_channelAudio != null){
destroyPlay();
_playPosition = 0;
_channelAudio.stop();
_time = 0;
if (_mediaObject.player.stateName != EPPPlayerEvent.STOPPING){
_mediaObject.player.setState(_mediaObject.player.getStateByName(EPPPlayerEvent.STOPPING));
};
_mediaObject.player.setState(_mediaObject.player.getStateByName(EPPPlayerEvent.STOPPED));
} else {
_mediaObject.player.setState(_mediaObject.player.getStateByName(EPPPlayerEvent.STOPPING));
_tryToTimer = null;
_tryToTimer = new Timer(10);
_tryToTimer.addEventListener(TimerEvent.TIMER, tryToStop);
_tryToTimer.start();
};
}
override public function get channel(){
return (_channelAudio);
}
override protected function initRating():void{
var _local1:Class = (getDefinitionByName("flash.events.SampleDataEvent") as Class);
if (_local1){
_ratePosition = 0;
_rateTarget = new ByteArray();
_rateSound = new Sound();
_rateSound.removeEventListener(_local1.SAMPLE_DATA, sampleData);
_rateSound.addEventListener(_local1.SAMPLE_DATA, sampleData);
};
}
override public function destroyPlay():void{
destroyPlayTimer();
if (_channelAudio != null){
_channelAudio.removeEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
};
}
override public function clear():void{
super.clear();
destroyPlayTimer();
_playPosition = 0;
if (_channelAudio){
_channelAudio.stop();
_channelAudio = null;
};
}
private function destroyPlayTimer():void{
if (_timerPlaying){
_timerPlaying.stop();
_timerPlaying.removeEventListener(TimerEvent.TIMER, updatePlaying);
_timerPlaying = null;
};
}
private function updatePlaying(_arg1:TimerEvent):void{
var _local2:Class;
_time = (_channelAudio.position / 1000);
if (((_rateSound) && ((_mediaObject.player.time >= _mediaObject.player.duration)))){
_local2 = (getDefinitionByName("flash.events.SampleDataEvent") as Class);
_rateSound.removeEventListener(_local2.SAMPLE_DATA, sampleData);
_time = (_mediaObject.player.duration + _mediaObject.player.start);
_channelAudio.stop();
_mediaObject.player.setState(_mediaObject.player.getStateByName(EPPPlayerEvent.PLAYED));
return;
};
if (((!((_mediaObject.player.end == _mediaObject.loader.metadata.duration))) && ((_mediaObject.player.time == _mediaObject.player.duration)))){
_time = (_mediaObject.player.duration + _mediaObject.player.start);
_channelAudio.stop();
_mediaObject.player.setState(_mediaObject.player.getStateByName(EPPPlayerEvent.PLAYED));
} else {
_mediaObject.player.dispatchEvent(_mediaObject.player.getStateByName(EPPPlayerEvent.PLAYING).event);
};
}
override public function createSoundChannel():EPPSoundChannel{
if ((_mediaObject is IMixable)){
return (new EPPSoundChannelAudio((_mediaObject as IMixable)));
};
throw (new Error("UNABLE TO CREATE THIS SOUND CHANNEL BECAUSE THE MEDIA IS NOT MIXABLE"));
}
private function sampleData(_arg1):void{
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
_rateTarget.position = 0;
var _local2:ByteArray = _arg1.data;
var _local3:Number = (BLOCK_SIZE * _rate);
var _local4:int = _ratePosition;
var _local5:Number = (_ratePosition - _local4);
var _local6:Number = _local5;
var _local7 = -1;
var _local8:int = (Math.ceil(_local3) + 2);
var _local9:* = (this._eppStream.stream as Sound);
var _local10:int = _local9.extract(_rateTarget, _local8, _local4);
var _local11:int = ((_local10 == _local8)) ? BLOCK_SIZE : (_local10 / _rate);
var _local16:int;
while (_local16 < _local11) {
if (int(_local6) != _local7){
_local7 = _local6;
_rateTarget.position = (_local7 << 3);
_local12 = _rateTarget.readFloat();
_local13 = _rateTarget.readFloat();
_local14 = _rateTarget.readFloat();
_local15 = _rateTarget.readFloat();
};
_local2.writeFloat((_local12 + (_local5 * (_local14 - _local12))));
_local2.writeFloat((_local13 + (_local5 * (_local15 - _local13))));
_local6 = (_local6 + _rate);
_local5 = (_local5 + _rate);
while (_local5 >= 1) {
_local5--;
};
_local16++;
};
if (_local16 < BLOCK_SIZE){
while (_local16 < BLOCK_SIZE) {
_local2.writeFloat(0);
_local2.writeFloat(0);
_local16++;
};
};
_ratePosition = (_ratePosition + _local3);
}
override public function pause():void{
if (_channelAudio != null){
destroyPlay();
_playPosition = _channelAudio.position;
_channelAudio.stop();
_mediaObject.player.setState(_mediaObject.player.getStateByName(EPPPlayerEvent.PAUSED));
} else {
_tryToTimer = null;
_tryToTimer = new Timer(10);
_tryToTimer.addEventListener(TimerEvent.TIMER, tryToPause);
_tryToTimer.start();
};
}
private function tryToStop(_arg1:TimerEvent):void{
_tryToTimer.stop();
_tryToTimer.removeEventListener(TimerEvent.TIMER, tryToStop);
_tryToTimer = null;
stop();
}
override public function play(... _args):void{
var _local3:Number;
destroyPlay();
if (_args[0] != ""){
if (_args.length > 0){
_playPosition = (Number(_args[0]) * 1000);
};
};
if ((((_mediaObject.player.start > 0)) && ((_playPosition == 0)))){
_playPosition = (_mediaObject.player.start * 1000);
};
if (_channelAudio != null){
_channelAudio.stop();
_channelAudio = null;
};
var _local2:Number = 1;
if (_mediaObject.hasParent){
_local2 = EPPMixer(EPPMediaCollection(_mediaObject.parent).mixer).channel.volume;
};
if ((_mediaObject is EPPAudio)){
_local3 = EPPMixer(IMixable(_mediaObject).mixer).channel.volume;
} else {
_local3 = EPPMixer(IMixable(EPPMediaOccurence(_mediaObject).original).mixer).channel.volume;
};
if (_rateSound){
initRating();
_channelAudio = _rateSound.play(_playPosition, (_mediaObject.player.loop - _mediaObject.player.loopCount), new SoundTransform((_local3 * _local2)));
} else {
_channelAudio = _mediaObject.player.stream.stream.play(_playPosition, (_mediaObject.player.loop - _mediaObject.player.loopCount), new SoundTransform((_local3 * _local2)));
};
_channelAudio.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
_mediaObject.player.setState(_mediaObject.player.getStateByName(EPPPlayerEvent.PLAYING));
if (_timerPlaying == null){
_timerPlaying = new Timer(50);
};
_timerPlaying.removeEventListener(TimerEvent.TIMER, updatePlaying);
_timerPlaying.addEventListener(TimerEvent.TIMER, updatePlaying);
_timerPlaying.start();
}
override public function seek(_arg1):void{
var _local4:Number;
destroyPlayTimer();
if (_mediaObject.player.stateName != EPPPlayerEvent.SEEKING){
_lastState = _mediaObject.player.state;
if (_lastState.name == EPPPlayerEvent.PLAYING){
_channelAudio.stop();
};
};
var _local2:String = String(_arg1);
var _local3:Array = _local2.split("%");
if (_local3.length == 2){
_local4 = (Number(_local3[0]) * _mediaObject.player.duration);
} else {
_local4 = Number(_arg1);
};
if ((((_local4 > _mediaObject.player.duration)) || (((_local4 + 0.7) >= _mediaObject.player.duration)))){
_local4 = _mediaObject.player.duration;
};
if (_local4 < 0){
_local4 = 0;
};
_time = (_local4 + _mediaObject.player.start);
if (_mediaObject.player.stateName != EPPPlayerEvent.SEEKING){
_mediaObject.player.setState(_mediaObject.player.getStateByName(EPPPlayerEvent.SEEKING));
} else {
_mediaObject.player.dispatchEvent(_mediaObject.player.getStateByName(EPPPlayerEvent.SEEKING).event);
};
if (_rateSound){
_channelAudio = _rateSound.play(((_local4 + _mediaObject.player.start) * 1000));
} else {
_channelAudio = _mediaObject.player.stream.stream.play(((_local4 + _mediaObject.player.start) * 1000));
};
_playPosition = _channelAudio.position;
_channelAudio.stop();
if (_dontChangeState == false){
if ((((_local4 == _mediaObject.player.duration)) && ((_mediaObject.loader.stateName == EPPLoaderEvent.LOADED)))){
_mediaObject.player.setState(_mediaObject.player.getStateByName(EPPPlayerEvent.PLAYED));
} else {
if (_lastState.name == EPPPlayerEvent.PLAYING){
play();
} else {
if ((((((_lastState.name == EPPPlayerEvent.PLAYED)) || ((_lastState.name == EPPPlayerEvent.BUFFERED)))) || ((_lastState.name == EPPPlayerEvent.STOPPED)))){
if ((((_lastState.name == EPPPlayerEvent.STOPPED)) && ((_time < 0.1)))){
_mediaObject.player.channel.stop();
} else {
_mediaObject.player.channel.pause();
};
} else {
_mediaObject.player.setState(_lastState);
};
};
};
_mediaObject.player.dispatchEvent(new EPPPlayerEvent(EPPPlayerEvent.SEEKED));
_lastState = null;
};
}
}
}//package com.busfront.epp.net.channel
Section 179
//EPPChannelCollection (com.busfront.epp.net.channel.EPPChannelCollection)
package com.busfront.epp.net.channel {
import com.busfront.epp.events.*;
import com.busfront.epp.controls.player.*;
import com.busfront.epp.net.channel.sound.*;
import flash.events.*;
import com.busfront.epp.net.stream.*;
import com.busfront.epp.controls.mixer.*;
import com.busfront.epp.base.media.*;
import flash.utils.*;
public class EPPChannelCollection extends EPPChannel {
private var _collection:EPPMediaCollection;
public function EPPChannelCollection(_arg1:EPPStreamCollection, _arg2:IPlayable){
super(_arg1, _arg2);
_collection = (_arg2 as EPPMediaCollection);
}
override public function set rate(_arg1):void{
}
private function recheckColl(_arg1:EPPLoaderEvent):void{
_collection.loader.removeEventListener(EPPLoaderEvent.CONNECTION_SUCCESS, recheckColl);
_collection.getChildAt(_collection.lastValidChildIndex).addEventListener(EPPPlayerEvent.PLAYED, playedLastItem, false, 1);
}
override public function stop():void{
destroyPlay();
_time = 0;
var _local1:Namespace = _collection.getRestrictedNamespace(this);
var _local2:uint = _collection._local1::_children.length;
var _local3:uint;
while (_local3 < _local2) {
_collection.getChildAt(_local3).player.stop();
_local3++;
};
_collection.playerCollection.currentChild = _collection.firstValidChildIndex;
_mediaObject.player.setState(_mediaObject.player.getStateByName(EPPPlayerEvent.STOPPING));
_collection.player.setState(_collection.player.getStateByName(EPPPlayerEvent.STOPPED));
}
private function setPlayingState(_arg1:EPPPlayerEvent):void{
_collection.playerCollection.currentChild.player.removeEventListener(EPPPlayerEvent.PLAYING, setPlayingState);
var _local2:Boolean;
if ((((_mediaObject.player.start > 0)) && ((_time == 0)))){
_time = _mediaObject.player.start;
_collection.player.seek(_time);
_local2 = true;
};
_collection.player.setState(_collection.player.getStateByName(EPPPlayerEvent.PLAYING));
if (_local2 == false){
_collection.player.notifyScreens();
};
if (_local2 == false){
_timerPlaying = new Timer(100);
_timerPlaying.addEventListener(TimerEvent.TIMER, updatePlaying);
_timerPlaying.start();
_collection.playerCollection.currentChild.addEventListener(EPPPlayerEvent.PAUSED, currentPaused, false, 1);
_collection.playerCollection.currentChild.addEventListener(EPPPlayerEvent.STOPPED, currentStopped, false, 1);
_collection.playerCollection.currentChild.addEventListener(EPPPlayerEvent.PLAY, currentPlaying, false, 1);
_collection.playerCollection.currentChild.addEventListener(EPPPlayerEvent.SEEKING, currentSeeking, false, 1);
};
}
public function playedItem(_arg1:EPPPlayerEvent):void{
var _local2:uint = _collection.playerCollection.currentIndex;
if (_local2 < _collection.lastValidChildIndex){
if ((((_collection.player.state.name == EPPPlayerEvent.PLAYING)) && ((_collection.playerCollection.continuousPlayEnabled == true)))){
_collection.playerCollection.currentChild.player.removeEventListener(EPPPlayerEvent.PAUSED, currentPaused);
_collection.playerCollection.currentChild.player.removeEventListener(EPPPlayerEvent.STOPPED, currentStopped);
_collection.playerCollection.currentChild.player.removeEventListener(EPPPlayerEvent.PLAYING, currentPlaying);
_collection.playerCollection.currentChild = (_local2 + 1);
play();
};
};
}
private function currentPaused(_arg1:EPPPlayerEvent):void{
if (((!((_arg1.target.channel._lastState.name == EPPPlayerEvent.PLAYED))) && (!((_arg1.target.channel._lastState.name == EPPPlayerEvent.PLAYING))))){
_collection.player.setState(_collection.player.getStateByName(EPPPlayerEvent.PAUSED));
};
}
private function resumePlaying(_arg1:EPPPlayerEvent):void{
_arg1.target.removeEventListener(EPPPlayerEvent.SEEKED, resumePlaying);
if ((((_collection.playerCollection.currentChild.player.state.name == EPPPlayerEvent.PAUSED)) || ((_collection.playerCollection.currentChild.player.state.name == EPPPlayerEvent.STOPPED)))){
_collection.playerCollection.currentChild.player.play();
};
}
override public function clear():void{
super.clear();
destroyPlay();
_timerPlaying = null;
}
override public function destroyPlay():void{
if (_timerPlaying != null){
_timerPlaying.stop();
_timerPlaying.removeEventListener(TimerEvent.TIMER, updatePlaying);
};
}
override public function createSoundChannel():EPPSoundChannel{
if ((_mediaObject is IMixable)){
return (new EPPSoundChannelCollection((_mediaObject as IMixable)));
};
throw (new Error("UNABLE TO CREATE THIS SOUND CHANNEL BECAUSE THE MEDIA IS NOT MIXABLE"));
}
private function currentStopped(_arg1:EPPPlayerEvent):void{
_time = 0;
_collection.player.setState(_collection.player.getStateByName(EPPPlayerEvent.STOPPED));
}
private function removedLast(_arg1:EPPLoaderEvent):void{
_collection.loader.addEventListener(EPPLoaderEvent.CONNECTION_SUCCESS, recheckColl, false, 1);
}
private function startInternalSeek(_arg1:EPPPlayerEvent):void{
_collection.playerCollection.currentChild.player.removeEventListener(EPPPlayerEvent.PAUSED, startInternalSeek);
_collection.playerCollection.currentChild.player.play();
_timerPlaying = new Timer(100);
_timerPlaying.addEventListener(TimerEvent.TIMER, updatePlaying);
_timerPlaying.start();
_collection.player.notifyScreens();
_collection.playerCollection.currentChild.addEventListener(EPPPlayerEvent.PAUSED, currentPaused, false, 1);
_collection.playerCollection.currentChild.addEventListener(EPPPlayerEvent.STOPPED, currentStopped, false, 1);
_collection.playerCollection.currentChild.addEventListener(EPPPlayerEvent.PLAY, currentPlaying, false, 1);
_collection.playerCollection.currentChild.addEventListener(EPPPlayerEvent.SEEKING, currentSeeking, false, 1);
}
private function updatePlaying(_arg1:TimerEvent):void{
var _local2:Number = 0;
var _local3:uint = _collection.length;
var _local4:Number = 0;
var _local5:Namespace = _collection.getRestrictedNamespace(this);
var _local6:uint;
while (_local6 < _local3) {
if (_collection._local5::_children[_local6] == _collection.playerCollection.currentChild){
_local4 = (_local4 + _collection.getChildAt(_local6).player.time);
break;
};
_local4 = (_local4 + _collection.getChildAt(_local6).player.duration);
_local6++;
};
_time = _local4;
_collection.player.dispatchEvent(_collection.player.getStateByName(EPPPlayerEvent.PLAYING).event);
}
private function firstBuffered(_arg1:EPPPlayerEvent):void{
_collection.playerCollection.currentChild.player.removeEventListener(EPPPlayerEvent.BUFFERED, firstBuffered);
_collection.player.setState(_collection.player.getStateByName(EPPPlayerEvent.BUFFERED));
_collection.playerCollection.currentChild.player.play();
_collection.player.setState(_collection.player.getStateByName(EPPPlayerEvent.PLAYING));
_timerPlaying = new Timer(100);
_timerPlaying.addEventListener(TimerEvent.TIMER, updatePlaying);
_timerPlaying.start();
}
private function currentSeeking(_arg1:EPPPlayerEvent):void{
_collection.player.setState(_collection.player.getStateByName(EPPPlayerEvent.SEEKING));
}
override public function play(... _args):void{
destroyPlay();
_collection.playerCollection.currentChild.player.removeEventListener(EPPPlayerEvent.PLAYED, playedItem);
_collection.playerCollection.currentChild.removeEventListener(EPPPlayerEvent.PAUSED, currentPaused);
_collection.playerCollection.currentChild.removeEventListener(EPPPlayerEvent.STOPPED, currentStopped);
_collection.playerCollection.currentChild.removeEventListener(EPPPlayerEvent.PLAY, currentPlaying);
_collection.playerCollection.currentChild.removeEventListener(EPPPlayerEvent.SEEKING, currentSeeking);
_collection.playerCollection.currentChild.player.removeEventListener(EPPPlayerEvent.PAUSED, startInternalSeek);
if (_args[0] != ""){
if (_args.length > 0){
if (_args[0] == 0){
_collection.playerCollection.currentChild = _collection.firstValidChildIndex;
} else {
_collection.player.seek(_args[0]);
};
};
};
_collection.getChildAt(_collection.lastValidChildIndex).player.removeEventListener(EPPPlayerEvent.PLAYED, playedLastItem);
_collection.getChildAt(_collection.lastValidChildIndex).player.addEventListener(EPPPlayerEvent.PLAYED, playedLastItem, false, 1);
var _local2:Boolean;
if ((((_mediaObject.player.start > 0)) && ((_time == 0)))){
_time = _mediaObject.player.start;
_collection.player.seek(_time);
_local2 = true;
};
if (_collection.playerCollection.continuousPlayEnabled === true){
_collection.playerCollection.currentChild.player.removeEventListener(EPPPlayerEvent.PLAYED, playedItem);
_collection.playerCollection.currentChild.player.addEventListener(EPPPlayerEvent.PLAYED, playedItem, false, 1);
};
_collection.playerCollection.currentChild.player.addEventListener(EPPPlayerEvent.PLAYING, setPlayingState, false, 1);
if ((((((_collection.player.stateName == EPPPlayerEvent.PLAYING)) || ((_collection.player.stateName == EPPPlayerEvent.BUFFERED)))) || ((_collection.player.stateName == EPPPlayerEvent.PAUSED)))){
_collection.playerCollection.currentChild.player.play();
};
if ((((_collection.playerCollection.currentChild.player.stateName == EPPPlayerEvent.BUFFERING)) && ((_local2 == true)))){
_collection.playerCollection.currentChild.player.removeEventListener(EPPPlayerEvent.PAUSED, startInternalSeek);
_collection.playerCollection.currentChild.player.addEventListener(EPPPlayerEvent.PAUSED, startInternalSeek, false, 1);
};
}
private function currentPlaying(_arg1:EPPPlayerEvent):void{
_collection.player.setState(_collection.player.getStateByName(EPPPlayerEvent.PLAYING));
_timerPlaying.addEventListener(TimerEvent.TIMER, updatePlaying);
_timerPlaying.start();
}
override public function seek(_arg1):void{
var _local4:Number;
var _local5:IPlayable;
var _local9:Number;
var _local10:String;
var _local11:Array;
var _local12:Number;
var _local13:String;
var _local14:Number;
var _local15:String;
var _local16:Array;
var _local17:Number;
var _local18:String;
var _local19:String;
var _local20:Array;
var _local21:Number;
var _local22:String;
destroyPlay();
if (_collection.player.state.name != EPPPlayerEvent.SEEKING){
_lastState = _collection.player.state;
};
var _local2:String = String(_arg1);
var _local3:Array = _local2.split("%");
if (_local3.length == 2){
_local10 = String(Number((Number(_local3[0]) * _collection.player.duration)));
_local11 = _local10.split(".");
_local12 = (Number(_local3[0]) * _collection.player.duration);
if (_local11.length > 1){
_local13 = String(((_local11[0] + ".") + String(_local11[(_local11.length - 1)]).substr(0, 3)));
_local12 = Number(_local13);
};
_local4 = _local12;
} else {
_local4 = Number(_arg1);
};
var _local6:Number = 0;
var _local7:uint = _collection.length;
var _local8:uint;
while (_local8 < _local7) {
_local14 = _collection.getChildAt(_local8).player.duration;
_local15 = String(Number((_local14 + _local6)));
_local16 = _local15.split(".");
_local17 = (_local14 + _local6);
if (_local16.length > 1){
_local18 = String(((_local16[0] + ".") + String(_local16[(_local16.length - 1)]).substr(0, 3)));
_local17 = Number(_local18);
};
if (_local4 < _local17){
_local5 = _collection.getChildAt(_local8);
break;
};
_local6 = Number((_local6 + _collection.getChildAt(_local8).player.duration));
_local8++;
};
if (_local5 != null){
if (_local5 != _collection.playerCollection.currentChild){
_collection.playerCollection.currentChild.player.removeEventListener(EPPPlayerEvent.SEEKED, resumePlaying);
_collection.playerCollection.currentChild = _local5.order;
};
};
if ((((_local6 >= _collection.playerCollection.currentChild.player.duration)) && ((_local5 == null)))){
_local9 = _collection.playerCollection.currentChild.player.duration;
} else {
_local19 = String(Number((_local4 - _local6)));
_local20 = _local19.split(".");
_local21 = (_local4 - _local6);
if (_local20.length > 1){
_local22 = String(((_local20[0] + ".") + String(_local20[(_local20.length - 1)]).substr(0, 3)));
_local21 = Number(_local22);
};
_local9 = _local21;
};
if (_local4 >= _collection.player.duration){
_time = _collection.player.duration;
} else {
_time = _local4;
};
if (_dontChangeState == false){
if (_lastState.name == EPPPlayerEvent.PLAYING){
_collection.playerCollection.currentChild.player.addEventListener(EPPPlayerEvent.SEEKED, resumePlaying, false, 1);
};
};
_collection.playerCollection.currentChild.player.channel._dontChangeState = _dontChangeState;
_collection.playerCollection.currentChild.player.seek(_local9);
if (_collection.player.state.name != EPPPlayerEvent.SEEKING){
_collection.player.setState(_collection.player.getStateByName(EPPPlayerEvent.SEEKING));
} else {
_collection.player.dispatchEvent(_collection.player.getStateByName(EPPPlayerEvent.SEEKING).event);
};
if (_dontChangeState == false){
if (_lastState.name == EPPPlayerEvent.PLAYING){
play();
} else {
if ((((((_lastState.name == EPPPlayerEvent.PLAYED)) || ((_lastState.name == EPPPlayerEvent.STOPPED)))) || ((_lastState.name == EPPPlayerEvent.BUFFERED)))){
if ((((_lastState.name == EPPPlayerEvent.STOPPED)) && ((_time < 0.1)))){
_mediaObject.player.channel.stop();
} else {
_mediaObject.player.channel.pause();
};
} else {
_mediaObject.player.setState(_lastState);
};
};
_collection.player.dispatchEvent(new EPPPlayerEvent(EPPPlayerEvent.SEEKED));
_collection.player.notifyScreens();
_lastState = null;
};
}
private function playedLastItem(_arg1:EPPPlayerEvent):void{
destroyPlay();
_collection.player.setState(_collection.player.getStateByName(EPPPlayerEvent.PLAYED));
}
override public function pause():void{
destroyPlay();
_collection.playerCollection.currentChild.player.pause();
_collection.player.setState(_collection.player.getStateByName(EPPPlayerEvent.PAUSED));
}
}
}//package com.busfront.epp.net.channel
Section 180
//EPPChannelImage (com.busfront.epp.net.channel.EPPChannelImage)
package com.busfront.epp.net.channel {
import com.busfront.epp.events.*;
import flash.display.*;
import com.busfront.epp.controls.player.*;
import com.busfront.epp.net.channel.sound.*;
import flash.geom.*;
import flash.events.*;
import com.busfront.epp.net.stream.*;
import com.busfront.epp.controls.mixer.*;
import com.busfront.epp.base.media.*;
import flash.utils.*;
public class EPPChannelImage extends EPPChannel {
private var _getTimerCache:int;
private var _channelImage:BitmapData;
public function EPPChannelImage(_arg1:EPPStreamImage, _arg2:IPlayable){
super(_arg1, _arg2);
}
override public function set rate(_arg1):void{
}
override public function stop():void{
destroyPlay();
_time = _mediaObject.player.start;
_playPosition = (_mediaObject.player.start * 1000);
_mediaObject.player.setState(_mediaObject.player.getStateByName(EPPPlayerEvent.STOPPING));
_mediaObject.player.setState(_mediaObject.player.getStateByName(EPPPlayerEvent.STOPPED));
}
override public function get channel(){
return (_channelImage);
}
override public function createChannel():void{
var _local1:BitmapData;
var _local2:BitmapData;
if (_channelImage == null){
_local1 = Bitmap(_mediaObject.player.stream.stream.content).bitmapData;
_local2 = new BitmapData(_local1.width, _local1.height, _local1.transparent);
_local2.copyPixels(_local1, _local1.rect, new Point(0, 0));
_channelImage = _local2;
} else {
throw (new Error("CHANNEL ALLREADY EXIST"));
};
}
override public function clear():void{
super.clear();
destroyPlay();
_playPosition = 0;
_channelImage = null;
}
override public function createSoundChannel():EPPSoundChannel{
if ((_mediaObject is EPPMediaOccurence)){
return (new EPPSoundChannel((_mediaObject as IMixable)));
};
throw (new Error("UNABLE TO CREATE THIS SOUND CHANNEL BECAUSE THE MEDIA IS NOT MIXABLE"));
}
private function updatePosition(_arg1:TimerEvent):void{
var _local2:int = getTimer();
_time = (_time + ((_local2 - _getTimerCache) / 1000));
_getTimerCache = _local2;
if ((((_mediaObject.player.time >= _mediaObject.player.duration)) && ((_mediaObject.player.duration > 0)))){
destroyPlay();
_mediaObject.player.setState(_mediaObject.player.getStateByName(EPPPlayerEvent.PLAYED));
} else {
_mediaObject.player.dispatchEvent(_mediaObject.player.getStateByName(EPPPlayerEvent.PLAYING).event);
};
}
override public function destroyPlay():void{
if (_timerPlaying != null){
_timerPlaying.stop();
_timerPlaying.removeEventListener(TimerEvent.TIMER, updatePosition);
_timerPlaying = null;
};
}
override public function pause():void{
destroyPlay();
_mediaObject.player.setState(_mediaObject.player.getStateByName(EPPPlayerEvent.PAUSED));
}
override public function seek(_arg1):void{
var _local4:Number;
destroyPlay();
if (_mediaObject.player.state.name != EPPPlayerEvent.SEEKING){
_lastState = _mediaObject.player.state;
};
var _local2:String = String(_arg1);
var _local3:Array = _local2.split("%");
if (_local3.length == 2){
_local4 = (Number(_local3[0]) * _mediaObject.player.duration);
} else {
_local4 = Number(_arg1);
};
if (_local4 >= (_mediaObject.player.duration - 0.1)){
_local4 = _mediaObject.player.duration;
};
if (_local4 < 0){
_local4 = 0;
};
_time = (_local4 + _mediaObject.player.start);
if (_timerPlaying == null){
_timerPlaying = new Timer(100);
};
_playPosition = ((_local4 + _mediaObject.player.start) * 1000);
if (_mediaObject.player.state.name != EPPPlayerEvent.SEEKING){
_mediaObject.player.setState(_mediaObject.player.getStateByName(EPPPlayerEvent.SEEKING));
} else {
_mediaObject.player.dispatchEvent(_mediaObject.player.getStateByName(EPPPlayerEvent.SEEKING).event);
};
if (_dontChangeState == false){
if (_local4 == _mediaObject.player.duration){
_mediaObject.player.setState(_mediaObject.player.getStateByName(EPPPlayerEvent.PLAYED));
} else {
if (_lastState.name == EPPPlayerEvent.PLAYING){
play();
} else {
if ((((((_lastState.name == EPPPlayerEvent.PLAYED)) || ((_lastState.name == EPPPlayerEvent.BUFFERED)))) || ((_lastState.name == EPPPlayerEvent.STOPPED)))){
if ((((_lastState.name == EPPPlayerEvent.STOPPED)) && ((_time < 0.1)))){
_mediaObject.player.channel.stop();
} else {
_mediaObject.player.channel.pause();
};
} else {
_mediaObject.player.setState(_lastState);
};
};
};
_mediaObject.player.dispatchEvent(new EPPPlayerEvent(EPPPlayerEvent.SEEKED));
_lastState = null;
};
}
override public function play(... _args):void{
destroyPlay();
if (_args[0] != ""){
if (_args.length > 0){
_playPosition = ((Number(_args[0]) + _mediaObject.player.start) * 1000);
_time = (Number(_args[0]) + _mediaObject.player.start);
};
};
if ((((_mediaObject.player.start > 0)) && ((_playPosition == 0)))){
_playPosition = (_mediaObject.player.start * 1000);
_time = _mediaObject.player.start;
};
_getTimerCache = getTimer();
_timerPlaying = new Timer(50);
_timerPlaying.addEventListener(TimerEvent.TIMER, updatePosition);
_timerPlaying.start();
_mediaObject.player.notifyScreens();
_mediaObject.player.setState(_mediaObject.player.getStateByName(EPPPlayerEvent.PLAYING));
}
}
}//package com.busfront.epp.net.channel
Section 181
//EPPChannelVideo (com.busfront.epp.net.channel.EPPChannelVideo)
package com.busfront.epp.net.channel {
import com.busfront.epp.events.*;
import com.busfront.epp.controls.player.*;
import com.busfront.epp.net.channel.sound.*;
import flash.events.*;
import com.busfront.epp.net.stream.*;
import com.busfront.epp.controls.mixer.*;
import flash.utils.*;
import flash.media.*;
public class EPPChannelVideo extends EPPChannel {
private var _lastSeekPoint:Number;// = -1
private var _endTimer:Timer;
private var _startingTime:Number;
private var _retrySeekTimer:Timer;
private var _repeatTime:Number;
private var _oldNeededTime:Number;// = 0
private var _dontChangeCount:uint;// = 0
private var _timeBlock:Number;// = 0
private var _lastStreamTime:Number;// = 0
private var _neededTime:Number;// = 0
private var _isIntenalStartSeeking:Boolean;// = false
private var _isStartBuffFull:Boolean;// = false
private var _stepsInSeconds:Number;// = 0
private var _difference:Number;// = 0
private var _nbTimerToWait:uint;// = 0
private var _netStreamTimer:Timer;
private var _isBuffFull:Boolean;// = false
private var _allReadyplayed:Boolean;// = false
private var _seekBuffer:Timer;
public function EPPChannelVideo(_arg1:EPPStreamVideo, _arg2:IPlayable){
_endTimer = new Timer(700);
super(_arg1, _arg2);
}
override public function pause():void{
destroyPlayTimer();
_endTimer.stop();
_eppStream.stream.pause();
_mediaObject.player.setState(_mediaObject.player.getStateByName(EPPPlayerEvent.PAUSED));
}
override public function createSoundChannel():EPPSoundChannel{
if ((_mediaObject is IMixable)){
return (new EPPSoundChannelVideo((_mediaObject as IMixable)));
};
throw (new Error("UNABLE TO CREATE THIS SOUND CHANNEL BECAUSE THE MEDIA IS NOT MIXABLE"));
}
private function destroyPlayTimer():void{
if (_timerPlaying != null){
_timerPlaying.stop();
_timerPlaying.removeEventListener(TimerEvent.TIMER, updatePlaying);
_timerPlaying.reset();
};
}
private function isReady():Boolean{
var _local1:Boolean;
var _local2:Boolean;
if (_repeatTime > 0){
if (_repeatTime == _eppStream.stream.time){
_dontChangeCount++;
} else {
_dontChangeCount = 0;
};
_local2 = true;
};
if ((((EPPStreamVideo(_eppStream).hasSeekpoints === true)) && ((((_eppStream.stream.time == getNearestSeekPoint(_time))) || ((_dontChangeCount == 3)))))){
_local1 = true;
_dontChangeCount = 0;
_local2 = true;
};
if ((((((((((_local2 === false)) && ((_mediaObject.player.start == 0)))) && (!((_mediaObject.player.loop == 0))))) && ((_mediaObject.player.stateName == EPPPlayerEvent.PLAYED)))) && ((EPPStreamVideo(_eppStream).hasSeekpoints === false)))){
_local1 = true;
_dontChangeCount = 0;
return (true);
};
if ((((EPPStreamVideo(_eppStream).hasSeekpoints === false)) && ((_dontChangeCount == 3)))){
_local1 = true;
_dontChangeCount = 0;
};
_repeatTime = _eppStream.stream.time;
return (_local1);
}
override public function stop():void{
_endTimer.stop();
_lastSeekPoint = 0;
_eppStream.stream.pause();
destroyPlayTimer();
_eppStream.stream.removeEventListener(NetStatusEvent.NET_STATUS, stoppingStatusHandler);
if (_eppStream.stream){
_mediaObject.player.setState(_mediaObject.player.getStateByName(EPPPlayerEvent.STOPPING));
_eppStream.stream.addEventListener(NetStatusEvent.NET_STATUS, stoppingStatusHandler);
_eppStream.stream.seek(0);
} else {
_time = 0;
_mediaObject.player.setState(_mediaObject.player.getStateByName(EPPPlayerEvent.STOPPING));
_mediaObject.player.setState(_mediaObject.player.getStateByName(EPPPlayerEvent.STOPPED));
};
}
private function netStreamWaitBufferStatus(_arg1:NetStatusEvent):void{
switch (_arg1.info.code){
case "NetStream.Buffer.Full":
_isIntenalStartSeeking = false;
initPlaying();
_eppStream.stream.removeEventListener(NetStatusEvent.NET_STATUS, netStreamWaitBufferStatus);
break;
};
}
private function destroySeek():void{
if (_eppStream.stream != null){
_eppStream.stream.removeEventListener(NetStatusEvent.NET_STATUS, seekingStatusHandler);
};
}
private function updatePlaying(_arg1:TimerEvent):void{
if (_eppStream.stream == null){
_time = 0;
} else {
_time = _eppStream.stream.time;
};
if (_mediaObject.player.time >= _mediaObject.player.duration){
_time = (_mediaObject.player.duration + _mediaObject.player.start);
_eppStream.stream.pause();
destroyPlay();
_allReadyplayed = true;
_mediaObject.player.setState(_mediaObject.player.getStateByName(EPPPlayerEvent.PLAYED));
} else {
_mediaObject.player.dispatchEvent(_mediaObject.player.getStateByName(EPPPlayerEvent.PLAYING).event);
};
}
private function retrySeekLater(_arg1:TimerEvent):void{
if (_retrySeekTimer){
endSeek();
_retrySeekTimer.stop();
_retrySeekTimer.removeEventListener(TimerEvent.TIMER, retrySeekLater);
_retrySeekTimer = null;
_eppStream.stream.seek(_neededTime);
};
}
private function seekingStatusHandler(_arg1:NetStatusEvent):void{
trace(_arg1.info.code);
_isBuffFull = false;
switch (_arg1.info.code){
case "NetStream.Seek.InvalidTime":
trace(_mediaObject.player.duration);
trace(_mediaObject.player.time);
endSeek();
break;
case "NetStream.Seek.Failed":
throw (new Error((("[EPP] SEEK FAILED : Time : " + _time) + " is invalid.")));
case "NetStream.Play.Stop":
case "NetStream.Seek.InvalidTime":
if (_mediaObject.player.time > _mediaObject.player.duration){
throw (new Error((("[EPP] SEEK FAILED : Time : " + _time) + " is invalid.")));
};
if (_mediaObject.player.time != _mediaObject.player.duration){
_retrySeekTimer = new Timer(100);
_retrySeekTimer.addEventListener(TimerEvent.TIMER, retrySeekLater);
_retrySeekTimer.start();
} else {
if (_mediaObject.player.time == _mediaObject.player.duration){
_allReadyplayed = true;
_mediaObject.player.setState(_mediaObject.player.getStateByName(EPPPlayerEvent.PLAYED));
_mediaObject.player.dispatchEvent(new EPPPlayerEvent(EPPPlayerEvent.SEEKED));
_lastSeekPoint = _time;
_lastState = null;
destroySeek();
};
};
break;
case "NetStream.Seek.Notify":
if (_retrySeekTimer){
_retrySeekTimer.stop();
_retrySeekTimer.removeEventListener(TimerEvent.TIMER, retrySeekLater);
_retrySeekTimer = null;
};
if (_mediaObject.player.stateName != EPPPlayerEvent.PLAYED){
if (_seekBuffer){
_seekBuffer.removeEventListener(TimerEvent.TIMER, bufferSeek);
_seekBuffer.stop();
_seekBuffer = null;
};
_seekBuffer = new Timer(100);
_seekBuffer.addEventListener(TimerEvent.TIMER, bufferSeek);
_seekBuffer.start();
};
break;
case "NetStream.Buffer.Flush":
_isBuffFull = true;
if (_seekBuffer){
};
endSeek();
break;
case "NetStream.Buffer.Full":
_isBuffFull = true;
endSeek();
break;
};
}
private function getNearestSeekPoint(_arg1:Number):Number{
var _local2:uint;
var _local3:uint;
var _local4:Object;
var _local5:uint;
var _local6:uint;
if (EPPStreamVideo(_eppStream).hasSeekpoints === true){
_local2 = 0;
_local3 = 0;
_local4 = _mediaObject.loader.metadata.seekpoints;
_local5 = _mediaObject.loader.metadata.seekpoints.length;
_local6 = 0;
while (_local6 < _local5) {
if (_local4[_local6].time < _arg1){
_local2 = _local6;
} else {
_local3 = _local6;
break;
};
_local6++;
};
if ((_arg1 - _local4[_local2].time) < (_local4[_local3].time - _arg1)){
trace(("****** " + _local4[_local2].time));
return (_local4[_local2].time);
};
trace(("****** " + _local4[_local3].time));
return (_local4[_local3].time);
};
throw (new Error("[EPP] Error impossible to getNearestSeekPoint no seekpoints found in metadata."));
}
override public function play(... _args):void{
var arguments = _args;
destroyPlayTimer();
var isMovde:Boolean;
if (arguments[0] != ""){
if (arguments.length > 0){
killNetStreamTimer();
muteSound();
_time = (Number(arguments[0]) + _mediaObject.player.start);
_eppStream.stream.removeEventListener(NetStatusEvent.NET_STATUS, netStreamStartStatus2);
_eppStream.stream.addEventListener(NetStatusEvent.NET_STATUS, netStreamStartStatus2);
_isIntenalStartSeeking = true;
if ((((EPPStreamVideo(_eppStream)._alternativeValue > 0)) && ((_time < EPPStreamVideo(_eppStream)._alternativeValue)))){
this._mediaObject.player.stop();
trace("IOP ON Y VA");
with ({}) {
with ({}) {
!ERROR!.op = function (_arg1:EPPPlayerEvent):void{
var e = _arg1;
trace("RELAUNCH");
e.target.removeEventListener(EPPPlayerEvent.STOPPED, op);
_mediaObject.loader.unload();
_mediaObject.loader.preload();
with ({}) {
with ({}) {
!ERROR!.op2 = function (_arg1:EPPLoaderEvent):void{
_arg1.target.removeEventListener(EPPLoaderEvent.PRELOADED, op2);
_mediaObject.player.play();
};
};
_mediaObject.loader.addEventListener(EPPLoaderEvent.PRELOADED, function (_arg1:EPPLoaderEvent):void{
_arg1.target.removeEventListener(EPPLoaderEvent.PRELOADED, op2);
_mediaObject.player.play();
});
};
};
this._mediaObject.player.addEventListener(EPPPlayerEvent.STOPPED, function (_arg1:EPPPlayerEvent):void{
var e = _arg1;
trace("RELAUNCH");
e.target.removeEventListener(EPPPlayerEvent.STOPPED, op);
_mediaObject.loader.unload();
_mediaObject.loader.preload();
with ({}) {
with ({}) {
!ERROR!.op2 = function (_arg1:EPPLoaderEvent):void{
_arg1.target.removeEventListener(EPPLoaderEvent.PRELOADED, op2);
_mediaObject.player.play();
};
};
_mediaObject.loader.addEventListener(EPPLoaderEvent.PRELOADED, function (_arg1:EPPLoaderEvent):void{
_arg1.target.removeEventListener(EPPLoaderEvent.PRELOADED, op2);
_mediaObject.player.play();
});
});
return;
};
_eppStream.stream.seek(0);
isMovde = true;
};
};
if (isMovde === false){
if ((((_mediaObject.player.start > 0)) && ((_time == 0)))){
killNetStreamTimer();
muteSound();
_time = _mediaObject.player.start;
_eppStream.stream.removeEventListener(NetStatusEvent.NET_STATUS, netStreamStartStatus2);
_eppStream.stream.addEventListener(NetStatusEvent.NET_STATUS, netStreamStartStatus2);
_isIntenalStartSeeking = true;
_eppStream.stream.seek(0);
} else {
killNetStreamTimer();
initPlaying();
};
};
}
private function killNetStreamTimer():void{
if (_netStreamTimer){
_netStreamTimer.removeEventListener(TimerEvent.TIMER, netStreamTimerCallBack);
_netStreamTimer.stop();
_netStreamTimer = null;
};
}
private function reportSeek():void{
var ttm:Timer;
ttm = new Timer(50);
with ({}) {
with ({}) {
!ERROR!.tim = function (_arg1:TimerEvent):void{
if (EPPStreamVideo(_eppStream).hasSeekpoints === true){
_eppStream.stream.seek(getNearestSeekPoint(_time));
} else {
_eppStream.stream.seek(_time);
};
ttm.stop();
ttm.removeEventListener(TimerEvent.TIMER, tim);
};
};
ttm.addEventListener(TimerEvent.TIMER, function (_arg1:TimerEvent):void{
if (EPPStreamVideo(_eppStream).hasSeekpoints === true){
_eppStream.stream.seek(getNearestSeekPoint(_time));
} else {
_eppStream.stream.seek(_time);
};
ttm.stop();
ttm.removeEventListener(TimerEvent.TIMER, tim);
});
ttm.start();
}
private function netStreamTimerCallBack(_arg1:TimerEvent):void{
if (_isStartBuffFull === false){
if (isReady() == true){
_eppStream.stream.removeEventListener(NetStatusEvent.NET_STATUS, netStreamStartStatus2);
killNetStreamTimer();
initPlaying();
} else {
reportSeek();
};
};
killNetStreamTimer();
}
public function get isIntenalStartSeeking():Boolean{
return (_isIntenalStartSeeking);
}
private function bufferSeek(_arg1:TimerEvent):void{
if (_isBuffFull === false){
endSeek();
};
_seekBuffer.stop();
_seekBuffer.removeEventListener(TimerEvent.TIMER, bufferSeek);
_seekBuffer = null;
}
private function streamComplete(_arg1:EPPStreamEvent):void{
if ((_mediaObject.player.duration - _mediaObject.player.time) < 1){
_time = (_mediaObject.player.duration + _mediaObject.player.start);
if (_mediaObject.player.stateName != EPPPlayerEvent.SEEKING){
_allReadyplayed = true;
_mediaObject.player.setState(_mediaObject.player.getStateByName(EPPPlayerEvent.PLAYED));
};
} else {
_mediaObject.loader.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.CONNECTION_LOST));
};
}
private function netStreamStartStatus2(_arg1:NetStatusEvent):void{
_isStartBuffFull = false;
switch (_arg1.info.code){
case "NetStream.Buffer.Full":
_isStartBuffFull = true;
if (isReady() == true){
_mediaObject.player.start = _eppStream.stream.time;
_eppStream.stream.removeEventListener(NetStatusEvent.NET_STATUS, netStreamStartStatus2);
initPlaying();
} else {
reportSeek();
};
break;
case "NetStream.Seek.Notify":
killNetStreamTimer();
_netStreamTimer = new Timer(50);
_netStreamTimer.addEventListener(TimerEvent.TIMER, netStreamTimerCallBack);
_netStreamTimer.start();
break;
};
}
override public function destroyPlay():void{
destroyPlayTimer();
_isIntenalStartSeeking = false;
if (_retrySeekTimer){
endSeek();
_retrySeekTimer.stop();
_retrySeekTimer.removeEventListener(TimerEvent.TIMER, retrySeekLater);
_retrySeekTimer = null;
};
if (_eppStream.stream != null){
_eppStream.stream.removeEventListener(EPPStreamEvent.COMPLETE, streamComplete);
};
}
private function stoppingStatusHandler(_arg1:NetStatusEvent):void{
var tt2:Timer;
var e = _arg1;
switch (e.info.code){
case "NetStream.Seek.Notify":
if (EPPStreamVideo(_eppStream).isMP4 === false){
_time = 0;
_mediaObject.player.setState(_mediaObject.player.getStateByName(EPPPlayerEvent.STOPPED));
_eppStream.stream.removeEventListener(NetStatusEvent.NET_STATUS, stoppingStatusHandler);
} else {
tt2 = new Timer(300);
with ({}) {
with ({}) {
!ERROR!.ttz = function (_arg1:TimerEvent):void{
tt2.removeEventListener(TimerEvent.TIMER, ttz);
tt2.stop();
if (_mediaObject.player.stateName == EPPPlayerEvent.STOPPING){
_time = 0;
_mediaObject.player.setState(_mediaObject.player.getStateByName(EPPPlayerEvent.STOPPED));
_eppStream.stream.removeEventListener(NetStatusEvent.NET_STATUS, stoppingStatusHandler);
};
};
};
tt2.addEventListener(TimerEvent.TIMER, function (_arg1:TimerEvent):void{
tt2.removeEventListener(TimerEvent.TIMER, ttz);
tt2.stop();
if (_mediaObject.player.stateName == EPPPlayerEvent.STOPPING){
_time = 0;
_mediaObject.player.setState(_mediaObject.player.getStateByName(EPPPlayerEvent.STOPPED));
_eppStream.stream.removeEventListener(NetStatusEvent.NET_STATUS, stoppingStatusHandler);
};
});
tt2.start();
};
break;
case "NetStream.Buffer.Full":
_time = 0;
_mediaObject.player.setState(_mediaObject.player.getStateByName(EPPPlayerEvent.STOPPED));
_eppStream.stream.removeEventListener(NetStatusEvent.NET_STATUS, stoppingStatusHandler);
break;
};
}
private function endSeek():void{
trace("endSeek");
if (_lastState){
trace(("yes, _lastState -> " + _lastState));
if (_mediaObject.player.duration == _mediaObject.player.time){
_allReadyplayed = true;
_mediaObject.player.setState(_mediaObject.player.getStateByName(EPPPlayerEvent.PLAYED));
trace("set played");
} else {
if (_lastState.name == EPPPlayerEvent.PLAYING){
initPlaying();
} else {
if ((((((_lastState.name == EPPPlayerEvent.PLAYED)) || ((_lastState.name == EPPPlayerEvent.STOPPED)))) || ((_lastState.name == EPPPlayerEvent.BUFFERED)))){
if ((((_lastState.name == EPPPlayerEvent.STOPPED)) && ((_mediaObject.player.time < 0.1)))){
_mediaObject.player.channel.stop();
} else {
_mediaObject.player.channel.pause();
};
} else {
_mediaObject.player.setState(_lastState);
};
};
};
_mediaObject.player.dispatchEvent(new EPPPlayerEvent(EPPPlayerEvent.SEEKED));
_lastSeekPoint = _time;
_lastState = null;
destroySeek();
} else {
trace("no, _lastState");
};
}
override public function seek(_arg1):void{
var _local4:Number;
trace(("seconds -> " + _arg1));
_endTimer.stop();
var _local2:String = String(_arg1);
var _local3:Array = _local2.split("%");
if (_local3.length == 2){
_local4 = (Number(_local3[0]) * _mediaObject.player.duration);
} else {
_local4 = Number(_arg1);
};
destroyPlayTimer();
if (_mediaObject.player.stateName != EPPPlayerEvent.SEEKING){
_lastState = _mediaObject.player.state;
_eppStream.stream.pause();
};
trace((_local4 == _mediaObject.player.duration));
if (_local4 > _mediaObject.player.duration){
_local4 = _mediaObject.player.duration;
};
if (_local4 < 0){
_local4 = 0;
};
_neededTime = _local4;
if (((EPPStreamVideo(_eppStream).isYoutube) && ((((_neededTime > _mediaObject.loader.timeLoaded)) || ((_neededTime < _oldNeededTime)))))){
_oldNeededTime = _neededTime;
EPPStreamVideo(_eppStream).alternativeURL = Math.floor((_neededTime * 1000));
_mediaObject.loader.load();
_mediaObject.player.play();
return;
};
var _local5:Boolean;
if (_dontChangeState == false){
trace("c1");
if ((((_lastState.name == EPPPlayerEvent.STOPPED)) && ((_lastSeekPoint > 0)))){
_local5 = true;
_lastSeekPoint = 0;
} else {
_eppStream.stream.addEventListener(NetStatusEvent.NET_STATUS, seekingStatusHandler);
};
};
if (_local5 == false){
trace("c2");
_eppStream.stream.seek((_local4 + _mediaObject.player.start));
_time = (_local4 + _mediaObject.player.start);
};
if (_mediaObject.player.stateName != EPPPlayerEvent.SEEKING){
trace("c3");
_mediaObject.player.notifyScreens();
_mediaObject.player.setState(_mediaObject.player.getStateByName(EPPPlayerEvent.SEEKING));
} else {
trace("c4");
_mediaObject.player.dispatchEvent(_mediaObject.player.getStateByName(EPPPlayerEvent.SEEKING).event);
};
if (_local5 == true){
trace("c5");
endSeek();
};
}
private function videoBuffered(_arg1:EPPPlayerEvent):void{
_mediaObject.player.removeEventListener(EPPPlayerEvent.BUFFERED, videoBuffered);
initPlaying();
}
private function muteSound():void{
var _local1:SoundTransform = _eppStream.stream.soundTransform;
_local1.volume = 0;
_eppStream.stream.soundTransform = _local1;
}
private function initPlaying(_arg1:TimerEvent=null):void{
var _local3:Number;
var _local4:Timer;
if (_arg1){
_arg1.target.stop();
_arg1.target.removeEventListener(TimerEvent.TIMER, initPlaying);
};
_eppStream.stream.removeEventListener(EPPStreamEvent.COMPLETE, streamComplete);
_eppStream.stream.addEventListener(EPPStreamEvent.COMPLETE, streamComplete);
if (_timerPlaying == null){
_local3 = EPPStreamVideo(_mediaObject.loader.connection).framerate;
if (isNaN(_local3)){
_local4 = new Timer(100);
_local4.addEventListener(TimerEvent.TIMER, initPlaying);
_local4.start();
return;
};
_timerPlaying = new Timer((1000 / Math.round(_local3)));
};
_eppStream.stream.resume();
var _local2:SoundTransform = _eppStream.stream.soundTransform;
_local2.volume = IMixable(_mediaObject).mixer.volume;
_eppStream.stream.soundTransform = _local2;
_timerPlaying.addEventListener(TimerEvent.TIMER, updatePlaying);
_timerPlaying.reset();
_timerPlaying.start();
_mediaObject.player.setState(_mediaObject.player.getStateByName(EPPPlayerEvent.PLAYING));
}
}
}//package com.busfront.epp.net.channel
Section 182
//IChannel (com.busfront.epp.net.channel.IChannel)
package com.busfront.epp.net.channel {
import com.busfront.epp.net.channel.sound.*;
public interface IChannel {
function createSoundChannel():EPPSoundChannel;
function stop():void;
function play(... _args):void;
function pause():void;
function seek(_arg1):void;
function get time():Number;
}
}//package com.busfront.epp.net.channel
Section 183
//EPPConnection (com.busfront.epp.net.connection.EPPConnection)
package com.busfront.epp.net.connection {
import com.busfront.epp.events.*;
import flash.events.*;
import com.busfront.epp.controls.loader.*;
import com.busfront.epp.base.media.*;
import com.busfront.epp.base.cache.*;
import flash.utils.*;
public class EPPConnection extends EventDispatcher implements IConnection {
protected var _eppObject:ILoadable;
protected var _metadata:Object;
protected var _timerLoading:Timer;
protected var _bytesTotal:int;// = -1
protected var _isValid:Boolean;// = false
protected var _connection;
public var killStream:Boolean;// = true
public function EPPConnection(_arg1:ILoadable){
_metadata = new Object();
_timerLoading = new Timer(50);
super();
_eppObject = _arg1;
}
protected function checkNullUrl():Boolean{
var _local1:Timer;
if (url == null){
_local1 = new Timer(10, 1);
_local1.addEventListener(TimerEvent.TIMER_COMPLETE, dispatchNullURLInvalid);
_local1.start();
_local1 = null;
return (true);
};
return (false);
}
public function get eppObject():ILoadable{
return (_eppObject);
}
public function check():void{
}
public function get metaData():Object{
return (_metadata);
}
public function preload():void{
}
private function dispatchNullURLInvalid(_arg1:TimerEvent):void{
invalidate();
_arg1.target.removeEventListener(TimerEvent.TIMER_COMPLETE, dispatchNullURLInvalid);
_arg1.target.stop();
}
public function get bytesTotal():uint{
return (_bytesTotal);
}
protected function validate():void{
var _local4:EPPCacheItem;
var _local5:uint;
var _local6:uint;
var _local7:IOccurable;
var _local8:uint;
var _local9:uint;
var _local10:IOccurable;
var _local11:uint;
var _local12:uint;
var _local1:EPPLoaderEvent = new EPPLoaderEvent(EPPLoaderEvent.CHECKING);
_eppObject.loader.dispatchEvent(_local1);
destroyChecking();
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.UNLOADED));
var _local2:EPPLoaderEvent = new EPPLoaderEvent(EPPLoaderEvent.CONNECTION_SUCCESS);
_eppObject.loader.dispatchEvent(_local2);
var _local3:EPPLoaderEvent = new EPPLoaderEvent(EPPLoaderEvent.CHECKED);
_eppObject.loader.dispatchEvent(_local3);
if ((_eppObject is EPPCacheItem)){
_local4 = (_eppObject as EPPCacheItem);
_local5 = _local4.cachedReferences.length;
_local6 = 0;
while (_local6 < _local5) {
_local4.cachedReferences[_local6].loader.dispatchEvent((_local1 as Event));
_local4.cachedReferences[_local6].loader.dispatchEvent(_local2);
_local4.cachedReferences[_local6].loader.dispatchEvent(_local3);
if ((_local4.cachedReferences[_local6] is IOccurable)){
_local7 = (_local4.cachedReferences[_local6] as IOccurable);
_local8 = _local7.occurences.length;
_local9 = 0;
while (_local9 < _local8) {
_local7.occurences[_local9].dispatchEvent(_local1);
_local7.occurences[_local9].dispatchEvent(_local2);
_local7.occurences[_local9].dispatchEvent(_local3);
_local9++;
};
};
_local6++;
};
} else {
if ((_eppObject is IOccurable)){
_local10 = (_eppObject as IOccurable);
_local11 = _local10.occurences.length;
_local12 = 0;
while (_local12 < _local11) {
_local10.occurences[_local12].dispatchEvent(_local1);
_local10.occurences[_local12].dispatchEvent(_local2);
_local10.occurences[_local12].dispatchEvent(_local3);
_local12++;
};
};
};
_isValid = true;
}
public function get bytesLoaded():uint{
return (_connection.bytesLoaded);
}
public function load():void{
}
public function get url():String{
var _local1:String;
var _local2:EPPCacheItem;
var _local3:ICacheable;
if ((_eppObject is EPPCacheItem)){
_local2 = (_eppObject as EPPCacheItem);
_local1 = _local2.url;
};
if ((_eppObject is ICacheable)){
_local3 = (_eppObject as ICacheable);
_local1 = _local3.url;
};
return (_local1);
}
protected function destroyChecking():void{
}
public function invalidate():void{
var _local4:EPPCacheItem;
var _local5:uint;
var _local6:uint;
var _local7:IOccurable;
var _local8:uint;
var _local9:uint;
var _local10:IOccurable;
var _local11:uint;
var _local12:uint;
var _local1:EPPLoaderEvent = new EPPLoaderEvent(EPPLoaderEvent.CHECKING);
_eppObject.loader.dispatchEvent(_local1);
destroyChecking();
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.UNLOADABLE));
var _local2:EPPLoaderEvent = new EPPLoaderEvent(EPPLoaderEvent.CONNECTION_FAILURE);
_eppObject.loader.dispatchEvent(_local2);
var _local3:EPPLoaderEvent = new EPPLoaderEvent(EPPLoaderEvent.CHECKED);
_eppObject.loader.dispatchEvent(_local3);
if ((_eppObject is EPPCacheItem)){
_local4 = (_eppObject as EPPCacheItem);
_local5 = _local4.cachedReferences.length;
_local6 = 0;
while (_local6 < _local5) {
_local4.cachedReferences[_local6].loader.dispatchEvent(_local1);
_local4.cachedReferences[_local6].loader.dispatchEvent(_local2);
_local4.cachedReferences[_local6].loader.dispatchEvent(_local3);
if ((_local4.cachedReferences[_local6] is IOccurable)){
_local7 = (_local4.cachedReferences[_local6] as IOccurable);
_local8 = _local7.occurences.length;
_local9 = 0;
while (_local9 < _local8) {
_local7.occurences[_local9].dispatchEvent(_local1);
_local7.occurences[_local9].dispatchEvent(_local2);
_local7.occurences[_local9].dispatchEvent(_local3);
_local9++;
};
};
_local6++;
};
} else {
if ((_eppObject is IOccurable)){
_local10 = (_eppObject as IOccurable);
_local11 = _local10.occurences.length;
_local12 = 0;
while (_local12 < _local11) {
_local10.occurences[_local12].dispatchEvent(_local1);
_local10.occurences[_local12].dispatchEvent(_local2);
_local10.occurences[_local12].dispatchEvent(_local3);
_local12++;
};
};
};
_isValid = false;
}
public function unload():void{
}
}
}//package com.busfront.epp.net.connection
Section 184
//EPPConnectionCollection (com.busfront.epp.net.connection.EPPConnectionCollection)
package com.busfront.epp.net.connection {
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
import com.busfront.epp.controls.player.*;
import flash.events.*;
import com.busfront.epp.controls.loader.*;
import flash.utils.*;
public class EPPConnectionCollection extends EPPConnection {
private var _currentLoadingIndex:uint;
private var _collection:EPPCollectionLoadable;
public function EPPConnectionCollection(_arg1:ILoadable){
super(_arg1);
_collection = (_arg1 as EPPCollectionLoadable);
}
private function preloadingDestroy():void{
var _local3:ILoadable;
var _local1:uint = _collection.length;
var _local2:uint;
while (_local2 < _local1) {
_local3 = _collection.getChildAt(_local2);
if (_local3.loader.state.name == EPPLoaderEvent.UNLOADED){
_local3.loader.removeEventListener(EPPLoaderEvent.PRELOADED, itemPreloaded);
};
_local2++;
};
}
private function loadChild():void{
var _local1:ILoadable;
_local1 = _collection.getChildAt(_currentLoadingIndex);
var _local2:String = _local1.loader.state.name;
if (((!((_local2 == EPPLoaderEvent.LOADED))) && (!((_local2 == EPPLoaderEvent.UNLOADABLE))))){
_local1.loader.addEventListener(EPPLoaderEvent.LOADED, itemLoaded, false, 1);
_local1.loader.load();
} else {
if (_collection.lastValidChildIndex > _currentLoadingIndex){
_currentLoadingIndex++;
loadChild();
} else {
finishLoad();
};
};
}
override public function load():void{
this.preloadingDestroy();
loadingDestroy();
_currentLoadingIndex = _collection.firstValidChildIndex;
_timerLoading = new Timer(100);
_timerLoading.addEventListener(TimerEvent.TIMER, upgrade);
_timerLoading.start();
loadChild();
_collection.loader.setState(_collection.loader.getStateByName(EPPLoaderEvent.LOADING));
}
override public function preload():void{
var _local4:ILoadable;
_collection.loader.setState(_collection.loader.getStateByName(EPPLoaderEvent.PRELOADING));
var _local1:uint = _collection.length;
var _local2:Boolean;
var _local3:uint;
while (_local3 < _local1) {
_local4 = _collection.getChildAt(_local3);
if (_local4.loader.state.name == EPPLoaderEvent.UNLOADED){
_local4.loader.addEventListener(EPPLoaderEvent.PRELOADED, itemPreloaded, false, 1);
_local4.loader.preload();
_local2 = true;
};
_local3++;
};
if (_local2 === false){
_collection.loader.setState(_collection.loader.getStateByName(EPPLoaderEvent.PRELOADED));
};
}
private function itemUnloaded(_arg1:EPPLoaderEvent):void{
_arg1.target.removeEventListener(EPPLoaderEvent.UNLOADED, itemUnloaded);
var _local2:Namespace = _collection.getRestrictedNamespace(this);
var _local3:Array = _collection._local2::_children;
var _local4:uint = _local3.length;
var _local5:uint;
while (_local5 < _local4) {
if (_local3[_local5].loader.state.name != EPPLoaderEvent.UNLOADABLE){
if (_local3[_local5].loader.state.name != EPPLoaderEvent.UNLOADED){
_local3[_local5].loader.removeEventListener(EPPLoaderEvent.UNLOADED, itemUnloaded);
return;
};
};
_local5++;
};
_bytesTotal = -1;
_collection.loader.setState(_collection.loader.getStateByName(EPPLoaderEvent.UNLOADED));
destroyUnload();
}
override public function unload():void{
preloadingDestroy();
loadingDestroy();
if ((_collection is IPlayable)){
IPlayable(_collection).player.clearScreens();
};
_collection.loader.setState(_collection.loader.getStateByName(EPPLoaderEvent.UNLOADING));
var _local1:uint = _collection.validChildren.length;
var _local2:uint;
while (_local2 < _local1) {
_collection.validChildren[_local2].loader.addEventListener(EPPLoaderEvent.UNLOADED, itemUnloaded, false, 1);
_collection.validChildren[_local2].loader.unload();
_local2++;
};
}
override public function check():void{
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.CHECKING));
var _local1:Array = EPPCollectionLoadable(_eppObject).children;
var _local2:uint = _local1.length;
var _local3:uint;
while (_local3 < _local2) {
_local1[_local3].loader.check();
_local3++;
};
ILoader(_eppObject.loader.state).refreshCollectionState();
}
private function finishLoad():void{
_collection.loader.setState(_collection.loader.getStateByName(EPPLoaderEvent.LOADED));
loadingDestroy();
}
private function itemPreloaded(_arg1:EPPLoaderEvent):void{
_arg1.target.removeEventListener(EPPLoaderEvent.PRELOADED, itemPreloaded);
var _local2:uint = _collection.length;
var _local3:Namespace = _collection.getRestrictedNamespace(this);
var _local4:uint;
while (_local4 < _local2) {
if (_collection._local3::_children[_local4].loader.state.name != EPPLoaderEvent.UNLOADABLE){
if (_collection._local3::_children[_local4].loader.state.name != EPPLoaderEvent.PRELOADED){
return;
};
};
_local4++;
};
preloadingDestroy();
}
public function get currentLoadingIndex():uint{
return (_currentLoadingIndex);
}
override public function get bytesLoaded():uint{
var _local1:uint;
var _local2:uint = _collection.length;
var _local3:uint;
while (_local3 < _local2) {
_local1 = (_local1 + _collection.getChildAt(_local3).loader.bytesLoaded);
_local3++;
};
return (_local1);
}
override public function get bytesTotal():uint{
var _local1:uint;
var _local2:uint = _collection.length;
var _local3:uint;
while (_local3 < _local2) {
_local1 = (_local1 + _collection.getChildAt(_local3).loader.bytesTotal);
_local3++;
};
return (_local1);
}
public function destroyUnload():void{
var _local1:uint = _collection.validChildren.length;
var _local2:uint;
while (_local2 < _local1) {
_collection.validChildren[_local2].loader.removeEventListener(EPPLoaderEvent.UNLOADED, itemUnloaded);
_local2++;
};
}
private function upgrade(_arg1:Event):void{
_collection.loader.dispatchEvent(_collection.loader.getStateByName(EPPLoaderEvent.LOADING).event);
}
private function loadingDestroy():void{
if (_timerLoading != null){
_timerLoading.stop();
_timerLoading.removeEventListener(TimerEvent.TIMER, upgrade);
};
var _local1:uint = _collection.length;
var _local2:uint;
while (_local2 < _local1) {
_collection.getChildAt(_local2).loader.removeEventListener(EPPLoaderEvent.LOADED, itemLoaded);
_local2++;
};
}
private function itemLoaded(_arg1:EPPLoaderEvent):void{
_arg1.target.removeEventListener(EPPLoaderEvent.LOADED, itemLoaded);
if (_collection.lastValidChildIndex > _currentLoadingIndex){
_currentLoadingIndex++;
loadChild();
} else {
finishLoad();
};
}
}
}//package com.busfront.epp.net.connection
Section 185
//EPPConnectionFileContent (com.busfront.epp.net.connection.EPPConnectionFileContent)
package com.busfront.epp.net.connection {
import com.busfront.epp.events.*;
import com.busfront.epp.base.feed.*;
import flash.events.*;
import com.busfront.epp.controls.loader.*;
import flash.net.*;
public class EPPConnectionFileContent extends EPPConnection {
private var _streamFile:URLLoader;
public function EPPConnectionFileContent(_arg1:ILoadable){
super(_arg1);
}
private function xmlExist(_arg1:ProgressEvent):void{
var _local2:uint;
validate();
if (killStream == false){
_local2 = _arg1.bytesTotal;
if (_bytesTotal == -1){
_bytesTotal = _arg1.bytesTotal;
};
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.PRELOADED));
if (killStream == false){
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.LOADING));
_streamFile.addEventListener(Event.COMPLETE, loadingCompleteHandler);
_streamFile.addEventListener(ProgressEvent.PROGRESS, dispatchLoading);
};
};
}
public function preloadingDestroy():void{
if (_streamFile != null){
_streamFile.removeEventListener(ProgressEvent.PROGRESS, preloadingProgressHandler);
_streamFile.removeEventListener(IOErrorEvent.IO_ERROR, preloadingIoErrorHandler);
if (killStream == true){
_streamFile.close();
_streamFile = null;
};
};
}
private function dispatchLoading(_arg1:ProgressEvent):void{
_eppObject.loader.dispatchEvent(_eppObject.loader.getStateByName(EPPLoaderEvent.LOADING).event);
}
private function preloadingProgressHandler(_arg1:ProgressEvent):void{
var _local2:uint = _arg1.bytesTotal;
if (_bytesTotal == -1){
_bytesTotal = _arg1.bytesTotal;
};
preloadingDestroy();
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.PRELOADED));
}
override public function load():void{
if (killStream == true){
_streamFile = new URLLoader();
_streamFile.addEventListener(IOErrorEvent.IO_ERROR, loadingIoErrorHandler);
_streamFile.addEventListener(Event.COMPLETE, loadingCompleteHandler);
_streamFile.addEventListener(ProgressEvent.PROGRESS, dispatchLoading);
};
if (killStream == true){
_streamFile.load(_connection);
};
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.LOADING));
}
override public function check():void{
var _local1:Namespace;
if ((_eppObject is EPPVirtualFeed)){
} else {
_local1 = _eppObject.getRestrictedNamespace(this);
_connection = new URLRequest(_eppObject._local1::getUrl());
_streamFile = new URLLoader();
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.CHECKING));
_streamFile.addEventListener(ProgressEvent.PROGRESS, xmlExist);
_streamFile.addEventListener(IOErrorEvent.IO_ERROR, xmlErr);
_streamFile.addEventListener(SecurityErrorEvent.SECURITY_ERROR, xmlSecErr);
_streamFile.load(_connection);
};
}
public function get data():Object{
if (_streamFile){
return (_streamFile.data);
};
return (null);
}
private function xmlSecErr(_arg1:SecurityErrorEvent):void{
invalidate();
}
private function xmlErr(_arg1:IOErrorEvent):void{
invalidate();
}
override public function get bytesLoaded():uint{
if (_streamFile){
return (_streamFile.bytesLoaded);
};
return (0);
}
override protected function destroyChecking():void{
if (_streamFile){
_streamFile.removeEventListener(ProgressEvent.PROGRESS, xmlExist);
_streamFile.removeEventListener(IOErrorEvent.IO_ERROR, xmlErr);
_streamFile.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, xmlSecErr);
if (killStream == true){
_streamFile.close();
_streamFile = null;
};
};
}
private function loadingCompleteHandler(_arg1:Event):void{
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.LOADED));
loadingDestroy();
}
override public function preload():void{
if (killStream == true){
_streamFile = new URLLoader();
};
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.PRELOADING));
if (killStream == true){
_streamFile.addEventListener(ProgressEvent.PROGRESS, preloadingProgressHandler);
_streamFile.addEventListener(IOErrorEvent.IO_ERROR, preloadingIoErrorHandler);
_streamFile.load(_connection);
};
}
private function preloadingIoErrorHandler(_arg1:IOErrorEvent):void{
preloadingDestroy();
}
private function loadingIoErrorHandler(_arg1:IOErrorEvent):void{
loadingDestroy();
}
public function loadingDestroy():void{
if (_streamFile != null){
_streamFile.removeEventListener(IOErrorEvent.IO_ERROR, loadingIoErrorHandler);
_streamFile.removeEventListener(Event.COMPLETE, loadingCompleteHandler);
_streamFile.removeEventListener(ProgressEvent.PROGRESS, dispatchLoading);
};
}
override public function unload():void{
loadingDestroy();
preloadingDestroy();
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.UNLOADING));
_bytesTotal = -1;
if (_streamFile != null){
_streamFile.close();
_streamFile = null;
};
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.UNLOADED));
}
}
}//package com.busfront.epp.net.connection
Section 186
//EPPConnectionSWF (com.busfront.epp.net.connection.EPPConnectionSWF)
package com.busfront.epp.net.connection {
import com.busfront.epp.events.*;
import flash.display.*;
import flash.events.*;
import com.busfront.epp.controls.loader.*;
import com.busfront.epp.base.swf.*;
import flash.net.*;
import com.busfront.epp.base.cache.*;
import flash.utils.*;
public class EPPConnectionSWF extends EPPConnection {
private var _pushedClone:Array;
private var _bytesSwf:ByteArray;
private var _streamSkin:URLLoader;
public function EPPConnectionSWF(_arg1:ILoadable){
super(_arg1);
}
private function checkingDestroy():void{
if (_streamSkin){
_streamSkin.removeEventListener(ProgressEvent.PROGRESS, checkinProgress);
_streamSkin.removeEventListener(IOErrorEvent.IO_ERROR, checkingIOError);
if (killStream == true){
_streamSkin.close();
_streamSkin = null;
};
};
}
private function preloadingDestroy():void{
if (_streamSkin){
_streamSkin.removeEventListener(ProgressEvent.PROGRESS, preloadingProgress);
_streamSkin.removeEventListener(IOErrorEvent.IO_ERROR, preloadingIOError);
if (killStream == true){
_streamSkin.close();
_streamSkin = null;
};
};
}
private function preloadingProgress(_arg1:ProgressEvent):void{
var _local2:uint = _arg1.bytesTotal;
if (_local2 > -1){
_bytesTotal = _arg1.bytesTotal;
preloadingDestroy();
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.PRELOADED));
};
}
override public function preload():void{
if (killStream == true){
checkingDestroy();
_streamSkin = new URLLoader();
_streamSkin.dataFormat = URLLoaderDataFormat.BINARY;
_streamSkin.removeEventListener(ProgressEvent.PROGRESS, preloadingProgress);
_streamSkin.addEventListener(ProgressEvent.PROGRESS, preloadingProgress);
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.PRELOADING));
_streamSkin.removeEventListener(IOErrorEvent.IO_ERROR, preloadingIOError);
_streamSkin.addEventListener(IOErrorEvent.IO_ERROR, preloadingIOError);
_streamSkin.load(_connection);
};
}
override public function check():void{
if (checkNullUrl() === true){
return;
};
_connection = new URLRequest(url);
_streamSkin = new URLLoader();
_streamSkin.dataFormat = URLLoaderDataFormat.BINARY;
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.CHECKING));
_streamSkin.addEventListener(ProgressEvent.PROGRESS, checkinProgress);
_streamSkin.addEventListener(IOErrorEvent.IO_ERROR, checkingIOError);
_streamSkin.load(_connection);
}
private function loadingComplete(_arg1:Event):void{
var _local2:EPPCacheItem;
var _local3:uint;
var _local4:uint;
if ((_eppObject is EPPSWF)){
cloneContent((_eppObject as EPPSWF));
} else {
if ((_eppObject is EPPCacheItem)){
_pushedClone = new Array();
_local2 = (_eppObject as EPPCacheItem);
_local3 = _local2.cachedReferences.length;
_local4 = 0;
while (_local4 < _local3) {
cloneContent((_local2.cachedReferences[_local4] as EPPSWF));
_local4++;
};
};
};
loadingDestroy();
}
override public function get bytesLoaded():uint{
if (_streamSkin){
return (_streamSkin.bytesLoaded);
};
return (0);
}
public function cloneContent(_arg1:EPPSWF):void{
var _local2:URLLoader = _streamSkin;
var _local3:Loader = new Loader();
_local3.contentLoaderInfo.addEventListener(Event.INIT, cloneComplete);
if ((_eppObject is EPPCacheItem)){
_pushedClone.push({loader:_local3, swf:_arg1});
};
_local3.loadBytes(_local2.data);
_local3.contentLoaderInfo.parameters;
}
private function loadingDestroy():void{
_streamSkin.removeEventListener(IOErrorEvent.IO_ERROR, loadingErrorHandler);
_streamSkin.removeEventListener(Event.COMPLETE, loadingComplete);
_streamSkin.removeEventListener(ProgressEvent.PROGRESS, dispatchLoading);
}
private function dispatchLoading(_arg1:ProgressEvent):void{
_eppObject.loader.dispatchEvent(_eppObject.loader.getStateByName(EPPLoaderEvent.LOADING).event);
}
override public function load():void{
preloadingDestroy();
if (killStream == true){
_streamSkin = new URLLoader();
_streamSkin.dataFormat = URLLoaderDataFormat.BINARY;
_streamSkin.removeEventListener(IOErrorEvent.IO_ERROR, loadingErrorHandler);
_streamSkin.removeEventListener(Event.COMPLETE, loadingComplete);
_streamSkin.removeEventListener(ProgressEvent.PROGRESS, dispatchLoading);
_streamSkin.addEventListener(IOErrorEvent.IO_ERROR, loadingErrorHandler);
_streamSkin.addEventListener(Event.COMPLETE, loadingComplete);
_streamSkin.addEventListener(ProgressEvent.PROGRESS, dispatchLoading);
_streamSkin.load(_connection);
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.LOADING));
};
}
private function checkingIOError(_arg1:IOErrorEvent):void{
checkingDestroy();
invalidate();
}
private function preloadingIOError(_arg1:IOErrorEvent):void{
preloadingDestroy();
throw (new Error("[EPP] IOError during preloading."));
}
private function checkinProgress(_arg1:ProgressEvent):void{
var _local2:uint;
if (killStream == true){
checkingDestroy();
};
if (_isValid == false){
validate();
};
if (killStream == false){
_local2 = _arg1.bytesTotal;
if (_local2 > -1){
_bytesTotal = _arg1.bytesTotal;
_eppObject.loader.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.PRELOAD));
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.PRELOADING));
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.PRELOADED));
if (killStream == true){
_streamSkin.removeEventListener(ProgressEvent.PROGRESS, checkinProgress);
_streamSkin.removeEventListener(IOErrorEvent.IO_ERROR, checkingIOError);
} else {
_eppObject.loader.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.LOAD));
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.LOADING));
_streamSkin.addEventListener(Event.COMPLETE, loadingComplete);
_streamSkin.addEventListener(ProgressEvent.PROGRESS, dispatchLoading);
};
};
};
}
private function cloneComplete(_arg1:Event):void{
var _local4:EPPSWF;
var _local5:EPPCacheItem;
var _local6:uint;
var _local7:uint;
var _local3:Namespace = _eppObject.getRestrictedNamespace(this);
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
if ((_eppObject is EPPSWF)){
_local4 = (_eppObject as EPPSWF);
_local4._local3::swfContent = _arg1.target.content;
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.LOADED));
} else {
if ((_eppObject is EPPCacheItem)){
_local5 = (_eppObject as EPPCacheItem);
_local6 = _pushedClone.length;
_local7 = 0;
while (_local7 < _local6) {
if (_pushedClone[_local7].loader == _arg1.target.loader){
_pushedClone[_local7].swf._local3::swfContent = _arg1.target.content;
_pushedClone.splice(_local7, 1);
break;
};
_local7++;
};
if (_pushedClone.length == 0){
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.LOADED));
};
};
};
}
private function loadingErrorHandler(_arg1:IOErrorEvent):void{
loadingDestroy();
throw (new Error("[EPP] IOError during Loading skin."));
}
override public function unload():void{
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.UNLOADING));
_bytesTotal = -1;
if (_streamSkin){
_streamSkin.close();
_streamSkin = null;
};
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.UNLOADED));
}
}
}//package com.busfront.epp.net.connection
Section 187
//IConnection (com.busfront.epp.net.connection.IConnection)
package com.busfront.epp.net.connection {
public interface IConnection {
function check():void;
function preload():void;
function load():void;
function unload():void;
}
}//package com.busfront.epp.net.connection
Section 188
//EPPNetStream (com.busfront.epp.net.stream.EPPNetStream)
package com.busfront.epp.net.stream {
import com.busfront.epp.events.*;
import flash.events.*;
import flash.net.*;
public class EPPNetStream extends NetStream {
private var _maxBufferLength:uint;
private var _aboutToStop:uint;
private var _lastCall:String;
private var _useFastStartBuffer:Boolean;
public function EPPNetStream(_arg1:NetConnection=null){
if (_arg1 == null){
_arg1 = new NetConnection();
_arg1.connect(null);
};
super(_arg1);
this.checkPolicyFile = true;
_maxBufferLength = 3;
_useFastStartBuffer = false;
_aboutToStop = 0;
bufferTime = _maxBufferLength;
_arg1.addEventListener(NetStatusEvent.NET_STATUS, connectionStatus);
addEventListener(NetStatusEvent.NET_STATUS, streamStatus);
}
public function get bufferPercentage():Number{
var _local1:uint = Math.round(((bufferLength * 100) / bufferTime));
if (_local1 > 94){
return (100);
};
return (_local1);
}
private function handleEnd():void{
dispatchEvent(new EPPStreamEvent(EPPStreamEvent.COMPLETE));
}
public function onCuePoint(_arg1:Object):void{
}
public function set useFastStartBuffer(_arg1:Boolean):void{
_useFastStartBuffer = _arg1;
if (!_arg1){
bufferTime = _maxBufferLength;
};
}
public function onLastSecond(_arg1:Object):void{
}
public function get maxBufferLength():Number{
return (_maxBufferLength);
}
override public function pause():void{
if (_lastCall != "pause"){
_lastCall = "pause";
super.pause();
};
}
public function onXMPData(_arg1:Object):void{
dispatchEvent(new EPPStreamEvent(EPPStreamEvent.XMPDATA, _arg1));
}
public function onMetaData(_arg1:Object):void{
dispatchEvent(new EPPStreamEvent(EPPStreamEvent.METADATA, _arg1));
}
override public function resume():void{
if (_lastCall != "resume"){
_lastCall = "resume";
super.resume();
};
}
protected function connectionStatus(_arg1:NetStatusEvent):void{
switch (_arg1.info.code){
case "NetConnection.Connect.Closed":
close();
break;
};
}
public function set maxBufferLength(_arg1:Number):void{
if (_arg1 < 0.1){
throw (new Error("[EPP] BufferSize is too short."));
};
_maxBufferLength = _arg1;
bufferTime = _maxBufferLength;
}
public function onImageData(_arg1:Object):void{
dispatchEvent(new EPPStreamEvent(EPPStreamEvent.IMAGEDATA, _arg1));
}
public function onTextData(_arg1:Object):void{
dispatchEvent(new EPPStreamEvent(EPPStreamEvent.TEXTDATA, _arg1));
}
private function streamStatus(_arg1:NetStatusEvent):void{
if (_useFastStartBuffer){
if ((((_arg1.info.code == "NetStream.Play.Start")) || ((_arg1.info.code == "NetStream.Buffer.Empty")))){
bufferTime = 0.5;
};
if (_arg1.info.code == "NetStream.Buffer.Full"){
bufferTime = _maxBufferLength;
};
};
switch (_arg1.info.code){
case "NetStream.Play.Start":
_aboutToStop = 0;
break;
case "NetStream.Play.Stop":
if (_aboutToStop == 2){
_aboutToStop = 0;
handleEnd();
} else {
_aboutToStop = 1;
};
break;
case "NetStream.Buffer.Empty":
if (_aboutToStop == 1){
_aboutToStop = 0;
handleEnd();
} else {
_aboutToStop = 2;
};
break;
case "NetStream.Buffer.Flush":
if (_aboutToStop == 1){
_aboutToStop = 0;
handleEnd();
} else {
_aboutToStop = 2;
};
break;
};
}
public function get useFastStartBuffer():Boolean{
return (_useFastStartBuffer);
}
}
}//package com.busfront.epp.net.stream
Section 189
//EPPStream (com.busfront.epp.net.stream.EPPStream)
package com.busfront.epp.net.stream {
import com.busfront.epp.controls.player.*;
import com.busfront.epp.controls.loader.*;
import com.busfront.epp.net.channel.*;
import com.busfront.epp.base.cache.*;
import com.busfront.epp.net.connection.*;
public class EPPStream extends EPPConnection implements IStream {
protected var _isBuffered:Boolean;// = false
protected var _objectPlayable:IPlayable;
protected var _channels:Array;
protected var _duration:Number;// = 0
protected var _stream;
public function EPPStream(_arg1:ILoadable){
super(_arg1);
if ((_arg1 is IPlayable)){
_objectPlayable = (_arg1 as IPlayable);
};
}
public function get stream(){
return (_stream);
}
public function createChannel(_arg1:IPlayable):EPPChannel{
return (null);
}
public function get duration():Number{
var _local1:ICacheable;
var _local2:EPPStream;
if ((_eppObject is ICacheable)){
_local1 = (_eppObject as ICacheable);
if (_local1.cached == true){
_local2 = (_local1.cache.loader.connection as EPPStream);
return (_local2.duration);
};
};
return (_duration);
}
override public function get bytesLoaded():uint{
if (_stream != null){
return (stream.bytesLoaded);
};
return (0);
}
public function get bufferPercent():uint{
return (0);
}
}
}//package com.busfront.epp.net.stream
Section 190
//EPPStreamAudio (com.busfront.epp.net.stream.EPPStreamAudio)
package com.busfront.epp.net.stream {
import com.busfront.epp.events.*;
import com.busfront.epp.controls.player.*;
import flash.events.*;
import com.busfront.epp.controls.loader.*;
import com.busfront.epp.base.media.*;
import com.busfront.epp.net.channel.*;
import flash.net.*;
import com.busfront.epp.base.cache.*;
import flash.utils.*;
import flash.media.*;
import flash.errors.*;
public final class EPPStreamAudio extends EPPStream {
private var _soundChannelTemporary:SoundChannel;
private var _allReadyLoad:Boolean;// = false
private var _timerTestAudio:Timer;
public function EPPStreamAudio(_arg1:ILoadable){
_timerTestAudio = new Timer(100);
super(_arg1);
}
override public function check():void{
if (checkNullUrl() === true){
return;
};
_connection = new URLRequest(url);
_stream = new Sound();
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.CHECKING));
_stream.addEventListener(ProgressEvent.PROGRESS, checkProgress);
_stream.addEventListener(IOErrorEvent.IO_ERROR, checkIoError);
if (killStream == false){
_stream.addEventListener(Event.ID3, id3Handler);
_stream.removeEventListener(Event.COMPLETE, loadingComplete);
_stream.addEventListener(Event.COMPLETE, loadingComplete);
};
_stream.load(_connection);
}
override public function preload():void{
if (killStream == true){
_stream = new Sound();
_stream.addEventListener(Event.ID3, id3Handler);
_stream.addEventListener(ProgressEvent.PROGRESS, preloadingProgressHandler);
_stream.load(_connection);
};
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.PRELOADING));
}
private function checkPosition(_arg1:TimerEvent):void{
var _local2:uint;
var _local3:uint;
var _local4:Number;
var _local5:EPPCacheItem;
var _local6:uint;
var _local7:IOccurable;
var _local8:Array;
var _local9:uint;
var _local10:uint;
if (((_soundChannelTemporary) && ((_soundChannelTemporary.position > 0)))){
if (killStream == true){
if (_stream.bytesLoaded < _stream.bytesTotal){
Sound(_stream).close();
};
_soundChannelTemporary.stop();
_timerTestAudio.stop();
_timerTestAudio.removeEventListener(TimerEvent.TIMER, checkPosition);
_stream.removeEventListener(ProgressEvent.PROGRESS, checkProgress);
validate();
};
if (killStream == false){
_local2 = _stream.bytesTotal;
if (_bytesTotal == -1){
_bytesTotal = _local2;
};
if (_stream.length > 8000){
if (_duration == 0){
_local3 = _stream.bytesLoaded;
_local4 = (_local3 / _local2);
_duration = (Math.round((_stream.length / _local4)) / 1000);
_metadata.duration = _duration;
};
_stream.removeEventListener(Event.ID3, id3Handler);
_stream.removeEventListener(ProgressEvent.PROGRESS, preloadingProgressHandler);
_soundChannelTemporary.stop();
_timerTestAudio.stop();
_timerTestAudio.removeEventListener(TimerEvent.TIMER, checkPosition);
validate();
_eppObject.loader.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.PRELOAD));
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.PRELOADING));
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.PRELOADED));
if (killStream == true){
_timerTestAudio.stop();
_timerTestAudio.removeEventListener(TimerEvent.TIMER, checkPosition);
_stream.removeEventListener(Event.ID3, id3Handler);
_stream.removeEventListener(Event.COMPLETE, loadingComplete);
this.destroyChecking();
};
if (killStream == false){
_allReadyLoad = true;
if ((_eppObject is EPPCacheItem)){
_local5 = (_eppObject as EPPCacheItem);
_local6 = 0;
while (_local6 < _local5.cachedReferences.length) {
_local5.cachedReferences[_local6].player;
_local6++;
};
} else {
_eppObject["player"];
if ((_eppObject is IOccurable)){
_local7 = (_eppObject as IOccurable);
_local8 = _local7.occurences;
_local9 = _local8.length;
_local10 = 0;
while (_local10 < _local9) {
_local8[_local10].player;
_local10++;
};
};
};
_eppObject.loader.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.LOAD));
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.LOADING));
};
};
};
} else {
if (_timerTestAudio.currentCount > 10){
_timerTestAudio.stop();
_timerTestAudio.removeEventListener(TimerEvent.TIMER, checkPosition);
invalidate();
};
};
}
private function checkProgress(_arg1:ProgressEvent):void{
var _local2:SoundTransform;
if (_stream.length > 0){
_stream.removeEventListener(ProgressEvent.PROGRESS, checkProgress);
_local2 = new SoundTransform(0);
_soundChannelTemporary = _stream.play(0, 0, _local2);
_timerTestAudio.addEventListener(TimerEvent.TIMER, checkPosition);
_timerTestAudio.start();
};
}
private function loadingProgress(_arg1:ProgressEvent):void{
_eppObject.loader.dispatchEvent(_eppObject.loader.getStateByName(EPPLoaderEvent.LOADING).event);
}
private function checkIoError(_arg1:IOErrorEvent):void{
invalidate();
}
private function loadingComplete(_arg1:Event):void{
var cItem:EPPCacheItem;
var i:uint;
var occArray:Array;
var nbOccurences:uint;
var j:uint;
var loaded:uint;
var percentLoadedd:Number;
var timerDisp:Timer;
var dech:*;
var e = _arg1;
if (killStream == false){
_timerTestAudio.stop();
_timerTestAudio.removeEventListener(TimerEvent.TIMER, checkPosition);
_stream.removeEventListener(Event.ID3, id3Handler);
_stream.removeEventListener(Event.COMPLETE, loadingComplete);
this.destroyChecking();
};
if ((_eppObject is EPPCacheItem)){
cItem = (_eppObject as EPPCacheItem);
i = 0;
while (i < cItem.cachedReferences.length) {
cItem.cachedReferences[i].player;
i = (i + 1);
};
} else {
_eppObject["player"];
occArray = _eppObject["occurences"];
nbOccurences = occArray.length;
j = 0;
while (j < nbOccurences) {
occArray[j].player;
j = (j + 1);
};
};
if (_duration == 0){
loaded = _stream.bytesLoaded;
percentLoadedd = (loaded / _stream.bytesTotal);
_duration = (Math.round((_stream.length / percentLoadedd)) / 1000);
_metadata.duration = _duration;
};
if (_bytesTotal == -1){
_bytesTotal = _stream.bytesTotal;
};
if ((((_allReadyLoad == false)) && ((killStream == false)))){
validate();
_eppObject.loader.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.PRELOAD));
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.PRELOADING));
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.PRELOADED));
_eppObject.loader.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.LOAD));
};
if (_isBuffered == false){
dech = function (_arg1:TimerEvent):void{
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.LOADED));
loadingDestroy();
timerDisp.removeEventListener(TimerEvent.TIMER, dech);
timerDisp.stop();
timerDisp = null;
};
_isBuffered = true;
_eppObject.loader.dispatchEvent(_eppObject.loader.getStateByName(EPPLoaderEvent.LOADING).event);
timerDisp = new Timer(100);
timerDisp.addEventListener(TimerEvent.TIMER, dech);
timerDisp.start();
} else {
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.LOADED));
loadingDestroy();
};
}
private function loadingDestroy():void{
if (_stream){
_stream.removeEventListener(IOErrorEvent.IO_ERROR, loadingIoError);
_stream.removeEventListener(ProgressEvent.PROGRESS, loadingProgress);
_stream.removeEventListener(Event.COMPLETE, loadingComplete);
};
}
private function preloadingProgressHandler(_arg1:ProgressEvent):void{
var _local3:uint;
var _local4:Number;
var _local2:uint = _arg1.bytesTotal;
if (_bytesTotal == -1){
_bytesTotal = _local2;
};
if (_arg1.target.length > 8000){
if (_duration == 0){
_local3 = _arg1.bytesLoaded;
_local4 = (_local3 / _local2);
_duration = (Math.round((_arg1.target.length / _local4)) / 1000);
_metadata.duration = _duration;
};
_arg1.target.removeEventListener(Event.ID3, id3Handler);
_arg1.target.removeEventListener(ProgressEvent.PROGRESS, preloadingProgressHandler);
if (killStream == true){
_arg1.target.close();
_stream = null;
};
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.PRELOADED));
};
}
override public function get bufferPercent():uint{
var _local1:SoundChannel = new SoundChannel();
if (_isBuffered == true){
trace("bufferPercent : _isBuffered == true\t\t\t\t\t\t\t: return 100");
return (100);
};
if (((_stream) && ((_stream.isBuffering == false)))){
trace("bufferPercent : _stream && _stream.isBuffering == false \t: return 100");
return (100);
};
trace("\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t: return 0");
return (0);
}
override public function load():void{
if (killStream == true){
_stream = new Sound();
_stream.addEventListener(IOErrorEvent.IO_ERROR, loadingIoError);
_stream.addEventListener(ProgressEvent.PROGRESS, loadingProgress);
_stream.addEventListener(Event.COMPLETE, loadingComplete);
_stream.load(_connection);
};
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.LOADING));
}
override public function createChannel(_arg1:IPlayable):EPPChannel{
var _local4:uint;
var _local5:uint;
if (_channels == null){
_channels = new Array();
} else {
_local4 = _channels.length;
_local5 = 0;
while (_local5 < _local4) {
if (_channels[_local5].media == _arg1){
throw (new Error("THIS MEDIA ALLREADY HAS A CHANNEL"));
};
_local5++;
};
};
var _local2:EPPChannelAudio = new EPPChannelAudio(this, _arg1);
var _local3:Object = {media:_arg1, channel:_local2};
_channels.push(_local3);
return (_local2);
}
private function id3Handler(_arg1:Event):void{
_metadata = _arg1.target.id3;
}
override protected function destroyChecking():void{
if (_soundChannelTemporary){
_soundChannelTemporary.stop();
};
if (_timerTestAudio){
_timerTestAudio.removeEventListener(TimerEvent.TIMER, checkPosition);
_timerTestAudio.stop();
};
if (_stream){
_stream.removeEventListener(IOErrorEvent.IO_ERROR, checkIoError);
_stream.removeEventListener(ProgressEvent.PROGRESS, checkProgress);
if (killStream == true){
_stream = null;
};
};
}
private function loadingIoError(_arg1:IOErrorEvent):void{
throw (new Error("[EPP] IOError during Loading audio."));
}
override public function unload():void{
loadingDestroy();
var oldState:String = _eppObject.loader.state.name;
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.UNLOADING));
_metadata = new Object();
_isBuffered = false;
if (_stream != null){
if (oldState != EPPLoaderEvent.LOADED){
try {
_stream.close();
} catch(error:IOError) {
trace((("IOError " + error.message) + " just caught"));
};
};
_stream = null;
};
_bytesTotal = -1;
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.UNLOADED));
}
}
}//package com.busfront.epp.net.stream
Section 191
//EPPStreamCollection (com.busfront.epp.net.stream.EPPStreamCollection)
package com.busfront.epp.net.stream {
import com.busfront.epp.controls.player.*;
import com.busfront.epp.controls.loader.*;
import com.busfront.epp.base.media.*;
import com.busfront.epp.net.channel.*;
import com.busfront.epp.net.connection.*;
public class EPPStreamCollection extends EPPStream {
private var _firstConnection:EPPConnectionCollection;
private var _collection:EPPMediaCollection;
public function EPPStreamCollection(_arg1:ILoadable){
super(_arg1);
_firstConnection = new EPPConnectionCollection(_arg1);
_collection = (_arg1 as EPPMediaCollection);
}
override public function createChannel(_arg1:IPlayable):EPPChannel{
var _local4:uint;
var _local5:uint;
if (_channels == null){
_channels = new Array();
} else {
_local4 = _channels.length;
_local5 = 0;
while (_local5 < _local4) {
if (_channels[_local5].media == _arg1){
return (_channels[_local5].channel);
};
_local5++;
};
};
var _local2:EPPChannelCollection = new EPPChannelCollection(this, _arg1);
var _local3:Object = {media:_arg1, channel:_local2};
_channels.push(_local3);
return (_local2);
}
override public function get bufferPercent():uint{
return (_collection.playerCollection.currentChild.player.stream.bufferPercent);
}
override public function load():void{
_firstConnection.load();
}
override public function get metaData():Object{
var _local1:Object = new Object();
_local1.width = _collection.playerCollection.currentChild.loader.metadata.width;
_local1.height = _collection.playerCollection.currentChild.loader.metadata.height;
return (_local1);
}
override public function preload():void{
_firstConnection.preload();
}
public function get firstConnection():EPPConnectionCollection{
return (_firstConnection);
}
override public function check():void{
_firstConnection.check();
}
override public function get bytesLoaded():uint{
return (_firstConnection.bytesLoaded);
}
override public function get duration():Number{
var _local1:uint = _collection.length;
var _local2:Number = 0;
var _local3:Number = 0;
var _local4:uint;
while (_local4 < _local1) {
_local2 = (_local2 + _collection.getChildAt(_local4).player.duration);
_local3 = (_local3 + _collection.getChildAt(_local4).loader.metadata.duration);
_local4++;
};
_metadata.duration = _local3;
return (_local2);
}
override public function get bytesTotal():uint{
return (_firstConnection.bytesTotal);
}
override public function unload():void{
_collection.player.channel.clear();
_collection.playerCollection.currentChild = _collection.firstValidChildIndex;
_firstConnection.unload();
}
}
}//package com.busfront.epp.net.stream
Section 192
//EPPStreamImage (com.busfront.epp.net.stream.EPPStreamImage)
package com.busfront.epp.net.stream {
import com.busfront.epp.events.*;
import flash.display.*;
import com.busfront.epp.controls.player.*;
import flash.events.*;
import com.busfront.epp.controls.loader.*;
import com.busfront.epp.net.channel.*;
import flash.net.*;
import com.busfront.epp.base.cache.*;
import flash.utils.*;
public final class EPPStreamImage extends EPPStream {
private var _streamPre:ByteArray;
private var _genericDur:Number;
private var _ba:ByteArray;
private var _size:String;
private var _preStreamImage:URLStream;
public function EPPStreamImage(_arg1:ILoadable, _arg2:Number){
_ba = new ByteArray();
super(_arg1);
_genericDur = _arg2;
}
private function preloadingDestroy():void{
if (_stream){
_stream.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, preloadingProgress);
_stream.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, checkIOError);
if (killStream == true){
_stream.unload();
_stream = null;
};
};
}
private function loadedHandler(_arg1:Event):void{
this._metadata.width = _stream.contentLoaderInfo.content.width;
this._metadata.height = _stream.contentLoaderInfo.content.height;
loadingDestroy();
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.LOADED));
}
private function preloadingProgress(_arg1:ProgressEvent):void{
var _local3:EPPCacheItem;
var _local4:uint;
var _local5:Array;
var _local6:uint;
var _local7:uint;
var _local2:uint = _arg1.bytesTotal;
if (_bytesTotal == -1){
_bytesTotal = _arg1.bytesTotal;
} else {
this._metadata.duration = _genericDur;
_duration = _genericDur;
_bytesTotal = _arg1.bytesTotal;
_eppObject.loader.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.PRELOAD));
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.PRELOADED));
if (killStream == true){
_stream.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, preloadingProgress);
_stream.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, checkIOError);
} else {
if (_eppObject.loader.stateName != EPPLoaderEvent.LOADING){
if ((_eppObject is EPPCacheItem)){
_local3 = (_eppObject as EPPCacheItem);
_local4 = 0;
while (_local4 < _local3.cachedReferences.length) {
_local3.cachedReferences[_local4].player;
_local4++;
};
} else {
_eppObject["player"];
_local5 = _eppObject["occurences"];
_local6 = _local5.length;
_local7 = 0;
while (_local7 < _local6) {
_local5[_local7].player;
_local7++;
};
};
_eppObject.loader.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.LOAD));
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.LOADING));
_stream.contentLoaderInfo.addEventListener(Event.COMPLETE, loadedHandler);
};
_eppObject.loader.dispatchEvent(_eppObject.loader.getStateByName(EPPLoaderEvent.LOADING).event);
};
};
}
private function loadingIOError(_arg1:IOErrorEvent):void{
loadingDestroy();
throw (new Error("[EPP] IOError during Loading image."));
}
override public function preload():void{
_stream = new Loader();
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.PRELOADING));
_stream.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, preloadingProgress);
_stream.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, checkIOError);
_stream.load(_connection);
}
override public function createChannel(_arg1:IPlayable):EPPChannel{
var _local4:uint;
var _local5:uint;
if (_channels == null){
_channels = new Array();
} else {
_local4 = _channels.length;
_local5 = 0;
while (_local5 < _local4) {
if (_channels[_local5].media == _arg1){
throw (new Error("THIS MEDIA ALLREADY HAS A CHANNEL"));
};
_local5++;
};
};
var _local2:EPPChannelImage = new EPPChannelImage(this, _arg1);
var _local3:Object = {media:_arg1, channel:_local2};
_channels.push(_local3);
return (_local2);
}
private function read(... _args):int{
switch (_args.length){
case 0:
return (_streamPre.readByte());
case 1:
_streamPre.readBytes(_args[0]);
return (_args[0].length);
case 3:
_streamPre.readBytes(_args[0], _args[1], _args[2]);
return (_args[2]);
default:
throw (new ArgumentError(("Argument Error at ImageInfoExtractor.read(). Expected 0, 1, or 3. Received " + _args.length)));
};
}
override public function check():void{
if (checkNullUrl() === true){
return;
};
_connection = new URLRequest(url);
_preStreamImage = new URLStream();
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.CHECKING));
_preStreamImage.addEventListener(ProgressEvent.PROGRESS, checkingProgress);
_preStreamImage.addEventListener(IOErrorEvent.IO_ERROR, checkingIOError);
_preStreamImage.load(_connection);
}
override public function get bytesLoaded():uint{
if (_stream != null){
return (_stream.contentLoaderInfo.bytesLoaded);
};
return (0);
}
private function loadingProgress(_arg1:ProgressEvent):void{
_eppObject.loader.dispatchEvent(_eppObject.loader.getStateByName(EPPLoaderEvent.LOADING).event);
}
private function checkType(_arg1:ByteArray):Boolean{
_streamPre = _arg1;
var _local2 = (read() & 0xFF);
var _local3 = (read() & 0xFF);
if ((((_local2 == 71)) && ((_local3 == 73)))){
this.metaData.imageFormat = "gif";
return (true);
};
if ((((_local2 == 0xFF)) && ((_local3 == 216)))){
this.metaData.imageFormat = "jpeg";
return (true);
};
if ((((_local2 == 137)) && ((_local3 == 80)))){
this.metaData.imageFormat = "png";
return (true);
};
return (false);
}
override public function get bufferPercent():uint{
return (((bytesLoaded / bytesTotal) * 100));
}
override public function load():void{
preloadingDestroy();
if (killStream == true){
_stream = new Loader();
_stream.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadingIOError);
_stream.contentLoaderInfo.addEventListener(Event.COMPLETE, loadedHandler);
_stream.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loadingProgress);
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.LOADING));
_stream.load(_connection);
};
}
private function checkingProgress(_arg1:ProgressEvent):void{
_size = (Math.floor((_arg1.bytesTotal / 0x0400)) + " kb");
_preStreamImage.readBytes(_ba);
if (checkType(_ba) == true){
_preStreamImage.close();
validate();
if (killStream == false){
preload();
};
};
}
private function checkingIOError(_arg1:IOErrorEvent):void{
invalidate();
}
override protected function destroyChecking():void{
_preStreamImage.removeEventListener(ProgressEvent.PROGRESS, checkingProgress);
_preStreamImage.removeEventListener(IOErrorEvent.IO_ERROR, checkingIOError);
_preStreamImage = null;
}
private function loadingDestroy():void{
if (_stream != null){
_stream.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, loadingProgress);
_stream.contentLoaderInfo.removeEventListener(Event.COMPLETE, loadedHandler);
_stream.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, loadingIOError);
};
}
private function checkIOError(_arg1:IOErrorEvent):void{
preloadingDestroy();
throw (new Error("[EPP] IOError during Loading image."));
}
override public function unload():void{
loadingDestroy();
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.UNLOADING));
_metadata = new Object();
_duration = 0;
if (_stream != null){
_stream.unload();
_stream = null;
};
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.UNLOADED));
}
}
}//package com.busfront.epp.net.stream
Section 193
//EPPStreamVideo (com.busfront.epp.net.stream.EPPStreamVideo)
package com.busfront.epp.net.stream {
import com.busfront.epp.events.*;
import com.busfront.epp.controls.player.*;
import flash.events.*;
import com.busfront.epp.controls.loader.*;
import com.busfront.epp.net.channel.*;
import flash.net.*;
import com.busfront.epp.base.cache.*;
import flash.utils.*;
import flash.media.*;
public class EPPStreamVideo extends EPPStream {
private var _isMP4:Boolean;// = false
protected var _isYoutube:Boolean;// = false
protected var _alternativeURL:String;
public var _alternativeValue:Number;// = 0
private var _oldBytesTotal:Number;
private var _hasSeekPoints:Boolean;// = false
private var _youTubeLoader:URLLoader;
private var _framerate:Number;
private var _singleBytesTotal:uint;// = 0
private var _youTubeRequest:URLRequest;
public var _restricedbytesTotal:Number;// = 0
public function EPPStreamVideo(_arg1:ILoadable){
super(_arg1);
}
private function dispatchLoad(_arg1:TimerEvent):void{
_arg1.currentTarget.stop();
_arg1.currentTarget.removeEventListener(TimerEvent.TIMER, dispatchLoad);
_eppObject.loader.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.LOAD));
}
public function get singleBytesTotal():uint{
return (_singleBytesTotal);
}
public function set alternativeURL(_arg1:Number):void{
unload();
_alternativeValue = _arg1;
}
override public function unload():void{
var _local1:IPlayable;
_restricedbytesTotal = 0;
this._alternativeValue = 0;
_local1 = (_eppObject as IPlayable);
_local1.player.channel.destroyPlay();
destroyPreloading();
destroyLoading();
_local1.player.clearScreens();
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.UNLOADING));
if (_stream){
_stream.close();
_stream = null;
_connection = null;
};
_oldBytesTotal = _bytesTotal;
_bytesTotal = -1;
_local1.player.channel.clear();
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.UNLOADED));
}
public function get isMP4():Boolean{
return (_isMP4);
}
override public function preload():void{
var _local1:Array;
var _local2:Array;
if (killStream == true){
destroyPreloading();
createStream();
trace(((("PRELOAD " + _alternativeValue) + " ") + _alternativeURL));
if ((((_alternativeValue == 0)) && (isYoutube))){
_local1 = this._alternativeURL.split("%26begin");
this._alternativeURL = _local1[0];
_stream.removeEventListener(EPPStreamEvent.METADATA, preloadingMetadata);
_stream.addEventListener(EPPStreamEvent.METADATA, preloadingMetadata);
};
if (_isYoutube){
if (_alternativeValue > 0){
_local2 = url.split("youtube.com/");
if (_local2.length == 2){
_youTubeLoader = new URLLoader();
_youTubeRequest = new URLRequest(url);
_youTubeLoader.addEventListener(Event.COMPLETE, youTubeLoadSeek);
_youTubeLoader.addEventListener(IOErrorEvent.IO_ERROR, youTubeLoadError);
_youTubeLoader.load(_youTubeRequest);
return;
};
} else {
trace((" IOP IOP " + _alternativeURL));
_stream.play(_alternativeURL);
};
} else {
_stream.removeEventListener(EPPStreamEvent.METADATA, preloadingMetadata);
_stream.addEventListener(EPPStreamEvent.METADATA, preloadingMetadata);
trace("PRELOAD NORMAL");
_stream.play(url);
};
_stream.pause();
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.PRELOADING));
};
}
override public function check():void{
var youtubeSplit:Array;
var medvideo4:IPlayable;
var tm:Timer;
if (checkNullUrl() === true){
return;
};
if (_isYoutube === false){
youtubeSplit = url.split("youtube.com/");
if (youtubeSplit.length == 2){
_youTubeLoader = new URLLoader();
_youTubeRequest = new URLRequest(url);
_youTubeLoader.addEventListener(Event.COMPLETE, youTubeLoad);
_youTubeLoader.addEventListener(IOErrorEvent.IO_ERROR, youTubeLoadError);
_youTubeLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, youTubeLoadError);
_youTubeLoader.load(_youTubeRequest);
return;
};
};
createStream();
_connection.removeEventListener(NetStatusEvent.NET_STATUS, checkConnectionStatus);
_connection.addEventListener(NetStatusEvent.NET_STATUS, checkConnectionStatus);
_connection.removeEventListener(IOErrorEvent.IO_ERROR, checkIOErrorHandler);
_connection.addEventListener(IOErrorEvent.IO_ERROR, checkIOErrorHandler);
_connection.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, checkSecurityErrorHandler);
_connection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, checkSecurityErrorHandler);
_stream.removeEventListener(NetStatusEvent.NET_STATUS, checkConnectionStatus);
_stream.addEventListener(NetStatusEvent.NET_STATUS, checkConnectionStatus);
_stream.removeEventListener(IOErrorEvent.IO_ERROR, checkIOErrorHandler);
_stream.addEventListener(IOErrorEvent.IO_ERROR, checkIOErrorHandler);
_stream.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, checkSecurityErrorHandler);
_stream.addEventListener(SecurityErrorEvent.SECURITY_ERROR, checkSecurityErrorHandler);
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.CHECKING));
if (killStream == false){
_stream.removeEventListener(EPPStreamEvent.METADATA, preloadingMetadata);
_stream.addEventListener(EPPStreamEvent.METADATA, preloadingMetadata);
if ((_eppObject is EPPCacheItem)){
} else {
_eppObject["player"];
};
if (_eppObject.autoLoadControl == EPPLoaderEvent.LOAD){
if (_isYoutube){
_stream.play(_alternativeURL);
} else {
_stream.play(url);
};
if (hasSeekpoints === false){
_stream.pause();
};
medvideo4 = (_eppObject as IPlayable);
if (medvideo4){
medvideo4.player.setState(medvideo4.player.getStateByName(EPPPlayerEvent.BUFFERING));
tm = new Timer(1000);
with ({}) {
with ({}) {
!ERROR!.waitBuffer = function (_arg1:TimerEvent):void{
if ((((medvideo4.loader.timeLoaded >= (medvideo4.player.start + stream.bufferTime))) || ((medvideo4.loader.timeLoaded >= medvideo4.player.duration)))){
if (hasSeekpoints === true){
_stream.pause();
};
tm.stop();
tm.removeEventListener(TimerEvent.TIMER, waitBuffer);
medvideo4.player.setState(medvideo4.player.getStateByName(EPPPlayerEvent.BUFFERED));
};
};
};
tm.addEventListener(TimerEvent.TIMER, function (_arg1:TimerEvent):void{
if ((((medvideo4.loader.timeLoaded >= (medvideo4.player.start + stream.bufferTime))) || ((medvideo4.loader.timeLoaded >= medvideo4.player.duration)))){
if (hasSeekpoints === true){
_stream.pause();
};
tm.stop();
tm.removeEventListener(TimerEvent.TIMER, waitBuffer);
medvideo4.player.setState(medvideo4.player.getStateByName(EPPPlayerEvent.BUFFERED));
};
});
tm.start();
_connection.removeEventListener(NetStatusEvent.NET_STATUS, checkConnectionStatus);
_stream.removeEventListener(NetStatusEvent.NET_STATUS, checkConnectionStatus);
};
} else {
if (_isYoutube){
_stream.play(_alternativeURL);
} else {
_stream.play(url);
};
_stream.pause();
};
} else {
if (_isYoutube){
_stream.play(_alternativeURL);
} else {
_stream.play(url);
};
_stream.pause();
};
}
public function get hasSeekpoints():Boolean{
return (_hasSeekPoints);
}
public function get isYoutube():Boolean{
return (_isYoutube);
}
private function checkConnectionStatus(_arg1:NetStatusEvent):void{
var _local2:Timer;
switch (_arg1.info.code){
case "NetStream.Play.StreamNotFound":
invalidate();
return;
case "NetStream.Play.FileStructureInvalid":
invalidate();
return;
case "NetStream.Play.NoSupportedTrackFound":
invalidate();
return;
case "NetStream.Play.Start":
validate();
if (_eppObject.autoLoadControl == EPPLoaderEvent.LOAD){
_local2 = new Timer(10);
_local2.addEventListener(TimerEvent.TIMER, dispatchLoad);
_local2.start();
};
break;
};
}
private function preloadingMetadata(_arg1:EPPStreamEvent):void{
var _local3:Boolean;
var _local4:uint;
var _local5:EPPCacheItem;
var _local6:uint;
var _local7:uint;
var _local8:uint;
var _local9:EPPCacheItem;
var _local10:uint;
var _local11:uint;
var _local12:EPPCacheItem;
var _local13:uint;
var _local14:uint;
if (isNaN(_arg1.data["duration"])){
throw (new Error("[EPP] This video dont have metaData."));
};
var _local2:Boolean;
if (isNaN(_arg1.data["videoframerate"])){
_local2 = false;
} else {
_local2 = true;
_framerate = (_arg1.data["videoframerate"] as Number);
};
if ((((_local2 == false)) && (isNaN(_arg1.data["framerate"])))){
_local2 = false;
} else {
if (_local2 == false){
_local2 = true;
_framerate = _arg1.data["framerate"];
};
};
if (_local2 === false){
_framerate = 30;
};
if (_arg1.data.trackinfo){
_local3 = false;
_local4 = 0;
while (_local4 < _arg1.data.trackinfo.length) {
if (_arg1.data.trackinfo[_local4].sampledescription[0].sampletype == "amf0"){
_local3 = true;
};
_local4++;
};
if (_local3 === false){
this._isMP4 = true;
};
};
_metadata = _arg1.data;
if (_metadata.seekpoints){
_hasSeekPoints = true;
};
_duration = _arg1.data.duration;
if ((_eppObject is EPPCacheItem)){
_local5 = (_eppObject as EPPCacheItem);
_local6 = _local5.cachedReferences.length;
_bytesTotal = (_stream.bytesTotal * _local6);
_singleBytesTotal = _stream.bytesTotal;
} else {
_bytesTotal = _stream.bytesTotal;
};
if (_metadata.cuePoints){
_local7 = _metadata.cuePoints.length;
_local8 = 0;
while (_local8 < _local7) {
if ((_eppObject is EPPCacheItem)){
_local9 = (_eppObject as EPPCacheItem);
_local10 = _local9.cachedReferences.length;
_local11 = 0;
while (_local11 < _local10) {
_local9.cachedReferences[_local11].player.addCuepoint(_metadata.cuePoints[_local8]["name"], _metadata.cuePoints[_local8]["time"], _metadata.cuePoints[_local8]["parameters"], _metadata.cuePoints[_local8]["type"]);
_local11++;
};
} else {
_objectPlayable.player.addCuepoint(_metadata.cuePoints[_local8]["name"], _metadata.cuePoints[_local8]["time"], _metadata.cuePoints[_local8]["parameters"], _metadata.cuePoints[_local8]["type"]);
};
_local8++;
};
};
if (_eppObject.loader.stateName == EPPLoaderEvent.CHECKING){
validate();
};
_eppObject.loader.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.PRELOAD));
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.PRELOADING));
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.PRELOADED));
if (_eppObject.loader.stateName != EPPLoaderEvent.LOADING){
destroyPreloading();
_eppObject.loader.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.LOADING));
};
if (killStream == false){
if ((_eppObject is EPPCacheItem)){
_local12 = (_eppObject as EPPCacheItem);
_local13 = _local12.cachedReferences.length;
_local14 = 0;
while (_local14 < _local13) {
_local12.cachedReferences[_local14].loader.load();
_local12.cachedReferences[_local14].player.notifyScreens();
_local14++;
};
} else {
_eppObject.loader.dispatchEvent(new EPPLoaderEvent(EPPLoaderEvent.LOAD));
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.LOADING));
_timerLoading.removeEventListener(TimerEvent.TIMER, dispatchLoadingAlone);
_timerLoading.addEventListener(TimerEvent.TIMER, dispatchLoadingAlone);
_timerLoading.start();
IPlayable(_eppObject).player.notifyScreens();
};
};
}
private function checkSecurityErrorHandler(_arg1:SecurityErrorEvent):void{
invalidate();
}
private function createStream():void{
_connection = new NetConnection();
_connection.connect(null);
_stream = new EPPNetStream(_connection);
var _local1:SoundTransform = _stream.soundTransform;
_local1.volume = 0;
_stream.soundTransform = _local1;
}
protected function dispatchLoadingAlone(_arg1:Event):void{
var _local2:IPlayable;
if (_eppObject.loader.state.name == EPPLoaderEvent.LOADING){
_local2 = (_eppObject as IPlayable);
_eppObject.loader.dispatchEvent(_eppObject.loader.getStateByName(EPPLoaderEvent.LOADING).event);
if (_eppObject.loader.alternativeBytesTotal == stream.bytesLoaded){
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.LOADED));
destroyLoading();
};
};
}
private function youTubeLoadError(_arg1:Event):void{
_youTubeLoader.removeEventListener(Event.COMPLETE, youTubeLoad);
_youTubeLoader.removeEventListener(IOErrorEvent.IO_ERROR, youTubeLoadError);
_youTubeLoader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, youTubeLoadError);
invalidate();
}
public function get framerate():Number{
return (_framerate);
}
override public function get bytesLoaded():uint{
if (_stream != null){
if (_restricedbytesTotal > 0){
return (((_bytesTotal - _restricedbytesTotal) + stream.bytesLoaded));
};
return (stream.bytesLoaded);
};
return (0);
}
public function destroyPreloading():void{
if (_stream){
_stream.removeEventListener(EPPStreamEvent.METADATA, preloadingMetadata);
if (killStream == true){
_stream.close();
_connection.close();
_connection = null;
_stream = null;
};
};
}
private function youTubeLoad(_arg1:Event):void{
removeYoutubeload(_arg1);
check();
}
private function youTubeLoadSeek(_arg1:Event):void{
removeYoutubeload(_arg1);
_stream.addEventListener(NetStatusEvent.NET_STATUS, fakePreload);
_stream.play(_alternativeURL);
}
override public function get bufferPercent():uint{
if (((stream) && ((_eppObject.loader.timeLoaded > stream.bufferTime)))){
return (100);
};
return (0);
}
override public function load():void{
var medvideo4:IPlayable;
var tm:Timer;
destroyPreloading();
if (killStream == true){
createStream();
IPlayable(_eppObject).player.notifyScreens();
if (_isYoutube){
_stream.play(_alternativeURL);
} else {
_stream.play(url);
};
if (hasSeekpoints === false){
_stream.pause();
};
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.LOADING));
_timerLoading.addEventListener(TimerEvent.TIMER, dispatchLoadingAlone);
_timerLoading.start();
medvideo4 = (_eppObject as IPlayable);
medvideo4.player.setState(medvideo4.player.getStateByName(EPPPlayerEvent.BUFFERING));
tm = new Timer(100);
with ({}) {
with ({}) {
!ERROR!.waitBuffer = function (_arg1:TimerEvent):void{
if (_stream){
if ((((medvideo4.loader.timeLoaded >= (medvideo4.player.start + stream.bufferTime))) || ((medvideo4.loader.timeLoaded >= medvideo4.player.duration)))){
if (hasSeekpoints === true){
_stream.pause();
};
tm.stop();
tm.removeEventListener(TimerEvent.TIMER, waitBuffer);
medvideo4.player.setState(medvideo4.player.getStateByName(EPPPlayerEvent.BUFFERED));
};
};
};
};
tm.addEventListener(TimerEvent.TIMER, function (_arg1:TimerEvent):void{
if (_stream){
if ((((medvideo4.loader.timeLoaded >= (medvideo4.player.start + stream.bufferTime))) || ((medvideo4.loader.timeLoaded >= medvideo4.player.duration)))){
if (hasSeekpoints === true){
_stream.pause();
};
tm.stop();
tm.removeEventListener(TimerEvent.TIMER, waitBuffer);
medvideo4.player.setState(medvideo4.player.getStateByName(EPPPlayerEvent.BUFFERED));
};
};
});
tm.start();
};
}
override public function createChannel(_arg1:IPlayable):EPPChannel{
var _local4:uint;
var _local5:uint;
if (_channels == null){
_channels = new Array();
} else {
_local4 = _channels.length;
_local5 = 0;
while (_local5 < _local4) {
if (_channels[_local5].media == _arg1){
throw (new Error("THIS MEDIA ALLREADY HAVE A CHANNEL"));
};
_local5++;
};
};
var _local2:EPPChannelVideo = new EPPChannelVideo(this, _arg1);
var _local3:Object = {media:_arg1, channel:_local2};
_channels.push(_local3);
return (_local2);
}
public function destroyLoading():void{
_timerLoading.stop();
_timerLoading.removeEventListener(TimerEvent.TIMER, dispatchLoadingAlone);
}
private function checkIOErrorHandler(_arg1:IOErrorEvent):void{
invalidate();
}
private function fakePreload(_arg1:NetStatusEvent):void{
if (_arg1.info.code == "NetStream.Play.Start"){
_stream.removeEventListener(NetStatusEvent.NET_STATUS, fakePreload);
_bytesTotal = this._oldBytesTotal;
if (_arg1.target.bytesTotal == 4294967295){
throw (new Error("Impossible to find bytesTotal on this stream"));
};
_restricedbytesTotal = _arg1.target.bytesTotal;
};
trace(_arg1.info.code);
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.PRELOADING));
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.PRELOADED));
}
override protected function destroyChecking():void{
if (_connection){
_connection.removeEventListener(NetStatusEvent.NET_STATUS, checkConnectionStatus);
_connection.removeEventListener(IOErrorEvent.IO_ERROR, checkIOErrorHandler);
_connection.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, checkSecurityErrorHandler);
_stream.removeEventListener(NetStatusEvent.NET_STATUS, checkConnectionStatus);
_stream.removeEventListener(IOErrorEvent.IO_ERROR, checkIOErrorHandler);
_stream.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, checkSecurityErrorHandler);
if (killStream == true){
_stream.close();
_connection.close();
_stream = null;
_connection = null;
};
};
}
private function removeYoutubeload(_arg1:Event):void{
var _local8:Array;
var _local9:uint;
var _local10:Array;
var _local11:String;
var _local12:Array;
var _local13:Array;
var _local14:Array;
var _local15:String;
_youTubeLoader.removeEventListener(Event.COMPLETE, youTubeLoad);
_youTubeLoader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, youTubeLoadError);
_youTubeLoader.removeEventListener(IOErrorEvent.IO_ERROR, youTubeLoadError);
_youTubeLoader.removeEventListener(Event.COMPLETE, youTubeLoadSeek);
var _local2:String = _arg1.target.data.toString();
var _local3:Array = _local2.split("http://");
var _local4:uint = _local3.length;
var _local5:Array = new Array();
var _local6:uint;
var _local7:uint = 1;
while (_local7 < _local4) {
_local8 = _local3[_local7].split("c.youtube.com");
_local9 = _local8.length;
if (_local9 == 2){
_local10 = _local8[1].split("'");
_local10 = _local10[0].split("\"");
_local11 = ((("http://" + _local8[0]) + "c.youtube.com") + _local10[0]);
_local11.replace(/generate_204/g, "videoplayback");
_isYoutube = true;
if (this._alternativeValue > 0){
_local12 = _local11.split("&begin");
if (_local6 == 0){
_local13 = String(_local12[0]).split(",");
_alternativeURL = ("https://busforge.busfront.com/players/yt.php?type=video&lien=" + escape(((_local13[0] + "&begin=") + _alternativeValue)));
trace(_alternativeURL);
break;
};
} else {
trace(((_local7 + " ") + _local11));
_local14 = _local11.split(",");
_local15 = ("https://busforge.busfront.com/players/yt.php?type=video&lien=" + escape(_local14[0]));
if (_local6 == 0){
_alternativeURL = _local15;
_local5.push(_alternativeURL);
_local6++;
trace(("NEW ALTERNATIVE " + _alternativeURL));
};
if (_local6 == 1){
_local5.push(_local15);
break;
};
};
trace(_alternativeURL);
};
_local7++;
};
}
}
}//package com.busfront.epp.net.stream
Section 194
//EPPStreamVideoCache (com.busfront.epp.net.stream.EPPStreamVideoCache)
package com.busfront.epp.net.stream {
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
import com.busfront.epp.controls.loader.*;
import com.busfront.epp.base.cache.*;
public class EPPStreamVideoCache extends EPPStreamVideo {
private var _streams:Array;
private var _cacheItem:EPPCacheItem;
public function EPPStreamVideoCache(_arg1:ILoadable){
_streams = new Array();
super(_arg1);
if (_arg1.type != EPPObjectType.CACHE_ITEM){
throw (new Error("INVALIDE STREAM"));
};
_cacheItem = (_arg1 as EPPCacheItem);
}
public function addStream(_arg1:EPPNetStream, _arg2:ICacheable):void{
_streams.push({stream:_arg1, cacheableObject:_arg2});
}
public function removeStream(_arg1:ICacheable):void{
var _local2:uint = _streams.length;
var _local3:uint;
while (_local3 < _local2) {
if (_streams[_local3].cacheableObject == _arg1){
_streams[_local3].stream.close();
delete _streams[_local3].stream;
_streams.splice(_local3, 1);
return;
};
_local3++;
};
}
override public function load():void{
destroyPreloading();
var _local1:uint = _cacheItem.cachedReferences.length;
var _local2:uint;
while (_local2 < _local1) {
_cacheItem.cachedReferences[_local2].loader.load();
_local2++;
};
}
public function getStreamByCachedObject(_arg1:ICacheable):EPPNetStream{
var _local2:uint = _streams.length;
var _local3:uint;
while (_local3 < _local2) {
if (_streams[_local3].cacheableObject == _arg1){
return (_streams[_local3].stream);
};
_local3++;
};
return (null);
}
override public function get bytesLoaded():uint{
var _local1:uint = _cacheItem.cachedReferences.length;
var _local2:* = _cacheItem.loader.connection;
var _local3:uint;
var _local4:uint;
while (_local4 < _local1) {
if (_local2.getStreamByCachedObject(_cacheItem.cachedReferences[_local4])){
_local3 = (_local3 + _local2.getStreamByCachedObject(_cacheItem.cachedReferences[_local4]).bytesLoaded);
};
_local4++;
};
return (_local3);
}
override public function unload():void{
destroyPreloading();
var _local1:uint = _cacheItem.cachedReferences.length;
_cacheItem.loader.setState(_cacheItem.loader.getStateByName(EPPLoaderEvent.UNLOADING));
var _local2:uint;
while (_local2 < _local1) {
_cacheItem.cachedReferences[_local2].player.channel.destroyPlay();
_cacheItem.cachedReferences[_local2].player.channel.clear();
_cacheItem.cachedReferences[_local2].loader.connection.destroyLoading();
_cacheItem.cachedReferences[_local2].player.clearScreens();
removeStream(_cacheItem.cachedReferences[_local2]);
_local2++;
};
_bytesTotal = -1;
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.UNLOADED));
}
}
}//package com.busfront.epp.net.stream
Section 195
//EPPStreamVideoCached (com.busfront.epp.net.stream.EPPStreamVideoCached)
package com.busfront.epp.net.stream {
import com.busfront.epp.events.*;
import com.busfront.epp.base.*;
import com.busfront.epp.controls.player.*;
import flash.events.*;
import com.busfront.epp.base.cache.*;
import flash.utils.*;
public class EPPStreamVideoCached extends EPPStreamVideo {
private var _cachedObject:ICacheable;
private var _connectionCacheItem:EPPStreamVideoCache;
private var _timerCacheVideoLoading:Timer;
public function EPPStreamVideoCached(_arg1:ICacheable){
super(_arg1);
if (((!((_arg1.type == EPPObjectType.VIDEO))) && (!((_arg1.type == EPPObjectType.OCCURENCE))))){
throw (new Error("INVALIDE STREAM"));
};
_cachedObject = _arg1;
_connectionCacheItem = (_cachedObject.cache.loader.connection as EPPStreamVideoCache);
}
override public function get stream(){
var _local1:* = _cachedObject.cache.loader.connection;
return (_local1.getStreamByCachedObject(_cachedObject));
}
override public function load():void{
var stream:EPPNetStream;
var medvideo4:IPlayable;
var tm:Timer;
_connectionCacheItem.destroyPreloading();
stream = new EPPNetStream();
_connectionCacheItem.addStream(stream, _cachedObject);
IPlayable(_eppObject).player.notifyScreens();
if (_isYoutube){
_stream.play(_alternativeURL);
} else {
stream.play(url);
};
if (_connectionCacheItem.hasSeekpoints === false){
stream.pause();
};
_eppObject.loader.setState(_eppObject.loader.getStateByName(EPPLoaderEvent.LOADING));
_timerLoading.addEventListener(TimerEvent.TIMER, dispatchLoadingAlone);
_timerLoading.start();
medvideo4 = (_eppObject as IPlayable);
medvideo4.player.setState(medvideo4.player.getStateByName(EPPPlayerEvent.BUFFERING));
tm = new Timer(100);
with ({}) {
with ({}) {
!ERROR!.waitBuffer = function (_arg1:TimerEvent):void{
if ((((medvideo4.loader.timeLoaded >= (medvideo4.player.start + stream.bufferTime))) || ((medvideo4.loader.timeLoaded >= medvideo4.player.duration)))){
if (_connectionCacheItem.hasSeekpoints === true){
stream.pause();
};
tm.stop();
tm.removeEventListener(TimerEvent.TIMER, waitBuffer);
medvideo4.player.setState(medvideo4.player.getStateByName(EPPPlayerEvent.BUFFERED));
};
};
};
tm.addEventListener(TimerEvent.TIMER, function (_arg1:TimerEvent):void{
if ((((medvideo4.loader.timeLoaded >= (medvideo4.player.start + stream.bufferTime))) || ((medvideo4.loader.timeLoaded >= medvideo4.player.duration)))){
if (_connectionCacheItem.hasSeekpoints === true){
stream.pause();
};
tm.stop();
tm.removeEventListener(TimerEvent.TIMER, waitBuffer);
medvideo4.player.setState(medvideo4.player.getStateByName(EPPPlayerEvent.BUFFERED));
};
});
tm.start();
}
override public function preload():void{
if (_cachedObject.loader.state.name != EPPLoaderEvent.PRELOADING){
_cachedObject.cache.loader.preload();
};
}
private function dispatchLoadingCacheItemVideo(_arg1:Event):void{
_cachedObject.cache.loader.dispatchEvent(_cachedObject.cache.loader.getStateByName(EPPLoaderEvent.LOADING).event);
}
override public function get isMP4():Boolean{
return (_connectionCacheItem.isMP4);
}
override public function check():void{
var timer1:Timer;
if (_cachedObject.cache.loader.state.name != EPPLoaderEvent.CHECKING){
timer1 = new Timer(10, 1);
with ({}) {
with ({}) {
!ERROR!.dispatchConnectionSucc = function (_arg1:TimerEvent):void{
_arg1.target.removeEventListener(TimerEvent.TIMER_COMPLETE, dispatchConnectionSucc);
if (_cachedObject.loader.state.name == EPPLoaderEvent.UNLOADABLE){
invalidate();
} else {
validate();
if ((((((_cachedObject.cache.loader.stateName == EPPLoaderEvent.PRELOADED)) || ((_cachedObject.cache.loader.stateName == EPPLoaderEvent.LOADED)))) || ((_cachedObject.cache.loader.stateName == EPPLoaderEvent.LOADING)))){
_cachedObject.loader.setState(_cachedObject.loader.getStateByName(EPPLoaderEvent.PRELOADED));
};
if (_cachedObject.autoLoadControl == EPPLoaderEvent.LOAD){
_cachedObject.loader.load();
};
};
};
};
timer1.addEventListener(TimerEvent.TIMER_COMPLETE, function (_arg1:TimerEvent):void{
_arg1.target.removeEventListener(TimerEvent.TIMER_COMPLETE, dispatchConnectionSucc);
if (_cachedObject.loader.state.name == EPPLoaderEvent.UNLOADABLE){
invalidate();
} else {
validate();
if ((((((_cachedObject.cache.loader.stateName == EPPLoaderEvent.PRELOADED)) || ((_cachedObject.cache.loader.stateName == EPPLoaderEvent.LOADED)))) || ((_cachedObject.cache.loader.stateName == EPPLoaderEvent.LOADING)))){
_cachedObject.loader.setState(_cachedObject.loader.getStateByName(EPPLoaderEvent.PRELOADED));
};
if (_cachedObject.autoLoadControl == EPPLoaderEvent.LOAD){
_cachedObject.loader.load();
};
};
});
timer1.start();
timer1 = null;
return;
};
}
override public function get bytesTotal():uint{
return (_connectionCacheItem.singleBytesTotal);
}
override public function get framerate():Number{
return (_connectionCacheItem.framerate);
}
override public function get hasSeekpoints():Boolean{
return (_connectionCacheItem.hasSeekpoints);
}
override public function get metaData():Object{
return (_connectionCacheItem.metaData);
}
override public function get bytesLoaded():uint{
if (((stream) && ((stream.bytesLoaded > -1)))){
return (stream.bytesLoaded);
};
return (0);
}
override protected function dispatchLoadingAlone(_arg1:Event):void{
var _local2:uint;
var _local3:Boolean;
var _local4:uint;
if (_eppObject.loader.state.name == EPPLoaderEvent.LOADING){
if (_cachedObject.cache.loader.state.name != EPPLoaderEvent.LOADING){
_local2 = _cachedObject.cache.cachedReferences.length;
_local3 = false;
_local4 = 0;
while (_local4 < _local2) {
if (((!((_cachedObject.cache.cachedReferences[_local4].loader.state.name == EPPLoaderEvent.LOADING))) && (!((_cachedObject.cache.cachedReferences[_local4].loader.state.name == EPPLoaderEvent.LOADED))))){
_local3 = true;
break;
};
_local4++;
};
if (_local3 == false){
_cachedObject.cache.loader.setState(_cachedObject.cache.loader.getStateByName(EPPLoaderEvent.LOADING));
_timerCacheVideoLoading = new Timer(_timerLoading.delay);
_timerCacheVideoLoading.removeEventListener(TimerEvent.TIMER, dispatchLoadingCacheItemVideo);
_timerCacheVideoLoading.addEventListener(TimerEvent.TIMER, dispatchLoadingCacheItemVideo);
_timerCacheVideoLoading.start();
};
};
super.dispatchLoadingAlone(_arg1);
if (bytesTotal == stream.bytesLoaded){
if (_cachedObject.cache.loader.bytesTotal == _cachedObject.cache.loader.bytesLoaded){
if (_timerCacheVideoLoading){
_timerCacheVideoLoading.removeEventListener(TimerEvent.TIMER, dispatchLoadingCacheItemVideo);
_timerCacheVideoLoading.stop();
_timerCacheVideoLoading = null;
};
_cachedObject.cache.loader.setState(_cachedObject.cache.loader.getStateByName(EPPLoaderEvent.LOADED));
};
};
};
}
override public function unload():void{
_connectionCacheItem.removeStream(_cachedObject);
_cachedObject.cache.loader.unload();
}
}
}//package com.busfront.epp.net.stream
Section 196
//IStream (com.busfront.epp.net.stream.IStream)
package com.busfront.epp.net.stream {
public interface IStream {
function get stream();
function get duration():Number;
}
}//package com.busfront.epp.net.stream
Section 197
//EPPString (com.busfront.epp.utils.EPPString)
package com.busfront.epp.utils {
import com.busfront.epp.controls.player.*;
import com.busfront.epp.controls.filter.*;
import com.busfront.epp.controls.mixer.*;
import com.busfront.epp.controls.loader.*;
import com.busfront.epp.display.*;
public class EPPString {
private var _string:String;
public function EPPString(_arg1:String){
_string = _arg1;
}
public static function decodeArguments(_arg1, _arg2){
var newTrucf:String;
var nbArgsBindable:uint;
var bindableArrayData:Array;
var k:uint;
var newTrucfd:String;
var argument = _arg1;
var object = _arg2;
if ((argument is String)){
var replFn:* = function ():String{
var property:String;
var property2:String;
var newTruc2:String;
var property3:String;
var percentValue:Number;
var newTruc3:String;
var property4:String;
var newTruc4:String;
var arguments = arguments;
var hasBeenReplace:Boolean;
property = arguments[0].replace(/<#(.+)#>/g, "$1");
var propertyArr:Array = property.split(".toTimeCode{{");
if (propertyArr.length == 2){
var replin:* = function ():String{
var _local2:EPPTime = new EPPTime(object[property]);
return (_local2.toTimeCode(arguments[1]));
};
property2 = (".toTimeCode{{" + propertyArr[1]);
property = propertyArr[0];
newTruc2 = property2.replace(/.toTimeCode{{(.+)}}/g, replin);
hasBeenReplace = true;
return (newTruc2);
};
propertyArr = property.split(".toPercent{{");
if (propertyArr.length == 2){
var replin2:* = function ():String{
if ((((((property == "bytesLoaded")) || ((property == "bytesRemaining")))) && ((object is EPPLoader)))){
if (property == "bytesLoaded"){
percentValue = ((object.bytesTotal / object[property]) * 100);
} else {
percentValue = ((object.bytesTotal / object[property]) * 100);
};
};
if ((((((property == "time")) || ((property == "timeRemaining")))) && ((object is EPPPlayer)))){
if (property == "time"){
percentValue = ((object.duration / object[property]) * 100);
} else {
percentValue = ((object.duration / object[property]) * 100);
};
};
if ((((property == "volume")) && ((object is EPPMixer)))){
percentValue = ((1 / object[property]) * 100);
};
if (arguments[1] == "ROUNDED"){
percentValue = Math.round(percentValue);
};
return (new String(percentValue));
};
property3 = (".toPercent{{" + propertyArr[1]);
property = propertyArr[0];
percentValue = 0;
newTruc3 = property3.replace(/.toPercent{{(.+)}}/g, replin2);
hasBeenReplace = true;
return (newTruc3);
};
propertyArr = property.split(".toSize{{");
if (propertyArr.length == 2){
var replin3:* = function ():String{
return (object[property]);
};
property4 = (".toSize{{" + propertyArr[1]);
property = propertyArr[0];
newTruc4 = property4.replace(/.toSize{{(.+)}}/g, replin3);
hasBeenReplace = true;
return (newTruc4);
};
if (hasBeenReplace == false){
if ((((((((((property == "type")) || ((property == "id")))) || ((property == "order")))) || ((property == "name")))) || ((property == "url")))){
return (object.eppObject[property]);
};
if ((object is EPPFilter)){
trace(((property + " IOPLA ") + object.eppObject.getFilterById(property).value));
return (object.eppObject.getFilterById(property).value);
};
return (object[property]);
};
return (" ");
};
newTrucf = argument.replace(/<#[^<#]+?#>/g, replFn);
return (newTrucf);
};
if ((argument is EPPBindable)){
nbArgsBindable = argument.props.length;
bindableArrayData = new Array();
k = 0;
while (k < nbArgsBindable) {
if ((argument.props[k] is String)){
newTrucfd = argument.props[k].replace(/<#(.+)#>/g, "$1");
bindableArrayData.push(object[newTrucfd]);
} else {
bindableArrayData.push(argument.props[k]);
};
k = (k + 1);
};
return (bindableArrayData);
//unresolved jump
};
return (argument);
}
}
}//package com.busfront.epp.utils
Section 198
//EPPTime (com.busfront.epp.utils.EPPTime)
package com.busfront.epp.utils {
public class EPPTime {
private var _seconds:Number;
public function EPPTime(_arg1:Number){
_seconds = _arg1;
}
public function clean():Number{
var _local2:String;
var _local1:Array = _seconds.toString().split(".");
if (_local1.length > 1){
if (_local1[1].toString().length > 3){
_local2 = ((_local1[0] + ".") + _local1[1].toString().substr(0, 3));
return (Number(_local2));
};
};
return (_seconds);
}
public function toTimeCode(_arg1:String):String{
var _local11:String;
var _local12:String;
var _local2:RegExp = /[hHmMsScC]]/;
var _local3:String = _arg1.replace(_local2, "£");
if (_local3.search(_local2)){
_local2 = /[hHmMsScC]/;
_local3 = _local3.replace(_local2, "£");
};
if (_local3.search(_local2)){
_local2 = /[hHmMsScC]/;
_local3 = _local3.replace(_local2, "£");
};
if (_local3.search(_local2)){
_local2 = /[hHmMsScC]/;
_local3 = _local3.replace(_local2, "£");
};
if (_local3.search(_local2)){
_local2 = /[hHmMsScC]/;
_local3 = _local3.replace(_local2, "£");
};
_local3 = _local3.slice(1, (_local3.length - 1));
var _local4:Array = _local3.split("£");
var _local5:Number = 0;
var _local6:Number = 0;
var _local7:Number = 0;
var _local8:Number = 0;
var _local9:Array = String(_seconds).split(".");
var _local10:Number = int(_seconds);
if (_local10 >= 3600){
_local5 = int((_local10 / 3600));
_local10 = (_local10 - (_local5 * 3600));
if (_local10 >= 60){
_local6 = int((_local10 / 60));
_local10 = (_local10 - (_local6 * 60));
};
_local7 = _local10;
} else {
if (_local10 >= 60){
_local6 = int((_local10 / 60));
_local10 = (_local10 - (_local6 * 60));
_local7 = _local10;
} else {
_local7 = _local10;
};
};
_local2 = /[hH]/;
var _local13:String = _local2.exec(_arg1);
if (_local13 == "H"){
if (_local5 > 9){
_local11 = String(_local5);
} else {
_local11 = ("0" + String(_local5));
};
} else {
if (_local13 == "h"){
_local11 = String(_local5);
};
};
_local2 = /[mM]/;
var _local14:String = _local2.exec(_arg1);
if (_local14 != null){
if (_local14 == "M"){
if (_local6 > 9){
_local12 = String(_local6);
} else {
_local12 = ("0" + String(_local6));
};
} else {
if (_local14 == "m"){
_local12 = String(_local6);
};
};
if (_local11 != null){
_local11 = (_local11 + _local4.shift());
_local11 = (_local11 + _local12);
} else {
_local11 = _local12;
};
};
_local2 = /[sS]/;
var _local15:String = _local2.exec(_arg1);
if (_local15 != null){
if (_local15 == "S"){
if (_local7 > 9){
_local12 = String(_local7);
} else {
_local12 = ("0" + String(_local7));
};
} else {
if (_local15 == "s"){
_local12 = String(_local7);
};
};
if (_local11 != null){
_local11 = (_local11 + _local4.shift());
_local11 = (_local11 + _local12);
} else {
_local11 = _local12;
};
};
_local2 = /[cC]/;
var _local16:String = _local2.exec(_arg1);
if (_local16 == "C"){
_local11 = (_local11 + _local4.shift());
if (_local9.length > 1){
_local11 = (_local11 + String(_local9[1]).slice(0, 2));
} else {
_local11 = (_local11 + "00");
};
} else {
if (_local16 == "c"){
_local11 = (_local11 + _local4.shift());
if (_local9.length > 1){
_local11 = (_local11 + String(_local9[1]).slice(0, 2));
} else {
_local11 = (_local11 + "00");
};
};
};
return (_local11);
}
}
}//package com.busfront.epp.utils
Section 199
//MainTimeline (player_fla.MainTimeline)
package player_fla {
import com.busfront.epp.events.*;
import com.busfront.epp.display.controller.*;
import com.busfront.epp.base.*;
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import com.busfront.epp.base.media.*;
import flash.net.*;
import com.busfront.epp.display.reporter.*;
import flash.utils.*;
import flash.media.*;
import flash.filters.*;
import com.busfront.epp.display.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.external.*;
import flash.system.*;
import flash.text.*;
import flash.ui.*;
public dynamic class MainTimeline extends MovieClip {
public var _playBar:EPPReportBar;
public var loadBar:MovieClip;
public var _loadBar:EPPReportBar;
public var playBar:MovieClip;
public var autoplay:Boolean;
public var playBt:MovieClip;
public var pauseBt:MovieClip;
public var myVideo:EPPVideo;
public var myScreen:MovieClip;
public var flashVars:Object;
public function MainTimeline(){
addFrameScript(0, frame1);
}
public function success(_arg1:EPPPlayerEvent):void{
if (autoplay == true){
myVideo.player.play();
};
var _local2:EPPControlMouse = new EPPControlMouse(playBt, MouseEvent.CLICK);
myVideo.player.addController(_local2, EPPPlayerEvent.PLAY);
var _local3:EPPControlMouse = new EPPControlMouse(pauseBt, MouseEvent.CLICK);
myVideo.player.addController(_local3, EPPPlayerEvent.PAUSE);
_loadBar = new EPPReportBar(loadBar, EPPBindable.BYTES_LOADED);
myVideo.loader.addReporter(_loadBar);
var _local4:* = new EPPReportBar(playBar, EPPBindable.TIME);
myVideo.player.addReporter(_local4);
var _local5:EPPControlMouse = new EPPControlMouse(_loadBar, MouseEvent.CLICK);
myVideo.player.addController(_local5, EPPPlayerEvent.SEEK);
var _local6:EPPControlMouse = new EPPControlMouse(_local4, MouseEvent.CLICK);
myVideo.player.addController(_local6, EPPPlayerEvent.SEEK);
myVideo.player.addEventListener(EPPPlayerEvent.PLAYED, playedCallBack);
myVideo.player.play();
}
public function unlock(_arg1:EPPControlGroupEvent):void{
_arg1.clipTarget.visible = true;
}
public function playedCallBack(_arg1:EPPPlayerEvent):void{
ExternalInterface.call("video_onend");
}
function frame1(){
pauseBt.visible = false;
EPP.epp.initApplication(stage, EPPLoaderEvent.LOAD);
playBar.buttonMode = true;
playBar.useHandCursor = true;
loadBar.buttonMode = true;
loadBar.useHandCursor = true;
playBt.buttonMode = true;
playBt.useHandCursor = true;
pauseBt.buttonMode = true;
pauseBt.useHandCursor = true;
flashVars = LoaderInfo(this.root.loaderInfo).parameters;
if (flashVars.autoplay != "false"){
autoplay = true;
} else {
autoplay = false;
};
myVideo = new EPPVideo("slyde.flv");
myVideo.player.addEventListener(EPPPlayerEvent.BUFFERED, success);
myVideo.loader.addEventListener(EPPLoaderEvent.CONNECTION_FAILURE, fail);
myScreen = new MovieClip();
myScreen.graphics.beginFill(0, 1);
myScreen.graphics.drawRect(0, 0, 960, 540);
myScreen.graphics.endFill();
addChild(myScreen);
myVideo.player.addScreen(myScreen);
myVideo.player.addEventListener(EPPControlGroupEvent.CONTROL_LOCKED, lock);
myVideo.player.addEventListener(EPPControlGroupEvent.CONTROL_UNLOCKED, unlock);
}
public function fail(_arg1:EPPLoaderEvent):void{
}
public function lock(_arg1:EPPControlGroupEvent):void{
if (_arg1.stateName != "seeking"){
_arg1.clipTarget.visible = false;
};
}
}
}//package player_fla