STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
228126
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2561 · P5121

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/36014873?noj=FRM36014873-13DC" width="1" height="1"></div>

dreamgirlfriend.swf

This is the info page for
Flash #81970

(Click the ID number above for more basic data on this flash file.)


Text
This is abuse.

So is controlling your girlfriend.

Would you stop yourself?

To find out more visit

www.direct.gov.uk/thisisabuse

<p align="left"><font face="Arial" size="20" color="#999999" letterSpacing="0.000000" kerning="1">e.g. Jump on the bed</font></p>

So is a controlling boyfriend.

Can you see it?

ActionScript [AS3]

Section 1
//PropTween (com.greensock.core.PropTween) package com.greensock.core { public class PropTween { public var priority:int; public var start:Number; public var prevNode:PropTween; public var change:Number; public var target:Object; public var name:String; public var property:String; public var nextNode:PropTween; public var isPlugin:Boolean; public function PropTween(target:Object, property:String, start:Number, change:Number, name:String, isPlugin:Boolean, nextNode:PropTween=null, priority:int=0){ super(); this.target = target; this.property = property; this.start = start; this.change = change; this.name = name; this.isPlugin = isPlugin; this.nextNode = nextNode; this.priority = priority; } } }//package com.greensock.core
Section 2
//SimpleTimeline (com.greensock.core.SimpleTimeline) package com.greensock.core { public class SimpleTimeline extends TweenCore { public var autoRemoveChildren:Boolean; protected var _lastChild:TweenCore; protected var _firstChild:TweenCore; public function SimpleTimeline(vars:Object=null){ super(0, vars); } override public function renderTime(time:Number, suppressEvents:Boolean=false, force:Boolean=false):void{ var dur:Number; var next:TweenCore; var tween:TweenCore = _firstChild; this.cachedTotalTime = time; this.cachedTime = time; while (tween) { next = tween.nextNode; if (((tween.active) || ((((time >= tween.cachedStartTime)) && (!(tween.cachedPaused)))))){ if (!tween.cachedReversed){ tween.renderTime(((time - tween.cachedStartTime) * tween.cachedTimeScale), suppressEvents, false); } else { dur = (tween.cacheIsDirty) ? tween.totalDuration : tween.cachedTotalDuration; tween.renderTime((dur - ((time - tween.cachedStartTime) * tween.cachedTimeScale)), suppressEvents, false); }; }; tween = next; }; } public function addChild(tween:TweenCore):void{ if (tween.timeline != null){ tween.timeline.remove(tween, true); }; tween.timeline = this; if (tween.gc){ tween.setEnabled(true, true); }; if (_firstChild != null){ _firstChild.prevNode = tween; tween.nextNode = _firstChild; } else { tween.nextNode = null; }; _firstChild = tween; tween.prevNode = null; } public function remove(tween:TweenCore, skipDisable:Boolean=false):void{ if (((!(tween.gc)) && (!(skipDisable)))){ tween.setEnabled(false, true); }; if (tween.nextNode != null){ tween.nextNode.prevNode = tween.prevNode; } else { if (_lastChild == tween){ _lastChild = tween.prevNode; }; }; if (tween.prevNode != null){ tween.prevNode.nextNode = tween.nextNode; } else { if (_firstChild == tween){ _firstChild = tween.nextNode; }; }; tween.nextNode = (tween.prevNode = null); } public function get rawTime():Number{ return (this.cachedTotalTime); } } }//package com.greensock.core
Section 3
//TweenCore (com.greensock.core.TweenCore) package com.greensock.core { import com.greensock.*; public class TweenCore { public var initted:Boolean; protected var _hasUpdate:Boolean; public var active:Boolean; protected var _delay:Number; public var cachedReversed:Boolean; public var nextNode:TweenCore; public var cachedTime:Number; protected var _rawPrevTime:Number;// = -1 public var vars:Object; public var cachedTotalTime:Number; public var timeline:SimpleTimeline; public var data; public var cachedStartTime:Number; public var prevNode:TweenCore; public var cachedDuration:Number; public var gc:Boolean; public var cacheIsDirty:Boolean; public var cachedPaused:Boolean; public var cachedTotalDuration:Number; public var cachedTimeScale:Number; public static const version:Number = 0.86; protected static var _classInitted:Boolean; public function TweenCore(duration:Number=0, vars:Object=null){ super(); this.vars = ((vars) || ({})); this.cachedDuration = (this.cachedTotalDuration = ((duration) || (0))); _delay = ((this.vars.delay) || (0)); this.cachedTimeScale = ((this.vars.timeScale) || (1)); this.active = Boolean((((((duration == 0)) && ((_delay == 0)))) && (!((this.vars.immediateRender == false))))); this.cachedTotalTime = (this.cachedTime = 0); this.data = this.vars.data; if (!_classInitted){ if (isNaN(TweenLite.rootFrame)){ TweenLite.initClass(); _classInitted = true; } else { return; }; }; var tl:SimpleTimeline = ((this.vars.timeline is SimpleTimeline)) ? this.vars.timeline : (this.vars.useFrames) ? TweenLite.rootFramesTimeline : TweenLite.rootTimeline; this.cachedStartTime = (tl.cachedTotalTime + _delay); tl.addChild(this); } public function get delay():Number{ return (_delay); } public function renderTime(time:Number, suppressEvents:Boolean=false, force:Boolean=false):void{ } public function get duration():Number{ return (this.cachedDuration); } public function set time(n:Number):void{ this.startTime = (this.timeline.cachedTotalTime - (n / this.cachedTimeScale)); renderTime(n, false, false); } public function set startTime(n:Number):void{ var adjust:Boolean = Boolean(((!((this.timeline == null))) && (((!((n == this.cachedStartTime))) || (this.gc))))); this.cachedStartTime = n; if (adjust){ this.timeline.addChild(this); }; } public function set duration(n:Number):void{ this.cachedDuration = (this.cachedTotalDuration = n); } public function set delay(n:Number):void{ this.startTime = (this.startTime + (n - _delay)); _delay = n; } public function complete(skipRender:Boolean=false, suppressEvents:Boolean=false):void{ } public function invalidate():void{ } public function get startTime():Number{ return (this.cachedStartTime); } public function kill():void{ setEnabled(false, false); } public function get time():Number{ return (this.cachedTime); } public function set totalDuration(n:Number):void{ this.duration = n; } public function get totalDuration():Number{ return (this.cachedTotalDuration); } public function setEnabled(enabled:Boolean, ignoreTimeline:Boolean=false):void{ if (enabled == this.gc){ this.gc = !(enabled); if (enabled){ this.active = Boolean(((((!(this.cachedPaused)) && ((this.cachedTotalTime > 0)))) && ((this.cachedTotalTime < this.cachedTotalDuration)))); if (!ignoreTimeline){ this.timeline.addChild(this); }; } else { this.active = false; if (!ignoreTimeline){ this.timeline.remove(this); }; }; }; } } }//package com.greensock.core
Section 4
//Linear (com.greensock.easing.Linear) package com.greensock.easing { public class Linear { public function Linear(){ super(); } public static function easeOut(t:Number, b:Number, c:Number, d:Number):Number{ return ((((c * t) / d) + b)); } public static function easeIn(t:Number, b:Number, c:Number, d:Number):Number{ return ((((c * t) / d) + b)); } public static function easeInOut(t:Number, b:Number, c:Number, d:Number):Number{ return ((((c * t) / d) + b)); } public static function easeNone(t:Number, b:Number, c:Number, d:Number):Number{ return ((((c * t) / d) + b)); } } }//package com.greensock.easing
Section 5
//TweenLite (com.greensock.TweenLite) package com.greensock { import flash.events.*; import com.greensock.core.*; import flash.display.*; import flash.utils.*; import com.greensock.plugins.*; public class TweenLite extends TweenCore { protected var _hasPlugins:Boolean; public var propTweenLookup:Object; protected var _overwrittenProps:Object; public var target:Object; protected var _notifyPluginsOfEnabled:Boolean; public var ease:Function; protected var _firstPropTween:PropTween; public static const version:Number = 11.09993; public static var rootTimeline:SimpleTimeline; public static var onPluginEvent:Function; public static var rootFramesTimeline:SimpleTimeline; public static var defaultEase:Function = TweenLite.easeOut; public static var plugins:Object = {}; public static var masterList:Dictionary = new Dictionary(false); public static var overwriteManager:Object; public static var rootFrame:Number; public static var killDelayedCallsTo:Function = TweenLite.killTweensOf; private static var _shape:Shape = new Shape(); protected static var _reservedProps:Object = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, useFrames:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, roundProps:1, onStart:1, onStartParams:1, onReverseComplete:1, onReverseCompleteParams:1, onRepeat:1, onRepeatParams:1, proxiedEase:1, easeParams:1, yoyo:1, onCompleteListener:1, onUpdateListener:1, onStartListener:1, orientToBezier:1, timeScale:1, immediateRender:1, repeat:1, repeatDelay:1, timeline:1, data:1, paused:1}; public function TweenLite(target:Object, duration:Number, vars:Object){ var mode:int; var siblings:Array; var sibling:TweenLite; super(duration, vars); this.ease = ((typeof(this.vars.ease))!="function") ? defaultEase : this.vars.ease; this.target = target; if (this.vars.easeParams){ this.vars.proxiedEase = this.ease; this.ease = easeProxy; }; propTweenLookup = {}; if (!(target in masterList)){ masterList[target] = [this]; } else { mode = ((((vars.overwrite == undefined)) || (((!(overwriteManager.enabled)) && ((vars.overwrite > 1)))))) ? overwriteManager.mode : int(vars.overwrite); if (mode == 1){ siblings = masterList[target]; for each (sibling in siblings) { if (!sibling.gc){ sibling.setEnabled(false, false); }; }; masterList[target] = [this]; } else { masterList[target].push(this); }; }; if (((this.active) || (this.vars.immediateRender))){ renderTime(0, false, true); }; } protected function easeProxy(t:Number, b:Number, c:Number, d:Number):Number{ return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams))); } override public function renderTime(time:Number, suppressEvents:Boolean=false, force:Boolean=false):void{ var factor:Number; var isComplete:Boolean; var prevTime:Number = this.cachedTime; this.active = true; if (time >= this.cachedDuration){ this.cachedTotalTime = (this.cachedTime = this.cachedDuration); factor = 1; isComplete = true; if (this.cachedDuration == 0){ if ((((((time == 0)) || ((_rawPrevTime < 0)))) && (!((_rawPrevTime == time))))){ force = true; }; _rawPrevTime = time; }; } else { if (time <= 0){ factor = 0; this.cachedTotalTime = (this.cachedTime = factor); if (time < 0){ this.active = false; if (this.cachedDuration == 0){ if (_rawPrevTime > 0){ force = true; isComplete = true; }; _rawPrevTime = time; }; }; } else { this.cachedTotalTime = (this.cachedTime = time); factor = this.ease(time, 0, 1, this.cachedDuration); }; }; if ((((this.cachedTime == prevTime)) && (!(force)))){ return; }; if (!this.initted){ init(); }; if ((((((prevTime == 0)) && (!((this.vars.onStart == null))))) && (!(suppressEvents)))){ this.vars.onStart.apply(null, this.vars.onStartParams); }; var pt:PropTween = _firstPropTween; while (pt) { pt.target[pt.property] = (pt.start + (factor * pt.change)); pt = pt.nextNode; }; if (((_hasUpdate) && (!(suppressEvents)))){ this.vars.onUpdate.apply(null, this.vars.onUpdateParams); }; if (isComplete){ complete(true, suppressEvents); }; } protected function removePropTween(propTween:PropTween):void{ if (((propTween.isPlugin) && (propTween.target.onDisable))){ propTween.target.onDisable(); }; if (propTween.nextNode){ propTween.nextNode.prevNode = propTween.prevNode; }; if (propTween.prevNode){ propTween.prevNode.nextNode = propTween.nextNode; } else { if (_firstPropTween == propTween){ _firstPropTween = propTween.nextNode; }; }; } protected function insertPropTween(target:Object, property:String, start:Number, end, name:String, isPlugin:Boolean, nextNode:PropTween):PropTween{ var op:Array; var i:int; var pt:PropTween = new PropTween(target, property, start, ((typeof(end))=="number") ? (end - start) : Number(end), name, isPlugin, nextNode); if (nextNode){ nextNode.prevNode = pt; }; if (((isPlugin) && ((name == "_MULTIPLE_")))){ op = target.overwriteProps; i = op.length; while (i-- > 0) { this.propTweenLookup[op[i]] = pt; }; } else { this.propTweenLookup[name] = pt; }; return (pt); } protected function init():void{ var p:String; var i:int; var plugin:*; var prioritize:Boolean; var pt:PropTween; var enumerables:Object = ((this.vars.isTV)==true) ? this.vars.exposedVars : this.vars; propTweenLookup = {}; if (((!((enumerables.timeScale == undefined))) && ((this.target is TweenCore)))){ _firstPropTween = insertPropTween(this.target, "timeScale", this.target.timeScale, enumerables.timeScale, "timeScale", false, _firstPropTween); }; for (p in enumerables) { if ((p in _reservedProps)){ } else { if ((p in plugins)){ plugin = new (plugins[p]); if (plugin.onInitTween(this.target, enumerables[p], this) == false){ _firstPropTween = insertPropTween(this.target, p, this.target[p], enumerables[p], p, false, _firstPropTween); } else { _firstPropTween = insertPropTween(plugin, "changeFactor", 0, 1, ((plugin.overwriteProps.length)==1) ? plugin.overwriteProps[0] : "_MULTIPLE_", true, _firstPropTween); _hasPlugins = true; if (plugin.priority != 0){ _firstPropTween.priority = plugin.priority; prioritize = true; }; if (((!((plugin.onDisable == null))) || (!((plugin.onEnable == null))))){ _notifyPluginsOfEnabled = true; }; }; } else { _firstPropTween = insertPropTween(this.target, p, this.target[p], enumerables[p], p, false, _firstPropTween); }; }; }; if (prioritize){ _firstPropTween = onPluginEvent("onInit", _firstPropTween); }; if (this.vars.runBackwards == true){ pt = _firstPropTween; while (pt) { pt.start = (pt.start + pt.change); pt.change = -(pt.change); pt = pt.nextNode; }; }; _hasUpdate = Boolean(!((this.vars.onUpdate == null))); if (_overwrittenProps){ killVars(_overwrittenProps); }; if (((((((TweenLite.overwriteManager.enabled) && (!((_firstPropTween == null))))) && ((TweenLite.overwriteManager.mode > 1)))) && ((this.target in masterList)))){ overwriteManager.manageOverwrites(this, propTweenLookup, masterList[this.target]); }; this.initted = true; } override public function complete(skipRender:Boolean=false, suppressEvents:Boolean=false):void{ if (!skipRender){ renderTime(this.cachedTotalDuration, suppressEvents, false); return; }; if (_hasPlugins){ onPluginEvent("onComplete", _firstPropTween); }; if (this.timeline.autoRemoveChildren){ this.setEnabled(false, false); } else { this.active = false; }; if (((((!((this.vars.onComplete == null))) && (((!((this.cachedTotalTime == 0))) || ((this.cachedDuration == 0)))))) && (!(suppressEvents)))){ this.vars.onComplete.apply(null, this.vars.onCompleteParams); }; } override public function invalidate():void{ if (_notifyPluginsOfEnabled){ onPluginEvent("onDisable", _firstPropTween); }; _firstPropTween = null; _overwrittenProps = null; _hasUpdate = (this.initted = (this.active = (_notifyPluginsOfEnabled = false))); this.propTweenLookup = {}; } public function killVars(vars:Object, permanent:Boolean=true):void{ var p:String; var pt:PropTween; if (_overwrittenProps == null){ _overwrittenProps = {}; }; for (p in vars) { if ((p in propTweenLookup)){ pt = propTweenLookup[p]; if (((pt.isPlugin) && ((pt.name == "_MULTIPLE_")))){ pt.target.killProps(vars); if (pt.target.overwriteProps.length == 0){ removePropTween(pt); delete propTweenLookup[p]; }; } else { removePropTween(pt); delete propTweenLookup[p]; }; }; if (permanent){ _overwrittenProps[p] = 1; }; }; } override public function setEnabled(enabled:Boolean, ignoreTimeline:Boolean=false):void{ if (enabled == this.gc){ if (enabled){ if (!(this.target in TweenLite.masterList)){ TweenLite.masterList[this.target] = [this]; } else { TweenLite.masterList[this.target].push(this); }; }; super.setEnabled(enabled, ignoreTimeline); if (_notifyPluginsOfEnabled){ onPluginEvent((enabled) ? "onEnable" : "onDisable", _firstPropTween); }; }; } public static function initClass():void{ rootFrame = 0; rootTimeline = new SimpleTimeline(null); rootFramesTimeline = new SimpleTimeline(null); rootTimeline.cachedStartTime = (getTimer() * 0.001); rootFramesTimeline.cachedStartTime = rootFrame; rootTimeline.autoRemoveChildren = true; rootFramesTimeline.autoRemoveChildren = true; _shape.addEventListener(Event.ENTER_FRAME, updateAll, false, 0, true); if (overwriteManager == null){ overwriteManager = {mode:1, enabled:false}; }; } public static function killTweensOf(target:Object, complete:Boolean=false):void{ var a:Array; var i:int; if ((target in masterList)){ a = masterList[target]; i = a.length; while (i-- > 0) { if (!a[i].gc){ if (complete){ a[i].complete(false, false); } else { a[i].setEnabled(false, false); }; }; }; delete masterList[target]; }; } public static function from(target:Object, duration:Number, vars:Object):TweenLite{ vars.runBackwards = true; if (vars.immediateRender != false){ vars.immediateRender = true; }; return (new TweenLite(target, duration, vars)); } protected static function easeOut(t:Number, b:Number, c:Number, d:Number):Number{ t = (t / d); return ((((-(c) * t) * (t - 2)) + b)); } public static function delayedCall(delay:Number, onComplete:Function, onCompleteParams:Array=null, useFrames:Boolean=false):TweenLite{ return (new TweenLite(onComplete, 0, {delay:delay, onComplete:onComplete, onCompleteParams:onCompleteParams, immediateRender:false, useFrames:useFrames, overwrite:0})); } protected static function updateAll(e:Event=null):void{ var ml:Dictionary; var tgt:Object; var a:Array; var i:int; rootTimeline.renderTime((((getTimer() * 0.001) - rootTimeline.cachedStartTime) * rootTimeline.cachedTimeScale), false, false); rootFrame++; rootFramesTimeline.renderTime(((rootFrame - rootFramesTimeline.cachedStartTime) * rootFramesTimeline.cachedTimeScale), false, false); if (!(rootFrame % 60)){ ml = masterList; for (tgt in ml) { a = ml[tgt]; i = a.length; while (i-- > 0) { if (a[i].gc){ a.splice(i, 1); }; }; if (a.length == 0){ delete ml[tgt]; }; }; }; } public static function to(target:Object, duration:Number, vars:Object):TweenLite{ return (new TweenLite(target, duration, vars)); } } }//package com.greensock
Section 6
//InitialLoadCommand (com.violenceagainstwomen.controller.InitialLoadCommand) package com.violenceagainstwomen.controller { import flash.events.*; import org.puremvc.as3.interfaces.*; import com.violenceagainstwomen.*; import com.violenceagainstwomen.model.*; import org.puremvc.as3.patterns.command.*; public class InitialLoadCommand extends SimpleCommand { private var _xmlUrl:String; public function InitialLoadCommand(){ super(); } private function get configProxy():ConfigProxy{ return (ConfigProxy(facade.retrieveProxy(ConfigProxy.DEFAULT_NAME))); } private function onConfigLoaded(e:Event):void{ configProxy.initialLoader = e.target.xml; var loader:XMLLoader = new XMLLoader(); loader.addEventListener(Event.COMPLETE, onDictionaryLoaded); loader.load(_xmlUrl); } private function get dictionaryProxy():DictionaryProxy{ return (DictionaryProxy(facade.retrieveProxy(DictionaryProxy.DEFAULT_NAME))); } private function onDictionaryLoaded(e:Event):void{ dictionaryProxy.initialLoader = e.target.xml; sendNotification(NotificationNames.LOADING_COMPLETE); } override public function execute(note:INotification):void{ _xmlUrl = (note.getBody() as String); var loader:XMLLoader = new XMLLoader(); loader.addEventListener(Event.COMPLETE, onConfigLoaded); loader.load("xml/config.xml"); } } }//package com.violenceagainstwomen.controller
Section 7
//LinkCommand (com.violenceagainstwomen.controller.LinkCommand) package com.violenceagainstwomen.controller { import org.puremvc.as3.interfaces.*; import com.violenceagainstwomen.model.*; import flash.net.*; import org.puremvc.as3.patterns.command.*; public class LinkCommand extends SimpleCommand { public function LinkCommand(){ super(); } private function get dictionaryProxy():DictionaryProxy{ return (DictionaryProxy(facade.retrieveProxy(DictionaryProxy.DEFAULT_NAME))); } override public function execute(note:INotification):void{ navigateToURL(new URLRequest(dictionaryProxy.linkURL), "_self"); } } }//package com.violenceagainstwomen.controller
Section 8
//StartupCommand (com.violenceagainstwomen.controller.StartupCommand) package com.violenceagainstwomen.controller { import com.violenceagainstwomen.view.*; import org.puremvc.as3.interfaces.*; import com.violenceagainstwomen.*; import com.violenceagainstwomen.model.*; import org.puremvc.as3.patterns.command.*; public class StartupCommand extends SimpleCommand { public function StartupCommand(){ super(); } protected function initApplication():void{ } protected function registerProxies(app:IApplication):void{ facade.registerProxy(new ConfigProxy()); facade.registerProxy(new ApplicationStateProxy()); facade.registerProxy(new DictionaryProxy()); } override public function execute(note:INotification):void{ var app:IApplication = (note.getBody().app as IApplication); var xmlUrl:String = note.getBody().xmlUrl; if (app){ registerProxies(app); registerMediators(app); initApplication(); sendNotification(NotificationNames.STARTUP_COMPLETE, xmlUrl); } else { throw (new Error("Startup notification must contain Application instance in body!")); }; } protected function registerMediators(app:IApplication):void{ facade.registerMediator(new FramedViewMediator(app.framedView)); } } }//package com.violenceagainstwomen.controller
Section 9
//SubmitCommand (com.violenceagainstwomen.controller.SubmitCommand) package com.violenceagainstwomen.controller { import com.violenceagainstwomen.model.vo.*; import org.puremvc.as3.interfaces.*; import com.violenceagainstwomen.*; import com.violenceagainstwomen.model.*; import org.puremvc.as3.patterns.command.*; public class SubmitCommand extends SimpleCommand { public function SubmitCommand(){ super(); } private function get dictionaryProxy():DictionaryProxy{ return (DictionaryProxy(facade.retrieveProxy(DictionaryProxy.DEFAULT_NAME))); } override public function execute(note:INotification):void{ var text:String = String(note.getBody()); var video:VideoVO = dictionaryProxy.getVideo(text); trace("SubmitCommant", text, video); sendNotification(NotificationNames.PLAY_VIDEO, video); } } }//package com.violenceagainstwomen.controller
Section 10
//ApplicationStateVO (com.violenceagainstwomen.model.vo.ApplicationStateVO) package com.violenceagainstwomen.model.vo { public class ApplicationStateVO { public var isMuted:Boolean; public var nextSection:String; public var currentSection:String; public function ApplicationStateVO(){ super(); currentSection = null; nextSection = null; } } }//package com.violenceagainstwomen.model.vo
Section 11
//ConfigVO (com.violenceagainstwomen.model.vo.ConfigVO) package com.violenceagainstwomen.model.vo { public class ConfigVO { public var thumbsPath:String; public var flashVars:Object; public var photosPath:String; public var videosPath:String; public function ConfigVO(photosPath:String=null, thumbsPath:String=null, videosPath:String=null){ super(); this.photosPath = photosPath; this.thumbsPath = thumbsPath; this.videosPath = videosPath; } public function toString():String{ return (((((("ConfigVO: photosPath=" + photosPath) + " thumbsPath=") + thumbsPath) + " videosPath=") + videosPath)); } } }//package com.violenceagainstwomen.model.vo
Section 12
//VideoVO (com.violenceagainstwomen.model.vo.VideoVO) package com.violenceagainstwomen.model.vo { public class VideoVO { public var phrases:Array; public var video:String; public var rating:int; public function VideoVO(rating:int=0, video:String=null, phrases:Array=null){ super(); this.rating = rating; this.video = video; this.phrases = phrases; } public function toString():String{ return (((((("DictionaryVO: video=" + video) + " rating=") + rating) + " phrases=") + phrases)); } } }//package com.violenceagainstwomen.model.vo
Section 13
//ApplicationStateProxy (com.violenceagainstwomen.model.ApplicationStateProxy) package com.violenceagainstwomen.model { import com.violenceagainstwomen.model.vo.*; import org.puremvc.as3.interfaces.*; import org.puremvc.as3.patterns.proxy.*; public class ApplicationStateProxy extends Proxy implements IProxy { public static const DEFAULT_NAME:String = "ApplicationStateProxy"; public function ApplicationStateProxy(proxyName:String="ApplicationStateProxy", data:ApplicationStateVO=null){ if (data == null){ data = new ApplicationStateVO(); }; super(proxyName, data); } public function get isMuted():Boolean{ return (data.isMuted); } public function get nextSection():String{ return (data.nextSection); } public function set nextSection(v:String):void{ data.nextSection = sanityCheckSection(v); } public function set currentSection(v:String):void{ data.currentSection = sanityCheckSection(v); } public function set isMuted(v:Boolean):void{ data.isMuted = v; } private function sanityCheckSection(name:String=null):String{ var result:String; switch (name){ case "product": case "newspaper": case "car": case "punchbag": case "map": case "mirror": case "cctv": case "tv": case "phone": case "bike": case "picture": case "legpress": case "arcade": case "email": case "gallery": result = name; break; }; return (result); } public function get currentSection():String{ return (data.currentSection); } } }//package com.violenceagainstwomen.model
Section 14
//ConfigProxy (com.violenceagainstwomen.model.ConfigProxy) package com.violenceagainstwomen.model { import com.violenceagainstwomen.model.vo.*; import org.puremvc.as3.interfaces.*; import org.puremvc.as3.patterns.proxy.*; public class ConfigProxy extends Proxy implements IProxy { public static const DEFAULT_NAME:String = "ConfigProxy"; public static const DATA_LOADED:String = "configproxy.dataLoaded"; public function ConfigProxy(proxyName:String="ConfigProxy", data:Object=null){ if (data == null){ data = new ConfigVO(); }; super(proxyName, data); } public function get configVO():ConfigVO{ return ((data as ConfigVO)); } public function set initialLoader(xml:XML):void{ var xml = xml; var configVO:ConfigVO = new ConfigVO(); configVO.photosPath = xml.string.(@id == "photos_path").text(); configVO.thumbsPath = xml.string.(@id == "thumbs_path").text(); configVO.videosPath = xml.string.(@id == "videos_path").text(); setData(configVO); sendNotification(DATA_LOADED, configVO); } } }//package com.violenceagainstwomen.model
Section 15
//DictionaryProxy (com.violenceagainstwomen.model.DictionaryProxy) package com.violenceagainstwomen.model { import com.violenceagainstwomen.model.vo.*; import org.puremvc.as3.interfaces.*; import org.puremvc.as3.patterns.proxy.*; public class DictionaryProxy extends Proxy implements IProxy { private var _genericLoopVids:Array; private var _videoFolder:String; private var _twitterLink:String; private var _dontUnderstandVids:Array; private var _linkURL:String; private var _version:String; private var _facebookLink:String; public static const GENERIC_LOOP:String = "GENERIC_LOOP"; public static const DEFAULT_NAME:String = "DictionaryProxy"; public static const DATA_LOADED:String = "DictionaryProxy.dataLoaded"; public static const EXPLICIT_REQUEST:String = "EXPLICIT_REQUEST"; public static const DONT_UNDERSTAND:String = "DONT_UNDERSTAND"; public function DictionaryProxy(proxyName:String="DictionaryProxy", data:Object=null){ _dontUnderstandVids = []; _genericLoopVids = []; if (data == null){ data = new VideoVO(); }; super(proxyName, data); } public function get facebookLink():String{ return (_facebookLink); } public function get linkURL():String{ return (_linkURL); } public function get version():String{ return (_version); } public function get videoFolder():String{ return (_videoFolder); } public function get twitterLink():String{ return (_twitterLink); } public function get dictionaryVO():VideoVO{ return ((data as VideoVO)); } public function set initialLoader(xml:XML):void{ var explicitPhrases:String; var videos:XMLList; var dictionary_arr:Array; var i:int; var rating:int; var video:String; var phrasesStr:String; var phrases:Array; var dictionaryVO:VideoVO; var xml = xml; explicitPhrases = xml.general.string.(@id == "explicit_phrases").text(); _videoFolder = xml.general.string.(@id == "video_folder").text(); _linkURL = xml.general.string.(@id == "link").text(); _version = xml.general.string.(@id == "version").text(); _facebookLink = xml.general.string.(@id == "facebook_link").text(); _twitterLink = xml.general.string.(@id == "twitter_link").text(); trace("explicit", explicitPhrases); videos = xml.videos.string; dictionary_arr = new Array(); while (i < videos.length()) { rating = int(videos[i].@rating); video = videos[i].@video; phrasesStr = videos[i].text(); if (phrasesStr == EXPLICIT_REQUEST){ phrases = explicitPhrases.split(","); } else { phrases = phrasesStr.split(","); }; dictionaryVO = new VideoVO(rating, video, phrases); if (phrasesStr == DONT_UNDERSTAND){ _dontUnderstandVids.push(dictionaryVO); } else { if (phrasesStr == GENERIC_LOOP){ _genericLoopVids.push(dictionaryVO); } else { dictionary_arr.push(dictionaryVO); }; }; i = (i + 1); }; setData(dictionary_arr); sendNotification(DATA_LOADED, dictionaryVO); } public function get genericLoops():Array{ return (_genericLoopVids); } public function getVideo(text:String):VideoVO{ var result:VideoVO; var d:VideoVO; var phrases:Array; var numPhrases:int; var j:int; var k:int; var pattern:RegExp = /[^a-zA-Z ]/g; text = text.replace(pattern, " "); var words:Array = text.split(" "); var numWords:int = words.length; var matches:Array = []; var numVideos:int = data.length; var i:int; while (i < numVideos) { d = data[i]; phrases = d.phrases; numPhrases = phrases.length; matches[i] = 0; j = 0; while (j < numPhrases) { k = 0; while (k < numWords) { if (String(phrases[j]).toLowerCase() == String(words[k]).toLowerCase()){ matches[i] = (matches[i] + d.rating); }; k++; }; j++; }; i++; }; var same:Array = new Array(); var highest = 1; var l:int; while (l < numVideos) { if (matches[l] > highest){ highest = matches[l]; same = [l]; } else { if (matches[l] == highest){ same.push(l); }; }; l++; }; var picked:VideoVO; if (same.length <= 0){ picked = _dontUnderstandVids[Math.floor((Math.random() * _dontUnderstandVids.length))]; } else { if (same.length == 1){ picked = data[same[0]]; } else { picked = data[same[Math.floor((Math.random() * same.length))]]; }; }; if (picked != null){ result = picked; }; trace("shortlisted videos", same, picked); return (result); } } }//package com.violenceagainstwomen.model
Section 16
//XMLLoader (com.violenceagainstwomen.model.XMLLoader) package com.violenceagainstwomen.model { import flash.events.*; import flash.net.*; public class XMLLoader extends EventDispatcher { private var _xml:XML; public function XMLLoader(){ super(); } private function openHandler(event:Event):void{ trace(("openHandler: " + event)); } private function securityErrorHandler(event:SecurityErrorEvent):void{ trace(("securityErrorHandler: " + event)); } public function load(url:String):void{ var url = url; var loader:URLLoader = new URLLoader(); loader.dataFormat = URLLoaderDataFormat.TEXT; configureListeners(loader); loader.load(new URLRequest(url)); //unresolved jump var _slot1 = error; trace("Unable to load requested document:", url); } private function ioErrorHandler(event:IOErrorEvent):void{ trace(("ioErrorHandler: " + event)); } private function completeHandler(event:Event):void{ var loader:URLLoader = URLLoader(event.target); _xml = new XML(loader.data); dispatchEvent(new Event(Event.COMPLETE)); } public function get xml():XML{ return (_xml); } private function configureListeners(dispatcher:IEventDispatcher):void{ dispatcher.addEventListener(Event.COMPLETE, completeHandler); dispatcher.addEventListener(Event.OPEN, openHandler); dispatcher.addEventListener(ProgressEvent.PROGRESS, progressHandler); dispatcher.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); dispatcher.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler); dispatcher.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler); } private function progressHandler(event:ProgressEvent):void{ trace(((("progressHandler loaded:" + event.bytesLoaded) + " total: ") + event.bytesTotal)); } private function httpStatusHandler(event:HTTPStatusEvent):void{ trace(("httpStatusHandler: " + event)); } } }//package com.violenceagainstwomen.model
Section 17
//FinalMessage (com.violenceagainstwomen.view.ui.FinalMessage) package com.violenceagainstwomen.view.ui { import flash.events.*; import flash.display.*; import flash.net.*; public class FinalMessage extends Sprite { private var _view:MovieClip; public static const END:String = "FinalMessage.End"; public function FinalMessage(view:MovieClip){ super(); _view = view; _view.visible = false; _view.gotoAndStop(1); } override public function set x(v:Number):void{ _view.x = v; } override public function set y(v:Number):void{ _view.y = v; } override public function get width():Number{ return (_view.width); } override public function get height():Number{ return (_view.height); } public function onHomeOffice(e:MouseEvent):void{ navigateToURL(new URLRequest("http://www.direct.gov.uk/thisisabuse")); } private function onEnterFrame(e:Event):void{ if (_view["linkHit"] != null){ if (_view["linkHit"].buttonMode == false){ _view["linkHit"].addEventListener(MouseEvent.CLICK, onHomeOffice); _view["linkHit"].buttonMode = true; }; }; if (_view.currentFrame == _view.totalFrames){ removeEventListener(Event.ENTER_FRAME, onEnterFrame); _view.stop(); dispatchEvent(new Event(END)); }; } public function show():void{ _view.visible = true; addEventListener(Event.ENTER_FRAME, onEnterFrame); _view.gotoAndPlay(2); } } }//package com.violenceagainstwomen.view.ui
Section 18
//InputForm (com.violenceagainstwomen.view.ui.InputForm) package com.violenceagainstwomen.view.ui { import flash.events.*; import com.violenceagainstwomen.view.utils.*; import flash.display.*; import flash.text.*; import flash.ui.*; public class InputForm extends EventDispatcher { private var _view:Sprite; private var _submit:Sprite; private var _input:TextField; public static const SUBMIT:String = "InputForm.Submit"; private static const DEFAULT_INPUT:String = "e.g. Play air guitar."; public function InputForm(view:Sprite){ super(); _view = view; _input = _view["input"]; _input.addEventListener(FocusEvent.FOCUS_IN, onFocus); _input.addEventListener(FocusEvent.FOCUS_OUT, onUnfocus); _input.text = DEFAULT_INPUT; _submit = _view["submit"]; _submit.addEventListener(MouseEvent.CLICK, onClick); _submit.buttonMode = true; } private function onFocus(e:FocusEvent):void{ var tf:TextField = (e.target as TextField); switch (tf.text){ case DEFAULT_INPUT: tf.text = ""; break; }; tf.addEventListener(KeyboardEvent.KEY_DOWN, reportKeyDown); } private function onUnfocus(e:FocusEvent):void{ var tf:TextField = (e.target as TextField); tf.removeEventListener(KeyboardEvent.KEY_DOWN, reportKeyDown); } private function onClick(e:MouseEvent):void{ submit(); } private function reportKeyDown(event:KeyboardEvent):void{ if (event.keyCode == Keyboard.ENTER){ submit(); }; } private function submit():void{ dispatchEvent(new CustomEvent(SUBMIT, {text:_input.text})); _input.text = ""; } } }//package com.violenceagainstwomen.view.ui
Section 19
//Preloader (com.violenceagainstwomen.view.ui.Preloader) package com.violenceagainstwomen.view.ui { import flash.display.*; import flash.geom.*; public class Preloader extends Sprite { private var _fill:Shape; private var _fillColour:uint; public function Preloader(backgroundColour:uint=0xFFFFFF, fillColour:uint=3845625){ super(); _fillColour = fillColour; var background:Shape = new Shape(); background.graphics.beginFill(backgroundColour); background.graphics.drawCircle(0, 0, 20); background.graphics.endFill(); _fill = new Shape(); addChild(background); addChild(_fill); } public function update(bytesLoaded:Number, bytesTotal:Number):void{ var i:int; var radian:Number; var pointX:Number; var pointY:Number; var percent:Number = ((bytesLoaded / bytesTotal) * 100); _fill.graphics.clear(); _fill.graphics.beginFill(_fillColour); var center:Point = new Point(0, 0); var radius:Number = 20; var endAngle:Number = Math.round(((percent / 100) * 360)); while (i <= endAngle) { radian = (((i - 90) / 180) * Math.PI); pointX = (center.x + (Math.cos(radian) * radius)); pointY = (center.y + (Math.sin(radian) * radius)); _fill.graphics.lineTo(pointX, pointY); i++; }; _fill.graphics.endFill(); } public function reset():void{ _fill.graphics.clear(); } } }//package com.violenceagainstwomen.view.ui
Section 20
//ProgressiveVideo (com.violenceagainstwomen.view.ui.ProgressiveVideo) package com.violenceagainstwomen.view.ui { import flash.events.*; import com.violenceagainstwomen.view.utils.*; import flash.display.*; import flash.geom.*; import org.openvideoplayer.events.*; import flash.media.*; import org.openvideoplayer.net.*; public class ProgressiveVideo extends MovieClip { private var _isPausedStart:Boolean; private var _nc:OvpConnection; private var _isPaused:Boolean;// = false private var _ns:OvpNetStream; private var _filename:String; private var _metaData:Object; private var _video:Video; public static const CUE_POINT:String = "ProgressVideo.CuePoint"; public static const END:String = "ProgressVideo.End"; public static const PROGRESS:String = "ProgressVideo.Progress"; public static const NUM_CUE_POINTS:String = "ProgressVideo.NumCuePoints"; public function ProgressiveVideo(){ _filename = new String("http://products.edgeboss.net/download/products/content/demo/video/oomt/elephants_dream_700k.flv"); super(); } private function connectedHandler():void{ trace(("Successfully connected to: " + _nc.netConnection.uri)); _ns = new OvpNetStream(_nc); _ns.addEventListener(NetStatusEvent.NET_STATUS, streamStatusHandler); _ns.addEventListener(OvpEvent.NETSTREAM_PLAYSTATUS, streamPlayStatusHandler); _ns.addEventListener(OvpEvent.NETSTREAM_METADATA, metadataHandler); _ns.addEventListener(OvpEvent.STREAM_LENGTH, streamLengthHandler); _ns.addEventListener(OvpEvent.COMPLETE, endHandler); _ns.addEventListener(OvpEvent.PROGRESS, update); _ns.addEventListener(OvpEvent.NETSTREAM_CUEPOINT, onCuePoint); _video.attachNetStream(_ns); _ns.play(_filename); if (_isPausedStart){ _ns.pause(); _ns.seek(0); _isPaused = true; }; } private function streamPlayStatusHandler(e:OvpEvent):void{ trace(e.data.code); } public function get isPaused():Boolean{ return (_isPaused); } private function update(e:OvpEvent):void{ if (_metaData == null){ return; }; var percent:Number = ((_ns.time / _metaData.duration) * 100); var precentLoaded:Number = ((_ns.bytesLoaded / _ns.bytesTotal) * 100); dispatchEvent(new CustomEvent(PROGRESS, {percent:percent, precentLoaded:precentLoaded})); } private function streamStatusHandler(e:NetStatusEvent):void{ } public function get volume():Number{ return (_ns.volume); } private function metadataHandler(e:OvpEvent):void{ var propName:String; _metaData = e.data; for (propName in e.data) { }; if (e.data.cuePoints != null){ dispatchEvent(new CustomEvent(NUM_CUE_POINTS, {number:e.data.cuePoints.length})); }; } private function errorHandler(e:OvpEvent):void{ trace(((("Error #" + e.data.errorNumber) + ": ") + e.data.errorDescription), "ERROR"); } private function onCuePoint(e:OvpEvent):void{ dispatchEvent(new CustomEvent(CUE_POINT, {number:e.data.name})); } public function playVideo(filename:String, dimensions:Rectangle, isPausedStart:Boolean=false):void{ _isPausedStart = isPausedStart; if (_ns != null){ _ns.close(); }; _video = new Video(dimensions.width, dimensions.height); addChild(_video); _filename = filename; trace("Video:", _filename); _nc = new OvpConnection(); _nc.addEventListener(OvpEvent.ERROR, errorHandler); _nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler); _nc.connect(null); } private function netStatusHandler(e:NetStatusEvent):void{ trace(e.info.code); switch (e.info.code){ case "NetConnection.Connect.Rejected": trace(("Rejected by server. Reason is " + e.info.description)); break; case "NetConnection.Connect.Success": connectedHandler(); break; }; } private function streamLengthHandler(e:OvpEvent):void{ } private function endHandler(e:OvpEvent):void{ dispatchEvent(new Event(END)); } public function set volume(v:Number):void{ (_ns.volume = v); } public function pause():void{ if (_isPaused){ _ns.resume(); } else { _ns.pause(); }; (_isPaused = !(_isPaused)); } public function destroy():void{ (_metaData = null); _ns.close(); } public function seek(percent:Number):void{ var time:Number = Utils.map(percent, 0, 100, 0, _ns.streamLength); _ns.seek(time); } } }//package com.violenceagainstwomen.view.ui
Section 21
//ShareButtons (com.violenceagainstwomen.view.ui.ShareButtons) package com.violenceagainstwomen.view.ui { import flash.events.*; import flash.display.*; import flash.net.*; public class ShareButtons extends Sprite { private var _twitterLink:String; private var _twitterHit:Sprite; private var _facebookHit:Sprite; private var _facebookLink:String; private static const SHARE_BUTTONS:Class = ShareButtons_SHARE_BUTTONS; public function ShareButtons(facebookLink:String, twitterLink:String){ super(); _facebookLink = facebookLink; _twitterLink = twitterLink; var view:Sprite = new SHARE_BUTTONS(); addChild(view); _facebookHit = new Sprite(); _facebookHit.graphics.beginFill(0xFFFF, 0); _facebookHit.graphics.drawRect(0, 0, 23, 23); _facebookHit.graphics.endFill(); _facebookHit.addEventListener(MouseEvent.CLICK, onShareFacebook); _facebookHit.buttonMode = true; _facebookHit.x = 106; addChild(_facebookHit); _twitterHit = new Sprite(); _twitterHit.graphics.beginFill(0xFFFF, 0); _twitterHit.graphics.drawRect(0, 0, 23, 23); _twitterHit.graphics.endFill(); _twitterHit.addEventListener(MouseEvent.CLICK, onShareTwitter); _twitterHit.buttonMode = true; _twitterHit.x = 136; addChild(_twitterHit); } public function onShareTwitter(e:MouseEvent):void{ navigateToURL(new URLRequest(_twitterLink)); } public function onShareFacebook(e:MouseEvent):void{ navigateToURL(new URLRequest(_facebookLink)); } } }//package com.violenceagainstwomen.view.ui
Section 22
//ShareButtons_SHARE_BUTTONS (com.violenceagainstwomen.view.ui.ShareButtons_SHARE_BUTTONS) package com.violenceagainstwomen.view.ui { import mx.core.*; import flash.display.*; public class ShareButtons_SHARE_BUTTONS extends SpriteAsset { public var submit:DisplayObject; public var title:DisplayObject; public var linkHit:DisplayObject; public var input:DisplayObject; public var form:DisplayObject; } }//package com.violenceagainstwomen.view.ui
Section 23
//CustomEvent (com.violenceagainstwomen.view.utils.CustomEvent) package com.violenceagainstwomen.view.utils { import flash.events.*; public class CustomEvent extends Event { private var _params:Object; public function CustomEvent(type:String, params:Object, bubbles:Boolean=false, cancelable:Boolean=false){ super(type, bubbles, cancelable); _params = params; } public function get params():Object{ return (_params); } override public function toString():String{ return (formatToString("CustomEvent", "params", "type", "bubbles", "cancelable")); } override public function clone():Event{ return (new CustomEvent(type, _params, bubbles, cancelable)); } } }//package com.violenceagainstwomen.view.utils
Section 24
//Utils (com.violenceagainstwomen.view.utils.Utils) package com.violenceagainstwomen.view.utils { import flash.display.*; public class Utils { public function Utils(){ super(); } public static function angle(x1:Number, y1:Number, x2:Number, y2:Number):Number{ if ((((x1 == x2)) && ((y1 == y2)))){ return (0); }; var theX:Number = (x2 - x1); var theY:Number = ((y2 - y1) * -1); var angle:Number = (Math.atan((theY / theX)) / (Math.PI / 180)); if (theX < 0){ angle = (angle + 180); }; if ((((theX >= 0)) && ((theY < 0)))){ angle = (angle + 360); }; return (angle); } public static function distance(x1:Number, y1:Number, x2:Number, y2:Number):Number{ var dx:Number = (x2 - x1); var dy:Number = (y2 - y1); return (Math.sqrt(((dx * dx) + (dy * dy)))); } public static function sendChildToTop(parent:DisplayObjectContainer, child:DisplayObject):void{ var c:String; var ch:DisplayObject; var topChild:DisplayObject = child; for (c in parent) { ch = parent[c]; if (parent.getChildIndex(ch) > parent.getChildIndex(topChild)){ parent.swapChildren(ch, topChild); }; }; } public static function sendChildToTopOfGroup(parent:DisplayObjectContainer, child:DisplayObject, children:Array):void{ var i:int; var ch:DisplayObject; while (i < children.length) { ch = children[i]; if (parent.getChildIndex(ch) > parent.getChildIndex(child)){ parent.swapChildren(ch, child); }; i++; }; } public static function isValidEmail(str:String):Boolean{ var reg:RegExp = /^[a-z][\w.-]+@\w[\w.-]+\.[\w.-]*[a-z][a-z]$/i; return (reg.test(str)); } public static function map(inValue:Number, inLow:Number, inHigh:Number, outLow:Number, outHigh:Number):Number{ var outValue:Number = 0; var inRange:Number = (inHigh - inLow); inValue = (inValue - inLow); var inPercent:Number = ((inValue / inRange) * 100); var outRange:Number = (outHigh - outLow); outValue = (outLow + ((inPercent / 100) * outRange)); return (outValue); } } }//package com.violenceagainstwomen.view.utils
Section 25
//BoyfriendFrameView (com.violenceagainstwomen.view.BoyfriendFrameView) package com.violenceagainstwomen.view { import com.violenceagainstwomen.model.vo.*; import flash.events.*; import com.violenceagainstwomen.view.utils.*; import flash.display.*; import flash.geom.*; import flash.media.*; import flash.net.*; import com.violenceagainstwomen.view.ui.*; import com.greensock.easing.*; import com.greensock.*; public class BoyfriendFrameView extends Sprite implements IFrameView { private var _shareButtons:ShareButtons; private var _loop:SoundChannel; private var _videoFolder:String; private var _finalMessage:FinalMessage; private var _genericLoops:Array; private var _form:InputForm; private var _ratingAcc:int; private var _loopTransform:SoundTransform; private var _finalVideo:ProgressiveVideo; private var _loopSound:Sound; private var _blackout:Shape; private var _backgroundHolder:Sprite; private var _finalMaxScale:Number; private var _whiteout:Shape; private var _linkButton:Sprite; private var _frame:Sprite; private var _numCuePoints:int; private var _currentCuePoint:int; private var _video:ProgressiveVideo; public static const LINK:String = "FramedView.Link"; private static const FINAL_VIDEO_DIMENSIONS:Rectangle = new Rectangle(0, 0, 450, 300); private static const NORMAL_VIDEO_DIMENSIONS:Rectangle = new Rectangle(0, 0, 450, 300); private static const FRAME:Class = BoyfriendFrameView_FRAME; private static const BACKGROUND:Class = BoyfriendFrameView_BACKGROUND; public static const SUBMIT:String = "FramedView.Submit"; private static const GIRL_LINK:Class = BoyfriendFrameView_GIRL_LINK; private static const FINAL_MESSAGE:Class = BoyfriendFrameView_FINAL_MESSAGE; public function BoyfriendFrameView(){ super(); addEventListener(Event.ADDED_TO_STAGE, onAddedToStage); visible = false; } public function onFinalMessageEnd(e:Event):void{ TweenLite.killTweensOf(_linkButton); TweenLite.to(_linkButton, 1, {alpha:1, ease:Linear.easeNone}); TweenLite.killTweensOf(_shareButtons); TweenLite.to(_shareButtons, 1, {alpha:1, ease:Linear.easeNone}); } private function onNumCuePoints(e:CustomEvent):void{ _numCuePoints = e.params.number; } private function onAddedToStage(e:Event):void{ stage.addEventListener(Event.RESIZE, onResize); onResize(); } public function playVideo(video:VideoVO):void{ var videoLoc:Point; var widthPercent:Number; var heightPercent:Number; _ratingAcc++; if (_ratingAcc < 3){ _video.playVideo(((_videoFolder + video.video) + ".flv"), NORMAL_VIDEO_DIMENSIONS); } else { fadeBackground(0); _finalVideo.pause(); _finalVideo.visible = true; _finalVideo.alpha = 0; TweenLite.killTweensOf(_linkButton); TweenLite.to(_linkButton, 5, {alpha:0, ease:Linear.easeNone}); TweenLite.killTweensOf(_shareButtons); TweenLite.to(_shareButtons, 5, {alpha:0, ease:Linear.easeNone}); TweenLite.killTweensOf(_blackout); TweenLite.to(_blackout, 5, {alpha:1, ease:Linear.easeNone}); trace("_finalVideo", _finalVideo.width, _finalVideo.height); videoLoc = _frame.localToGlobal(new Point(_video.x, _video.y)); _finalVideo.x = videoLoc.x; _finalVideo.y = videoLoc.y; widthPercent = (NORMAL_VIDEO_DIMENSIONS.width / FINAL_VIDEO_DIMENSIONS.width); heightPercent = (NORMAL_VIDEO_DIMENSIONS.height / FINAL_VIDEO_DIMENSIONS.height); _finalVideo.scaleX = (_finalVideo.scaleY = Math.max(widthPercent, heightPercent)); TweenLite.killTweensOf(_finalVideo); TweenLite.to(_finalVideo, 0.3, {alpha:1, ease:Linear.easeNone}); if (_currentCuePoint == 0){ widthPercent = (stage.stageWidth / FINAL_VIDEO_DIMENSIONS.width); heightPercent = (stage.stageHeight / FINAL_VIDEO_DIMENSIONS.height); _finalMaxScale = Math.max(widthPercent, heightPercent); } else { positionFinalVideo(); }; }; } private function onCuePoint(e:CustomEvent):void{ _currentCuePoint = e.params.number; positionFinalVideo(); } private function positionFinalVideo():void{ var scaleStep:Number = ((_finalMaxScale - 1) / _numCuePoints); var newScale:Number = (1 + (scaleStep * _currentCuePoint)); _finalVideo.scaleX = (_finalVideo.scaleY = newScale); _finalVideo.x = ((stage.stageWidth - _finalVideo.width) / 2); _finalVideo.y = ((stage.stageHeight - _finalVideo.height) / 2); } public function genericLoops(loops:Array):void{ _genericLoops = loops; } public function hide():void{ visible = false; } public function set volumeHandle(v:Number):void{ _loopTransform.volume = v; if (_loop != null){ _loop.soundTransform = _loopTransform; }; } public function fadeBackground(v:Number):void{ TweenLite.killTweensOf(this); TweenLite.to(this, 1, {volumeHandle:v}); } private function onSubmit(e:CustomEvent):void{ dispatchEvent(new CustomEvent(SUBMIT, {text:e.params.text})); } private function onVideoEnd(e:Event):void{ var video:VideoVO = _genericLoops[Math.floor((Math.random() * _genericLoops.length))]; trace("PLayloop video"); _video.playVideo(((_videoFolder + video.video) + ".flv"), NORMAL_VIDEO_DIMENSIONS); } public function get volumeHandle():Number{ var result:Number = 0; if (_loop != null){ result = _loopTransform.volume; }; return (result); } private function onFinalVideoEnd(e:Event):void{ _finalMessage.show(); _finalVideo.visible = false; } public function reset():void{ } public function populate(videoFolder:String, facebookLink:String, twitterLink:String):void{ var i:int; var bg:Bitmap; _videoFolder = videoFolder; _video = new ProgressiveVideo(); _video.addEventListener(ProgressiveVideo.END, onVideoEnd); _video.playVideo((_videoFolder + "INTRO.flv"), NORMAL_VIDEO_DIMENSIONS); _video.x = -222; _video.y = 170; _blackout = new Shape(); _blackout.graphics.beginFill(0); _blackout.graphics.drawRect(0, 0, 100, 100); _blackout.graphics.endFill(); _blackout.alpha = 0; var finalMessage:MovieClip = new FINAL_MESSAGE(); _finalMessage = new FinalMessage(finalMessage); _finalMessage.addEventListener(FinalMessage.END, onFinalMessageEnd); _shareButtons = new ShareButtons(facebookLink, twitterLink); _whiteout = new Shape(); _whiteout.graphics.beginFill(0xFFFFFF); _whiteout.graphics.drawRect(0, 0, 100, 100); _whiteout.graphics.endFill(); _whiteout.alpha = 0; _whiteout.blendMode = BlendMode.ADD; _frame = new FRAME(); _form = new InputForm(_frame["form"]); _form.addEventListener(InputForm.SUBMIT, onSubmit); _linkButton = new GIRL_LINK(); _linkButton.buttonMode = true; _linkButton.addEventListener(MouseEvent.CLICK, onLink); _backgroundHolder = new Sprite(); while (i < 2000) { bg = new BACKGROUND(); bg.x = i; _backgroundHolder.addChild(bg); i = (i + 80); }; _finalVideo = new ProgressiveVideo(); _finalVideo.addEventListener(ProgressiveVideo.CUE_POINT, onCuePoint); _finalVideo.addEventListener(ProgressiveVideo.NUM_CUE_POINTS, onNumCuePoints); _finalVideo.addEventListener(ProgressiveVideo.END, onFinalVideoEnd); _finalVideo.playVideo("assets/videos/boy/boy_final.flv", FINAL_VIDEO_DIMENSIONS, true); _finalVideo.visible = false; addChild(_backgroundHolder); addChild(_frame); _frame.addChild(_video); if (_frame.getChildIndex(_frame["frame"]) < _frame.getChildIndex(_video)){ _frame.swapChildren(_frame["frame"], _video); }; addChild(_blackout); addChild(_linkButton); addChild(_shareButtons); addChild(_finalVideo); addChild(_whiteout); addChild(finalMessage); onResize(); } private function onResize(e:Event=null):void{ if (((((((!(stage)) || (!(_frame)))) || (!(_video)))) || (!(_linkButton)))){ return; }; var sW:Number = ((stage.stageWidth)>944) ? stage.stageWidth : 944; var sH:Number = ((stage.stageHeight)>600) ? stage.stageHeight : 600; _frame.x = (sW / 2); _frame.y = ((sH - 650) / 2); _finalVideo.x = ((sW - NORMAL_VIDEO_DIMENSIONS.width) / 2); _finalVideo.y = 170; _linkButton.x = (sW - _linkButton.width); _linkButton.y = (sH - _linkButton.height); _blackout.width = sW; _blackout.height = sH; _shareButtons.x = 10; _shareButtons.y = (sH - 34); _finalMessage.x = ((sW - _finalMessage.width) / 2); _finalMessage.y = ((sH - _finalMessage.height) / 2); _finalVideo.x = ((sW - _finalVideo.width) / 2); _finalVideo.y = ((sH - _finalVideo.height) / 2); var widthPercent:Number = (sW / FINAL_VIDEO_DIMENSIONS.width); var heightPercent:Number = (sH / FINAL_VIDEO_DIMENSIONS.height); _finalMaxScale = Math.max(widthPercent, heightPercent); } private function onLink(e:MouseEvent):void{ dispatchEvent(new Event(LINK)); } public function show():void{ _loopSound = new Sound(new URLRequest("assets/audio/city_din_02_60_loop2_lowpass.mp3")); _loopTransform = new SoundTransform(0); _loop = _loopSound.play(0, 100, _loopTransform); fadeBackground(0.2); visible = true; } } }//package com.violenceagainstwomen.view
Section 26
//BoyfriendFrameView_BACKGROUND (com.violenceagainstwomen.view.BoyfriendFrameView_BACKGROUND) package com.violenceagainstwomen.view { import mx.core.*; import flash.display.*; public class BoyfriendFrameView_BACKGROUND extends BitmapAsset { public var form:DisplayObject; public var input:DisplayObject; public var frame:DisplayObject; public var submit:DisplayObject; public var linkHit:DisplayObject; public var title:DisplayObject; } }//package com.violenceagainstwomen.view
Section 27
//BoyfriendFrameView_FINAL_MESSAGE (com.violenceagainstwomen.view.BoyfriendFrameView_FINAL_MESSAGE) package com.violenceagainstwomen.view { import mx.core.*; import flash.display.*; public class BoyfriendFrameView_FINAL_MESSAGE extends MovieClipAsset { public var form:DisplayObject; public var input:DisplayObject; public var frame:DisplayObject; public var submit:DisplayObject; public var linkHit:DisplayObject; public var title:DisplayObject; } }//package com.violenceagainstwomen.view
Section 28
//BoyfriendFrameView_FRAME (com.violenceagainstwomen.view.BoyfriendFrameView_FRAME) package com.violenceagainstwomen.view { import mx.core.*; import flash.display.*; public class BoyfriendFrameView_FRAME extends SpriteAsset { public var form:DisplayObject; public var input:DisplayObject; public var frame:DisplayObject; public var submit:DisplayObject; public var linkHit:DisplayObject; public var title:DisplayObject; } }//package com.violenceagainstwomen.view
Section 29
//BoyfriendFrameView_GIRL_LINK (com.violenceagainstwomen.view.BoyfriendFrameView_GIRL_LINK) package com.violenceagainstwomen.view { import mx.core.*; import flash.display.*; public class BoyfriendFrameView_GIRL_LINK extends SpriteAsset { public var form:DisplayObject; public var input:DisplayObject; public var frame:DisplayObject; public var submit:DisplayObject; public var linkHit:DisplayObject; public var title:DisplayObject; } }//package com.violenceagainstwomen.view
Section 30
//FramedViewMediator (com.violenceagainstwomen.view.FramedViewMediator) package com.violenceagainstwomen.view { import flash.events.*; import com.violenceagainstwomen.view.utils.*; import org.puremvc.as3.interfaces.*; import com.violenceagainstwomen.*; import com.violenceagainstwomen.model.*; import org.puremvc.as3.patterns.mediator.*; public class FramedViewMediator extends Mediator implements IMediator { public static const NAME:String = "GymViewMediator"; public function FramedViewMediator(viewComponent:IFrameView){ super(NAME, viewComponent); viewComponent.addEventListener(BoyfriendFrameView.SUBMIT, onSubmit); viewComponent.addEventListener(BoyfriendFrameView.LINK, onLink); } override public function listNotificationInterests():Array{ return ([NotificationNames.STARTUP_COMPLETE, NotificationNames.LOADING_COMPLETE, NotificationNames.PLAY_VIDEO]); } override public function handleNotification(note:INotification):void{ var name:String; switch (note.getName()){ case NotificationNames.LOADING_COMPLETE: viewComponent.populate(dictionaryProxy.videoFolder, dictionaryProxy.facebookLink, dictionaryProxy.twitterLink); viewComponent.show(); viewComponent.genericLoops(dictionaryProxy.genericLoops); break; case NotificationNames.PLAY_VIDEO: viewComponent.playVideo(note.getBody()); break; }; } private function get dictionaryProxy():DictionaryProxy{ return (DictionaryProxy(facade.retrieveProxy(DictionaryProxy.DEFAULT_NAME))); } private function onLink(e:Event):void{ sendNotification(NotificationNames.LINK); } private function get applicationStateProxy():ApplicationStateProxy{ return (ApplicationStateProxy(facade.retrieveProxy(ApplicationStateProxy.DEFAULT_NAME))); } private function onSubmit(e:CustomEvent):void{ sendNotification(NotificationNames.SUBMIT, e.params.text); } } }//package com.violenceagainstwomen.view
Section 31
//GirlfriendFrameView (com.violenceagainstwomen.view.GirlfriendFrameView) package com.violenceagainstwomen.view { import com.violenceagainstwomen.model.vo.*; import flash.events.*; import com.violenceagainstwomen.view.utils.*; import flash.display.*; import flash.geom.*; import flash.media.*; import flash.net.*; import com.violenceagainstwomen.view.ui.*; import com.greensock.easing.*; import com.greensock.*; public class GirlfriendFrameView extends Sprite implements IFrameView { private var _shareButtons:ShareButtons; private var _loop:SoundChannel; private var _videoFolder:String; private var _finalMessage:FinalMessage; private var _genericLoops:Array; private var _form:InputForm; private var _ratingAcc:int; private var _loopTransform:SoundTransform; private var _finalVideo:ProgressiveVideo; private var _loopSound:Sound; private var _blackout:Shape; private var _backgroundHolder:Sprite; private var _finalMaxScale:Number; private var _whiteout:Shape; private var _linkButton:Sprite; private var _frame:Sprite; private var _numCuePoints:int; private var _currentCuePoint:int; private var _video:ProgressiveVideo; public static const LINK:String = "FramedView.Link"; private static const FINAL_VIDEO_DIMENSIONS:Rectangle = new Rectangle(0, 0, 450, 300); private static const NORMAL_VIDEO_DIMENSIONS:Rectangle = new Rectangle(0, 0, 450, 300); private static const FRAME:Class = GirlfriendFrameView_FRAME; private static const BACKGROUND:Class = GirlfriendFrameView_BACKGROUND; public static const SUBMIT:String = "FramedView.Submit"; private static const GIRL_LINK:Class = GirlfriendFrameView_GIRL_LINK; private static const FINAL_MESSAGE:Class = GirlfriendFrameView_FINAL_MESSAGE; public function GirlfriendFrameView(){ super(); addEventListener(Event.ADDED_TO_STAGE, onAddedToStage); visible = false; } public function onFinalMessageEnd(e:Event):void{ TweenLite.killTweensOf(_linkButton); TweenLite.to(_linkButton, 1, {alpha:1, ease:Linear.easeNone}); TweenLite.killTweensOf(_shareButtons); TweenLite.to(_shareButtons, 1, {alpha:1, ease:Linear.easeNone}); } private function onNumCuePoints(e:CustomEvent):void{ _numCuePoints = e.params.number; } private function onAddedToStage(e:Event):void{ stage.addEventListener(Event.RESIZE, onResize); onResize(); } public function playVideo(video:VideoVO):void{ var videoLoc:Point; var widthPercent:Number; var heightPercent:Number; _ratingAcc = (_ratingAcc + video.rating); trace("rating", _ratingAcc); if (_ratingAcc < 3){ _video.playVideo(((_videoFolder + video.video) + ".flv"), NORMAL_VIDEO_DIMENSIONS); } else { fadeBackground(0); _finalVideo.pause(); _finalVideo.visible = true; _finalVideo.alpha = 0; TweenLite.killTweensOf(_linkButton); TweenLite.to(_linkButton, 5, {alpha:0, ease:Linear.easeNone}); TweenLite.killTweensOf(_shareButtons); TweenLite.to(_shareButtons, 5, {alpha:0, ease:Linear.easeNone}); TweenLite.killTweensOf(_blackout); TweenLite.to(_blackout, 5, {alpha:1, ease:Linear.easeNone}); trace("_finalVideo", _finalVideo.width, _finalVideo.height); videoLoc = _frame.localToGlobal(new Point(_video.x, _video.y)); _finalVideo.x = videoLoc.x; _finalVideo.y = videoLoc.y; widthPercent = (NORMAL_VIDEO_DIMENSIONS.width / FINAL_VIDEO_DIMENSIONS.width); heightPercent = (NORMAL_VIDEO_DIMENSIONS.height / FINAL_VIDEO_DIMENSIONS.height); _finalVideo.scaleX = (_finalVideo.scaleY = Math.max(widthPercent, heightPercent)); TweenLite.killTweensOf(_finalVideo); TweenLite.to(_finalVideo, 0.3, {alpha:1, ease:Linear.easeNone}); if (_currentCuePoint == 0){ widthPercent = (stage.stageWidth / FINAL_VIDEO_DIMENSIONS.width); heightPercent = (stage.stageHeight / FINAL_VIDEO_DIMENSIONS.height); _finalMaxScale = Math.max(widthPercent, heightPercent); } else { positionFinalVideo(); }; }; } private function onCuePoint(e:CustomEvent):void{ _currentCuePoint = e.params.number; positionFinalVideo(); } private function positionFinalVideo():void{ var scaleStep:Number = ((_finalMaxScale - 1) / _numCuePoints); var newScale:Number = (1 + (scaleStep * _currentCuePoint)); _finalVideo.scaleX = (_finalVideo.scaleY = newScale); _finalVideo.x = ((stage.stageWidth - _finalVideo.width) / 2); _finalVideo.y = ((stage.stageHeight - _finalVideo.height) / 2); } public function genericLoops(loops:Array):void{ _genericLoops = loops; } public function hide():void{ visible = false; } public function set volumeHandle(v:Number):void{ _loopTransform.volume = v; if (_loop != null){ _loop.soundTransform = _loopTransform; }; } public function fadeBackground(v:Number):void{ TweenLite.killTweensOf(this); TweenLite.to(this, 1, {volumeHandle:v}); } private function onSubmit(e:CustomEvent):void{ dispatchEvent(new CustomEvent(SUBMIT, {text:e.params.text})); } private function onVideoEnd(e:Event):void{ var video:VideoVO = _genericLoops[Math.floor((Math.random() * _genericLoops.length))]; trace("PLayloop video"); _video.playVideo(((_videoFolder + video.video) + ".flv"), NORMAL_VIDEO_DIMENSIONS); } public function get volumeHandle():Number{ var result:Number = 0; if (_loop != null){ result = _loopTransform.volume; }; return (result); } private function onFinalVideoEnd(e:Event):void{ _finalMessage.show(); _finalVideo.visible = false; } public function reset():void{ } public function populate(videoFolder:String, facebookLink:String, twitterLink:String):void{ var i:int; var bg:Bitmap; _videoFolder = videoFolder; _video = new ProgressiveVideo(); _video.addEventListener(ProgressiveVideo.END, onVideoEnd); _video.playVideo((_videoFolder + "INTRO.flv"), NORMAL_VIDEO_DIMENSIONS); _video.x = -222; _video.y = 170; _blackout = new Shape(); _blackout.graphics.beginFill(0); _blackout.graphics.drawRect(0, 0, 100, 100); _blackout.graphics.endFill(); _blackout.alpha = 0; var finalMessage:MovieClip = new FINAL_MESSAGE(); _finalMessage = new FinalMessage(finalMessage); _finalMessage.addEventListener(FinalMessage.END, onFinalMessageEnd); _shareButtons = new ShareButtons(facebookLink, twitterLink); _whiteout = new Shape(); _whiteout.graphics.beginFill(0xFFFFFF); _whiteout.graphics.drawRect(0, 0, 100, 100); _whiteout.graphics.endFill(); _whiteout.alpha = 0; _whiteout.blendMode = BlendMode.ADD; _frame = new FRAME(); _form = new InputForm(_frame["form"]); _form.addEventListener(InputForm.SUBMIT, onSubmit); _linkButton = new GIRL_LINK(); _linkButton.buttonMode = true; _linkButton.addEventListener(MouseEvent.CLICK, onLink); _backgroundHolder = new Sprite(); while (i < 2000) { bg = new BACKGROUND(); bg.x = i; _backgroundHolder.addChild(bg); i = (i + 6); }; _finalVideo = new ProgressiveVideo(); _finalVideo.addEventListener(ProgressiveVideo.CUE_POINT, onCuePoint); _finalVideo.addEventListener(ProgressiveVideo.NUM_CUE_POINTS, onNumCuePoints); _finalVideo.addEventListener(ProgressiveVideo.END, onFinalVideoEnd); _finalVideo.playVideo("assets/videos/girl/girl_final.flv", FINAL_VIDEO_DIMENSIONS, true); _finalVideo.visible = false; addChild(_backgroundHolder); addChild(_frame); _frame.addChild(_video); if (_frame.getChildIndex(_frame["title"]) < _frame.getChildIndex(_video)){ _frame.swapChildren(_frame["title"], _video); }; addChild(_blackout); addChild(_linkButton); addChild(_shareButtons); addChild(_finalVideo); addChild(_whiteout); addChild(finalMessage); onResize(); } private function onResize(e:Event=null):void{ if (((((((!(stage)) || (!(_frame)))) || (!(_video)))) || (!(_linkButton)))){ return; }; var sW:Number = ((stage.stageWidth)>944) ? stage.stageWidth : 944; var sH:Number = ((stage.stageHeight)>600) ? stage.stageHeight : 600; _frame.x = (sW / 2); _frame.y = ((sH - 650) / 2); _finalVideo.x = ((sW - NORMAL_VIDEO_DIMENSIONS.width) / 2); _finalVideo.y = 170; _linkButton.x = (sW - _linkButton.width); _linkButton.y = (sH - _linkButton.height); _blackout.width = sW; _blackout.height = sH; _shareButtons.x = 10; _shareButtons.y = (sH - 34); _finalMessage.x = ((sW - _finalMessage.width) / 2); _finalMessage.y = ((sH - _finalMessage.height) / 2); _finalVideo.x = ((sW - _finalVideo.width) / 2); _finalVideo.y = ((sH - _finalVideo.height) / 2); var widthPercent:Number = (sW / FINAL_VIDEO_DIMENSIONS.width); var heightPercent:Number = (sH / FINAL_VIDEO_DIMENSIONS.height); _finalMaxScale = Math.max(widthPercent, heightPercent); } private function onLink(e:MouseEvent):void{ dispatchEvent(new Event(LINK)); } public function show():void{ _loopSound = new Sound(new URLRequest("assets/audio/city_din_loop.mp3")); _loopTransform = new SoundTransform(0); _loop = _loopSound.play(0, 100, _loopTransform); fadeBackground(0.15); visible = true; } } }//package com.violenceagainstwomen.view
Section 32
//GirlfriendFrameView_BACKGROUND (com.violenceagainstwomen.view.GirlfriendFrameView_BACKGROUND) package com.violenceagainstwomen.view { import mx.core.*; import flash.display.*; public class GirlfriendFrameView_BACKGROUND extends BitmapAsset { public var submit:DisplayObject; public var title:DisplayObject; public var linkHit:DisplayObject; public var input:DisplayObject; public var form:DisplayObject; } }//package com.violenceagainstwomen.view
Section 33
//GirlfriendFrameView_FINAL_MESSAGE (com.violenceagainstwomen.view.GirlfriendFrameView_FINAL_MESSAGE) package com.violenceagainstwomen.view { import mx.core.*; import flash.display.*; public class GirlfriendFrameView_FINAL_MESSAGE extends MovieClipAsset { public var linkHit:DisplayObject; } }//package com.violenceagainstwomen.view
Section 34
//GirlfriendFrameView_FRAME (com.violenceagainstwomen.view.GirlfriendFrameView_FRAME) package com.violenceagainstwomen.view { import mx.core.*; import flash.display.*; public class GirlfriendFrameView_FRAME extends SpriteAsset { public var submit:DisplayObject; public var title:DisplayObject; public var linkHit:DisplayObject; public var input:DisplayObject; public var form:DisplayObject; } }//package com.violenceagainstwomen.view
Section 35
//GirlfriendFrameView_GIRL_LINK (com.violenceagainstwomen.view.GirlfriendFrameView_GIRL_LINK) package com.violenceagainstwomen.view { import mx.core.*; import flash.display.*; public class GirlfriendFrameView_GIRL_LINK extends SpriteAsset { public var submit:DisplayObject; public var title:DisplayObject; public var linkHit:DisplayObject; public var input:DisplayObject; public var form:DisplayObject; } }//package com.violenceagainstwomen.view
Section 36
//IFrameView (com.violenceagainstwomen.view.IFrameView) package com.violenceagainstwomen.view { import com.violenceagainstwomen.model.vo.*; import flash.events.*; public interface IFrameView extends IEventDispatcher { function hide():void; function playVideo(:VideoVO):void; function genericLoops(:Array):void; function populate(_arg1:String, _arg2:String, _arg3:String):void; function show():void; function reset():void; } }//package com.violenceagainstwomen.view
Section 37
//ApplicationFacade (com.violenceagainstwomen.ApplicationFacade) package com.violenceagainstwomen { import org.puremvc.as3.interfaces.*; import org.puremvc.as3.patterns.facade.*; import com.violenceagainstwomen.controller.*; public class ApplicationFacade extends Facade implements IFacade { public function ApplicationFacade(){ super(); } override protected function initializeController():void{ super.initializeController(); registerCommand(NotificationNames.STARTUP, StartupCommand); registerCommand(NotificationNames.STARTUP_COMPLETE, InitialLoadCommand); registerCommand(NotificationNames.SUBMIT, SubmitCommand); registerCommand(NotificationNames.LINK, LinkCommand); } public function startup(app:IApplication, xmlUrl:String):void{ sendNotification(NotificationNames.STARTUP, {app:app, xmlUrl:xmlUrl}); } public static function getInstance():ApplicationFacade{ if (instance == null){ instance = new (ApplicationFacade); }; return ((instance as ApplicationFacade)); } } }//package com.violenceagainstwomen
Section 38
//DreamGirlfriend (com.violenceagainstwomen.DreamGirlfriend) package com.violenceagainstwomen { import com.violenceagainstwomen.view.*; import flash.display.*; public class DreamGirlfriend extends MovieClip implements IApplication { private var facade:ApplicationFacade; private var _framedView:GirlfriendFrameView; public function DreamGirlfriend(){ super(); _framedView = new GirlfriendFrameView(); addChild(_framedView); facade = ApplicationFacade.getInstance(); facade.startup(this, "xml/girlfriend.xml"); } public function get framedView():IFrameView{ return (_framedView); } } }//package com.violenceagainstwomen
Section 39
//DreamGirlfriendFactory (com.violenceagainstwomen.DreamGirlfriendFactory) package com.violenceagainstwomen { import flash.events.*; import com.greensock.*; import flash.display.*; import com.violenceagainstwomen.view.ui.*; import flash.utils.*; public class DreamGirlfriendFactory extends MovieClip { private var _preloader:Preloader; public function DreamGirlfriendFactory(){ super(); stop(); stage.scaleMode = "noScale"; stage.align = "TL"; _preloader = new Preloader(0, 0xE67700); _preloader.x = (stage.stageWidth / 2); _preloader.y = (stage.stageHeight / 2); _preloader.alpha = 0; TweenLite.killTweensOf(_preloader); TweenLite.to(_preloader, 0.3, {alpha:1}); addChild(_preloader); addEventListener(Event.ENTER_FRAME, onEnterFrame); } private function init():void{ var app:Object; removeChild(_preloader); var mainClass:Class = Class(getDefinitionByName("com.violenceagainstwomen.DreamGirlfriend")); if (mainClass){ app = new (mainClass); addChild((app as DisplayObject)); } else { trace("[ERROR] ApplicationFactory couldn't find main class"); }; } public function onEnterFrame(event:Event):void{ graphics.clear(); if (framesLoaded == totalFrames){ removeEventListener(Event.ENTER_FRAME, onEnterFrame); nextFrame(); TweenLite.killTweensOf(_preloader); TweenLite.to(_preloader, 0.3, {alpha:0, onComplete:init}); } else { _preloader.update(root.loaderInfo.bytesLoaded, root.loaderInfo.bytesTotal); }; } } }//package com.violenceagainstwomen
Section 40
//IApplication (com.violenceagainstwomen.IApplication) package com.violenceagainstwomen { import com.violenceagainstwomen.view.*; public interface IApplication { function get framedView():IFrameView; } }//package com.violenceagainstwomen
Section 41
//NotificationNames (com.violenceagainstwomen.NotificationNames) package com.violenceagainstwomen { public class NotificationNames { public static const PLAY_VIDEO:String = "SubmitCommand.PlayVideo"; public static const LINK:String = "FramedView.Link"; public static const STARTUP_COMPLETE:String = "Application.StartupComplete"; public static const LOADING_COMPLETE:String = "InitialLoadCommand.LoadingComplete"; public static const STARTUP:String = "Application.Startup"; public static const SUBMIT:String = "FramedView.Submit"; public function NotificationNames(){ super(); } } }//package com.violenceagainstwomen
Section 42
//BitmapAsset (mx.core.BitmapAsset) package mx.core { import flash.display.*; public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject { mx_internal static const VERSION:String = "3.4.0.9271"; public function BitmapAsset(bitmapData:BitmapData=null, pixelSnapping:String="auto", smoothing:Boolean=false){ super(bitmapData, pixelSnapping, smoothing); } public function get measuredWidth():Number{ if (bitmapData){ return (bitmapData.width); }; return (0); } public function get measuredHeight():Number{ if (bitmapData){ return (bitmapData.height); }; return (0); } public function setActualSize(newWidth:Number, newHeight:Number):void{ width = newWidth; height = newHeight; } public function move(x:Number, y:Number):void{ this.x = x; this.y = y; } } }//package mx.core
Section 43
//EdgeMetrics (mx.core.EdgeMetrics) package mx.core { public class EdgeMetrics { public var top:Number; public var left:Number; public var bottom:Number; public var right:Number; mx_internal static const VERSION:String = "3.4.0.9271"; public static const EMPTY:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0); ; public function EdgeMetrics(left:Number=0, top:Number=0, right:Number=0, bottom:Number=0){ super(); this.left = left; this.top = top; this.right = right; this.bottom = bottom; } public function clone():EdgeMetrics{ return (new EdgeMetrics(left, top, right, bottom)); } } }//package mx.core
Section 44
//FlexBitmap (mx.core.FlexBitmap) package mx.core { import flash.display.*; import mx.utils.*; public class FlexBitmap extends Bitmap { mx_internal static const VERSION:String = "3.4.0.9271"; public function FlexBitmap(bitmapData:BitmapData=null, pixelSnapping:String="auto", smoothing:Boolean=false){ var bitmapData = bitmapData; var pixelSnapping = pixelSnapping; var smoothing = smoothing; super(bitmapData, pixelSnapping, smoothing); name = NameUtil.createUniqueName(this); //unresolved jump var _slot1 = e; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 45
//FlexLoader (mx.core.FlexLoader) package mx.core { import flash.display.*; import mx.utils.*; public class FlexLoader extends Loader { mx_internal static const VERSION:String = "3.4.0.9271"; public function FlexLoader(){ super(); name = NameUtil.createUniqueName(this); //unresolved jump var _slot1 = e; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 46
//FlexMovieClip (mx.core.FlexMovieClip) package mx.core { import flash.display.*; import mx.utils.*; public class FlexMovieClip extends MovieClip { mx_internal static const VERSION:String = "3.4.0.9271"; public function FlexMovieClip(){ super(); name = NameUtil.createUniqueName(this); //unresolved jump var _slot1 = e; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 47
//FlexShape (mx.core.FlexShape) package mx.core { import flash.display.*; import mx.utils.*; public class FlexShape extends Shape { mx_internal static const VERSION:String = "3.4.0.9271"; public function FlexShape(){ super(); name = NameUtil.createUniqueName(this); //unresolved jump var _slot1 = e; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 48
//FlexSprite (mx.core.FlexSprite) package mx.core { import flash.display.*; import mx.utils.*; public class FlexSprite extends Sprite { mx_internal static const VERSION:String = "3.4.0.9271"; public function FlexSprite(){ super(); name = NameUtil.createUniqueName(this); //unresolved jump var _slot1 = e; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 49
//FlexVersion (mx.core.FlexVersion) package mx.core { import mx.resources.*; public class FlexVersion { public static const VERSION_2_0_1:uint = 33554433; public static const CURRENT_VERSION:uint = 50331648; public static const VERSION_3_0:uint = 50331648; public static const VERSION_2_0:uint = 33554432; public static const VERSION_ALREADY_READ:String = "versionAlreadyRead"; public static const VERSION_ALREADY_SET:String = "versionAlreadySet"; mx_internal static const VERSION:String = "3.4.0.9271"; private static var compatibilityVersionChanged:Boolean = false; private static var _compatibilityErrorFunction:Function; private static var _compatibilityVersion:uint = 50331648; private static var compatibilityVersionRead:Boolean = false; public function FlexVersion(){ super(); } mx_internal static function changeCompatibilityVersionString(value:String):void{ var pieces:Array = value.split("."); var major:uint = parseInt(pieces[0]); var minor:uint = parseInt(pieces[1]); var update:uint = parseInt(pieces[2]); _compatibilityVersion = (((major << 24) + (minor << 16)) + update); } public static function set compatibilityVersion(value:uint):void{ var s:String; if (value == _compatibilityVersion){ return; }; if (compatibilityVersionChanged){ if (compatibilityErrorFunction == null){ s = ResourceManager.getInstance().getString("core", VERSION_ALREADY_SET); throw (new Error(s)); }; compatibilityErrorFunction(value, VERSION_ALREADY_SET); }; if (compatibilityVersionRead){ if (compatibilityErrorFunction == null){ s = ResourceManager.getInstance().getString("core", VERSION_ALREADY_READ); throw (new Error(s)); }; compatibilityErrorFunction(value, VERSION_ALREADY_READ); }; _compatibilityVersion = value; compatibilityVersionChanged = true; } public static function get compatibilityVersion():uint{ compatibilityVersionRead = true; return (_compatibilityVersion); } public static function set compatibilityErrorFunction(value:Function):void{ _compatibilityErrorFunction = value; } public static function set compatibilityVersionString(value:String):void{ var pieces:Array = value.split("."); var major:uint = parseInt(pieces[0]); var minor:uint = parseInt(pieces[1]); var update:uint = parseInt(pieces[2]); compatibilityVersion = (((major << 24) + (minor << 16)) + update); } public static function get compatibilityErrorFunction():Function{ return (_compatibilityErrorFunction); } public static function get compatibilityVersionString():String{ var major:uint = ((compatibilityVersion >> 24) & 0xFF); var minor:uint = ((compatibilityVersion >> 16) & 0xFF); var update:uint = (compatibilityVersion & 0xFFFF); return (((((major.toString() + ".") + minor.toString()) + ".") + update.toString())); } } }//package mx.core
Section 50
//IBorder (mx.core.IBorder) package mx.core { public interface IBorder { function get borderMetrics():EdgeMetrics; } }//package mx.core
Section 51
//IButton (mx.core.IButton) package mx.core { public interface IButton extends IUIComponent { function get emphasized():Boolean; function set emphasized(C:\autobuild\galaga\frameworks\projects\framework\src;mx\core;IButton.as:Boolean):void; function callLater(_arg1:Function, _arg2:Array=null):void; } }//package mx.core
Section 52
//IChildList (mx.core.IChildList) package mx.core { import flash.display.*; import flash.geom.*; public interface IChildList { function get numChildren():int; function removeChild(C:\autobuild\galaga\frameworks\projects\framework\src;mx\core;IChildList.as:DisplayObject):DisplayObject; function getChildByName(C:\autobuild\galaga\frameworks\projects\framework\src;mx\core;IChildList.as:String):DisplayObject; function removeChildAt(C:\autobuild\galaga\frameworks\projects\framework\src;mx\core;IChildList.as:int):DisplayObject; function getChildIndex(:DisplayObject):int; function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject; function getObjectsUnderPoint(child:Point):Array; function setChildIndex(_arg1:DisplayObject, _arg2:int):void; function getChildAt(C:\autobuild\galaga\frameworks\projects\framework\src;mx\core;IChildList.as:int):DisplayObject; function addChild(C:\autobuild\galaga\frameworks\projects\framework\src;mx\core;IChildList.as:DisplayObject):DisplayObject; function contains(flash.display:DisplayObject):Boolean; } }//package mx.core
Section 53
//IContainer (mx.core.IContainer) package mx.core { import flash.display.*; import flash.geom.*; import mx.managers.*; import flash.media.*; import flash.text.*; public interface IContainer extends IUIComponent { function set hitArea(mx.core:IContainer/mx.core:IContainer:graphics/get:Sprite):void; function swapChildrenAt(_arg1:int, _arg2:int):void; function getChildByName(Graphics:String):DisplayObject; function get doubleClickEnabled():Boolean; function get graphics():Graphics; function get useHandCursor():Boolean; function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject; function set mouseChildren(mx.core:IContainer/mx.core:IContainer:graphics/get:Boolean):void; function set creatingContentPane(mx.core:IContainer/mx.core:IContainer:graphics/get:Boolean):void; function get textSnapshot():TextSnapshot; function getChildIndex(value:DisplayObject):int; function set doubleClickEnabled(mx.core:IContainer/mx.core:IContainer:graphics/get:Boolean):void; function getObjectsUnderPoint(lockCenter:Point):Array; function get creatingContentPane():Boolean; function setChildIndex(_arg1:DisplayObject, _arg2:int):void; function get soundTransform():SoundTransform; function set useHandCursor(mx.core:IContainer/mx.core:IContainer:graphics/get:Boolean):void; function get numChildren():int; function contains(C:\autobuild\galaga\frameworks\projects\framework\src;mx\core;ISpriteInterface.as:DisplayObject):Boolean; function get verticalScrollPosition():Number; function set defaultButton(mx.core:IContainer/mx.core:IContainer:graphics/get:IFlexDisplayObject):void; function swapChildren(_arg1:DisplayObject, _arg2:DisplayObject):void; function set horizontalScrollPosition(mx.core:IContainer/mx.core:IContainer:graphics/get:Number):void; function get focusManager():IFocusManager; function startDrag(_arg1:Boolean=false, _arg2:Rectangle=null):void; function set mouseEnabled(mx.core:IContainer/mx.core:IContainer:graphics/get:Boolean):void; function getChildAt(Graphics:int):DisplayObject; function set soundTransform(mx.core:IContainer/mx.core:IContainer:graphics/get:SoundTransform):void; function get tabChildren():Boolean; function get tabIndex():int; function set focusRect(mx.core:IContainer/mx.core:IContainer:graphics/get:Object):void; function get hitArea():Sprite; function get mouseChildren():Boolean; function removeChildAt(Graphics:int):DisplayObject; function get defaultButton():IFlexDisplayObject; function stopDrag():void; function set tabEnabled(mx.core:IContainer/mx.core:IContainer:graphics/get:Boolean):void; function get horizontalScrollPosition():Number; function get focusRect():Object; function get viewMetrics():EdgeMetrics; function set verticalScrollPosition(mx.core:IContainer/mx.core:IContainer:graphics/get:Number):void; function get dropTarget():DisplayObject; function get mouseEnabled():Boolean; function set tabChildren(mx.core:IContainer/mx.core:IContainer:graphics/get:Boolean):void; function set buttonMode(mx.core:IContainer/mx.core:IContainer:graphics/get:Boolean):void; function get tabEnabled():Boolean; function get buttonMode():Boolean; function removeChild(Graphics:DisplayObject):DisplayObject; function set tabIndex(mx.core:IContainer/mx.core:IContainer:graphics/get:int):void; function addChild(Graphics:DisplayObject):DisplayObject; function areInaccessibleObjectsUnderPoint(C:\autobuild\galaga\frameworks\projects\framework\src;mx\core;ISpriteInterface.as:Point):Boolean; } }//package mx.core
Section 54
//IFlexAsset (mx.core.IFlexAsset) package mx.core { public interface IFlexAsset { } }//package mx.core
Section 55
//IFlexDisplayObject (mx.core.IFlexDisplayObject) package mx.core { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.accessibility.*; public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher { function get visible():Boolean; function get rotation():Number; function localToGlobal(void:Point):Point; function get name():String; function set width(flash.display:Number):void; function get measuredHeight():Number; function get blendMode():String; function get scale9Grid():Rectangle; function set name(flash.display:String):void; function set scaleX(flash.display:Number):void; function set scaleY(flash.display:Number):void; function get measuredWidth():Number; function get accessibilityProperties():AccessibilityProperties; function set scrollRect(flash.display:Rectangle):void; function get cacheAsBitmap():Boolean; function globalToLocal(void:Point):Point; function get height():Number; function set blendMode(flash.display:String):void; function get parent():DisplayObjectContainer; function getBounds(String:DisplayObject):Rectangle; function get opaqueBackground():Object; function set scale9Grid(flash.display:Rectangle):void; function setActualSize(_arg1:Number, _arg2:Number):void; function set alpha(flash.display:Number):void; function set accessibilityProperties(flash.display:AccessibilityProperties):void; function get width():Number; function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean; function set cacheAsBitmap(flash.display:Boolean):void; function get scaleX():Number; function get scaleY():Number; function get scrollRect():Rectangle; function get mouseX():Number; function get mouseY():Number; function set height(flash.display:Number):void; function set mask(flash.display:DisplayObject):void; function getRect(String:DisplayObject):Rectangle; function get alpha():Number; function set transform(flash.display:Transform):void; function move(_arg1:Number, _arg2:Number):void; function get loaderInfo():LoaderInfo; function get root():DisplayObject; function hitTestObject(mx.core:IFlexDisplayObject/mx.core:IFlexDisplayObject:stage/get:DisplayObject):Boolean; function set opaqueBackground(flash.display:Object):void; function set visible(flash.display:Boolean):void; function get mask():DisplayObject; function set x(flash.display:Number):void; function set y(flash.display:Number):void; function get transform():Transform; function set filters(flash.display:Array):void; function get x():Number; function get y():Number; function get filters():Array; function set rotation(flash.display:Number):void; function get stage():Stage; } }//package mx.core
Section 56
//IFlexModuleFactory (mx.core.IFlexModuleFactory) package mx.core { import flash.utils.*; public interface IFlexModuleFactory { function get preloadedRSLs():Dictionary; function allowInsecureDomain(... _args):void; function create(... _args):Object; function allowDomain(... _args):void; function info():Object; } }//package mx.core
Section 57
//IInvalidating (mx.core.IInvalidating) package mx.core { public interface IInvalidating { function validateNow():void; function invalidateSize():void; function invalidateDisplayList():void; function invalidateProperties():void; } }//package mx.core
Section 58
//IProgrammaticSkin (mx.core.IProgrammaticSkin) package mx.core { public interface IProgrammaticSkin { function validateNow():void; function validateDisplayList():void; } }//package mx.core
Section 59
//IRawChildrenContainer (mx.core.IRawChildrenContainer) package mx.core { public interface IRawChildrenContainer { function get rawChildren():IChildList; } }//package mx.core
Section 60
//IRectangularBorder (mx.core.IRectangularBorder) package mx.core { import flash.geom.*; public interface IRectangularBorder extends IBorder { function get backgroundImageBounds():Rectangle; function get hasBackgroundImage():Boolean; function set backgroundImageBounds(C:\autobuild\galaga\frameworks\projects\framework\src;mx\core;IRectangularBorder.as:Rectangle):void; function layoutBackgroundImage():void; } }//package mx.core
Section 61
//IRepeaterClient (mx.core.IRepeaterClient) package mx.core { public interface IRepeaterClient { function get instanceIndices():Array; function set instanceIndices(C:\autobuild\galaga\frameworks\projects\framework\src;mx\core;IRepeaterClient.as:Array):void; function get isDocument():Boolean; function set repeaters(C:\autobuild\galaga\frameworks\projects\framework\src;mx\core;IRepeaterClient.as:Array):void; function initializeRepeaterArrays(C:\autobuild\galaga\frameworks\projects\framework\src;mx\core;IRepeaterClient.as:IRepeaterClient):void; function get repeaters():Array; function set repeaterIndices(C:\autobuild\galaga\frameworks\projects\framework\src;mx\core;IRepeaterClient.as:Array):void; function get repeaterIndices():Array; } }//package mx.core
Section 62
//ISWFBridgeGroup (mx.core.ISWFBridgeGroup) package mx.core { import flash.events.*; public interface ISWFBridgeGroup { function getChildBridgeProvider(mx.core:ISWFBridgeGroup/mx.core:ISWFBridgeGroup:parentBridge/get:IEventDispatcher):ISWFBridgeProvider; function removeChildBridge(C:\autobuild\galaga\frameworks\projects\framework\src;mx\core;ISWFBridgeGroup.as:IEventDispatcher):void; function get parentBridge():IEventDispatcher; function addChildBridge(_arg1:IEventDispatcher, _arg2:ISWFBridgeProvider):void; function set parentBridge(C:\autobuild\galaga\frameworks\projects\framework\src;mx\core;ISWFBridgeGroup.as:IEventDispatcher):void; function containsBridge(IEventDispatcher:IEventDispatcher):Boolean; function getChildBridges():Array; } }//package mx.core
Section 63
//ISWFBridgeProvider (mx.core.ISWFBridgeProvider) package mx.core { import flash.events.*; public interface ISWFBridgeProvider { function get childAllowsParent():Boolean; function get swfBridge():IEventDispatcher; function get parentAllowsChild():Boolean; } }//package mx.core
Section 64
//IUIComponent (mx.core.IUIComponent) package mx.core { import flash.display.*; import mx.managers.*; public interface IUIComponent extends IFlexDisplayObject { function set focusPane(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Sprite):void; function get enabled():Boolean; function set enabled(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Boolean):void; function set isPopUp(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Boolean):void; function get explicitMinHeight():Number; function get percentWidth():Number; function get isPopUp():Boolean; function get owner():DisplayObjectContainer; function get percentHeight():Number; function get baselinePosition():Number; function owns(Number:DisplayObject):Boolean; function initialize():void; function get maxWidth():Number; function get minWidth():Number; function getExplicitOrMeasuredWidth():Number; function get explicitMaxWidth():Number; function get explicitMaxHeight():Number; function set percentHeight(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Number):void; function get minHeight():Number; function set percentWidth(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Number):void; function get document():Object; function get focusPane():Sprite; function getExplicitOrMeasuredHeight():Number; function set tweeningProperties(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Array):void; function set explicitWidth(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Number):void; function set measuredMinHeight(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Number):void; function get explicitMinWidth():Number; function get tweeningProperties():Array; function get maxHeight():Number; function set owner(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:DisplayObjectContainer):void; function set includeInLayout(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Boolean):void; function setVisible(_arg1:Boolean, _arg2:Boolean=false):void; function parentChanged(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:DisplayObjectContainer):void; function get explicitWidth():Number; function get measuredMinHeight():Number; function set measuredMinWidth(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Number):void; function set explicitHeight(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Number):void; function get includeInLayout():Boolean; function get measuredMinWidth():Number; function get explicitHeight():Number; function set systemManager(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:ISystemManager):void; function set document(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Object):void; function get systemManager():ISystemManager; } }//package mx.core
Section 65
//MovieClipAsset (mx.core.MovieClipAsset) package mx.core { public class MovieClipAsset extends FlexMovieClip implements IFlexAsset, IFlexDisplayObject, IBorder { private var _measuredHeight:Number; private var _measuredWidth:Number; mx_internal static const VERSION:String = "3.4.0.9271"; public function MovieClipAsset(){ super(); _measuredWidth = width; _measuredHeight = height; } public function get measuredWidth():Number{ return (_measuredWidth); } public function get measuredHeight():Number{ return (_measuredHeight); } public function setActualSize(newWidth:Number, newHeight:Number):void{ width = newWidth; height = newHeight; } public function move(x:Number, y:Number):void{ this.x = x; this.y = y; } public function get borderMetrics():EdgeMetrics{ if (scale9Grid == null){ return (EdgeMetrics.EMPTY); }; return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom)))); } } }//package mx.core
Section 66
//mx_internal (mx.core.mx_internal) package mx.core { public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal"; }//package mx.core
Section 67
//Singleton (mx.core.Singleton) package mx.core { public class Singleton { mx_internal static const VERSION:String = "3.4.0.9271"; private static var classMap:Object = {}; public function Singleton(){ super(); } public static function registerClass(interfaceName:String, clazz:Class):void{ var c:Class = classMap[interfaceName]; if (!c){ classMap[interfaceName] = clazz; }; } public static function getClass(interfaceName:String):Class{ return (classMap[interfaceName]); } public static function getInstance(interfaceName:String):Object{ var c:Class = classMap[interfaceName]; if (!c){ throw (new Error((("No class registered for interface '" + interfaceName) + "'."))); }; return (c["getInstance"]()); } } }//package mx.core
Section 68
//SpriteAsset (mx.core.SpriteAsset) package mx.core { public class SpriteAsset extends FlexSprite implements IFlexAsset, IFlexDisplayObject, IBorder { private var _measuredHeight:Number; private var _measuredWidth:Number; mx_internal static const VERSION:String = "3.4.0.9271"; public function SpriteAsset(){ super(); _measuredWidth = width; _measuredHeight = height; } public function get measuredWidth():Number{ return (_measuredWidth); } public function get measuredHeight():Number{ return (_measuredHeight); } public function setActualSize(newWidth:Number, newHeight:Number):void{ width = newWidth; height = newHeight; } public function move(x:Number, y:Number):void{ this.x = x; this.y = y; } public function get borderMetrics():EdgeMetrics{ if (scale9Grid == null){ return (EdgeMetrics.EMPTY); }; return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom)))); } } }//package mx.core
Section 69
//UIComponentGlobals (mx.core.UIComponentGlobals) package mx.core { import flash.display.*; import flash.geom.*; import mx.managers.*; public class UIComponentGlobals { mx_internal static var callLaterSuspendCount:int = 0; mx_internal static var layoutManager:ILayoutManager; mx_internal static var nextFocusObject:InteractiveObject; mx_internal static var designTime:Boolean = false; mx_internal static var tempMatrix:Matrix = new Matrix(); mx_internal static var callLaterDispatcherCount:int = 0; private static var _catchCallLaterExceptions:Boolean = false; public function UIComponentGlobals(){ super(); } public static function set catchCallLaterExceptions(value:Boolean):void{ _catchCallLaterExceptions = value; } public static function get designMode():Boolean{ return (designTime); } public static function set designMode(value:Boolean):void{ designTime = value; } public static function get catchCallLaterExceptions():Boolean{ return (_catchCallLaterExceptions); } } }//package mx.core
Section 70
//ModuleEvent (mx.events.ModuleEvent) package mx.events { import mx.core.*; import flash.events.*; import mx.modules.*; public class ModuleEvent extends ProgressEvent { public var errorText:String; private var _module:IModuleInfo; public static const READY:String = "ready"; public static const ERROR:String = "error"; public static const PROGRESS:String = "progress"; mx_internal static const VERSION:String = "3.4.0.9271"; public static const SETUP:String = "setup"; public static const UNLOAD:String = "unload"; public function ModuleEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false, bytesLoaded:uint=0, bytesTotal:uint=0, errorText:String=null, module:IModuleInfo=null){ super(type, bubbles, cancelable, bytesLoaded, bytesTotal); this.errorText = errorText; this._module = module; } public function get module():IModuleInfo{ if (_module){ return (_module); }; return ((target as IModuleInfo)); } override public function clone():Event{ return (new ModuleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText, module)); } } }//package mx.events
Section 71
//ResourceEvent (mx.events.ResourceEvent) package mx.events { import mx.core.*; import flash.events.*; public class ResourceEvent extends ProgressEvent { public var errorText:String; mx_internal static const VERSION:String = "3.4.0.9271"; public static const COMPLETE:String = "complete"; public static const PROGRESS:String = "progress"; public static const ERROR:String = "error"; public function ResourceEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false, bytesLoaded:uint=0, bytesTotal:uint=0, errorText:String=null){ super(type, bubbles, cancelable, bytesLoaded, bytesTotal); this.errorText = errorText; } override public function clone():Event{ return (new ResourceEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText)); } } }//package mx.events
Section 72
//StyleEvent (mx.events.StyleEvent) package mx.events { import mx.core.*; import flash.events.*; public class StyleEvent extends ProgressEvent { public var errorText:String; mx_internal static const VERSION:String = "3.4.0.9271"; public static const COMPLETE:String = "complete"; public static const PROGRESS:String = "progress"; public static const ERROR:String = "error"; public function StyleEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false, bytesLoaded:uint=0, bytesTotal:uint=0, errorText:String=null){ super(type, bubbles, cancelable, bytesLoaded, bytesTotal); this.errorText = errorText; } override public function clone():Event{ return (new StyleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText)); } } }//package mx.events
Section 73
//RectangularDropShadow (mx.graphics.RectangularDropShadow) package mx.graphics { import mx.core.*; import flash.display.*; import flash.geom.*; import mx.utils.*; import flash.filters.*; public class RectangularDropShadow { private var leftShadow:BitmapData; private var _tlRadius:Number;// = 0 private var _trRadius:Number;// = 0 private var _angle:Number;// = 45 private var topShadow:BitmapData; private var _distance:Number;// = 4 private var rightShadow:BitmapData; private var _alpha:Number;// = 0.4 private var shadow:BitmapData; private var _brRadius:Number;// = 0 private var _blRadius:Number;// = 0 private var _color:int;// = 0 private var bottomShadow:BitmapData; private var changed:Boolean;// = true mx_internal static const VERSION:String = "3.4.0.9271"; public function RectangularDropShadow(){ super(); } public function get blRadius():Number{ return (_blRadius); } public function set brRadius(value:Number):void{ if (_brRadius != value){ _brRadius = value; changed = true; }; } public function set color(value:int):void{ if (_color != value){ _color = value; changed = true; }; } public function drawShadow(g:Graphics, x:Number, y:Number, width:Number, height:Number):void{ var tlWidth:Number; var tlHeight:Number; var trWidth:Number; var trHeight:Number; var blWidth:Number; var blHeight:Number; var brWidth:Number; var brHeight:Number; if (changed){ createShadowBitmaps(); changed = false; }; width = Math.ceil(width); height = Math.ceil(height); var leftThickness:int = (leftShadow) ? leftShadow.width : 0; var rightThickness:int = (rightShadow) ? rightShadow.width : 0; var topThickness:int = (topShadow) ? topShadow.height : 0; var bottomThickness:int = (bottomShadow) ? bottomShadow.height : 0; var widthThickness:int = (leftThickness + rightThickness); var heightThickness:int = (topThickness + bottomThickness); var maxCornerHeight:Number = ((height + heightThickness) / 2); var maxCornerWidth:Number = ((width + widthThickness) / 2); var matrix:Matrix = new Matrix(); if (((leftShadow) || (topShadow))){ tlWidth = Math.min((tlRadius + widthThickness), maxCornerWidth); tlHeight = Math.min((tlRadius + heightThickness), maxCornerHeight); matrix.tx = (x - leftThickness); matrix.ty = (y - topThickness); g.beginBitmapFill(shadow, matrix); g.drawRect((x - leftThickness), (y - topThickness), tlWidth, tlHeight); g.endFill(); }; if (((rightShadow) || (topShadow))){ trWidth = Math.min((trRadius + widthThickness), maxCornerWidth); trHeight = Math.min((trRadius + heightThickness), maxCornerHeight); matrix.tx = (((x + width) + rightThickness) - shadow.width); matrix.ty = (y - topThickness); g.beginBitmapFill(shadow, matrix); g.drawRect((((x + width) + rightThickness) - trWidth), (y - topThickness), trWidth, trHeight); g.endFill(); }; if (((leftShadow) || (bottomShadow))){ blWidth = Math.min((blRadius + widthThickness), maxCornerWidth); blHeight = Math.min((blRadius + heightThickness), maxCornerHeight); matrix.tx = (x - leftThickness); matrix.ty = (((y + height) + bottomThickness) - shadow.height); g.beginBitmapFill(shadow, matrix); g.drawRect((x - leftThickness), (((y + height) + bottomThickness) - blHeight), blWidth, blHeight); g.endFill(); }; if (((rightShadow) || (bottomShadow))){ brWidth = Math.min((brRadius + widthThickness), maxCornerWidth); brHeight = Math.min((brRadius + heightThickness), maxCornerHeight); matrix.tx = (((x + width) + rightThickness) - shadow.width); matrix.ty = (((y + height) + bottomThickness) - shadow.height); g.beginBitmapFill(shadow, matrix); g.drawRect((((x + width) + rightThickness) - brWidth), (((y + height) + bottomThickness) - brHeight), brWidth, brHeight); g.endFill(); }; if (leftShadow){ matrix.tx = (x - leftThickness); matrix.ty = 0; g.beginBitmapFill(leftShadow, matrix); g.drawRect((x - leftThickness), ((y - topThickness) + tlHeight), leftThickness, ((((height + topThickness) + bottomThickness) - tlHeight) - blHeight)); g.endFill(); }; if (rightShadow){ matrix.tx = (x + width); matrix.ty = 0; g.beginBitmapFill(rightShadow, matrix); g.drawRect((x + width), ((y - topThickness) + trHeight), rightThickness, ((((height + topThickness) + bottomThickness) - trHeight) - brHeight)); g.endFill(); }; if (topShadow){ matrix.tx = 0; matrix.ty = (y - topThickness); g.beginBitmapFill(topShadow, matrix); g.drawRect(((x - leftThickness) + tlWidth), (y - topThickness), ((((width + leftThickness) + rightThickness) - tlWidth) - trWidth), topThickness); g.endFill(); }; if (bottomShadow){ matrix.tx = 0; matrix.ty = (y + height); g.beginBitmapFill(bottomShadow, matrix); g.drawRect(((x - leftThickness) + blWidth), (y + height), ((((width + leftThickness) + rightThickness) - blWidth) - brWidth), bottomThickness); g.endFill(); }; } public function get brRadius():Number{ return (_brRadius); } public function get angle():Number{ return (_angle); } private function createShadowBitmaps():void{ var roundRectWidth:Number = ((Math.max(tlRadius, blRadius) + (2 * distance)) + Math.max(trRadius, brRadius)); var roundRectHeight:Number = ((Math.max(tlRadius, trRadius) + (2 * distance)) + Math.max(blRadius, brRadius)); if ((((roundRectWidth < 0)) || ((roundRectHeight < 0)))){ return; }; var roundRect:Shape = new FlexShape(); var g:Graphics = roundRect.graphics; g.beginFill(0xFFFFFF); GraphicsUtil.drawRoundRectComplex(g, 0, 0, roundRectWidth, roundRectHeight, tlRadius, trRadius, blRadius, brRadius); g.endFill(); var roundRectBitmap:BitmapData = new BitmapData(roundRectWidth, roundRectHeight, true, 0); roundRectBitmap.draw(roundRect, new Matrix()); var filter:DropShadowFilter = new DropShadowFilter(distance, angle, color, alpha); filter.knockout = true; var inputRect:Rectangle = new Rectangle(0, 0, roundRectWidth, roundRectHeight); var outputRect:Rectangle = roundRectBitmap.generateFilterRect(inputRect, filter); var leftThickness:Number = (inputRect.left - outputRect.left); var rightThickness:Number = (outputRect.right - inputRect.right); var topThickness:Number = (inputRect.top - outputRect.top); var bottomThickness:Number = (outputRect.bottom - inputRect.bottom); shadow = new BitmapData(outputRect.width, outputRect.height); shadow.applyFilter(roundRectBitmap, inputRect, new Point(leftThickness, topThickness), filter); var origin:Point = new Point(0, 0); var rect:Rectangle = new Rectangle(); if (leftThickness > 0){ rect.x = 0; rect.y = ((tlRadius + topThickness) + bottomThickness); rect.width = leftThickness; rect.height = 1; leftShadow = new BitmapData(leftThickness, 1); leftShadow.copyPixels(shadow, rect, origin); } else { leftShadow = null; }; if (rightThickness > 0){ rect.x = (shadow.width - rightThickness); rect.y = ((trRadius + topThickness) + bottomThickness); rect.width = rightThickness; rect.height = 1; rightShadow = new BitmapData(rightThickness, 1); rightShadow.copyPixels(shadow, rect, origin); } else { rightShadow = null; }; if (topThickness > 0){ rect.x = ((tlRadius + leftThickness) + rightThickness); rect.y = 0; rect.width = 1; rect.height = topThickness; topShadow = new BitmapData(1, topThickness); topShadow.copyPixels(shadow, rect, origin); } else { topShadow = null; }; if (bottomThickness > 0){ rect.x = ((blRadius + leftThickness) + rightThickness); rect.y = (shadow.height - bottomThickness); rect.width = 1; rect.height = bottomThickness; bottomShadow = new BitmapData(1, bottomThickness); bottomShadow.copyPixels(shadow, rect, origin); } else { bottomShadow = null; }; } public function get alpha():Number{ return (_alpha); } public function get color():int{ return (_color); } public function set angle(value:Number):void{ if (_angle != value){ _angle = value; changed = true; }; } public function set trRadius(value:Number):void{ if (_trRadius != value){ _trRadius = value; changed = true; }; } public function set tlRadius(value:Number):void{ if (_tlRadius != value){ _tlRadius = value; changed = true; }; } public function get trRadius():Number{ return (_trRadius); } public function set distance(value:Number):void{ if (_distance != value){ _distance = value; changed = true; }; } public function get distance():Number{ return (_distance); } public function get tlRadius():Number{ return (_tlRadius); } public function set alpha(value:Number):void{ if (_alpha != value){ _alpha = value; changed = true; }; } public function set blRadius(value:Number):void{ if (_blRadius != value){ _blRadius = value; changed = true; }; } } }//package mx.graphics
Section 74
//IFocusManager (mx.managers.IFocusManager) package mx.managers { import mx.core.*; import flash.events.*; import flash.display.*; public interface IFocusManager { function get focusPane():Sprite; function getFocus():IFocusManagerComponent; function deactivate():void; function set defaultButton(C:\autobuild\galaga\frameworks\projects\framework\src;mx\managers;IFocusManager.as:IButton):void; function set focusPane(C:\autobuild\galaga\frameworks\projects\framework\src;mx\managers;IFocusManager.as:Sprite):void; function set showFocusIndicator(C:\autobuild\galaga\frameworks\projects\framework\src;mx\managers;IFocusManager.as:Boolean):void; function moveFocus(_arg1:String, _arg2:DisplayObject=null):void; function addSWFBridge(_arg1:IEventDispatcher, _arg2:DisplayObject):void; function removeSWFBridge(C:\autobuild\galaga\frameworks\projects\framework\src;mx\managers;IFocusManager.as:IEventDispatcher):void; function get defaultButtonEnabled():Boolean; function findFocusManagerComponent(value:InteractiveObject):IFocusManagerComponent; function get nextTabIndex():int; function get defaultButton():IButton; function get showFocusIndicator():Boolean; function setFocus(C:\autobuild\galaga\frameworks\projects\framework\src;mx\managers;IFocusManager.as:IFocusManagerComponent):void; function activate():void; function showFocus():void; function set defaultButtonEnabled(C:\autobuild\galaga\frameworks\projects\framework\src;mx\managers;IFocusManager.as:Boolean):void; function hideFocus():void; function getNextFocusManagerComponent(value:Boolean=false):IFocusManagerComponent; } }//package mx.managers
Section 75
//IFocusManagerComponent (mx.managers.IFocusManagerComponent) package mx.managers { public interface IFocusManagerComponent { function set focusEnabled(C:\autobuild\galaga\frameworks\projects\framework\src;mx\managers;IFocusManagerComponent.as:Boolean):void; function drawFocus(C:\autobuild\galaga\frameworks\projects\framework\src;mx\managers;IFocusManagerComponent.as:Boolean):void; function setFocus():void; function get focusEnabled():Boolean; function get tabEnabled():Boolean; function get tabIndex():int; function get mouseFocusEnabled():Boolean; } }//package mx.managers
Section 76
//IFocusManagerContainer (mx.managers.IFocusManagerContainer) package mx.managers { import flash.events.*; import flash.display.*; public interface IFocusManagerContainer extends IEventDispatcher { function set focusManager(C:\autobuild\galaga\frameworks\projects\framework\src;mx\managers;IFocusManagerContainer.as:IFocusManager):void; function get focusManager():IFocusManager; function get systemManager():ISystemManager; function contains(mx.managers:DisplayObject):Boolean; } }//package mx.managers
Section 77
//ILayoutManager (mx.managers.ILayoutManager) package mx.managers { import flash.events.*; public interface ILayoutManager extends IEventDispatcher { function validateNow():void; function validateClient(_arg1:ILayoutManagerClient, _arg2:Boolean=false):void; function isInvalid():Boolean; function invalidateDisplayList(C:\autobuild\galaga\frameworks\projects\framework\src;mx\managers;ILayoutManager.as:ILayoutManagerClient):void; function set usePhasedInstantiation(C:\autobuild\galaga\frameworks\projects\framework\src;mx\managers;ILayoutManager.as:Boolean):void; function invalidateSize(C:\autobuild\galaga\frameworks\projects\framework\src;mx\managers;ILayoutManager.as:ILayoutManagerClient):void; function get usePhasedInstantiation():Boolean; function invalidateProperties(C:\autobuild\galaga\frameworks\projects\framework\src;mx\managers;ILayoutManager.as:ILayoutManagerClient):void; } }//package mx.managers
Section 78
//ILayoutManagerClient (mx.managers.ILayoutManagerClient) package mx.managers { import flash.events.*; public interface ILayoutManagerClient extends IEventDispatcher { function get updateCompletePendingFlag():Boolean; function set updateCompletePendingFlag(C:\autobuild\galaga\frameworks\projects\framework\src;mx\managers;ILayoutManagerClient.as:Boolean):void; function set initialized(C:\autobuild\galaga\frameworks\projects\framework\src;mx\managers;ILayoutManagerClient.as:Boolean):void; function validateProperties():void; function validateDisplayList():void; function get nestLevel():int; function get initialized():Boolean; function get processedDescriptors():Boolean; function validateSize(C:\autobuild\galaga\frameworks\projects\framework\src;mx\managers;ILayoutManagerClient.as:Boolean=false):void; function set nestLevel(C:\autobuild\galaga\frameworks\projects\framework\src;mx\managers;ILayoutManagerClient.as:int):void; function set processedDescriptors(C:\autobuild\galaga\frameworks\projects\framework\src;mx\managers;ILayoutManagerClient.as:Boolean):void; } }//package mx.managers
Section 79
//ISystemManager (mx.managers.ISystemManager) package mx.managers { import mx.core.*; import flash.events.*; import flash.display.*; import flash.geom.*; import flash.text.*; public interface ISystemManager extends IEventDispatcher, IChildList, IFlexModuleFactory { function set focusPane(mx.managers:ISystemManager/mx.managers:ISystemManager:cursorChildren/get:Sprite):void; function get toolTipChildren():IChildList; function useSWFBridge():Boolean; function isFontFaceEmbedded(flash.display:TextFormat):Boolean; function deployMouseShields(mx.managers:ISystemManager/mx.managers:ISystemManager:cursorChildren/get:Boolean):void; function get rawChildren():IChildList; function get topLevelSystemManager():ISystemManager; function dispatchEventFromSWFBridges(_arg1:Event, _arg2:IEventDispatcher=null, _arg3:Boolean=false, _arg4:Boolean=false):void; function getSandboxRoot():DisplayObject; function get swfBridgeGroup():ISWFBridgeGroup; function removeFocusManager(mx.managers:ISystemManager/mx.managers:ISystemManager:cursorChildren/get:IFocusManagerContainer):void; function addChildToSandboxRoot(_arg1:String, _arg2:DisplayObject):void; function get document():Object; function get focusPane():Sprite; function get loaderInfo():LoaderInfo; function addChildBridge(_arg1:IEventDispatcher, _arg2:DisplayObject):void; function getTopLevelRoot():DisplayObject; function removeChildBridge(mx.managers:ISystemManager/mx.managers:ISystemManager:cursorChildren/get:IEventDispatcher):void; function isDisplayObjectInABridgedApplication(flash.display:DisplayObject):Boolean; function get popUpChildren():IChildList; function get screen():Rectangle; function removeChildFromSandboxRoot(_arg1:String, _arg2:DisplayObject):void; function getDefinitionByName(C:\autobuild\galaga\frameworks\projects\framework\src;mx\managers;ISystemManager.as:String):Object; function activate(mx.managers:ISystemManager/mx.managers:ISystemManager:cursorChildren/get:IFocusManagerContainer):void; function deactivate(mx.managers:ISystemManager/mx.managers:ISystemManager:cursorChildren/get:IFocusManagerContainer):void; function get cursorChildren():IChildList; function set document(mx.managers:ISystemManager/mx.managers:ISystemManager:cursorChildren/get:Object):void; function get embeddedFontList():Object; function set numModalWindows(mx.managers:ISystemManager/mx.managers:ISystemManager:cursorChildren/get:int):void; function isTopLevel():Boolean; function isTopLevelRoot():Boolean; function get numModalWindows():int; function addFocusManager(mx.managers:ISystemManager/mx.managers:ISystemManager:cursorChildren/get:IFocusManagerContainer):void; function get stage():Stage; function getVisibleApplicationRect(value:Rectangle=null):Rectangle; } }//package mx.managers
Section 80
//SystemManagerGlobals (mx.managers.SystemManagerGlobals) package mx.managers { public class SystemManagerGlobals { public static var topLevelSystemManagers:Array = []; public static var changingListenersInOtherSystemManagers:Boolean; public static var bootstrapLoaderInfoURL:String; public static var showMouseCursor:Boolean; public static var dispatchingEventToOtherSystemManagers:Boolean; public function SystemManagerGlobals(){ super(); } } }//package mx.managers
Section 81
//IModuleInfo (mx.modules.IModuleInfo) package mx.modules { import mx.core.*; import flash.events.*; import flash.utils.*; import flash.system.*; public interface IModuleInfo extends IEventDispatcher { function get ready():Boolean; function get loaded():Boolean; function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null, _arg3:ByteArray=null):void; function release():void; function get error():Boolean; function get data():Object; function publish(C:\autobuild\galaga\frameworks\projects\framework\src;mx\modules;IModuleInfo.as:IFlexModuleFactory):void; function get factory():IFlexModuleFactory; function set data(C:\autobuild\galaga\frameworks\projects\framework\src;mx\modules;IModuleInfo.as:Object):void; function get url():String; function get setup():Boolean; function unload():void; } }//package mx.modules
Section 82
//ModuleManager (mx.modules.ModuleManager) package mx.modules { import mx.core.*; public class ModuleManager { mx_internal static const VERSION:String = "3.4.0.9271"; public function ModuleManager(){ super(); } public static function getModule(url:String):IModuleInfo{ return (getSingleton().getModule(url)); } private static function getSingleton():Object{ if (!ModuleManagerGlobals.managerSingleton){ ModuleManagerGlobals.managerSingleton = new ModuleManagerImpl(); }; return (ModuleManagerGlobals.managerSingleton); } public static function getAssociatedFactory(object:Object):IFlexModuleFactory{ return (getSingleton().getAssociatedFactory(object)); } } }//package mx.modules import mx.core.*; import flash.events.*; import flash.utils.*; import flash.system.*; import flash.display.*; import mx.events.*; import flash.net.*; class ModuleInfoProxy extends EventDispatcher implements IModuleInfo { private var _data:Object; private var info:ModuleInfo; private var referenced:Boolean;// = false private function ModuleInfoProxy(info:ModuleInfo){ super(); this.info = info; info.addEventListener(ModuleEvent.SETUP, moduleEventHandler, false, 0, true); info.addEventListener(ModuleEvent.PROGRESS, moduleEventHandler, false, 0, true); info.addEventListener(ModuleEvent.READY, moduleEventHandler, false, 0, true); info.addEventListener(ModuleEvent.ERROR, moduleEventHandler, false, 0, true); info.addEventListener(ModuleEvent.UNLOAD, moduleEventHandler, false, 0, true); } public function get loaded():Boolean{ return (info.loaded); } public function release():void{ if (referenced){ info.removeReference(); referenced = false; }; } public function get error():Boolean{ return (info.error); } public function get factory():IFlexModuleFactory{ return (info.factory); } public function publish(factory:IFlexModuleFactory):void{ info.publish(factory); } public function set data(value:Object):void{ _data = value; } public function get ready():Boolean{ return (info.ready); } public function load(applicationDomain:ApplicationDomain=null, securityDomain:SecurityDomain=null, bytes:ByteArray=null):void{ var moduleEvent:ModuleEvent; info.resurrect(); if (!referenced){ info.addReference(); referenced = true; }; if (info.error){ dispatchEvent(new ModuleEvent(ModuleEvent.ERROR)); } else { if (info.loaded){ if (info.setup){ dispatchEvent(new ModuleEvent(ModuleEvent.SETUP)); if (info.ready){ moduleEvent = new ModuleEvent(ModuleEvent.PROGRESS); moduleEvent.bytesLoaded = info.size; moduleEvent.bytesTotal = info.size; dispatchEvent(moduleEvent); dispatchEvent(new ModuleEvent(ModuleEvent.READY)); }; }; } else { info.load(applicationDomain, securityDomain, bytes); }; }; } private function moduleEventHandler(event:ModuleEvent):void{ dispatchEvent(event); } public function get url():String{ return (info.url); } public function get data():Object{ return (_data); } public function get setup():Boolean{ return (info.setup); } public function unload():void{ info.unload(); info.removeEventListener(ModuleEvent.SETUP, moduleEventHandler); info.removeEventListener(ModuleEvent.PROGRESS, moduleEventHandler); info.removeEventListener(ModuleEvent.READY, moduleEventHandler); info.removeEventListener(ModuleEvent.ERROR, moduleEventHandler); info.removeEventListener(ModuleEvent.UNLOAD, moduleEventHandler); } } class ModuleManagerImpl extends EventDispatcher { private var moduleList:Object; private function ModuleManagerImpl(){ moduleList = {}; super(); } public function getModule(url:String):IModuleInfo{ var info:ModuleInfo = (moduleList[url] as ModuleInfo); if (!info){ info = new ModuleInfo(url); moduleList[url] = info; }; return (new ModuleInfoProxy(info)); } public function getAssociatedFactory(object:Object):IFlexModuleFactory{ var m:Object; var info:ModuleInfo; var domain:ApplicationDomain; var cls:Class; var object = object; var className:String = getQualifiedClassName(object); for each (m in moduleList) { info = (m as ModuleInfo); if (!info.ready){ } else { domain = info.applicationDomain; cls = Class(domain.getDefinition(className)); if ((object is cls)){ return (info.factory); }; //unresolved jump var _slot1 = error; }; }; return (null); } } class ModuleInfo extends EventDispatcher { private var _error:Boolean;// = false private var loader:Loader; private var factoryInfo:FactoryInfo; private var limbo:Dictionary; private var _loaded:Boolean;// = false private var _ready:Boolean;// = false private var numReferences:int;// = 0 private var _url:String; private var _setup:Boolean;// = false private function ModuleInfo(url:String){ super(); _url = url; } private function clearLoader():void{ if (loader){ if (loader.contentLoaderInfo){ loader.contentLoaderInfo.removeEventListener(Event.INIT, initHandler); loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, completeHandler); loader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, progressHandler); loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler); loader.contentLoaderInfo.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler); }; if (loader.content){ loader.content.removeEventListener("ready", readyHandler); loader.content.removeEventListener("error", moduleErrorHandler); }; //unresolved jump var _slot1 = error; if (_loaded){ loader.close(); //unresolved jump var _slot1 = error; }; loader.unload(); //unresolved jump var _slot1 = error; loader = null; }; } public function get size():int{ return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.bytesTotal : 0); } public function get loaded():Boolean{ return ((limbo) ? false : _loaded); } public function release():void{ if (((_ready) && (!(limbo)))){ limbo = new Dictionary(true); limbo[factoryInfo] = 1; factoryInfo = null; } else { unload(); }; } public function get error():Boolean{ return ((limbo) ? false : _error); } public function get factory():IFlexModuleFactory{ return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.factory : null); } public function completeHandler(event:Event):void{ var moduleEvent:ModuleEvent = new ModuleEvent(ModuleEvent.PROGRESS, event.bubbles, event.cancelable); moduleEvent.bytesLoaded = loader.contentLoaderInfo.bytesLoaded; moduleEvent.bytesTotal = loader.contentLoaderInfo.bytesTotal; dispatchEvent(moduleEvent); } public function publish(factory:IFlexModuleFactory):void{ if (factoryInfo){ return; }; if (_url.indexOf("published://") != 0){ return; }; factoryInfo = new FactoryInfo(); factoryInfo.factory = factory; _loaded = true; _setup = true; _ready = true; _error = false; dispatchEvent(new ModuleEvent(ModuleEvent.SETUP)); dispatchEvent(new ModuleEvent(ModuleEvent.PROGRESS)); dispatchEvent(new ModuleEvent(ModuleEvent.READY)); } public function initHandler(event:Event):void{ var moduleEvent:ModuleEvent; var event = event; factoryInfo = new FactoryInfo(); factoryInfo.factory = (loader.content as IFlexModuleFactory); //unresolved jump var _slot1 = error; if (!factoryInfo.factory){ moduleEvent = new ModuleEvent(ModuleEvent.ERROR, event.bubbles, event.cancelable); moduleEvent.bytesLoaded = 0; moduleEvent.bytesTotal = 0; moduleEvent.errorText = "SWF is not a loadable module"; dispatchEvent(moduleEvent); return; }; loader.content.addEventListener("ready", readyHandler); loader.content.addEventListener("error", moduleErrorHandler); factoryInfo.applicationDomain = loader.contentLoaderInfo.applicationDomain; //unresolved jump var _slot1 = error; _setup = true; dispatchEvent(new ModuleEvent(ModuleEvent.SETUP)); } public function resurrect():void{ var f:Object; if (((!(factoryInfo)) && (limbo))){ for (f in limbo) { factoryInfo = (f as FactoryInfo); break; }; limbo = null; }; if (!factoryInfo){ if (_loaded){ dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD)); }; loader = null; _loaded = false; _setup = false; _ready = false; _error = false; }; } public function errorHandler(event:ErrorEvent):void{ _error = true; var moduleEvent:ModuleEvent = new ModuleEvent(ModuleEvent.ERROR, event.bubbles, event.cancelable); moduleEvent.bytesLoaded = 0; moduleEvent.bytesTotal = 0; moduleEvent.errorText = event.text; dispatchEvent(moduleEvent); } public function get ready():Boolean{ return ((limbo) ? false : _ready); } private function loadBytes(applicationDomain:ApplicationDomain, bytes:ByteArray):void{ var c:LoaderContext = new LoaderContext(); c.applicationDomain = (applicationDomain) ? applicationDomain : new ApplicationDomain(ApplicationDomain.currentDomain); if (("allowLoadBytesCodeExecution" in c)){ c["allowLoadBytesCodeExecution"] = true; }; loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler); loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler); loader.loadBytes(bytes, c); } public function removeReference():void{ numReferences--; if (numReferences == 0){ release(); }; } public function addReference():void{ numReferences++; } public function progressHandler(event:ProgressEvent):void{ var moduleEvent:ModuleEvent = new ModuleEvent(ModuleEvent.PROGRESS, event.bubbles, event.cancelable); moduleEvent.bytesLoaded = event.bytesLoaded; moduleEvent.bytesTotal = event.bytesTotal; dispatchEvent(moduleEvent); } public function load(applicationDomain:ApplicationDomain=null, securityDomain:SecurityDomain=null, bytes:ByteArray=null):void{ if (_loaded){ return; }; _loaded = true; limbo = null; if (bytes){ loadBytes(applicationDomain, bytes); return; }; if (_url.indexOf("published://") == 0){ return; }; var r:URLRequest = new URLRequest(_url); var c:LoaderContext = new LoaderContext(); c.applicationDomain = (applicationDomain) ? applicationDomain : new ApplicationDomain(ApplicationDomain.currentDomain); c.securityDomain = securityDomain; if ((((securityDomain == null)) && ((Security.sandboxType == Security.REMOTE)))){ c.securityDomain = SecurityDomain.currentDomain; }; loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler); loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler); loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler); loader.load(r, c); } public function get url():String{ return (_url); } public function get applicationDomain():ApplicationDomain{ return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.applicationDomain : null); } public function moduleErrorHandler(event:Event):void{ var errorEvent:ModuleEvent; _ready = true; factoryInfo.bytesTotal = loader.contentLoaderInfo.bytesTotal; clearLoader(); if ((event is ModuleEvent)){ errorEvent = ModuleEvent(event); } else { errorEvent = new ModuleEvent(ModuleEvent.ERROR); }; dispatchEvent(errorEvent); } public function readyHandler(event:Event):void{ _ready = true; factoryInfo.bytesTotal = loader.contentLoaderInfo.bytesTotal; var moduleEvent:ModuleEvent = new ModuleEvent(ModuleEvent.READY); moduleEvent.bytesLoaded = loader.contentLoaderInfo.bytesLoaded; moduleEvent.bytesTotal = loader.contentLoaderInfo.bytesTotal; clearLoader(); dispatchEvent(moduleEvent); } public function get setup():Boolean{ return ((limbo) ? false : _setup); } public function unload():void{ clearLoader(); if (_loaded){ dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD)); }; limbo = null; factoryInfo = null; _loaded = false; _setup = false; _ready = false; _error = false; } } class FactoryInfo { public var bytesTotal:int;// = 0 public var factory:IFlexModuleFactory; public var applicationDomain:ApplicationDomain; private function FactoryInfo(){ super(); } }
Section 83
//ModuleManagerGlobals (mx.modules.ModuleManagerGlobals) package mx.modules { public class ModuleManagerGlobals { public static var managerSingleton:Object = null; public function ModuleManagerGlobals(){ super(); } } }//package mx.modules
Section 84
//IResourceBundle (mx.resources.IResourceBundle) package mx.resources { public interface IResourceBundle { function get content():Object; function get locale():String; function get bundleName():String; } }//package mx.resources
Section 85
//IResourceManager (mx.resources.IResourceManager) package mx.resources { import flash.events.*; import flash.system.*; public interface IResourceManager extends IEventDispatcher { function loadResourceModule(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher; function getBoolean(_arg1:String, _arg2:String, _arg3:String=null):Boolean; function getClass(_arg1:String, _arg2:String, _arg3:String=null):Class; function getLocales():Array; function removeResourceBundlesForLocale(C:\autobuild\galaga\frameworks\projects\framework\src;mx\resources;IResourceManager.as:String):void; function getResourceBundle(_arg1:String, _arg2:String):IResourceBundle; function get localeChain():Array; function getInt(_arg1:String, _arg2:String, _arg3:String=null):int; function update():void; function set localeChain(C:\autobuild\galaga\frameworks\projects\framework\src;mx\resources;IResourceManager.as:Array):void; function getUint(_arg1:String, _arg2:String, _arg3:String=null):uint; function addResourceBundle(C:\autobuild\galaga\frameworks\projects\framework\src;mx\resources;IResourceManager.as:IResourceBundle):void; function getStringArray(_arg1:String, _arg2:String, _arg3:String=null):Array; function getBundleNamesForLocale(:String):Array; function removeResourceBundle(_arg1:String, _arg2:String):void; function getObject(_arg1:String, _arg2:String, _arg3:String=null); function getString(_arg1:String, _arg2:String, _arg3:Array=null, _arg4:String=null):String; function installCompiledResourceBundles(_arg1:ApplicationDomain, _arg2:Array, _arg3:Array):void; function unloadResourceModule(_arg1:String, _arg2:Boolean=true):void; function getPreferredLocaleChain():Array; function findResourceBundleWithResource(_arg1:String, _arg2:String):IResourceBundle; function initializeLocaleChain(C:\autobuild\galaga\frameworks\projects\framework\src;mx\resources;IResourceManager.as:Array):void; function getNumber(_arg1:String, _arg2:String, _arg3:String=null):Number; } }//package mx.resources
Section 86
//IResourceModule (mx.resources.IResourceModule) package mx.resources { public interface IResourceModule { function get resourceBundles():Array; } }//package mx.resources
Section 87
//LocaleSorter (mx.resources.LocaleSorter) package mx.resources { import mx.core.*; public class LocaleSorter { mx_internal static const VERSION:String = "3.4.0.9271"; public function LocaleSorter(){ super(); } private static function normalizeLocale(locale:String):String{ return (locale.toLowerCase().replace(/-/g, "_")); } public static function sortLocalesByPreference(appLocales:Array, systemPreferences:Array, ultimateFallbackLocale:String=null, addAll:Boolean=false):Array{ var result:Array; var hasLocale:Object; var i:int; var j:int; var k:int; var l:int; var locale:String; var plocale:LocaleID; var appLocales = appLocales; var systemPreferences = systemPreferences; var ultimateFallbackLocale = ultimateFallbackLocale; var addAll = addAll; var promote:Function = function (locale:String):void{ if (typeof(hasLocale[locale]) != "undefined"){ result.push(appLocales[hasLocale[locale]]); delete hasLocale[locale]; }; }; result = []; hasLocale = {}; var locales:Array = trimAndNormalize(appLocales); var preferenceLocales:Array = trimAndNormalize(systemPreferences); addUltimateFallbackLocale(preferenceLocales, ultimateFallbackLocale); j = 0; while (j < locales.length) { hasLocale[locales[j]] = j; j = (j + 1); }; i = 0; l = preferenceLocales.length; while (i < l) { plocale = LocaleID.fromString(preferenceLocales[i]); promote(preferenceLocales[i]); promote(plocale.toString()); while (plocale.transformToParent()) { promote(plocale.toString()); }; plocale = LocaleID.fromString(preferenceLocales[i]); j = 0; while (j < l) { locale = preferenceLocales[j]; if (plocale.isSiblingOf(LocaleID.fromString(locale))){ promote(locale); }; j = (j + 1); }; j = 0; k = locales.length; while (j < k) { locale = locales[j]; if (plocale.isSiblingOf(LocaleID.fromString(locale))){ promote(locale); }; j = (j + 1); }; i = (i + 1); }; if (addAll){ j = 0; k = locales.length; while (j < k) { promote(locales[j]); j = (j + 1); }; }; return (result); } private static function addUltimateFallbackLocale(preferenceLocales:Array, ultimateFallbackLocale:String):void{ var locale:String; if (((!((ultimateFallbackLocale == null))) && (!((ultimateFallbackLocale == ""))))){ locale = normalizeLocale(ultimateFallbackLocale); if (preferenceLocales.indexOf(locale) == -1){ preferenceLocales.push(locale); }; }; } private static function trimAndNormalize(list:Array):Array{ var resultList:Array = []; var i:int; while (i < list.length) { resultList.push(normalizeLocale(list[i])); i++; }; return (resultList); } } }//package mx.resources class LocaleID { private var privateLangs:Boolean;// = false private var script:String;// = "" private var variants:Array; private var privates:Array; private var extensions:Object; private var lang:String;// = "" private var region:String;// = "" private var extended_langs:Array; public static const STATE_PRIMARY_LANGUAGE:int = 0; public static const STATE_REGION:int = 3; public static const STATE_EXTENDED_LANGUAGES:int = 1; public static const STATE_EXTENSIONS:int = 5; public static const STATE_SCRIPT:int = 2; public static const STATE_VARIANTS:int = 4; public static const STATE_PRIVATES:int = 6; private function LocaleID(){ extended_langs = []; variants = []; extensions = {}; privates = []; super(); } public function equals(locale:LocaleID):Boolean{ return ((toString() == locale.toString())); } public function canonicalize():void{ var i:String; for (i in extensions) { if (extensions.hasOwnProperty(i)){ if (extensions[i].length == 0){ delete extensions[i]; } else { extensions[i] = extensions[i].sort(); }; }; }; extended_langs = extended_langs.sort(); variants = variants.sort(); privates = privates.sort(); if (script == ""){ script = LocaleRegistry.getScriptByLang(lang); }; if ((((script == "")) && (!((region == ""))))){ script = LocaleRegistry.getScriptByLangAndRegion(lang, region); }; if ((((region == "")) && (!((script == ""))))){ region = LocaleRegistry.getDefaultRegionForLangAndScript(lang, script); }; } public function toString():String{ var i:String; var stack:Array = [lang]; Array.prototype.push.apply(stack, extended_langs); if (script != ""){ stack.push(script); }; if (region != ""){ stack.push(region); }; Array.prototype.push.apply(stack, variants); for (i in extensions) { if (extensions.hasOwnProperty(i)){ stack.push(i); Array.prototype.push.apply(stack, extensions[i]); }; }; if (privates.length > 0){ stack.push("x"); Array.prototype.push.apply(stack, privates); }; return (stack.join("_")); } public function isSiblingOf(other:LocaleID):Boolean{ return ((((lang == other.lang)) && ((script == other.script)))); } public function transformToParent():Boolean{ var i:String; var lastExtension:Array; var defaultRegion:String; if (privates.length > 0){ privates.splice((privates.length - 1), 1); return (true); }; var lastExtensionName:String; for (i in extensions) { if (extensions.hasOwnProperty(i)){ lastExtensionName = i; }; }; if (lastExtensionName){ lastExtension = extensions[lastExtensionName]; if (lastExtension.length == 1){ delete extensions[lastExtensionName]; return (true); }; lastExtension.splice((lastExtension.length - 1), 1); return (true); }; if (variants.length > 0){ variants.splice((variants.length - 1), 1); return (true); }; if (script != ""){ if (LocaleRegistry.getScriptByLang(lang) != ""){ script = ""; return (true); }; if (region == ""){ defaultRegion = LocaleRegistry.getDefaultRegionForLangAndScript(lang, script); if (defaultRegion != ""){ region = defaultRegion; script = ""; return (true); }; }; }; if (region != ""){ if (!(((script == "")) && ((LocaleRegistry.getScriptByLang(lang) == "")))){ region = ""; return (true); }; }; if (extended_langs.length > 0){ extended_langs.splice((extended_langs.length - 1), 1); return (true); }; return (false); } public static function fromString(str:String):LocaleID{ var last_extension:Array; var subtag:String; var subtag_length:int; var firstChar:String; var localeID:LocaleID = new (LocaleID); var state:int = STATE_PRIMARY_LANGUAGE; var subtags:Array = str.replace(/-/g, "_").split("_"); var i:int; var l:int = subtags.length; while (i < l) { subtag = subtags[i].toLowerCase(); if (state == STATE_PRIMARY_LANGUAGE){ if (subtag == "x"){ localeID.privateLangs = true; } else { if (subtag == "i"){ localeID.lang = (localeID.lang + "i-"); } else { localeID.lang = (localeID.lang + subtag); state = STATE_EXTENDED_LANGUAGES; }; }; } else { subtag_length = subtag.length; if (subtag_length == 0){ } else { firstChar = subtag.charAt(0).toLowerCase(); if ((((state <= STATE_EXTENDED_LANGUAGES)) && ((subtag_length == 3)))){ localeID.extended_langs.push(subtag); if (localeID.extended_langs.length == 3){ state = STATE_SCRIPT; }; } else { if ((((state <= STATE_SCRIPT)) && ((subtag_length == 4)))){ localeID.script = subtag; state = STATE_REGION; } else { if ((((state <= STATE_REGION)) && ((((subtag_length == 2)) || ((subtag_length == 3)))))){ localeID.region = subtag; state = STATE_VARIANTS; } else { if ((((state <= STATE_VARIANTS)) && ((((((((firstChar >= "a")) && ((firstChar <= "z")))) && ((subtag_length >= 5)))) || ((((((firstChar >= "0")) && ((firstChar <= "9")))) && ((subtag_length >= 4)))))))){ localeID.variants.push(subtag); state = STATE_VARIANTS; } else { if ((((state < STATE_PRIVATES)) && ((subtag_length == 1)))){ if (subtag == "x"){ state = STATE_PRIVATES; last_extension = localeID.privates; } else { state = STATE_EXTENSIONS; last_extension = ((localeID.extensions[subtag]) || ([])); localeID.extensions[subtag] = last_extension; }; } else { if (state >= STATE_EXTENSIONS){ last_extension.push(subtag); }; }; }; }; }; }; }; }; i++; }; localeID.canonicalize(); return (localeID); } } class LocaleRegistry { private static const SCRIPT_ID_BY_LANG:Object = {ab:5, af:1, am:2, ar:3, as:4, ay:1, be:5, bg:5, bn:4, bs:1, ca:1, ch:1, cs:1, cy:1, da:1, de:1, dv:6, dz:7, el:8, en:1, eo:1, es:1, et:1, eu:1, fa:3, fi:1, fj:1, fo:1, fr:1, frr:1, fy:1, ga:1, gl:1, gn:1, gu:9, gv:1, he:10, hi:11, hr:1, ht:1, hu:1, hy:12, id:1, in:1, is:1, it:1, iw:10, ja:13, ka:14, kk:5, kl:1, km:15, kn:16, ko:17, la:1, lb:1, ln:1, lo:18, lt:1, lv:1, mg:1, mh:1, mk:5, ml:19, mo:1, mr:11, ms:1, mt:1, my:20, na:1, nb:1, nd:1, ne:11, nl:1, nn:1, no:1, nr:1, ny:1, om:1, or:21, pa:22, pl:1, ps:3, pt:1, qu:1, rn:1, ro:1, ru:5, rw:1, sg:1, si:23, sk:1, sl:1, sm:1, so:1, sq:1, ss:1, st:1, sv:1, sw:1, ta:24, te:25, th:26, ti:2, tl:1, tn:1, to:1, tr:1, ts:1, uk:5, ur:3, ve:1, vi:1, wo:1, xh:1, yi:10, zu:1, cpe:1, dsb:1, frs:1, gsw:1, hsb:1, kok:11, mai:11, men:1, nds:1, niu:1, nqo:27, nso:1, son:1, tem:1, tkl:1, tmh:1, tpi:1, tvl:1, zbl:28}; private static const SCRIPTS:Array = ["", "latn", "ethi", "arab", "beng", "cyrl", "thaa", "tibt", "grek", "gujr", "hebr", "deva", "armn", "jpan", "geor", "khmr", "knda", "kore", "laoo", "mlym", "mymr", "orya", "guru", "sinh", "taml", "telu", "thai", "nkoo", "blis", "hans", "hant", "mong", "syrc"]; private static const DEFAULT_REGION_BY_LANG_AND_SCRIPT:Object = {bg:{5:"bg"}, ca:{1:"es"}, zh:{30:"tw", 29:"cn"}, cs:{1:"cz"}, da:{1:"dk"}, de:{1:"de"}, el:{8:"gr"}, en:{1:"us"}, es:{1:"es"}, fi:{1:"fi"}, fr:{1:"fr"}, he:{10:"il"}, hu:{1:"hu"}, is:{1:"is"}, it:{1:"it"}, ja:{13:"jp"}, ko:{17:"kr"}, nl:{1:"nl"}, nb:{1:"no"}, pl:{1:"pl"}, pt:{1:"br"}, ro:{1:"ro"}, ru:{5:"ru"}, hr:{1:"hr"}, sk:{1:"sk"}, sq:{1:"al"}, sv:{1:"se"}, th:{26:"th"}, tr:{1:"tr"}, ur:{3:"pk"}, id:{1:"id"}, uk:{5:"ua"}, be:{5:"by"}, sl:{1:"si"}, et:{1:"ee"}, lv:{1:"lv"}, lt:{1:"lt"}, fa:{3:"ir"}, vi:{1:"vn"}, hy:{12:"am"}, az:{1:"az", 5:"az"}, eu:{1:"es"}, mk:{5:"mk"}, af:{1:"za"}, ka:{14:"ge"}, fo:{1:"fo"}, hi:{11:"in"}, ms:{1:"my"}, kk:{5:"kz"}, ky:{5:"kg"}, sw:{1:"ke"}, uz:{1:"uz", 5:"uz"}, tt:{5:"ru"}, pa:{22:"in"}, gu:{9:"in"}, ta:{24:"in"}, te:{25:"in"}, kn:{16:"in"}, mr:{11:"in"}, sa:{11:"in"}, mn:{5:"mn"}, gl:{1:"es"}, kok:{11:"in"}, syr:{32:"sy"}, dv:{6:"mv"}, nn:{1:"no"}, sr:{1:"cs", 5:"cs"}, cy:{1:"gb"}, mi:{1:"nz"}, mt:{1:"mt"}, quz:{1:"bo"}, tn:{1:"za"}, xh:{1:"za"}, zu:{1:"za"}, nso:{1:"za"}, se:{1:"no"}, smj:{1:"no"}, sma:{1:"no"}, sms:{1:"fi"}, smn:{1:"fi"}, bs:{1:"ba"}}; private static const SCRIPT_BY_ID:Object = {latn:1, ethi:2, arab:3, beng:4, cyrl:5, thaa:6, tibt:7, grek:8, gujr:9, hebr:10, deva:11, armn:12, jpan:13, geor:14, khmr:15, knda:16, kore:17, laoo:18, mlym:19, mymr:20, orya:21, guru:22, sinh:23, taml:24, telu:25, thai:26, nkoo:27, blis:28, hans:29, hant:30, mong:31, syrc:32}; private static const SCRIPT_ID_BY_LANG_AND_REGION:Object = {zh:{cn:29, sg:29, tw:30, hk:30, mo:30}, mn:{cn:31, sg:5}, pa:{pk:3, in:22}, ha:{gh:1, ne:1}}; private function LocaleRegistry(){ super(); } public static function getScriptByLangAndRegion(lang:String, region:String):String{ var langRegions:Object = SCRIPT_ID_BY_LANG_AND_REGION[lang]; if (langRegions == null){ return (""); }; var scriptID:Object = langRegions[region]; if (scriptID == null){ return (""); }; return (SCRIPTS[int(scriptID)].toLowerCase()); } public static function getScriptByLang(lang:String):String{ var scriptID:Object = SCRIPT_ID_BY_LANG[lang]; if (scriptID == null){ return (""); }; return (SCRIPTS[int(scriptID)].toLowerCase()); } public static function getDefaultRegionForLangAndScript(lang:String, script:String):String{ var langObj:Object = DEFAULT_REGION_BY_LANG_AND_SCRIPT[lang]; var scriptID:Object = SCRIPT_BY_ID[script]; if ((((langObj == null)) || ((scriptID == null)))){ return (""); }; return (((langObj[int(scriptID)]) || (""))); } }
Section 88
//ResourceBundle (mx.resources.ResourceBundle) package mx.resources { import mx.core.*; import flash.system.*; import mx.utils.*; public class ResourceBundle implements IResourceBundle { mx_internal var _locale:String; private var _content:Object; mx_internal var _bundleName:String; mx_internal static const VERSION:String = "3.4.0.9271"; mx_internal static var backupApplicationDomain:ApplicationDomain; mx_internal static var locale:String; public function ResourceBundle(locale:String=null, bundleName:String=null){ _content = {}; super(); mx_internal::_locale = locale; mx_internal::_bundleName = bundleName; _content = getContent(); } protected function getContent():Object{ return ({}); } public function getString(key:String):String{ return (String(_getObject(key))); } public function get content():Object{ return (_content); } public function getBoolean(key:String, defaultValue:Boolean=true):Boolean{ var temp:String = _getObject(key).toLowerCase(); if (temp == "false"){ return (false); }; if (temp == "true"){ return (true); }; return (defaultValue); } public function getStringArray(key:String):Array{ var array:Array = _getObject(key).split(","); var n:int = array.length; var i:int; while (i < n) { array[i] = StringUtil.trim(array[i]); i++; }; return (array); } public function getObject(key:String):Object{ return (_getObject(key)); } private function _getObject(key:String):Object{ var value:Object = content[key]; if (!value){ throw (new Error(((("Key " + key) + " was not found in resource bundle ") + bundleName))); }; return (value); } public function get locale():String{ return (mx_internal::_locale); } public function get bundleName():String{ return (mx_internal::_bundleName); } public function getNumber(key:String):Number{ return (Number(_getObject(key))); } private static function getClassByName(name:String, domain:ApplicationDomain):Class{ var c:Class; if (domain.hasDefinition(name)){ c = (domain.getDefinition(name) as Class); }; return (c); } public static function getResourceBundle(baseName:String, currentDomain:ApplicationDomain=null):ResourceBundle{ var className:String; var bundleClass:Class; var bundleObj:Object; var bundle:ResourceBundle; if (!currentDomain){ currentDomain = ApplicationDomain.currentDomain; }; className = (((mx_internal::locale + "$") + baseName) + "_properties"); bundleClass = getClassByName(className, currentDomain); if (!bundleClass){ className = (baseName + "_properties"); bundleClass = getClassByName(className, currentDomain); }; if (!bundleClass){ className = baseName; bundleClass = getClassByName(className, currentDomain); }; if (((!(bundleClass)) && (mx_internal::backupApplicationDomain))){ className = (baseName + "_properties"); bundleClass = getClassByName(className, mx_internal::backupApplicationDomain); if (!bundleClass){ className = baseName; bundleClass = getClassByName(className, mx_internal::backupApplicationDomain); }; }; if (bundleClass){ bundleObj = new (bundleClass); if ((bundleObj is ResourceBundle)){ bundle = ResourceBundle(bundleObj); return (bundle); }; }; throw (new Error(("Could not find resource bundle " + baseName))); } } }//package mx.resources
Section 89
//ResourceManager (mx.resources.ResourceManager) package mx.resources { import mx.core.*; public class ResourceManager { mx_internal static const VERSION:String = "3.4.0.9271"; private static var implClassDependency:ResourceManagerImpl; private static var instance:IResourceManager; public function ResourceManager(){ super(); } public static function getInstance():IResourceManager{ if (!instance){ instance = IResourceManager(Singleton.getInstance("mx.resources::IResourceManager")); //unresolved jump var _slot1 = e; instance = new ResourceManagerImpl(); }; return (instance); } } }//package mx.resources
Section 90
//ResourceManagerImpl (mx.resources.ResourceManagerImpl) package mx.resources { import mx.core.*; import flash.events.*; import flash.utils.*; import flash.system.*; import mx.modules.*; import mx.events.*; import mx.utils.*; public class ResourceManagerImpl extends EventDispatcher implements IResourceManager { private var resourceModules:Object; private var initializedForNonFrameworkApp:Boolean;// = false private var localeMap:Object; private var _localeChain:Array; mx_internal static const VERSION:String = "3.4.0.9271"; private static var instance:IResourceManager; public function ResourceManagerImpl(){ localeMap = {}; resourceModules = {}; super(); } public function get localeChain():Array{ return (_localeChain); } public function set localeChain(value:Array):void{ _localeChain = value; update(); } public function getStringArray(bundleName:String, resourceName:String, locale:String=null):Array{ var resourceBundle:IResourceBundle = findBundle(bundleName, resourceName, locale); if (!resourceBundle){ return (null); }; var value:* = resourceBundle.content[resourceName]; var array:Array = String(value).split(","); var n:int = array.length; var i:int; while (i < n) { array[i] = StringUtil.trim(array[i]); i++; }; return (array); } mx_internal function installCompiledResourceBundle(applicationDomain:ApplicationDomain, locale:String, bundleName:String):void{ var packageName:String; var localName:String = bundleName; var colonIndex:int = bundleName.indexOf(":"); if (colonIndex != -1){ packageName = bundleName.substring(0, colonIndex); localName = bundleName.substring((colonIndex + 1)); }; if (getResourceBundle(locale, bundleName)){ return; }; var resourceBundleClassName = (((locale + "$") + localName) + "_properties"); if (packageName != null){ resourceBundleClassName = ((packageName + ".") + resourceBundleClassName); }; var bundleClass:Class; if (applicationDomain.hasDefinition(resourceBundleClassName)){ bundleClass = Class(applicationDomain.getDefinition(resourceBundleClassName)); }; if (!bundleClass){ resourceBundleClassName = bundleName; if (applicationDomain.hasDefinition(resourceBundleClassName)){ bundleClass = Class(applicationDomain.getDefinition(resourceBundleClassName)); }; }; if (!bundleClass){ resourceBundleClassName = (bundleName + "_properties"); if (applicationDomain.hasDefinition(resourceBundleClassName)){ bundleClass = Class(applicationDomain.getDefinition(resourceBundleClassName)); }; }; if (!bundleClass){ throw (new Error((((("Could not find compiled resource bundle '" + bundleName) + "' for locale '") + locale) + "'."))); }; var resourceBundle:ResourceBundle = ResourceBundle(new (bundleClass)); resourceBundle.mx_internal::_locale = locale; resourceBundle.mx_internal::_bundleName = bundleName; addResourceBundle(resourceBundle); } public function getString(bundleName:String, resourceName:String, parameters:Array=null, locale:String=null):String{ var resourceBundle:IResourceBundle = findBundle(bundleName, resourceName, locale); if (!resourceBundle){ return (null); }; var value:String = String(resourceBundle.content[resourceName]); if (parameters){ value = StringUtil.substitute(value, parameters); }; return (value); } public function loadResourceModule(url:String, updateFlag:Boolean=true, applicationDomain:ApplicationDomain=null, securityDomain:SecurityDomain=null):IEventDispatcher{ var moduleInfo:IModuleInfo; var resourceEventDispatcher:ResourceEventDispatcher; var timer:Timer; var timerHandler:Function; var url = url; var updateFlag = updateFlag; var applicationDomain = applicationDomain; var securityDomain = securityDomain; moduleInfo = ModuleManager.getModule(url); resourceEventDispatcher = new ResourceEventDispatcher(moduleInfo); var readyHandler:Function = function (event:ModuleEvent):void{ var resourceModule:* = event.module.factory.create(); resourceModules[event.module.url].resourceModule = resourceModule; if (updateFlag){ update(); }; }; moduleInfo.addEventListener(ModuleEvent.READY, readyHandler, false, 0, true); var errorHandler:Function = function (event:ModuleEvent):void{ var resourceEvent:ResourceEvent; var message:String = ("Unable to load resource module from " + url); if (resourceEventDispatcher.willTrigger(ResourceEvent.ERROR)){ resourceEvent = new ResourceEvent(ResourceEvent.ERROR, event.bubbles, event.cancelable); resourceEvent.bytesLoaded = 0; resourceEvent.bytesTotal = 0; resourceEvent.errorText = message; resourceEventDispatcher.dispatchEvent(resourceEvent); } else { throw (new Error(message)); }; }; moduleInfo.addEventListener(ModuleEvent.ERROR, errorHandler, false, 0, true); resourceModules[url] = new ResourceModuleInfo(moduleInfo, readyHandler, errorHandler); timer = new Timer(0); timerHandler = function (event:TimerEvent):void{ timer.removeEventListener(TimerEvent.TIMER, timerHandler); timer.stop(); moduleInfo.load(applicationDomain, securityDomain); }; timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true); timer.start(); return (resourceEventDispatcher); } public function getLocales():Array{ var p:String; var locales:Array = []; for (p in localeMap) { locales.push(p); }; return (locales); } public function removeResourceBundlesForLocale(locale:String):void{ delete localeMap[locale]; } public function getResourceBundle(locale:String, bundleName:String):IResourceBundle{ var bundleMap:Object = localeMap[locale]; if (!bundleMap){ return (null); }; return (bundleMap[bundleName]); } private function dumpResourceModule(resourceModule):void{ var bundle:ResourceBundle; var p:String; for each (bundle in resourceModule.resourceBundles) { trace(bundle.locale, bundle.bundleName); for (p in bundle.content) { }; }; } public function addResourceBundle(resourceBundle:IResourceBundle):void{ var locale:String = resourceBundle.locale; var bundleName:String = resourceBundle.bundleName; if (!localeMap[locale]){ localeMap[locale] = {}; }; localeMap[locale][bundleName] = resourceBundle; } public function getObject(bundleName:String, resourceName:String, locale:String=null){ var resourceBundle:IResourceBundle = findBundle(bundleName, resourceName, locale); if (!resourceBundle){ return (undefined); }; return (resourceBundle.content[resourceName]); } public function getInt(bundleName:String, resourceName:String, locale:String=null):int{ var resourceBundle:IResourceBundle = findBundle(bundleName, resourceName, locale); if (!resourceBundle){ return (0); }; var value:* = resourceBundle.content[resourceName]; return (int(value)); } private function findBundle(bundleName:String, resourceName:String, locale:String):IResourceBundle{ supportNonFrameworkApps(); return (((locale)!=null) ? getResourceBundle(locale, bundleName) : findResourceBundleWithResource(bundleName, resourceName)); } private function supportNonFrameworkApps():void{ if (initializedForNonFrameworkApp){ return; }; initializedForNonFrameworkApp = true; if (getLocales().length > 0){ return; }; var applicationDomain:ApplicationDomain = ApplicationDomain.currentDomain; if (!applicationDomain.hasDefinition("_CompiledResourceBundleInfo")){ return; }; var c:Class = Class(applicationDomain.getDefinition("_CompiledResourceBundleInfo")); var locales:Array = c.compiledLocales; var bundleNames:Array = c.compiledResourceBundleNames; installCompiledResourceBundles(applicationDomain, locales, bundleNames); localeChain = locales; } public function getBundleNamesForLocale(locale:String):Array{ var p:String; var bundleNames:Array = []; for (p in localeMap[locale]) { bundleNames.push(p); }; return (bundleNames); } public function getPreferredLocaleChain():Array{ return (LocaleSorter.sortLocalesByPreference(getLocales(), getSystemPreferredLocales(), null, true)); } public function getNumber(bundleName:String, resourceName:String, locale:String=null):Number{ var resourceBundle:IResourceBundle = findBundle(bundleName, resourceName, locale); if (!resourceBundle){ return (NaN); }; var value:* = resourceBundle.content[resourceName]; return (Number(value)); } public function update():void{ dispatchEvent(new Event(Event.CHANGE)); } public function getClass(bundleName:String, resourceName:String, locale:String=null):Class{ var resourceBundle:IResourceBundle = findBundle(bundleName, resourceName, locale); if (!resourceBundle){ return (null); }; var value:* = resourceBundle.content[resourceName]; return ((value as Class)); } public function removeResourceBundle(locale:String, bundleName:String):void{ delete localeMap[locale][bundleName]; if (getBundleNamesForLocale(locale).length == 0){ delete localeMap[locale]; }; } public function initializeLocaleChain(compiledLocales:Array):void{ localeChain = LocaleSorter.sortLocalesByPreference(compiledLocales, getSystemPreferredLocales(), null, true); } public function findResourceBundleWithResource(bundleName:String, resourceName:String):IResourceBundle{ var locale:String; var bundleMap:Object; var bundle:ResourceBundle; if (!_localeChain){ return (null); }; var n:int = _localeChain.length; var i:int; while (i < n) { locale = localeChain[i]; bundleMap = localeMap[locale]; if (!bundleMap){ } else { bundle = bundleMap[bundleName]; if (!bundle){ } else { if ((resourceName in bundle.content)){ return (bundle); }; }; }; i++; }; return (null); } public function getUint(bundleName:String, resourceName:String, locale:String=null):uint{ var resourceBundle:IResourceBundle = findBundle(bundleName, resourceName, locale); if (!resourceBundle){ return (0); }; var value:* = resourceBundle.content[resourceName]; return (uint(value)); } private function getSystemPreferredLocales():Array{ var systemPreferences:Array; if (Capabilities["languages"]){ systemPreferences = Capabilities["languages"]; } else { systemPreferences = [Capabilities.language]; }; return (systemPreferences); } public function installCompiledResourceBundles(applicationDomain:ApplicationDomain, locales:Array, bundleNames:Array):void{ var locale:String; var j:int; var bundleName:String; var n:int = (locales) ? locales.length : 0; var m:int = (bundleNames) ? bundleNames.length : 0; var i:int; while (i < n) { locale = locales[i]; j = 0; while (j < m) { bundleName = bundleNames[j]; mx_internal::installCompiledResourceBundle(applicationDomain, locale, bundleName); j++; }; i++; }; } public function getBoolean(bundleName:String, resourceName:String, locale:String=null):Boolean{ var resourceBundle:IResourceBundle = findBundle(bundleName, resourceName, locale); if (!resourceBundle){ return (false); }; var value:* = resourceBundle.content[resourceName]; return ((String(value).toLowerCase() == "true")); } public function unloadResourceModule(url:String, update:Boolean=true):void{ var bundles:Array; var n:int; var i:int; var locale:String; var bundleName:String; var rmi:ResourceModuleInfo = resourceModules[url]; if (!rmi){ return; }; if (rmi.resourceModule){ bundles = rmi.resourceModule.resourceBundles; if (bundles){ n = bundles.length; i = 0; while (i < n) { locale = bundles[i].locale; bundleName = bundles[i].bundleName; removeResourceBundle(locale, bundleName); i++; }; }; }; resourceModules[url] = null; delete resourceModules[url]; rmi.moduleInfo.unload(); if (update){ this.update(); }; } public static function getInstance():IResourceManager{ if (!instance){ instance = new (ResourceManagerImpl); }; return (instance); } } }//package mx.resources import flash.events.*; import mx.modules.*; import mx.events.*; class ResourceModuleInfo { public var resourceModule:IResourceModule; public var errorHandler:Function; public var readyHandler:Function; public var moduleInfo:IModuleInfo; private function ResourceModuleInfo(moduleInfo:IModuleInfo, readyHandler:Function, errorHandler:Function){ super(); this.moduleInfo = moduleInfo; this.readyHandler = readyHandler; this.errorHandler = errorHandler; } } class ResourceEventDispatcher extends EventDispatcher { private function ResourceEventDispatcher(moduleInfo:IModuleInfo){ super(); moduleInfo.addEventListener(ModuleEvent.ERROR, moduleInfo_errorHandler, false, 0, true); moduleInfo.addEventListener(ModuleEvent.PROGRESS, moduleInfo_progressHandler, false, 0, true); moduleInfo.addEventListener(ModuleEvent.READY, moduleInfo_readyHandler, false, 0, true); } private function moduleInfo_progressHandler(event:ModuleEvent):void{ var resourceEvent:ResourceEvent = new ResourceEvent(ResourceEvent.PROGRESS, event.bubbles, event.cancelable); resourceEvent.bytesLoaded = event.bytesLoaded; resourceEvent.bytesTotal = event.bytesTotal; dispatchEvent(resourceEvent); } private function moduleInfo_readyHandler(event:ModuleEvent):void{ var resourceEvent:ResourceEvent = new ResourceEvent(ResourceEvent.COMPLETE); dispatchEvent(resourceEvent); } private function moduleInfo_errorHandler(event:ModuleEvent):void{ var resourceEvent:ResourceEvent = new ResourceEvent(ResourceEvent.ERROR, event.bubbles, event.cancelable); resourceEvent.bytesLoaded = event.bytesLoaded; resourceEvent.bytesTotal = event.bytesTotal; resourceEvent.errorText = event.errorText; dispatchEvent(resourceEvent); } }
Section 91
//HaloBorder (mx.skins.halo.HaloBorder) package mx.skins.halo { import mx.core.*; import mx.styles.*; import flash.display.*; import mx.skins.*; import mx.graphics.*; import mx.utils.*; public class HaloBorder extends RectangularBorder { mx_internal var radiusObj:Object; mx_internal var backgroundHole:Object; mx_internal var radius:Number; mx_internal var bRoundedCorners:Boolean; mx_internal var backgroundColor:Object; private var dropShadow:RectangularDropShadow; protected var _borderMetrics:EdgeMetrics; mx_internal var backgroundAlphaName:String; mx_internal static const VERSION:String = "3.4.0.9271"; private static var BORDER_WIDTHS:Object = {none:0, solid:1, inset:2, outset:2, alert:3, dropdown:2, menuBorder:1, comboNonEdit:2}; public function HaloBorder(){ super(); BORDER_WIDTHS["default"] = 3; } override public function styleChanged(styleProp:String):void{ if ((((((((((styleProp == null)) || ((styleProp == "styleName")))) || ((styleProp == "borderStyle")))) || ((styleProp == "borderThickness")))) || ((styleProp == "borderSides")))){ _borderMetrics = null; }; invalidateDisplayList(); } override protected function updateDisplayList(w:Number, h:Number):void{ if (((isNaN(w)) || (isNaN(h)))){ return; }; super.updateDisplayList(w, h); backgroundColor = getBackgroundColor(); bRoundedCorners = false; backgroundAlphaName = "backgroundAlpha"; backgroundHole = null; radius = 0; radiusObj = null; drawBorder(w, h); drawBackground(w, h); } mx_internal function drawBorder(w:Number, h:Number):void{ var backgroundAlpha:Number; var borderCapColor:uint; var borderColor:uint; var borderSides:String; var borderThickness:Number; var buttonColor:uint; var docked:Boolean; var dropdownBorderColor:uint; var fillColors:Array; var footerColors:Array; var highlightColor:uint; var shadowCapColor:uint; var shadowColor:uint; var themeColor:uint; var translucent:Boolean; var hole:Object; var borderColorDrk1:Number; var borderColorDrk2:Number; var borderColorLt1:Number; var borderInnerColor:Object; var contentAlpha:Number; var br:Number; var parentContainer:IContainer; var vm:EdgeMetrics; var showChrome:Boolean; var borderAlpha:Number; var fillAlphas:Array; var backgroundColorNum:uint; var bHasAllSides:Boolean; var holeRadius:Number; var borderStyle:String = getStyle("borderStyle"); var highlightAlphas:Array = getStyle("highlightAlphas"); var drawTopHighlight:Boolean; var g:Graphics = graphics; g.clear(); if (borderStyle){ switch (borderStyle){ case "none": break; case "inset": borderColor = getStyle("borderColor"); borderColorDrk1 = ColorUtil.adjustBrightness2(borderColor, -40); borderColorDrk2 = ColorUtil.adjustBrightness2(borderColor, 25); borderColorLt1 = ColorUtil.adjustBrightness2(borderColor, 40); borderInnerColor = backgroundColor; if ((((borderInnerColor === null)) || ((borderInnerColor === "")))){ borderInnerColor = borderColor; }; draw3dBorder(borderColorDrk2, borderColorDrk1, borderColorLt1, Number(borderInnerColor), Number(borderInnerColor), Number(borderInnerColor)); break; case "outset": borderColor = getStyle("borderColor"); borderColorDrk1 = ColorUtil.adjustBrightness2(borderColor, -40); borderColorDrk2 = ColorUtil.adjustBrightness2(borderColor, -25); borderColorLt1 = ColorUtil.adjustBrightness2(borderColor, 40); borderInnerColor = backgroundColor; if ((((borderInnerColor === null)) || ((borderInnerColor === "")))){ borderInnerColor = borderColor; }; draw3dBorder(borderColorDrk2, borderColorLt1, borderColorDrk1, Number(borderInnerColor), Number(borderInnerColor), Number(borderInnerColor)); break; case "alert": case "default": if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ contentAlpha = getStyle("backgroundAlpha"); backgroundAlpha = getStyle("borderAlpha"); backgroundAlphaName = "borderAlpha"; radius = getStyle("cornerRadius"); bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true"); br = (bRoundedCorners) ? radius : 0; drawDropShadow(0, 0, w, h, radius, radius, br, br); if (!bRoundedCorners){ radiusObj = {}; }; parentContainer = (parent as IContainer); if (parentContainer){ vm = parentContainer.viewMetrics; backgroundHole = {x:vm.left, y:vm.top, w:Math.max(0, ((w - vm.left) - vm.right)), h:Math.max(0, ((h - vm.top) - vm.bottom)), r:0}; if ((((backgroundHole.w > 0)) && ((backgroundHole.h > 0)))){ if (contentAlpha != backgroundAlpha){ drawDropShadow(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h, 0, 0, 0, 0); }; g.beginFill(Number(backgroundColor), contentAlpha); g.drawRect(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h); g.endFill(); }; }; backgroundColor = getStyle("borderColor"); }; break; case "dropdown": dropdownBorderColor = getStyle("dropdownBorderColor"); drawDropShadow(0, 0, w, h, 4, 0, 0, 4); drawRoundRect(0, 0, w, h, {tl:4, tr:0, br:0, bl:4}, 5068126, 1); drawRoundRect(0, 0, w, h, {tl:4, tr:0, br:0, bl:4}, [0xFFFFFF, 0xFFFFFF], [0.7, 0], verticalGradientMatrix(0, 0, w, h)); drawRoundRect(1, 1, (w - 1), (h - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1); drawRoundRect(1, 2, (w - 1), (h - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (w - 1), (h - 3))); if (!isNaN(dropdownBorderColor)){ drawRoundRect(0, 0, (w + 1), h, {tl:4, tr:0, br:0, bl:4}, dropdownBorderColor, 0.5); drawRoundRect(1, 1, (w - 1), (h - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1); drawRoundRect(1, 2, (w - 1), (h - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (w - 1), (h - 3))); }; backgroundColor = null; break; case "menuBorder": borderColor = getStyle("borderColor"); drawRoundRect(0, 0, w, h, 0, borderColor, 1); drawDropShadow(1, 1, (w - 2), (h - 2), 0, 0, 0, 0); break; case "comboNonEdit": break; case "controlBar": if ((((w == 0)) || ((h == 0)))){ backgroundColor = null; break; }; footerColors = getStyle("footerColors"); showChrome = !((footerColors == null)); borderAlpha = getStyle("borderAlpha"); if (showChrome){ g.lineStyle(0, ((footerColors.length > 0)) ? footerColors[1] : footerColors[0], borderAlpha); g.moveTo(0, 0); g.lineTo(w, 0); g.lineStyle(0, 0, 0); if (((((parent) && (parent.parent))) && ((parent.parent is IStyleClient)))){ radius = IStyleClient(parent.parent).getStyle("cornerRadius"); borderAlpha = IStyleClient(parent.parent).getStyle("borderAlpha"); }; if (isNaN(radius)){ radius = 0; }; if (IStyleClient(parent.parent).getStyle("roundedBottomCorners").toString().toLowerCase() != "true"){ radius = 0; }; drawRoundRect(0, 1, w, (h - 1), {tl:0, tr:0, bl:radius, br:radius}, footerColors, borderAlpha, verticalGradientMatrix(0, 0, w, h)); if ((((footerColors.length > 1)) && (!((footerColors[0] == footerColors[1]))))){ drawRoundRect(0, 1, w, (h - 1), {tl:0, tr:0, bl:radius, br:radius}, [0xFFFFFF, 0xFFFFFF], highlightAlphas, verticalGradientMatrix(0, 0, w, h)); drawRoundRect(1, 2, (w - 2), (h - 3), {tl:0, tr:0, bl:(radius - 1), br:(radius - 1)}, footerColors, borderAlpha, verticalGradientMatrix(0, 0, w, h)); }; }; backgroundColor = null; break; case "applicationControlBar": fillColors = getStyle("fillColors"); backgroundAlpha = getStyle("backgroundAlpha"); highlightAlphas = getStyle("highlightAlphas"); fillAlphas = getStyle("fillAlphas"); docked = getStyle("docked"); backgroundColorNum = uint(backgroundColor); radius = getStyle("cornerRadius"); if (!radius){ radius = 0; }; drawDropShadow(0, 1, w, (h - 1), radius, radius, radius, radius); if (((!((backgroundColor === null))) && (StyleManager.isValidStyleValue(backgroundColor)))){ drawRoundRect(0, 1, w, (h - 1), radius, backgroundColorNum, backgroundAlpha, verticalGradientMatrix(0, 0, w, h)); }; drawRoundRect(0, 1, w, (h - 1), radius, fillColors, fillAlphas, verticalGradientMatrix(0, 0, w, h)); drawRoundRect(0, 1, w, ((h / 2) - 1), {tl:radius, tr:radius, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], highlightAlphas, verticalGradientMatrix(0, 0, w, ((h / 2) - 1))); drawRoundRect(0, 1, w, (h - 1), {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, 0.3, null, GradientType.LINEAR, null, {x:0, y:2, w:w, h:(h - 2), r:{tl:radius, tr:radius, bl:0, br:0}}); backgroundColor = null; break; default: borderColor = getStyle("borderColor"); borderThickness = getStyle("borderThickness"); borderSides = getStyle("borderSides"); bHasAllSides = true; radius = getStyle("cornerRadius"); bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true"); holeRadius = Math.max((radius - borderThickness), 0); hole = {x:borderThickness, y:borderThickness, w:(w - (borderThickness * 2)), h:(h - (borderThickness * 2)), r:holeRadius}; if (!bRoundedCorners){ radiusObj = {tl:radius, tr:radius, bl:0, br:0}; hole.r = {tl:holeRadius, tr:holeRadius, bl:0, br:0}; }; if (borderSides != "left top right bottom"){ hole.r = {tl:holeRadius, tr:holeRadius, bl:(bRoundedCorners) ? holeRadius : 0, br:(bRoundedCorners) ? holeRadius : 0}; radiusObj = {tl:radius, tr:radius, bl:(bRoundedCorners) ? radius : 0, br:(bRoundedCorners) ? radius : 0}; borderSides = borderSides.toLowerCase(); if (borderSides.indexOf("left") == -1){ hole.x = 0; hole.w = (hole.w + borderThickness); hole.r.tl = 0; hole.r.bl = 0; radiusObj.tl = 0; radiusObj.bl = 0; bHasAllSides = false; }; if (borderSides.indexOf("top") == -1){ hole.y = 0; hole.h = (hole.h + borderThickness); hole.r.tl = 0; hole.r.tr = 0; radiusObj.tl = 0; radiusObj.tr = 0; bHasAllSides = false; }; if (borderSides.indexOf("right") == -1){ hole.w = (hole.w + borderThickness); hole.r.tr = 0; hole.r.br = 0; radiusObj.tr = 0; radiusObj.br = 0; bHasAllSides = false; }; if (borderSides.indexOf("bottom") == -1){ hole.h = (hole.h + borderThickness); hole.r.bl = 0; hole.r.br = 0; radiusObj.bl = 0; radiusObj.br = 0; bHasAllSides = false; }; }; if ((((radius == 0)) && (bHasAllSides))){ drawDropShadow(0, 0, w, h, 0, 0, 0, 0); g.beginFill(borderColor); g.drawRect(0, 0, w, h); g.drawRect(borderThickness, borderThickness, (w - (2 * borderThickness)), (h - (2 * borderThickness))); g.endFill(); } else { if (radiusObj){ drawDropShadow(0, 0, w, h, radiusObj.tl, radiusObj.tr, radiusObj.br, radiusObj.bl); drawRoundRect(0, 0, w, h, radiusObj, borderColor, 1, null, null, null, hole); radiusObj.tl = Math.max((radius - borderThickness), 0); radiusObj.tr = Math.max((radius - borderThickness), 0); radiusObj.bl = (bRoundedCorners) ? Math.max((radius - borderThickness), 0) : 0; radiusObj.br = (bRoundedCorners) ? Math.max((radius - borderThickness), 0) : 0; } else { drawDropShadow(0, 0, w, h, radius, radius, radius, radius); drawRoundRect(0, 0, w, h, radius, borderColor, 1, null, null, null, hole); radius = Math.max((getStyle("cornerRadius") - borderThickness), 0); }; }; }; }; } mx_internal function drawBackground(w:Number, h:Number):void{ var nd:Number; var alpha:Number; var bm:EdgeMetrics; var g:Graphics; var bottom:Number; var topRadius:Number; var bottomRadius:Number; var highlightAlphas:Array; var highlightAlpha:Number; if (((((((!((backgroundColor === null))) && (!((backgroundColor === ""))))) || (getStyle("mouseShield")))) || (getStyle("mouseShieldChildren")))){ nd = Number(backgroundColor); alpha = 1; bm = getBackgroundColorMetrics(); g = graphics; if (((((isNaN(nd)) || ((backgroundColor === "")))) || ((backgroundColor === null)))){ alpha = 0; nd = 0xFFFFFF; } else { alpha = getStyle(backgroundAlphaName); }; if (((!((radius == 0))) || (backgroundHole))){ bottom = bm.bottom; if (radiusObj){ topRadius = Math.max((radius - Math.max(bm.top, bm.left, bm.right)), 0); bottomRadius = (bRoundedCorners) ? Math.max((radius - Math.max(bm.bottom, bm.left, bm.right)), 0) : 0; radiusObj = {tl:topRadius, tr:topRadius, bl:bottomRadius, br:bottomRadius}; drawRoundRect(bm.left, bm.top, (width - (bm.left + bm.right)), (height - (bm.top + bottom)), radiusObj, nd, alpha, null, GradientType.LINEAR, null, backgroundHole); } else { drawRoundRect(bm.left, bm.top, (width - (bm.left + bm.right)), (height - (bm.top + bottom)), radius, nd, alpha, null, GradientType.LINEAR, null, backgroundHole); }; } else { g.beginFill(nd, alpha); g.drawRect(bm.left, bm.top, ((w - bm.right) - bm.left), ((h - bm.bottom) - bm.top)); g.endFill(); }; }; var borderStyle:String = getStyle("borderStyle"); if ((((((FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)) && ((((borderStyle == "alert")) || ((borderStyle == "default")))))) && ((getStyle("headerColors") == null)))){ highlightAlphas = getStyle("highlightAlphas"); highlightAlpha = (highlightAlphas) ? highlightAlphas[0] : 0.3; drawRoundRect(0, 0, w, h, {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, highlightAlpha, null, GradientType.LINEAR, null, {x:0, y:1, w:w, h:(h - 1), r:{tl:radius, tr:radius, bl:0, br:0}}); }; } mx_internal function drawDropShadow(x:Number, y:Number, width:Number, height:Number, tlRadius:Number, trRadius:Number, brRadius:Number, blRadius:Number):void{ var angle:Number; var docked:Boolean; if ((((((((getStyle("dropShadowEnabled") == false)) || ((getStyle("dropShadowEnabled") == "false")))) || ((width == 0)))) || ((height == 0)))){ return; }; var distance:Number = getStyle("shadowDistance"); var direction:String = getStyle("shadowDirection"); if (getStyle("borderStyle") == "applicationControlBar"){ docked = getStyle("docked"); angle = (docked) ? 90 : getDropShadowAngle(distance, direction); distance = Math.abs(distance); } else { angle = getDropShadowAngle(distance, direction); distance = (Math.abs(distance) + 2); }; if (!dropShadow){ dropShadow = new RectangularDropShadow(); }; dropShadow.distance = distance; dropShadow.angle = angle; dropShadow.color = getStyle("dropShadowColor"); dropShadow.alpha = 0.4; dropShadow.tlRadius = tlRadius; dropShadow.trRadius = trRadius; dropShadow.blRadius = blRadius; dropShadow.brRadius = brRadius; dropShadow.drawShadow(graphics, x, y, width, height); } mx_internal function getBackgroundColor():Object{ var color:Object; var p:IUIComponent = (parent as IUIComponent); if (((p) && (!(p.enabled)))){ color = getStyle("backgroundDisabledColor"); if (((!((color === null))) && (StyleManager.isValidStyleValue(color)))){ return (color); }; }; return (getStyle("backgroundColor")); } mx_internal function draw3dBorder(c1:Number, c2:Number, c3:Number, c4:Number, c5:Number, c6:Number):void{ var w:Number = width; var h:Number = height; drawDropShadow(0, 0, width, height, 0, 0, 0, 0); var g:Graphics = graphics; g.beginFill(c1); g.drawRect(0, 0, w, h); g.drawRect(1, 0, (w - 2), h); g.endFill(); g.beginFill(c2); g.drawRect(1, 0, (w - 2), 1); g.endFill(); g.beginFill(c3); g.drawRect(1, (h - 1), (w - 2), 1); g.endFill(); g.beginFill(c4); g.drawRect(1, 1, (w - 2), 1); g.endFill(); g.beginFill(c5); g.drawRect(1, (h - 2), (w - 2), 1); g.endFill(); g.beginFill(c6); g.drawRect(1, 2, (w - 2), (h - 4)); g.drawRect(2, 2, (w - 4), (h - 4)); g.endFill(); } mx_internal function getBackgroundColorMetrics():EdgeMetrics{ return (borderMetrics); } mx_internal function getDropShadowAngle(distance:Number, direction:String):Number{ if (direction == "left"){ return (((distance >= 0)) ? 135 : 225); } else { if (direction == "right"){ return (((distance >= 0)) ? 45 : 315); //unresolved jump }; }; return (!NULL!); } override public function get borderMetrics():EdgeMetrics{ var borderThickness:Number; var borderSides:String; if (_borderMetrics){ return (_borderMetrics); }; var borderStyle:String = getStyle("borderStyle"); if ((((borderStyle == "default")) || ((borderStyle == "alert")))){ if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ _borderMetrics = new EdgeMetrics(0, 0, 0, 0); } else { return (EdgeMetrics.EMPTY); }; } else { if ((((borderStyle == "controlBar")) || ((borderStyle == "applicationControlBar")))){ _borderMetrics = new EdgeMetrics(1, 1, 1, 1); } else { if (borderStyle == "solid"){ borderThickness = getStyle("borderThickness"); if (isNaN(borderThickness)){ borderThickness = 0; }; _borderMetrics = new EdgeMetrics(borderThickness, borderThickness, borderThickness, borderThickness); borderSides = getStyle("borderSides"); if (borderSides != "left top right bottom"){ if (borderSides.indexOf("left") == -1){ _borderMetrics.left = 0; }; if (borderSides.indexOf("top") == -1){ _borderMetrics.top = 0; }; if (borderSides.indexOf("right") == -1){ _borderMetrics.right = 0; }; if (borderSides.indexOf("bottom") == -1){ _borderMetrics.bottom = 0; }; }; } else { borderThickness = BORDER_WIDTHS[borderStyle]; if (isNaN(borderThickness)){ borderThickness = 0; }; _borderMetrics = new EdgeMetrics(borderThickness, borderThickness, borderThickness, borderThickness); }; }; }; return (_borderMetrics); } } }//package mx.skins.halo
Section 92
//HaloFocusRect (mx.skins.halo.HaloFocusRect) package mx.skins.halo { import mx.core.*; import mx.styles.*; import flash.display.*; import mx.skins.*; import mx.utils.*; public class HaloFocusRect extends ProgrammaticSkin implements IStyleClient { private var _focusColor:Number; mx_internal static const VERSION:String = "3.4.0.9271"; public function HaloFocusRect(){ super(); } public function get inheritingStyles():Object{ return (styleName.inheritingStyles); } public function set inheritingStyles(value:Object):void{ } public function notifyStyleChangeInChildren(styleProp:String, recursive:Boolean):void{ } public function registerEffects(effects:Array):void{ } public function regenerateStyleCache(recursive:Boolean):void{ } public function get styleDeclaration():CSSStyleDeclaration{ return (CSSStyleDeclaration(styleName)); } public function getClassStyleDeclarations():Array{ return ([]); } public function get className():String{ return ("HaloFocusRect"); } public function clearStyle(styleProp:String):void{ if (styleProp == "focusColor"){ _focusColor = NaN; }; } public function setStyle(styleProp:String, newValue):void{ if (styleProp == "focusColor"){ _focusColor = newValue; }; } public function set nonInheritingStyles(value:Object):void{ } public function get nonInheritingStyles():Object{ return (styleName.nonInheritingStyles); } override protected function updateDisplayList(w:Number, h:Number):void{ var tl:Number; var bl:Number; var tr:Number; var br:Number; var nr:Number; var ellipseSize:Number; super.updateDisplayList(w, h); var focusBlendMode:String = getStyle("focusBlendMode"); var focusAlpha:Number = getStyle("focusAlpha"); var focusColor:Number = getStyle("focusColor"); var cornerRadius:Number = getStyle("cornerRadius"); var focusThickness:Number = getStyle("focusThickness"); var focusRoundedCorners:String = getStyle("focusRoundedCorners"); var themeColor:Number = getStyle("themeColor"); var rectColor:Number = focusColor; if (isNaN(rectColor)){ rectColor = themeColor; }; var g:Graphics = graphics; g.clear(); if (focusBlendMode){ blendMode = focusBlendMode; }; if (((!((focusRoundedCorners == "tl tr bl br"))) && ((cornerRadius > 0)))){ tl = 0; bl = 0; tr = 0; br = 0; nr = (cornerRadius + focusThickness); if (focusRoundedCorners.indexOf("tl") >= 0){ tl = nr; }; if (focusRoundedCorners.indexOf("tr") >= 0){ tr = nr; }; if (focusRoundedCorners.indexOf("bl") >= 0){ bl = nr; }; if (focusRoundedCorners.indexOf("br") >= 0){ br = nr; }; g.beginFill(rectColor, focusAlpha); GraphicsUtil.drawRoundRectComplex(g, 0, 0, w, h, tl, tr, bl, br); tl = (tl) ? cornerRadius : 0; tr = (tr) ? cornerRadius : 0; bl = (bl) ? cornerRadius : 0; br = (br) ? cornerRadius : 0; GraphicsUtil.drawRoundRectComplex(g, focusThickness, focusThickness, (w - (2 * focusThickness)), (h - (2 * focusThickness)), tl, tr, bl, br); g.endFill(); nr = (cornerRadius + (focusThickness / 2)); tl = (tl) ? nr : 0; tr = (tr) ? nr : 0; bl = (bl) ? nr : 0; br = (br) ? nr : 0; g.beginFill(rectColor, focusAlpha); GraphicsUtil.drawRoundRectComplex(g, (focusThickness / 2), (focusThickness / 2), (w - focusThickness), (h - focusThickness), tl, tr, bl, br); tl = (tl) ? cornerRadius : 0; tr = (tr) ? cornerRadius : 0; bl = (bl) ? cornerRadius : 0; br = (br) ? cornerRadius : 0; GraphicsUtil.drawRoundRectComplex(g, focusThickness, focusThickness, (w - (2 * focusThickness)), (h - (2 * focusThickness)), tl, tr, bl, br); g.endFill(); } else { g.beginFill(rectColor, focusAlpha); ellipseSize = (((cornerRadius > 0)) ? (cornerRadius + focusThickness) : 0 * 2); g.drawRoundRect(0, 0, w, h, ellipseSize, ellipseSize); ellipseSize = (cornerRadius * 2); g.drawRoundRect(focusThickness, focusThickness, (w - (2 * focusThickness)), (h - (2 * focusThickness)), ellipseSize, ellipseSize); g.endFill(); g.beginFill(rectColor, focusAlpha); ellipseSize = (((cornerRadius > 0)) ? (cornerRadius + (focusThickness / 2)) : 0 * 2); g.drawRoundRect((focusThickness / 2), (focusThickness / 2), (w - focusThickness), (h - focusThickness), ellipseSize, ellipseSize); ellipseSize = (cornerRadius * 2); g.drawRoundRect(focusThickness, focusThickness, (w - (2 * focusThickness)), (h - (2 * focusThickness)), ellipseSize, ellipseSize); g.endFill(); }; } override public function getStyle(styleProp:String){ return (((styleProp == "focusColor")) ? _focusColor : super.getStyle(styleProp)); } public function set styleDeclaration(value:CSSStyleDeclaration):void{ } } }//package mx.skins.halo
Section 93
//Border (mx.skins.Border) package mx.skins { import mx.core.*; public class Border extends ProgrammaticSkin implements IBorder { mx_internal static const VERSION:String = "3.4.0.9271"; public function Border(){ super(); } public function get borderMetrics():EdgeMetrics{ return (EdgeMetrics.EMPTY); } } }//package mx.skins
Section 94
//ProgrammaticSkin (mx.skins.ProgrammaticSkin) package mx.skins { import mx.core.*; import mx.styles.*; import flash.display.*; import flash.geom.*; import mx.managers.*; import mx.utils.*; public class ProgrammaticSkin extends FlexShape implements IFlexDisplayObject, IInvalidating, ILayoutManagerClient, ISimpleStyleClient, IProgrammaticSkin { private var _initialized:Boolean;// = false private var _height:Number; private var invalidateDisplayListFlag:Boolean;// = false private var _styleName:IStyleClient; private var _nestLevel:int;// = 0 private var _processedDescriptors:Boolean;// = false private var _updateCompletePendingFlag:Boolean;// = true private var _width:Number; mx_internal static const VERSION:String = "3.4.0.9271"; private static var tempMatrix:Matrix = new Matrix(); public function ProgrammaticSkin(){ super(); _width = measuredWidth; _height = measuredHeight; } public function getStyle(styleProp:String){ return ((_styleName) ? _styleName.getStyle(styleProp) : null); } protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void{ } public function get nestLevel():int{ return (_nestLevel); } public function set nestLevel(value:int):void{ _nestLevel = value; invalidateDisplayList(); } override public function get height():Number{ return (_height); } public function get updateCompletePendingFlag():Boolean{ return (_updateCompletePendingFlag); } protected function verticalGradientMatrix(x:Number, y:Number, width:Number, height:Number):Matrix{ return (rotatedGradientMatrix(x, y, width, height, 90)); } public function validateSize(recursive:Boolean=false):void{ } public function invalidateDisplayList():void{ if (((!(invalidateDisplayListFlag)) && ((nestLevel > 0)))){ invalidateDisplayListFlag = true; UIComponentGlobals.layoutManager.invalidateDisplayList(this); }; } public function set updateCompletePendingFlag(value:Boolean):void{ _updateCompletePendingFlag = value; } protected function horizontalGradientMatrix(x:Number, y:Number, width:Number, height:Number):Matrix{ return (rotatedGradientMatrix(x, y, width, height, 0)); } override public function set height(value:Number):void{ _height = value; invalidateDisplayList(); } public function set processedDescriptors(value:Boolean):void{ _processedDescriptors = value; } public function validateDisplayList():void{ invalidateDisplayListFlag = false; updateDisplayList(width, height); } public function get measuredWidth():Number{ return (0); } override public function set width(value:Number):void{ _width = value; invalidateDisplayList(); } public function get measuredHeight():Number{ return (0); } public function set initialized(value:Boolean):void{ _initialized = value; } protected function drawRoundRect(x:Number, y:Number, width:Number, height:Number, cornerRadius:Object=null, color:Object=null, alpha:Object=null, gradientMatrix:Matrix=null, gradientType:String="linear", gradientRatios:Array=null, hole:Object=null):void{ var ellipseSize:Number; var alphas:Array; var holeR:Object; var g:Graphics = graphics; if ((((width == 0)) || ((height == 0)))){ return; }; if (color !== null){ if ((color is uint)){ g.beginFill(uint(color), Number(alpha)); } else { if ((color is Array)){ alphas = ((alpha is Array)) ? (alpha as Array) : [alpha, alpha]; if (!gradientRatios){ gradientRatios = [0, 0xFF]; }; g.beginGradientFill(gradientType, (color as Array), alphas, gradientRatios, gradientMatrix); }; }; }; if (!cornerRadius){ g.drawRect(x, y, width, height); } else { if ((cornerRadius is Number)){ ellipseSize = (Number(cornerRadius) * 2); g.drawRoundRect(x, y, width, height, ellipseSize, ellipseSize); } else { GraphicsUtil.drawRoundRectComplex(g, x, y, width, height, cornerRadius.tl, cornerRadius.tr, cornerRadius.bl, cornerRadius.br); }; }; if (hole){ holeR = hole.r; if ((holeR is Number)){ ellipseSize = (Number(holeR) * 2); g.drawRoundRect(hole.x, hole.y, hole.w, hole.h, ellipseSize, ellipseSize); } else { GraphicsUtil.drawRoundRectComplex(g, hole.x, hole.y, hole.w, hole.h, holeR.tl, holeR.tr, holeR.bl, holeR.br); }; }; if (color !== null){ g.endFill(); }; } public function get processedDescriptors():Boolean{ return (_processedDescriptors); } public function set styleName(value:Object):void{ if (_styleName != value){ _styleName = (value as IStyleClient); invalidateDisplayList(); }; } public function setActualSize(newWidth:Number, newHeight:Number):void{ var changed:Boolean; if (_width != newWidth){ _width = newWidth; changed = true; }; if (_height != newHeight){ _height = newHeight; changed = true; }; if (changed){ invalidateDisplayList(); }; } public function styleChanged(styleProp:String):void{ invalidateDisplayList(); } override public function get width():Number{ return (_width); } public function invalidateProperties():void{ } public function get initialized():Boolean{ return (_initialized); } protected function rotatedGradientMatrix(x:Number, y:Number, width:Number, height:Number, rotation:Number):Matrix{ tempMatrix.createGradientBox(width, height, ((rotation * Math.PI) / 180), x, y); return (tempMatrix); } public function move(x:Number, y:Number):void{ this.x = x; this.y = y; } public function get styleName():Object{ return (_styleName); } public function validateNow():void{ if (invalidateDisplayListFlag){ validateDisplayList(); }; } public function invalidateSize():void{ } public function validateProperties():void{ } } }//package mx.skins
Section 95
//RectangularBorder (mx.skins.RectangularBorder) package mx.skins { import mx.core.*; import flash.events.*; import flash.utils.*; import mx.styles.*; import flash.system.*; import flash.display.*; import flash.geom.*; import mx.resources.*; import flash.net.*; public class RectangularBorder extends Border implements IRectangularBorder { private var backgroundImage:DisplayObject; private var backgroundImageHeight:Number; private var _backgroundImageBounds:Rectangle; private var backgroundImageStyle:Object; private var backgroundImageWidth:Number; private var resourceManager:IResourceManager; mx_internal static const VERSION:String = "3.4.0.9271"; public function RectangularBorder(){ resourceManager = ResourceManager.getInstance(); super(); addEventListener(Event.REMOVED, removedHandler); } public function layoutBackgroundImage():void{ var sW:Number; var sH:Number; var sX:Number; var sY:Number; var scale:Number; var g:Graphics; var p:DisplayObject = parent; var bm:EdgeMetrics = ((p is IContainer)) ? IContainer(p).viewMetrics : borderMetrics; var scrollableBk = !((getStyle("backgroundAttachment") == "fixed")); if (_backgroundImageBounds){ sW = _backgroundImageBounds.width; sH = _backgroundImageBounds.height; } else { sW = ((width - bm.left) - bm.right); sH = ((height - bm.top) - bm.bottom); }; var percentage:Number = getBackgroundSize(); if (isNaN(percentage)){ sX = 1; sY = 1; } else { scale = (percentage * 0.01); sX = ((scale * sW) / backgroundImageWidth); sY = ((scale * sH) / backgroundImageHeight); }; backgroundImage.scaleX = sX; backgroundImage.scaleY = sY; var offsetX:Number = Math.round((0.5 * (sW - (backgroundImageWidth * sX)))); var offsetY:Number = Math.round((0.5 * (sH - (backgroundImageHeight * sY)))); backgroundImage.x = bm.left; backgroundImage.y = bm.top; var backgroundMask:Shape = Shape(backgroundImage.mask); backgroundMask.x = bm.left; backgroundMask.y = bm.top; if (((scrollableBk) && ((p is IContainer)))){ offsetX = (offsetX - IContainer(p).horizontalScrollPosition); offsetY = (offsetY - IContainer(p).verticalScrollPosition); }; backgroundImage.alpha = getStyle("backgroundAlpha"); backgroundImage.x = (backgroundImage.x + offsetX); backgroundImage.y = (backgroundImage.y + offsetY); var maskWidth:Number = ((width - bm.left) - bm.right); var maskHeight:Number = ((height - bm.top) - bm.bottom); if (((!((backgroundMask.width == maskWidth))) || (!((backgroundMask.height == maskHeight))))){ g = backgroundMask.graphics; g.clear(); g.beginFill(0xFFFFFF); g.drawRect(0, 0, maskWidth, maskHeight); g.endFill(); }; } public function set backgroundImageBounds(value:Rectangle):void{ if (((((_backgroundImageBounds) && (value))) && (_backgroundImageBounds.equals(value)))){ return; }; _backgroundImageBounds = value; invalidateDisplayList(); } private function getBackgroundSize():Number{ var index:int; var percentage:Number = NaN; var backgroundSize:Object = getStyle("backgroundSize"); if (((backgroundSize) && ((backgroundSize is String)))){ index = backgroundSize.indexOf("%"); if (index != -1){ percentage = Number(backgroundSize.substr(0, index)); }; }; return (percentage); } private function removedHandler(event:Event):void{ var childrenList:IChildList; if (backgroundImage){ childrenList = ((parent is IRawChildrenContainer)) ? IRawChildrenContainer(parent).rawChildren : IChildList(parent); childrenList.removeChild(backgroundImage.mask); childrenList.removeChild(backgroundImage); backgroundImage = null; }; } private function initBackgroundImage(image:DisplayObject):void{ backgroundImage = image; if ((image is Loader)){ backgroundImageWidth = Loader(image).contentLoaderInfo.width; backgroundImageHeight = Loader(image).contentLoaderInfo.height; } else { backgroundImageWidth = backgroundImage.width; backgroundImageHeight = backgroundImage.height; if ((image is ISimpleStyleClient)){ ISimpleStyleClient(image).styleName = styleName; }; }; var childrenList:IChildList = ((parent is IRawChildrenContainer)) ? IRawChildrenContainer(parent).rawChildren : IChildList(parent); var backgroundMask:Shape = new FlexShape(); backgroundMask.name = "backgroundMask"; backgroundMask.x = 0; backgroundMask.y = 0; childrenList.addChild(backgroundMask); var myIndex:int = childrenList.getChildIndex(this); childrenList.addChildAt(backgroundImage, (myIndex + 1)); backgroundImage.mask = backgroundMask; } public function get backgroundImageBounds():Rectangle{ return (_backgroundImageBounds); } public function get hasBackgroundImage():Boolean{ return (!((backgroundImage == null))); } private function completeEventHandler(event:Event):void{ if (!parent){ return; }; var target:DisplayObject = DisplayObject(LoaderInfo(event.target).loader); initBackgroundImage(target); layoutBackgroundImage(); dispatchEvent(event.clone()); } override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void{ var cls:Class; var newStyleObj:DisplayObject; var loader:Loader; var loaderContext:LoaderContext; var message:String; var unscaledWidth = unscaledWidth; var unscaledHeight = unscaledHeight; if (!parent){ return; }; var newStyle:Object = getStyle("backgroundImage"); if (newStyle != backgroundImageStyle){ removedHandler(null); backgroundImageStyle = newStyle; if (((newStyle) && ((newStyle as Class)))){ cls = Class(newStyle); initBackgroundImage(new (cls)); } else { if (((newStyle) && ((newStyle is String)))){ cls = Class(getDefinitionByName(String(newStyle))); //unresolved jump var _slot1 = e; if (cls){ newStyleObj = new (cls); initBackgroundImage(newStyleObj); } else { loader = new FlexLoader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeEventHandler); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorEventHandler); loader.contentLoaderInfo.addEventListener(ErrorEvent.ERROR, errorEventHandler); loaderContext = new LoaderContext(); loaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain); loader.load(new URLRequest(String(newStyle)), loaderContext); }; } else { if (newStyle){ message = resourceManager.getString("skins", "notLoaded", [newStyle]); throw (new Error(message)); }; }; }; }; if (backgroundImage){ layoutBackgroundImage(); }; } private function errorEventHandler(event:Event):void{ } } }//package mx.skins
Section 96
//CSSStyleDeclaration (mx.styles.CSSStyleDeclaration) package mx.styles { import mx.core.*; import flash.events.*; import flash.utils.*; import flash.display.*; import mx.managers.*; public class CSSStyleDeclaration extends EventDispatcher { mx_internal var effects:Array; protected var overrides:Object; public var defaultFactory:Function; public var factory:Function; mx_internal var selectorRefCount:int;// = 0 private var styleManager:IStyleManager2; private var clones:Dictionary; mx_internal static const VERSION:String = "3.4.0.9271"; private static const NOT_A_COLOR:uint = 4294967295; private static const FILTERMAP_PROP:String = "__reserved__filterMap"; public function CSSStyleDeclaration(selector:String=null){ clones = new Dictionary(true); super(); if (selector){ styleManager = (Singleton.getInstance("mx.styles::IStyleManager2") as IStyleManager2); styleManager.setStyleDeclaration(selector, this, false); }; } mx_internal function addStyleToProtoChain(chain:Object, target:DisplayObject, filterMap:Object=null):Object{ var p:String; var emptyObjectFactory:Function; var filteredChain:Object; var filterObjectFactory:Function; var i:String; var chain = chain; var target = target; var filterMap = filterMap; var nodeAddedToChain:Boolean; var originalChain:Object = chain; if (filterMap){ chain = {}; }; if (defaultFactory != null){ defaultFactory.prototype = chain; chain = new defaultFactory(); nodeAddedToChain = true; }; if (factory != null){ factory.prototype = chain; chain = new factory(); nodeAddedToChain = true; }; if (overrides){ if ((((defaultFactory == null)) && ((factory == null)))){ emptyObjectFactory = function ():void{ }; emptyObjectFactory.prototype = chain; chain = new (emptyObjectFactory); nodeAddedToChain = true; }; for (p in overrides) { if (overrides[p] === undefined){ delete chain[p]; } else { chain[p] = overrides[p]; }; }; }; if (filterMap){ if (nodeAddedToChain){ filteredChain = {}; filterObjectFactory = function ():void{ }; filterObjectFactory.prototype = originalChain; filteredChain = new (filterObjectFactory); for (i in chain) { if (filterMap[i] != null){ filteredChain[filterMap[i]] = chain[i]; }; }; chain = filteredChain; chain[FILTERMAP_PROP] = filterMap; } else { chain = originalChain; }; }; if (nodeAddedToChain){ clones[chain] = 1; }; return (chain); } public function getStyle(styleProp:String){ var o:*; var v:*; if (overrides){ if ((((styleProp in overrides)) && ((overrides[styleProp] === undefined)))){ return (undefined); }; v = overrides[styleProp]; if (v !== undefined){ return (v); }; }; if (factory != null){ factory.prototype = {}; o = new factory(); v = o[styleProp]; if (v !== undefined){ return (v); }; }; if (defaultFactory != null){ defaultFactory.prototype = {}; o = new defaultFactory(); v = o[styleProp]; if (v !== undefined){ return (v); }; }; return (undefined); } public function clearStyle(styleProp:String):void{ setStyle(styleProp, undefined); } public function setStyle(styleProp:String, newValue):void{ var i:int; var sm:Object; var oldValue:Object = getStyle(styleProp); var regenerate:Boolean; if ((((((((((selectorRefCount > 0)) && ((factory == null)))) && ((defaultFactory == null)))) && (!(overrides)))) && (!((oldValue === newValue))))){ regenerate = true; }; if (newValue !== undefined){ setStyle(styleProp, newValue); } else { if (newValue == oldValue){ return; }; setStyle(styleProp, newValue); }; var sms:Array = SystemManagerGlobals.topLevelSystemManagers; var n:int = sms.length; if (regenerate){ i = 0; while (i < n) { sm = sms[i]; sm.regenerateStyleCache(true); i++; }; }; i = 0; while (i < n) { sm = sms[i]; sm.notifyStyleChangeInChildren(styleProp, true); i++; }; } private function clearStyleAttr(styleProp:String):void{ var clone:*; if (!overrides){ overrides = {}; }; overrides[styleProp] = undefined; for (clone in clones) { delete clone[styleProp]; }; } mx_internal function createProtoChainRoot():Object{ var root:Object = {}; if (defaultFactory != null){ defaultFactory.prototype = root; root = new defaultFactory(); }; if (factory != null){ factory.prototype = root; root = new factory(); }; clones[root] = 1; return (root); } mx_internal function clearOverride(styleProp:String):void{ if (((overrides) && (overrides[styleProp]))){ delete overrides[styleProp]; }; } mx_internal function setStyle(styleProp:String, value):void{ var o:Object; var clone:*; var colorNumber:Number; var cloneFilter:Object; if (value === undefined){ clearStyleAttr(styleProp); return; }; if ((value is String)){ if (!styleManager){ styleManager = (Singleton.getInstance("mx.styles::IStyleManager2") as IStyleManager2); }; colorNumber = styleManager.getColorName(value); if (colorNumber != NOT_A_COLOR){ value = colorNumber; }; }; if (defaultFactory != null){ o = new defaultFactory(); if (o[styleProp] !== value){ if (!overrides){ overrides = {}; }; overrides[styleProp] = value; } else { if (overrides){ delete overrides[styleProp]; }; }; }; if (factory != null){ o = new factory(); if (o[styleProp] !== value){ if (!overrides){ overrides = {}; }; overrides[styleProp] = value; } else { if (overrides){ delete overrides[styleProp]; }; }; }; if ((((defaultFactory == null)) && ((factory == null)))){ if (!overrides){ overrides = {}; }; overrides[styleProp] = value; }; for (clone in clones) { cloneFilter = clone[FILTERMAP_PROP]; if (cloneFilter){ if (cloneFilter[styleProp] != null){ clone[cloneFilter[styleProp]] = value; }; } else { clone[styleProp] = value; }; }; } } }//package mx.styles
Section 97
//ISimpleStyleClient (mx.styles.ISimpleStyleClient) package mx.styles { public interface ISimpleStyleClient { function set styleName(C:\autobuild\galaga\frameworks\projects\framework\src;mx\styles;ISimpleStyleClient.as:Object):void; function styleChanged(C:\autobuild\galaga\frameworks\projects\framework\src;mx\styles;ISimpleStyleClient.as:String):void; function get styleName():Object; } }//package mx.styles
Section 98
//IStyleClient (mx.styles.IStyleClient) package mx.styles { public interface IStyleClient extends ISimpleStyleClient { function regenerateStyleCache(mx.styles:IStyleClient/mx.styles:IStyleClient:className/get:Boolean):void; function get className():String; function clearStyle(mx.styles:IStyleClient/mx.styles:IStyleClient:className/get:String):void; function getClassStyleDeclarations():Array; function get inheritingStyles():Object; function set nonInheritingStyles(mx.styles:IStyleClient/mx.styles:IStyleClient:className/get:Object):void; function setStyle(_arg1:String, _arg2):void; function get styleDeclaration():CSSStyleDeclaration; function set styleDeclaration(mx.styles:IStyleClient/mx.styles:IStyleClient:className/get:CSSStyleDeclaration):void; function get nonInheritingStyles():Object; function set inheritingStyles(mx.styles:IStyleClient/mx.styles:IStyleClient:className/get:Object):void; function getStyle(*:String); function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void; function registerEffects(mx.styles:IStyleClient/mx.styles:IStyleClient:className/get:Array):void; } }//package mx.styles
Section 99
//IStyleManager (mx.styles.IStyleManager) package mx.styles { import flash.events.*; public interface IStyleManager { function isColorName(value:String):Boolean; function registerParentDisplayListInvalidatingStyle(C:\autobuild\galaga\frameworks\projects\framework\src;mx\styles;IStyleManager.as:String):void; function registerInheritingStyle(C:\autobuild\galaga\frameworks\projects\framework\src;mx\styles;IStyleManager.as:String):void; function set stylesRoot(C:\autobuild\galaga\frameworks\projects\framework\src;mx\styles;IStyleManager.as:Object):void; function get typeSelectorCache():Object; function styleDeclarationsChanged():void; function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void; function isParentDisplayListInvalidatingStyle(value:String):Boolean; function isSizeInvalidatingStyle(value:String):Boolean; function get inheritingStyles():Object; function isValidStyleValue(value):Boolean; function isParentSizeInvalidatingStyle(value:String):Boolean; function getColorName(mx.styles:IStyleManager/mx.styles:IStyleManager:inheritingStyles/set:Object):uint; function set typeSelectorCache(C:\autobuild\galaga\frameworks\projects\framework\src;mx\styles;IStyleManager.as:Object):void; function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void; function getColorNames(C:\autobuild\galaga\frameworks\projects\framework\src;mx\styles;IStyleManager.as:Array):void; function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher; function isInheritingStyle(value:String):Boolean; function set inheritingStyles(C:\autobuild\galaga\frameworks\projects\framework\src;mx\styles;IStyleManager.as:Object):void; function get stylesRoot():Object; function initProtoChainRoots():void; function registerColorName(_arg1:String, _arg2:uint):void; function registerParentSizeInvalidatingStyle(C:\autobuild\galaga\frameworks\projects\framework\src;mx\styles;IStyleManager.as:String):void; function registerSizeInvalidatingStyle(C:\autobuild\galaga\frameworks\projects\framework\src;mx\styles;IStyleManager.as:String):void; function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void; function isInheritingTextFormatStyle(value:String):Boolean; function getStyleDeclaration(mx.styles:IStyleManager/mx.styles:IStyleManager:inheritingStyles/get:String):CSSStyleDeclaration; } }//package mx.styles
Section 100
//IStyleManager2 (mx.styles.IStyleManager2) package mx.styles { import flash.events.*; import flash.system.*; public interface IStyleManager2 extends IStyleManager { function get selectors():Array; function loadStyleDeclarations2(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher; } }//package mx.styles
Section 101
//IStyleModule (mx.styles.IStyleModule) package mx.styles { public interface IStyleModule { function unload():void; } }//package mx.styles
Section 102
//StyleManager (mx.styles.StyleManager) package mx.styles { import mx.core.*; import flash.events.*; import flash.system.*; public class StyleManager { mx_internal static const VERSION:String = "3.4.0.9271"; public static const NOT_A_COLOR:uint = 4294967295; private static var _impl:IStyleManager2; private static var implClassDependency:StyleManagerImpl; public function StyleManager(){ super(); } public static function isParentSizeInvalidatingStyle(styleName:String):Boolean{ return (impl.isParentSizeInvalidatingStyle(styleName)); } public static function registerInheritingStyle(styleName:String):void{ impl.registerInheritingStyle(styleName); } mx_internal static function set stylesRoot(value:Object):void{ impl.stylesRoot = value; } mx_internal static function get inheritingStyles():Object{ return (impl.inheritingStyles); } mx_internal static function styleDeclarationsChanged():void{ impl.styleDeclarationsChanged(); } public static function setStyleDeclaration(selector:String, styleDeclaration:CSSStyleDeclaration, update:Boolean):void{ impl.setStyleDeclaration(selector, styleDeclaration, update); } public static function registerParentDisplayListInvalidatingStyle(styleName:String):void{ impl.registerParentDisplayListInvalidatingStyle(styleName); } mx_internal static function get typeSelectorCache():Object{ return (impl.typeSelectorCache); } mx_internal static function set inheritingStyles(value:Object):void{ impl.inheritingStyles = value; } public static function isColorName(colorName:String):Boolean{ return (impl.isColorName(colorName)); } public static function isParentDisplayListInvalidatingStyle(styleName:String):Boolean{ return (impl.isParentDisplayListInvalidatingStyle(styleName)); } public static function isSizeInvalidatingStyle(styleName:String):Boolean{ return (impl.isSizeInvalidatingStyle(styleName)); } public static function getColorName(colorName:Object):uint{ return (impl.getColorName(colorName)); } mx_internal static function set typeSelectorCache(value:Object):void{ impl.typeSelectorCache = value; } public static function unloadStyleDeclarations(url:String, update:Boolean=true):void{ impl.unloadStyleDeclarations(url, update); } public static function getColorNames(colors:Array):void{ impl.getColorNames(colors); } public static function loadStyleDeclarations(url:String, update:Boolean=true, trustContent:Boolean=false, applicationDomain:ApplicationDomain=null, securityDomain:SecurityDomain=null):IEventDispatcher{ return (impl.loadStyleDeclarations2(url, update, applicationDomain, securityDomain)); } private static function get impl():IStyleManager2{ if (!_impl){ _impl = IStyleManager2(Singleton.getInstance("mx.styles::IStyleManager2")); }; return (_impl); } public static function isValidStyleValue(value):Boolean{ return (impl.isValidStyleValue(value)); } mx_internal static function get stylesRoot():Object{ return (impl.stylesRoot); } public static function isInheritingStyle(styleName:String):Boolean{ return (impl.isInheritingStyle(styleName)); } mx_internal static function initProtoChainRoots():void{ impl.initProtoChainRoots(); } public static function registerParentSizeInvalidatingStyle(styleName:String):void{ impl.registerParentSizeInvalidatingStyle(styleName); } public static function get selectors():Array{ return (impl.selectors); } public static function registerSizeInvalidatingStyle(styleName:String):void{ impl.registerSizeInvalidatingStyle(styleName); } public static function clearStyleDeclaration(selector:String, update:Boolean):void{ impl.clearStyleDeclaration(selector, update); } public static function registerColorName(colorName:String, colorValue:uint):void{ impl.registerColorName(colorName, colorValue); } public static function isInheritingTextFormatStyle(styleName:String):Boolean{ return (impl.isInheritingTextFormatStyle(styleName)); } public static function getStyleDeclaration(selector:String):CSSStyleDeclaration{ return (impl.getStyleDeclaration(selector)); } } }//package mx.styles
Section 103
//StyleManagerImpl (mx.styles.StyleManagerImpl) package mx.styles { import mx.core.*; import flash.events.*; import flash.utils.*; import flash.system.*; import mx.modules.*; import mx.events.*; import mx.resources.*; import mx.managers.*; public class StyleManagerImpl implements IStyleManager2 { private var _stylesRoot:Object; private var _selectors:Object; private var styleModules:Object; private var _inheritingStyles:Object; private var resourceManager:IResourceManager; private var _typeSelectorCache:Object; mx_internal static const VERSION:String = "3.4.0.9271"; private static var parentSizeInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true, baseline:true}; private static var colorNames:Object = {transparent:"transparent", black:0, blue:0xFF, green:0x8000, gray:0x808080, silver:0xC0C0C0, lime:0xFF00, olive:0x808000, white:0xFFFFFF, yellow:0xFFFF00, maroon:0x800000, navy:128, red:0xFF0000, purple:0x800080, teal:0x8080, fuchsia:0xFF00FF, aqua:0xFFFF, magenta:0xFF00FF, cyan:0xFFFF, halogreen:8453965, haloblue:40447, haloorange:0xFFB600, halosilver:11455193}; private static var inheritingTextFormatStyles:Object = {align:true, bold:true, color:true, font:true, indent:true, italic:true, size:true}; private static var instance:IStyleManager2; private static var parentDisplayListInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true, baseline:true}; private static var sizeInvalidatingStyles:Object = {borderStyle:true, borderThickness:true, fontAntiAliasType:true, fontFamily:true, fontGridFitType:true, fontSharpness:true, fontSize:true, fontStyle:true, fontThickness:true, fontWeight:true, headerHeight:true, horizontalAlign:true, horizontalGap:true, kerning:true, leading:true, letterSpacing:true, paddingBottom:true, paddingLeft:true, paddingRight:true, paddingTop:true, strokeWidth:true, tabHeight:true, tabWidth:true, verticalAlign:true, verticalGap:true}; public function StyleManagerImpl(){ _selectors = {}; styleModules = {}; resourceManager = ResourceManager.getInstance(); _inheritingStyles = {}; _typeSelectorCache = {}; super(); } public function setStyleDeclaration(selector:String, styleDeclaration:CSSStyleDeclaration, update:Boolean):void{ styleDeclaration.selectorRefCount++; _selectors[selector] = styleDeclaration; typeSelectorCache = {}; if (update){ styleDeclarationsChanged(); }; } public function registerParentDisplayListInvalidatingStyle(styleName:String):void{ parentDisplayListInvalidatingStyles[styleName] = true; } public function getStyleDeclaration(selector:String):CSSStyleDeclaration{ var index:int; if (selector.charAt(0) != "."){ index = selector.lastIndexOf("."); if (index != -1){ selector = selector.substr((index + 1)); }; }; return (_selectors[selector]); } public function set typeSelectorCache(value:Object):void{ _typeSelectorCache = value; } public function isColorName(colorName:String):Boolean{ return (!((colorNames[colorName.toLowerCase()] === undefined))); } public function set inheritingStyles(value:Object):void{ _inheritingStyles = value; } public function getColorNames(colors:Array):void{ var colorNumber:uint; if (!colors){ return; }; var n:int = colors.length; var i:int; while (i < n) { if (((!((colors[i] == null))) && (isNaN(colors[i])))){ colorNumber = getColorName(colors[i]); if (colorNumber != StyleManager.NOT_A_COLOR){ colors[i] = colorNumber; }; }; i++; }; } public function isInheritingTextFormatStyle(styleName:String):Boolean{ return ((inheritingTextFormatStyles[styleName] == true)); } public function registerParentSizeInvalidatingStyle(styleName:String):void{ parentSizeInvalidatingStyles[styleName] = true; } public function registerColorName(colorName:String, colorValue:uint):void{ colorNames[colorName.toLowerCase()] = colorValue; } public function isParentSizeInvalidatingStyle(styleName:String):Boolean{ return ((parentSizeInvalidatingStyles[styleName] == true)); } public function registerInheritingStyle(styleName:String):void{ inheritingStyles[styleName] = true; } public function set stylesRoot(value:Object):void{ _stylesRoot = value; } public function get typeSelectorCache():Object{ return (_typeSelectorCache); } public function isParentDisplayListInvalidatingStyle(styleName:String):Boolean{ return ((parentDisplayListInvalidatingStyles[styleName] == true)); } public function isSizeInvalidatingStyle(styleName:String):Boolean{ return ((sizeInvalidatingStyles[styleName] == true)); } public function styleDeclarationsChanged():void{ var sm:Object; var sms:Array = SystemManagerGlobals.topLevelSystemManagers; var n:int = sms.length; var i:int; while (i < n) { sm = sms[i]; sm.regenerateStyleCache(true); sm.notifyStyleChangeInChildren(null, true); i++; }; } public function isValidStyleValue(value):Boolean{ return (!((value === undefined))); } public function loadStyleDeclarations(url:String, update:Boolean=true, trustContent:Boolean=false):IEventDispatcher{ return (loadStyleDeclarations2(url, update)); } public function get inheritingStyles():Object{ return (_inheritingStyles); } public function unloadStyleDeclarations(url:String, update:Boolean=true):void{ var module:IModuleInfo; var styleModuleInfo:StyleModuleInfo = styleModules[url]; if (styleModuleInfo){ styleModuleInfo.styleModule.unload(); module = styleModuleInfo.module; module.unload(); module.removeEventListener(ModuleEvent.READY, styleModuleInfo.readyHandler); module.removeEventListener(ModuleEvent.ERROR, styleModuleInfo.errorHandler); styleModules[url] = null; }; if (update){ styleDeclarationsChanged(); }; } public function getColorName(colorName:Object):uint{ var n:Number; var c:*; if ((colorName is String)){ if (colorName.charAt(0) == "#"){ n = Number(("0x" + colorName.slice(1))); return ((isNaN(n)) ? StyleManager.NOT_A_COLOR : uint(n)); }; if ((((colorName.charAt(1) == "x")) && ((colorName.charAt(0) == "0")))){ n = Number(colorName); return ((isNaN(n)) ? StyleManager.NOT_A_COLOR : uint(n)); }; c = colorNames[colorName.toLowerCase()]; if (c === undefined){ return (StyleManager.NOT_A_COLOR); }; return (uint(c)); }; return (uint(colorName)); } public function isInheritingStyle(styleName:String):Boolean{ return ((inheritingStyles[styleName] == true)); } public function get stylesRoot():Object{ return (_stylesRoot); } public function initProtoChainRoots():void{ if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ delete _inheritingStyles["textDecoration"]; delete _inheritingStyles["leading"]; }; if (!stylesRoot){ stylesRoot = _selectors["global"].addStyleToProtoChain({}, null); }; } public function loadStyleDeclarations2(url:String, update:Boolean=true, applicationDomain:ApplicationDomain=null, securityDomain:SecurityDomain=null):IEventDispatcher{ var module:IModuleInfo; var styleEventDispatcher:StyleEventDispatcher; var timer:Timer; var timerHandler:Function; var url = url; var update = update; var applicationDomain = applicationDomain; var securityDomain = securityDomain; module = ModuleManager.getModule(url); var readyHandler:Function = function (moduleEvent:ModuleEvent):void{ var styleModule:IStyleModule = IStyleModule(moduleEvent.module.factory.create()); styleModules[moduleEvent.module.url].styleModule = styleModule; if (update){ styleDeclarationsChanged(); }; }; module.addEventListener(ModuleEvent.READY, readyHandler, false, 0, true); styleEventDispatcher = new StyleEventDispatcher(module); var errorHandler:Function = function (moduleEvent:ModuleEvent):void{ var styleEvent:StyleEvent; var errorText:String = resourceManager.getString("styles", "unableToLoad", [moduleEvent.errorText, url]); if (styleEventDispatcher.willTrigger(StyleEvent.ERROR)){ styleEvent = new StyleEvent(StyleEvent.ERROR, moduleEvent.bubbles, moduleEvent.cancelable); styleEvent.bytesLoaded = 0; styleEvent.bytesTotal = 0; styleEvent.errorText = errorText; styleEventDispatcher.dispatchEvent(styleEvent); } else { throw (new Error(errorText)); }; }; module.addEventListener(ModuleEvent.ERROR, errorHandler, false, 0, true); styleModules[url] = new StyleModuleInfo(module, readyHandler, errorHandler); timer = new Timer(0); timerHandler = function (event:TimerEvent):void{ timer.removeEventListener(TimerEvent.TIMER, timerHandler); timer.stop(); module.load(applicationDomain, securityDomain); }; timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true); timer.start(); return (styleEventDispatcher); } public function registerSizeInvalidatingStyle(styleName:String):void{ sizeInvalidatingStyles[styleName] = true; } public function clearStyleDeclaration(selector:String, update:Boolean):void{ var styleDeclaration:CSSStyleDeclaration = getStyleDeclaration(selector); if (((styleDeclaration) && ((styleDeclaration.selectorRefCount > 0)))){ styleDeclaration.selectorRefCount--; }; delete _selectors[selector]; if (update){ styleDeclarationsChanged(); }; } public function get selectors():Array{ var i:String; var theSelectors:Array = []; for (i in _selectors) { theSelectors.push(i); }; return (theSelectors); } public static function getInstance():IStyleManager2{ if (!instance){ instance = new (StyleManagerImpl); }; return (instance); } } }//package mx.styles import flash.events.*; import mx.modules.*; import mx.events.*; class StyleEventDispatcher extends EventDispatcher { private function StyleEventDispatcher(moduleInfo:IModuleInfo){ super(); moduleInfo.addEventListener(ModuleEvent.ERROR, moduleInfo_errorHandler, false, 0, true); moduleInfo.addEventListener(ModuleEvent.PROGRESS, moduleInfo_progressHandler, false, 0, true); moduleInfo.addEventListener(ModuleEvent.READY, moduleInfo_readyHandler, false, 0, true); } private function moduleInfo_progressHandler(event:ModuleEvent):void{ var styleEvent:StyleEvent = new StyleEvent(StyleEvent.PROGRESS, event.bubbles, event.cancelable); styleEvent.bytesLoaded = event.bytesLoaded; styleEvent.bytesTotal = event.bytesTotal; dispatchEvent(styleEvent); } private function moduleInfo_readyHandler(event:ModuleEvent):void{ var styleEvent:StyleEvent = new StyleEvent(StyleEvent.COMPLETE); styleEvent.bytesLoaded = event.bytesLoaded; styleEvent.bytesTotal = event.bytesTotal; dispatchEvent(styleEvent); } private function moduleInfo_errorHandler(event:ModuleEvent):void{ var styleEvent:StyleEvent = new StyleEvent(StyleEvent.ERROR, event.bubbles, event.cancelable); styleEvent.bytesLoaded = event.bytesLoaded; styleEvent.bytesTotal = event.bytesTotal; styleEvent.errorText = event.errorText; dispatchEvent(styleEvent); } } class StyleModuleInfo { public var errorHandler:Function; public var readyHandler:Function; public var module:IModuleInfo; public var styleModule:IStyleModule; private function StyleModuleInfo(module:IModuleInfo, readyHandler:Function, errorHandler:Function){ super(); this.module = module; this.readyHandler = readyHandler; this.errorHandler = errorHandler; } }
Section 104
//ColorUtil (mx.utils.ColorUtil) package mx.utils { import mx.core.*; public class ColorUtil { mx_internal static const VERSION:String = "3.4.0.9271"; public function ColorUtil(){ super(); } public static function adjustBrightness2(rgb:uint, brite:Number):uint{ var r:Number; var g:Number; var b:Number; if (brite == 0){ return (rgb); }; if (brite < 0){ brite = ((100 + brite) / 100); r = (((rgb >> 16) & 0xFF) * brite); g = (((rgb >> 8) & 0xFF) * brite); b = ((rgb & 0xFF) * brite); } else { brite = (brite / 100); r = ((rgb >> 16) & 0xFF); g = ((rgb >> 8) & 0xFF); b = (rgb & 0xFF); r = (r + ((0xFF - r) * brite)); g = (g + ((0xFF - g) * brite)); b = (b + ((0xFF - b) * brite)); r = Math.min(r, 0xFF); g = Math.min(g, 0xFF); b = Math.min(b, 0xFF); }; return ((((r << 16) | (g << 8)) | b)); } public static function rgbMultiply(rgb1:uint, rgb2:uint):uint{ var r1:Number = ((rgb1 >> 16) & 0xFF); var g1:Number = ((rgb1 >> 8) & 0xFF); var b1:Number = (rgb1 & 0xFF); var r2:Number = ((rgb2 >> 16) & 0xFF); var g2:Number = ((rgb2 >> 8) & 0xFF); var b2:Number = (rgb2 & 0xFF); return ((((((r1 * r2) / 0xFF) << 16) | (((g1 * g2) / 0xFF) << 8)) | ((b1 * b2) / 0xFF))); } public static function adjustBrightness(rgb:uint, brite:Number):uint{ var r:Number = Math.max(Math.min((((rgb >> 16) & 0xFF) + brite), 0xFF), 0); var g:Number = Math.max(Math.min((((rgb >> 8) & 0xFF) + brite), 0xFF), 0); var b:Number = Math.max(Math.min(((rgb & 0xFF) + brite), 0xFF), 0); return ((((r << 16) | (g << 8)) | b)); } } }//package mx.utils
Section 105
//GraphicsUtil (mx.utils.GraphicsUtil) package mx.utils { import mx.core.*; import flash.display.*; public class GraphicsUtil { mx_internal static const VERSION:String = "3.4.0.9271"; public function GraphicsUtil(){ super(); } public static function drawRoundRectComplex(graphics:Graphics, x:Number, y:Number, width:Number, height:Number, topLeftRadius:Number, topRightRadius:Number, bottomLeftRadius:Number, bottomRightRadius:Number):void{ var xw:Number = (x + width); var yh:Number = (y + height); var minSize:Number = ((width < height)) ? (width * 2) : (height * 2); topLeftRadius = ((topLeftRadius < minSize)) ? topLeftRadius : minSize; topRightRadius = ((topRightRadius < minSize)) ? topRightRadius : minSize; bottomLeftRadius = ((bottomLeftRadius < minSize)) ? bottomLeftRadius : minSize; bottomRightRadius = ((bottomRightRadius < minSize)) ? bottomRightRadius : minSize; var a:Number = (bottomRightRadius * 0.292893218813453); var s:Number = (bottomRightRadius * 0.585786437626905); graphics.moveTo(xw, (yh - bottomRightRadius)); graphics.curveTo(xw, (yh - s), (xw - a), (yh - a)); graphics.curveTo((xw - s), yh, (xw - bottomRightRadius), yh); a = (bottomLeftRadius * 0.292893218813453); s = (bottomLeftRadius * 0.585786437626905); graphics.lineTo((x + bottomLeftRadius), yh); graphics.curveTo((x + s), yh, (x + a), (yh - a)); graphics.curveTo(x, (yh - s), x, (yh - bottomLeftRadius)); a = (topLeftRadius * 0.292893218813453); s = (topLeftRadius * 0.585786437626905); graphics.lineTo(x, (y + topLeftRadius)); graphics.curveTo(x, (y + s), (x + a), (y + a)); graphics.curveTo((x + s), y, (x + topLeftRadius), y); a = (topRightRadius * 0.292893218813453); s = (topRightRadius * 0.585786437626905); graphics.lineTo((xw - topRightRadius), y); graphics.curveTo((xw - s), y, (xw - a), (y + a)); graphics.curveTo(xw, (y + s), xw, (y + topRightRadius)); graphics.lineTo(xw, (yh - bottomRightRadius)); } } }//package mx.utils
Section 106
//NameUtil (mx.utils.NameUtil) package mx.utils { import mx.core.*; import flash.utils.*; import flash.display.*; public class NameUtil { mx_internal static const VERSION:String = "3.4.0.9271"; private static var counter:int = 0; public function NameUtil(){ super(); } public static function displayObjectToString(displayObject:DisplayObject):String{ var result:String; var o:DisplayObject; var s:String; var indices:Array; var displayObject = displayObject; o = displayObject; while (o != null) { if (((((o.parent) && (o.stage))) && ((o.parent == o.stage)))){ break; }; s = o.name; if ((o is IRepeaterClient)){ indices = IRepeaterClient(o).instanceIndices; if (indices){ s = (s + (("[" + indices.join("][")) + "]")); }; }; result = ((result == null)) ? s : ((s + ".") + result); o = o.parent; }; //unresolved jump var _slot1 = e; return (result); } public static function createUniqueName(object:Object):String{ if (!object){ return (null); }; var name:String = getQualifiedClassName(object); var index:int = name.indexOf("::"); if (index != -1){ name = name.substr((index + 2)); }; var charCode:int = name.charCodeAt((name.length - 1)); if ((((charCode >= 48)) && ((charCode <= 57)))){ name = (name + "_"); }; return ((name + counter++)); } } }//package mx.utils
Section 107
//StringUtil (mx.utils.StringUtil) package mx.utils { import mx.core.*; public class StringUtil { mx_internal static const VERSION:String = "3.4.0.9271"; public function StringUtil(){ super(); } public static function trim(str:String):String{ if (str == null){ return (""); }; var startIndex:int; while (isWhitespace(str.charAt(startIndex))) { startIndex++; }; var endIndex:int = (str.length - 1); while (isWhitespace(str.charAt(endIndex))) { endIndex--; }; if (endIndex >= startIndex){ return (str.slice(startIndex, (endIndex + 1))); }; return (""); } public static function isWhitespace(character:String):Boolean{ switch (character){ case " ": case "\t": case "\r": case "\n": case "\f": return (true); default: return (false); }; } public static function substitute(str:String, ... _args):String{ var args:Array; if (str == null){ return (""); }; var len:uint = _args.length; if ((((len == 1)) && ((_args[0] is Array)))){ args = (_args[0] as Array); len = args.length; } else { args = _args; }; var i:int; while (i < len) { str = str.replace(new RegExp((("\\{" + i) + "\\}"), "g"), args[i]); i++; }; return (str); } public static function trimArrayElements(value:String, delimiter:String):String{ var items:Array; var len:int; var i:int; if (((!((value == ""))) && (!((value == null))))){ items = value.split(delimiter); len = items.length; i = 0; while (i < len) { items[i] = StringUtil.trim(items[i]); i++; }; if (len > 0){ value = items.join(delimiter); }; }; return (value); } } }//package mx.utils
Section 108
//OvpError (org.openvideoplayer.events.OvpError) package org.openvideoplayer.events { public class OvpError { private var _desc:String; private var _num:uint; public static const CLASS_BUSY:uint = 17; public static const HTTP_LOAD_FAILED:uint = 14; public static const NETWORK_FAILED:uint = 12; public static const XML_BOSS_MALFORMED:uint = 18; private static const _errorMap:Array = [{n:HOSTNAME_EMPTY, d:"Hostname cannot be empty"}, {n:BUFFER_LENGTH, d:"Buffer length must be > 0.1"}, {n:PROTOCOL_NOT_SUPPORTED, d:"Warning - this protocol is not supported"}, {n:PORT_NOT_SUPPORTED, d:"Warning - this port is not supported"}, {n:IDENT_REQUEST_FAILED, d:"Warning - unable to load XML data from ident request, will use domain name to connect"}, {n:CONNECTION_TIMEOUT, d:"Timed out while trying to connect"}, {n:STREAM_NOT_DEFINED, d:"Cannot play, pause, seek, or resume since the stream is not defined"}, {n:STREAM_NOT_FOUND, d:"Timed out trying to find the stream"}, {n:STREAM_LENGTH_REQ_ERROR, d:"Error requesting stream length"}, {n:VOLUME_OUT_OF_RANGE, d:"Volume value out of range"}, {n:NETWORK_FAILED, d:"Network failure - unable to play the live stream"}, {n:HTTP_LOAD_FAILED, d:"HTTP loading operation failed"}, {n:XML_MALFORMED, d:"XML is not well formed"}, {n:XML_MEDIARSS_MALFORMED, d:"XML does not conform to Media RSS standard"}, {n:CLASS_BUSY, d:"Class is busy and cannot process your request"}, {n:XML_BOSS_MALFORMED, d:"XML does not conform to BOSS standard"}, {n:STREAM_FASTSTART_INVALID, d:"The Fast Start feature cannot be used with live streams"}, {n:XML_LOAD_TIMEOUT, d:"Timed out trying to load the XML file"}, {n:STREAM_IO_ERROR, d:"NetStream IO Error event"}, {n:STREAM_BUFFER_EMPTY, d:"NetStream buffer has remained empty past timeout threshold"}, {n:INVALID_CUEPOINT_NAME, d:"Invalid cue point name - cannot be null or undefined"}, {n:INVALID_CUEPOINT_TIME, d:"Invalid cue point time - must be a number greater than zero"}, {n:INVALID_CUEPOINT, d:"Invalid cue point object - must contain a 'name' and 'time' properties"}, {n:INVALID_INDEX, d:"Attempting to switch to an invalid index in a multi-bitrate stream"}, {n:INVALID_ARGUMENT, d:"Invalid argument passed to property or method"}, {n:INVALID_CAPTION_FONT_SIZE, d:"Invalid caption font size specified. '%', '+', '-' are not supported"}]; public static const PROTOCOL_NOT_SUPPORTED:uint = 3; public static const STREAM_NOT_DEFINED:uint = 8; public static const HOSTNAME_EMPTY:uint = 1; public static const INVALID_CUEPOINT:uint = 27; public static const INVALID_CUEPOINT_TIME:uint = 26; public static const VOLUME_OUT_OF_RANGE:uint = 11; public static const INVALID_ARGUMENT:uint = 29; public static const STREAM_LENGTH_REQ_ERROR:uint = 10; public static const XML_LOAD_TIMEOUT:uint = 20; public static const PORT_NOT_SUPPORTED:uint = 4; public static const BUFFER_LENGTH:uint = 2; public static const INVALID_INDEX:uint = 28; public static const STREAM_BUFFER_EMPTY:uint = 24; public static const INVALID_CAPTION_FONT_SIZE:uint = 30; public static const XML_MEDIARSS_MALFORMED:uint = 16; public static const XML_MALFORMED:uint = 15; public static const STREAM_NOT_FOUND:uint = 9; public static const IDENT_REQUEST_FAILED:uint = 5; public static const CONNECTION_TIMEOUT:uint = 6; public static const INVALID_CUEPOINT_NAME:uint = 25; public static const STREAM_IO_ERROR:uint = 21; public static const STREAM_FASTSTART_INVALID:uint = 19; public function OvpError(errorCode:uint){ super(); this._num = errorCode; this._desc = ""; var i:uint; while (i < _errorMap.length) { if (_errorMap[i].n == this._num){ this._desc = _errorMap[i].d; break; }; i++; }; } public function get errorNumber():uint{ return (this._num); } public function get errorDescription():String{ return (this._desc); } } }//package org.openvideoplayer.events
Section 109
//OvpEvent (org.openvideoplayer.events.OvpEvent) package org.openvideoplayer.events { import flash.events.*; public class OvpEvent extends Event { private var _data:Object; public static const SWITCH_REQUESTED:String = "switchRequested"; public static const STREAM_LENGTH:String = "streamlength"; public static const LOADED:String = "loaded"; public static const FCSUBSCRIBE:String = "fcsubscribe"; public static const BANDWIDTH:String = "bandwidth"; public static const PARSED:String = "parsed"; public static const SUBSCRIBE_ATTEMPT:String = "subscribeattempt"; public static const NETSTREAM_TEXTDATA:String = "textdata"; public static const NETSTREAM_XMPDATA:String = "xmpdata"; public static const PROGRESS:String = "progress"; public static const MP3_ID3:String = "id3"; public static const DEBUG:String = "debug"; public static const ONLASTSECOND:String = "onLastSecond"; public static const COMPLETE:String = "complete"; public static const UNSUBSCRIBED:String = "unsubscribed"; public static const TIMEOUT:String = "timeout"; public static const ASYNC_ERROR:String = "asyncerror"; public static const FCUNSUBSCRIBE:String = "fcunsubscribe"; public static const CAPTION:String = "caption"; public static const SUBSCRIBED:String = "subscribed"; public static const ONFI:String = "onfi"; public static const NETSTREAM_IMAGEDATA:String = "imagedata"; public static const SWITCH_COMPLETE:String = "switchComplete"; public static const ERROR:String = "error"; public static const DATA_MESSAGE:String = "datamessage"; public static const NETSTREAM_PLAYSTATUS:String = "playstatus"; public static const NETSTREAM_METADATA:String = "metadata"; public static const SWITCH_ACKNOWLEDGED:String = "switchAcknowledged"; public static const NETSTREAM_CUEPOINT:String = "cuepoint"; public function OvpEvent(type:String, data:Object=null){ this._data = data; super(type); } public function get data():Object{ return (this._data); } override public function clone():Event{ return (new OvpEvent(type, this.data)); } } }//package org.openvideoplayer.events
Section 110
//INetConnection (org.openvideoplayer.net.INetConnection) package org.openvideoplayer.net { import flash.events.*; import flash.net.*; public interface INetConnection extends IEventDispatcher { function set objectEncoding(Boolean:uint):void; function get proxyType():String; function get connected():Boolean; function connect(Boolean:String, ... _args):void; function get uri():String; function addHeader(_arg1:String, _arg2:Boolean=false, _arg3:Object=null):void; function set proxyType(Boolean:String):void; function get objectEncoding():uint; function get usingTLS():Boolean; function close():void; function call(_arg1:String, _arg2:Responder, ... _args):void; function get connectedProxyType():String; } }//package org.openvideoplayer.net
Section 111
//OvpClientProxy (org.openvideoplayer.net.OvpClientProxy) package org.openvideoplayer.net { import flash.utils.*; public dynamic class OvpClientProxy extends Proxy { private var handlers:Dictionary; public function OvpClientProxy(){ this.handlers = new Dictionary(); super(); } public function addHandler(name:String, handler:Function):void{ var handlersForName:Array = (this.handlers.hasOwnProperty(name)) ? this.handlers[name] : this.handlers[name] = []; if (handlersForName.indexOf(handler) == -1){ handlersForName.push(handler); }; } private function invokeHandlers(name:String, args:Array){ var result:Array; var handler:Function; var handlersForName:Array; if (this.handlers.hasOwnProperty(name)){ result = []; handlersForName = this.handlers[name]; for each (handler in handlersForName) { result.push(handler.apply(null, args)); }; }; if (this.handlers.hasOwnProperty("all")){ result = []; handlersForName = this.handlers["all"]; for each (handler in handlersForName) { args.unshift(name); result.push(handler.apply(null, args)); }; }; return (result); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function callProperty(methodName, ... _args){ return (this.invokeHandlers(methodName, _args)); } public function removeHandler(name:String, handler:Function):Boolean{ var result:Boolean; var handlersForName:Array; var index:int; if (this.handlers.hasOwnProperty(name)){ handlersForName = this.handlers[name]; index = handlersForName.indexOf(handler); if (index != -1){ handlersForName.splice(index, 1); result = true; }; }; return (result); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(name){ var result:*; var name = name; result = function (){ return (invokeHandlers(arguments.callee.name, arguments)); }; result.name = name; return (result); } } }//package org.openvideoplayer.net
Section 112
//OvpConnection (org.openvideoplayer.net.OvpConnection) package org.openvideoplayer.net { import flash.events.*; import flash.utils.*; import org.openvideoplayer.events.*; import flash.net.*; import org.openvideoplayer.utilities.*; public class OvpConnection extends EventDispatcher implements INetConnection { private const TIMEOUT:uint = 15000; protected const VERSION:String = "2.1.0"; protected var _isProgressive:Boolean; protected var _aConnections:Array; protected var _serverVersion:String; protected var _aNC:Array; protected var _appNameInstName:String; protected var _liveStreamMasterTimeout:uint; protected var _aboutToStop:uint; protected var _nc:NetConnection; protected var _cacheable:Boolean; protected var _port:String; protected var _timeOutTimer:Timer; protected var _actualProtocol:String; protected var _attemptInterval:uint; protected var _successfullySubscribed:Boolean; protected var _connectionAttempt:uint; protected var _pendingLiveStreamName:String; protected var _hostName:String; protected var _connectionTimer:Timer; protected var _actualPort:String; protected var _liveStreamAuthParams:String; protected var _bufferFailureTimer:Timer; protected var _connectionEstablished:Boolean; protected var _timeOutTimerDelay:Number; protected var _playingLiveStream:Boolean; protected var _urlLoader:URLLoader; protected var _authParams:String; protected var _protocol:String; protected var _connectionArgs:Array; public function OvpConnection(){ super(); NetConnection.defaultObjectEncoding = ObjectEncoding.AMF3; this._liveStreamMasterTimeout = 3600000; this._port = "any"; this._protocol = "any"; this._authParams = ""; this._liveStreamAuthParams = ""; this._aboutToStop = 0; this._isProgressive = false; this._serverVersion = ""; this._cacheable = false; this._attemptInterval = 200; this._timeOutTimerDelay = this.TIMEOUT; this._timeOutTimer = new Timer(this._timeOutTimerDelay, 1); this._timeOutTimer.addEventListener(TimerEvent.TIMER_COMPLETE, this.masterTimeout); this._connectionTimer = new Timer(200); this._connectionTimer.addEventListener(TimerEvent.TIMER, this.tryToConnect); } public function get isProgressive():Boolean{ return (this._isProgressive); } public function get connected():Boolean{ if (((this._nc) && ((this._nc is NetConnection)))){ return (this._nc.connected); }; return (false); } public function get serverIPaddress():String{ return ((this._connectionEstablished) ? this._hostName : null); } protected function netSecurityError(event:SecurityErrorEvent):void{ dispatchEvent(event); } public function get requestedPort():String{ return (this._port); } public function serverVersion(info:Object):String{ if (!info){ return (this._serverVersion); }; if (((((!(this._serverVersion)) || (!(this._serverVersion.length)))) || ((this._serverVersion == "")))){ info.major = (info.minor = (info.subMinor = (info.build = 0))); return (this._serverVersion); }; var _aVer:Array = this._serverVersion.split(","); info.major = parseInt(_aVer[0]); info.minor = parseInt(_aVer[1]); info.subMinor = parseInt(_aVer[2]); info.build = parseInt(_aVer[3]); return (this._serverVersion); } private function onStreamLengthFault(info:Object):void{ dispatchEvent(new OvpEvent(OvpEvent.ERROR, new OvpError(OvpError.STREAM_LENGTH_REQ_ERROR))); } protected function contains(prop:String, str:String):Boolean{ var s:String; var a:Array = prop.split(","); for each (s in a) { if (s.toLowerCase() == str){ return (true); }; }; return (false); } public function set requestedPort(p:String):void{ this._port = p; } public function get requestedProtocol():String{ return (this._protocol); } public function get actualPort():String{ return ((this._connectionEstablished) ? this._actualPort : null); } public function get appNameInstanceName():String{ return (this._appNameInstName); } protected function handleGoodConnect():void{ this._connectionEstablished = true; var info:Object = new Object(); info.code = "NetConnection.Connect.Success"; info.description = "Connection succeeded."; info.level = "status"; dispatchEvent(new NetStatusEvent(NetStatusEvent.NET_STATUS, false, false, info)); } protected function setUpProgressiveConnection():void{ this._isProgressive = true; this._nc = new NetConnection(); this._nc.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.netSecurityError); this._nc.addEventListener(AsyncErrorEvent.ASYNC_ERROR, this.asyncError); this._nc.connect(null); this.handleGoodConnect(); } public function get actualProtocol():String{ return ((this._connectionEstablished) ? this._actualProtocol : null); } public function set requestedProtocol(p:String):void{ this._protocol = p; } public function detectBandwidth():Boolean{ if (((this._nc) && (this._connectionEstablished))){ this._nc.call("_checkbw", null); }; return (this._connectionEstablished); } public function get hostName():String{ return (this._hostName); } public function onFCUnsubscribe(info:Object):void{ if (info.code == "NetStream.Play.Stop"){ dispatchEvent(new OvpEvent(OvpEvent.FCUNSUBSCRIBE, info)); }; } public function reconnect():void{ this._connectionEstablished = false; this.buildConnectionSequence(); } public function get defaultObjectEncoding():uint{ return (NetConnection.defaultObjectEncoding); } public function get netConnection():NetConnection{ return (this._nc); } public function _onbwdone(latencyInMs:Number, bandwidthInKbps:Number):void{ var data:Object = new Object(); data.bandwidth = bandwidthInKbps; data.latency = latencyInMs; dispatchEvent(new OvpEvent(OvpEvent.BANDWIDTH, data)); } public function get timeout():Number{ return (this._timeOutTimerDelay); } public function set attemptInterval(value:uint):void{ this._attemptInterval = value; } public function call(command:String, responder:Responder, ... _args):void{ var args:Array; if (((this._nc) && ((this._nc is NetConnection)))){ args = [command, responder].concat(_args); this._nc.call.apply(this._nc, args); }; } protected function handleRejectedOrInvalid(event:NetStatusEvent):void{ this._timeOutTimer.stop(); this._connectionTimer.stop(); var i:uint; while (i < this._aNC.length) { this._aNC[i].close(); this._aNC[i] = null; i++; }; dispatchEvent(event); dispatchEvent(new OvpEvent(OvpEvent.ERROR, new OvpError(OvpError.CONNECTION_TIMEOUT))); } protected function buildConnectionAddress(protocol:String, port:String):String{ var address:String = ((((((protocol + "://") + this._hostName) + ":") + port) + "/") + this._appNameInstName); return (address); } protected function tryToConnect(evt:TimerEvent):void{ var evt = evt; this._aNC[this._connectionAttempt] = new NetConnection(); this._aNC[this._connectionAttempt].addEventListener(NetStatusEvent.NET_STATUS, this.netStatus); this._aNC[this._connectionAttempt].addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.netSecurityError); this._aNC[this._connectionAttempt].addEventListener(AsyncErrorEvent.ASYNC_ERROR, this.asyncError); this._aNC[this._connectionAttempt].client = new Object(); this._aNC[this._connectionAttempt].client.id = this._connectionAttempt; this._aNC[this._connectionAttempt].client._onbwcheck = this._onbwcheck; this._aNC[this._connectionAttempt].client._onbwdone = this._onbwdone; this._aNC[this._connectionAttempt].client.onFCSubscribe = this.onFCSubscribe; this._aNC[this._connectionAttempt].client.onFCUnsubscribe = this.onFCUnsubscribe; try { this._aNC[this._connectionAttempt].connect(this._aConnections[this._connectionAttempt].address, this._connectionArgs); //unresolved jump var _slot1 = error; } finally { this._connectionAttempt++; if (this._connectionAttempt >= this._aConnections.length){ this._connectionTimer.stop(); }; }; } public function get uri():String{ if (((this._nc) && ((this._nc is NetConnection)))){ return (this._nc.uri); }; return (""); } public function set objectEncoding(value:uint):void{ if (((this._nc) && ((this._nc is NetConnection)))){ this._nc.objectEncoding = value; }; } private function onStreamLengthResult(streamLength:Number):void{ var data:Object = new Object(); data.streamLength = streamLength; dispatchEvent(new OvpEvent(OvpEvent.STREAM_LENGTH, data)); } public function addHeader(operation:String, mustUnderstand:Boolean=false, param:Object=null):void{ if (((this._nc) && ((this._nc is NetConnection)))){ this._nc.addHeader(operation, mustUnderstand, param); }; } public function set proxyType(value:String):void{ if (((this._nc) && ((this._nc is NetConnection)))){ this._nc.proxyType = value; }; } public function _onbwcheck(data:Object, ctx:Number):Number{ return (ctx); } public function set defaultObjectEncoding(value:uint):void{ switch (value){ case ObjectEncoding.AMF0: case ObjectEncoding.AMF3: case ObjectEncoding.DEFAULT: NetConnection.defaultObjectEncoding = value; break; default: dispatchEvent(new OvpEvent(OvpEvent.ERROR, new OvpError(OvpError.INVALID_ARGUMENT))); }; } protected function masterTimeout(evt:Event):void{ var i:uint; while (i < this._aNC.length) { this._aNC[i].close(); this._aNC[i] = null; i++; }; dispatchEvent(new OvpEvent(OvpEvent.ERROR, new OvpError(OvpError.CONNECTION_TIMEOUT))); } public function requestStreamLength(filename:String):Boolean{ if (((!(this._connectionEstablished)) || ((filename == "")))){ return (false); }; if (((this._nc) && ((this._nc is NetConnection)))){ this._nc.call("getStreamLength", new Responder(this.onStreamLengthResult, this.onStreamLengthFault), ((filename.indexOf("?"))!=-1) ? filename.slice(0, filename.indexOf("?")) : filename); }; return (true); } protected function buildPortProtocolSequence():Array{ var aPort:Array; var aProtocol:Array; var pr:Number; var po:Number; var aTemp:Array = new Array(); if ((((this._port == "any")) && ((this._protocol == "any")))){ aTemp = [{port:"1935", protocol:"rtmp"}, {port:"443", protocol:"rtmp"}, {port:"80", protocol:"rtmp"}, {port:"80", protocol:"rtmpt"}, {port:"443", protocol:"rtmpt"}, {port:"1935", protocol:"rtmpt"}, {port:"1935", protocol:"rtmpe"}, {port:"443", protocol:"rtmpe"}, {port:"80", protocol:"rtmpe"}, {port:"80", protocol:"rtmpte"}, {port:"443", protocol:"rtmpte"}, {port:"1935", protocol:"rtmpte"}]; } else { if (this.contains(this._port, "any")){ this._port = "1935,443,80"; }; if (this.contains(this._protocol, "any")){ this._protocol = "rtmp,rtmpt,rtmpe,rtmpte"; }; aPort = this._port.split(","); aProtocol = this._protocol.split(","); pr = 0; while (pr < aProtocol.length) { po = 0; while (po < aPort.length) { aTemp.push({port:aPort[po], protocol:aProtocol[pr]}); po++; }; pr++; }; }; return (aTemp); } public function get connectedProxyType():String{ if (((this._nc) && ((this._nc is NetConnection)))){ return (this._nc.connectedProxyType); }; return (""); } public function get objectEncoding():uint{ if (((this._nc) && ((this._nc is NetConnection)))){ return (this._nc.objectEncoding); }; return (ObjectEncoding.DEFAULT); } public function set timeout(value:Number):void{ this._timeOutTimerDelay = value; } public function get proxyType():String{ if (((this._nc) && ((this._nc is NetConnection)))){ return (this._nc.proxyType); }; return (""); } public function set cacheable(value:Boolean):void{ this._cacheable = value; } public function streamLengthAsTimeCode(value:Number):String{ return (TimeUtil.timeCode(value)); } public function onFCSubscribe(info:Object):void{ dispatchEvent(new OvpEvent(OvpEvent.FCSUBSCRIBE, info)); } public function get cacheable():Boolean{ return (this._cacheable); } public function get usingTLS():Boolean{ if (((this._nc) && ((this._nc is NetConnection)))){ return (this._nc.usingTLS); }; return (false); } public function get attemptInterval():uint{ return (this._attemptInterval); } protected function buildConnectionSequence():void{ var connectionObject:Object; var address:String; var aPortProtocol:Array = this.buildPortProtocolSequence(); this._aConnections = new Array(); this._aNC = new Array(); var a:uint; while (a < aPortProtocol.length) { connectionObject = new Object(); address = this.buildConnectionAddress(aPortProtocol[a].protocol, aPortProtocol[a].port); connectionObject.address = address; connectionObject.port = aPortProtocol[a].port; connectionObject.protocol = aPortProtocol[a].protocol; this._aConnections.push(connectionObject); a++; }; this._timeOutTimer.delay = this._timeOutTimerDelay; this._timeOutTimer.reset(); this._timeOutTimer.start(); this._connectionAttempt = 0; this._connectionTimer.reset(); this._connectionTimer.delay = ((this._authParams == "")) ? this._attemptInterval : (this._attemptInterval + 150); this._connectionTimer.start(); this.tryToConnect(null); } protected function asyncError(event:AsyncErrorEvent):void{ dispatchEvent(event); } public function connect(command:String, ... _args):void{ this._connectionArgs = _args; if ((((command == null)) || ((command == "null")))){ this.setUpProgressiveConnection(); return; }; if (command == ""){ dispatchEvent(new OvpEvent(OvpEvent.ERROR, new OvpError(OvpError.HOSTNAME_EMPTY))); return; }; this._isProgressive = false; this._hostName = ((command.indexOf("/"))!=-1) ? command.slice(0, command.indexOf("/")) : command; this._appNameInstName = (((!((command.indexOf("/") == -1))) && (!((command.indexOf("/") == (command.length - 1)))))) ? command.slice((command.indexOf("/") + 1)) : ""; this._connectionEstablished = false; this.buildConnectionSequence(); } protected function netStatus(event:NetStatusEvent):void{ var i:uint; if (this._connectionEstablished){ dispatchEvent(event); }; switch (event.info.code){ case "NetConnection.Connect.InvalidApp": case "NetConnection.Connect.Rejected": break; case "NetConnection.Call.Failed": if (event.info.description.indexOf("_checkbw") != -1){ event.target.expectBWDone = true; event.target.call("checkBandwidth", null); }; break; case "NetConnection.Connect.Success": this._timeOutTimer.stop(); this._connectionTimer.stop(); i = 0; while (i < this._aNC.length) { if (((this._aNC[i]) && (!((i == event.target.client.id))))){ this._aNC[i].close(); this._aNC[i] = null; }; i++; }; this._nc = NetConnection(event.target); this._actualPort = this._aConnections[this._nc.client.id].port; this._actualProtocol = this._aConnections[this._nc.client.id].protocol; if (((event.info.data) && (event.info.data.version))){ this._serverVersion = event.info.data.version; }; this.handleGoodConnect(); break; }; } public function close():void{ if (((this._nc) && (this._connectionEstablished))){ this._nc.close(); this._connectionEstablished = false; }; } } }//package org.openvideoplayer.net
Section 113
//OvpNetStream (org.openvideoplayer.net.OvpNetStream) package org.openvideoplayer.net { import flash.events.*; import flash.utils.*; import org.openvideoplayer.events.*; import flash.media.*; import flash.net.*; import org.openvideoplayer.utilities.*; public class OvpNetStream extends NetStream { private const BUFFER_FAILURE_INTERVAL:Number = 20000; private const DEFAULT_STREAM_TIMEOUT:Number = 5000; private const DEFAULT_PROGRESS_INTERVAL:Number = 100; protected var _isProgressive:Boolean; protected var _panning:Number; protected var _progressTimer:Timer; protected var _maxBufferLength:uint; protected var _volume:Number; protected var _streamTimeout:uint; protected var _createPDLPauseAndResumeEvents:Boolean; protected var _clientObject:Object; protected var _aboutToStop:uint; protected var _watchForBufferFailure:Boolean; protected var _nc:NetConnection; protected var _isLive:Boolean; protected var _isBuffering:Boolean; protected var _bufferFailureTimer:Timer; protected var _useFastStartBuffer:Boolean; protected var _streamLength:Number; protected var _streamTimer:Timer; protected var _nsId3:OvpNetStream; public function OvpNetStream(connection:Object){ var _connection:NetConnection; if ((connection is NetConnection)){ _connection = NetConnection(connection); } else { if ((connection is OvpConnection)){ _connection = NetConnection(connection.netConnection); }; }; super(_connection); this._isProgressive = ((((_connection.uri == null)) || ((_connection.uri == "null")))) ? true : false; this._nc = _connection; this._clientObject = null; this._maxBufferLength = 3; this.bufferTime = this._maxBufferLength; this._useFastStartBuffer = false; this._aboutToStop = 0; this._isBuffering = false; this._watchForBufferFailure = false; this._volume = 1; this._panning = 0; this._streamLength = 0; this._isLive = false; this._createPDLPauseAndResumeEvents = false; this._nc.addEventListener(NetStatusEvent.NET_STATUS, this.connectionStatus); addEventListener(NetStatusEvent.NET_STATUS, this.streamStatus); addEventListener(AsyncErrorEvent.ASYNC_ERROR, this.asyncErrorHandler); this._progressTimer = new Timer(this.DEFAULT_PROGRESS_INTERVAL); this._progressTimer.addEventListener(TimerEvent.TIMER, this.updateProgress); this._bufferFailureTimer = new Timer(this.BUFFER_FAILURE_INTERVAL, 1); this._bufferFailureTimer.addEventListener(TimerEvent.TIMER_COMPLETE, this.handleBufferFailure); this._streamTimer = new Timer(this.DEFAULT_STREAM_TIMEOUT); this._streamTimer.addEventListener(TimerEvent.TIMER_COMPLETE, this.streamTimeoutHandler); var clientProxy:OvpClientProxy = new OvpClientProxy(); clientProxy.addHandler("all", this.onAllCallBacks); super.client = clientProxy; } public function set createProgressivePauseEvents(value:Boolean):void{ this._createPDLPauseAndResumeEvents = value; } public function get isProgressive():Boolean{ return (this._isProgressive); } protected function onPlayStatus(info:Object):void{ dispatchEvent(new OvpEvent(OvpEvent.NETSTREAM_PLAYSTATUS, info)); if (info.code == "NetStream.Play.Complete"){ dispatchEvent(new OvpEvent(OvpEvent.COMPLETE)); this._bufferFailureTimer.reset(); }; } public function get streamLength():Number{ return (this._streamLength); } public function set bufferTimeout(value:Number):void{ this._bufferFailureTimer.delay = value; } protected function onAllCallBacks(... _args):void{ var message_value:Object = _args[1]; var message_name:String = (_args[0] as String); if (((!((this._clientObject == null))) && (this._clientObject.hasOwnProperty(message_name)))){ (this._clientObject[message_name] as Function).apply(this, [message_value]); }; switch (message_name){ case "onMetaData": this.onMetaData(message_value); break; case "onCuePoint": this.onCuePoint(message_value); break; case "onPlayStatus": this.onPlayStatus(message_value); break; case "onXMPData": this.onXMPData(message_value); break; case "onImageData": this.onImageData(message_value); break; case "onTextData": this.onTextData(message_value); break; case "onFI": this.onFI(message_value); break; case "onId3": this.onId3(message_value); break; case "onLastSecond": this.onLastSecond(message_value); break; default: dispatchEvent(new OvpEvent(OvpEvent.DATA_MESSAGE, {name:message_name, value:message_value})); break; }; } protected function onXMPData(info:Object):void{ dispatchEvent(new OvpEvent(OvpEvent.NETSTREAM_XMPDATA, info)); } protected function handleBufferFailure(e:TimerEvent):void{ if (((!(this._isProgressive)) && ((super.bufferLength == 0)))){ dispatchEvent(new OvpEvent(OvpEvent.ERROR, new OvpError(OvpError.STREAM_BUFFER_EMPTY))); }; } public function get bufferTimeout():Number{ return (this._bufferFailureTimer.delay); } public function set streamTimeout(numOfSeconds:Number):void{ this._streamTimeout = (numOfSeconds * 1000); this._streamTimer.delay = this._streamTimeout; } protected function handleEnd():void{ if (((this._nc) && ((this._nc.uri == "null")))){ dispatchEvent(new OvpEvent(OvpEvent.COMPLETE)); }; } public function set maxBufferLength(length:Number):void{ if (length < 0.1){ dispatchEvent(new OvpEvent(OvpEvent.ERROR, new OvpError(OvpError.BUFFER_LENGTH))); } else { this._maxBufferLength = length; this.bufferTime = this._maxBufferLength; }; } protected function onImageData(info:Object):void{ dispatchEvent(new OvpEvent(OvpEvent.NETSTREAM_IMAGEDATA, info)); } public function get isBuffering():Boolean{ return (this._isBuffering); } protected function onFI(info:Object):void{ dispatchEvent(new OvpEvent(OvpEvent.ONFI, info)); } protected function onCuePoint(info:Object):void{ dispatchEvent(new OvpEvent(OvpEvent.NETSTREAM_CUEPOINT, info)); } public function set progressInterval(delay:Number):void{ this._progressTimer.delay = delay; } override public function set client(client:Object):void{ this._clientObject = client; } public function get volume():Number{ return (this._volume); } public function getMp3Id3Info(filename:String):Boolean{ if (((!(this._nc)) || (!(this._nc.connected)))){ return (false); }; if (!(this._nsId3 is OvpNetStream)){ this._nsId3 = new OvpNetStream(this._nc); this._nsId3.addEventListener(Event.ID3, this.onId3); }; if ((((filename.slice(0, 4) == "mp3:")) || ((filename.slice(0, 4) == "id3:")))){ filename = filename.slice(4); }; this._nsId3.play(("id3:" + filename)); return (true); } override public function resume():void{ var info:Object; super.resume(); if (((this._isProgressive) && (this._createPDLPauseAndResumeEvents))){ info = new Object(); info.code = "NetStream.Unpause.Notify"; info.description = "The stream is resumed."; info.level = "status"; dispatchEvent(new NetStatusEvent(NetStatusEvent.NET_STATUS, false, false, info)); }; } protected function updateProgress(e:TimerEvent):void{ dispatchEvent(new OvpEvent(OvpEvent.PROGRESS)); } protected function onLastSecond(info:Object):void{ dispatchEvent(new OvpEvent(OvpEvent.ONLASTSECOND, info)); } public function set panning(panning:Number):void{ if ((((panning < -1)) || ((panning > 1)))){ dispatchEvent(new OvpEvent(OvpEvent.ERROR, new OvpError(OvpError.VOLUME_OUT_OF_RANGE))); return; }; this._panning = panning; soundTransform = new SoundTransform(this._volume, this._panning); } public function get isLive():Boolean{ return (this._isLive); } public function set volume(vol:Number):void{ if ((((vol < 0)) || ((vol > 1)))){ dispatchEvent(new OvpEvent(OvpEvent.ERROR, new OvpError(OvpError.VOLUME_OUT_OF_RANGE))); return; }; this._volume = vol; soundTransform = new SoundTransform(this._volume, this._panning); } protected function asyncErrorHandler(event:AsyncErrorEvent):void{ dispatchEvent(new OvpEvent(OvpEvent.ASYNC_ERROR, event.text)); } public function get useFastStartBuffer():Boolean{ return (this._useFastStartBuffer); } override public function play(... _args):void{ super.play.apply(this, _args); if (!this._progressTimer.running){ this._progressTimer.start(); }; if (!this._streamTimer.running){ this._streamTimer.start(); }; } protected function onId3(info:Object):void{ dispatchEvent(new OvpEvent(OvpEvent.MP3_ID3, info)); } public function get createProgressivePauseEvents():Boolean{ return (this._createPDLPauseAndResumeEvents); } public function get streamTimeout():Number{ return ((this._streamTimeout / 1000)); } protected function onMetaData(info:Object):void{ var data:Object; dispatchEvent(new OvpEvent(OvpEvent.NETSTREAM_METADATA, info)); if (((this._isProgressive) && (!(isNaN(info["duration"]))))){ data = new Object(); data.streamLength = Number(info["duration"]); this._streamLength = data.streamLength; dispatchEvent(new OvpEvent(OvpEvent.STREAM_LENGTH, data)); }; } protected function streamTimeoutHandler(e:TimerEvent):void{ dispatchEvent(new OvpEvent(OvpEvent.ERROR, new OvpError(OvpError.STREAM_NOT_FOUND))); } public function get progressInterval():Number{ return (this._progressTimer.delay); } public function get netConnection():NetConnection{ return (this._nc); } public function get maxBufferLength():Number{ return (this._maxBufferLength); } public function get panning():Number{ return (this._panning); } public function set isLive(value:Boolean):void{ this._isLive = value; } protected function connectionStatus(event:NetStatusEvent):void{ switch (event.info.code){ case "NetConnection.Connect.Closed": this.close(); break; }; } public function get timeAsTimeCode():String{ return (TimeUtil.timeCode(this.time)); } protected function streamStatus(event:NetStatusEvent):void{ if (this._useFastStartBuffer){ if ((((event.info.code == "NetStream.Play.Start")) || ((event.info.code == "NetStream.Buffer.Empty")))){ this.bufferTime = 0.5; }; if (event.info.code == "NetStream.Buffer.Full"){ this.bufferTime = this._maxBufferLength; }; }; switch (event.info.code){ case "NetStream.Play.Start": this._aboutToStop = 0; this._isBuffering = true; this._watchForBufferFailure = true; this._streamTimer.stop(); break; case "NetStream.Play.Stop": if (this._aboutToStop == 2){ this._aboutToStop = 0; this.handleEnd(); } else { this._aboutToStop = 1; }; this._watchForBufferFailure = false; this._bufferFailureTimer.reset(); break; case "NetStream.Buffer.Empty": if (this._aboutToStop == 1){ this._aboutToStop = 0; this.handleEnd(); } else { this._aboutToStop = 2; }; if (this._watchForBufferFailure){ this._bufferFailureTimer.start(); }; break; case "NetStream.Buffer.Full": this._isBuffering = false; this._bufferFailureTimer.reset(); break; case "NetStream.Buffer.Flush": this._isBuffering = false; if (this._aboutToStop == 1){ this._aboutToStop = 0; this.handleEnd(); } else { this._aboutToStop = 2; }; break; }; } override public function pause():void{ var info:Object; super.pause(); if (((this._isProgressive) && (this._createPDLPauseAndResumeEvents))){ info = new Object(); info.code = "NetStream.Pause.Notify"; info.description = "The stream is paused."; info.level = "status"; dispatchEvent(new NetStatusEvent(NetStatusEvent.NET_STATUS, false, false, info)); }; } override public function close():void{ this._progressTimer.stop(); this._streamTimer.stop(); super.close(); } public function get bufferPercentage():Number{ return (Math.min(100, Math.round(((bufferLength * 100) / bufferTime)))); } protected function onTextData(info:Object):void{ dispatchEvent(new OvpEvent(OvpEvent.NETSTREAM_TEXTDATA, info)); } public function set useFastStartBuffer(value:Boolean):void{ this._useFastStartBuffer = value; if (!value){ this.bufferTime = this._maxBufferLength; }; } } }//package org.openvideoplayer.net
Section 114
//TimeUtil (org.openvideoplayer.utilities.TimeUtil) package org.openvideoplayer.utilities { public class TimeUtil { public function TimeUtil(){ super(); } public static function timeCode(sec:Number):String{ var h:Number = Math.floor((sec / 3600)); var m:Number = Math.floor(((sec % 3600) / 60)); var s:Number = Math.floor(((sec % 3600) % 60)); return ((((((h == 0)) ? "" : ((h < 10)) ? (("0" + h.toString()) + ":") : (h.toString() + ":") + ((m < 10)) ? ("0" + m.toString()) : m.toString()) + ":") + ((s < 10)) ? ("0" + s.toString()) : s.toString())); } } }//package org.openvideoplayer.utilities
Section 115
//Controller (org.puremvc.as3.core.Controller) package org.puremvc.as3.core { import org.puremvc.as3.interfaces.*; import org.puremvc.as3.patterns.observer.*; public class Controller implements IController { protected const SINGLETON_MSG:String = "Controller Singleton already constructed!"; protected var commandMap:Array; protected var view:IView; protected static var instance:IController; public function Controller(){ super(); if (instance != null){ throw (Error(SINGLETON_MSG)); }; instance = this; commandMap = new Array(); initializeController(); } public function removeCommand(notificationName:String):void{ if (hasCommand(notificationName)){ view.removeObserver(notificationName, this); commandMap[notificationName] = null; }; } public function registerCommand(notificationName:String, commandClassRef:Class):void{ if (commandMap[notificationName] == null){ view.registerObserver(notificationName, new Observer(executeCommand, this)); }; commandMap[notificationName] = commandClassRef; } protected function initializeController():void{ view = View.getInstance(); } public function hasCommand(notificationName:String):Boolean{ return (!((commandMap[notificationName] == null))); } public function executeCommand(note:INotification):void{ var commandClassRef:Class = commandMap[note.getName()]; if (commandClassRef == null){ return; }; var commandInstance:ICommand = new (commandClassRef); commandInstance.execute(note); } public static function getInstance():IController{ if (instance == null){ instance = new (Controller); }; return (instance); } } }//package org.puremvc.as3.core
Section 116
//Model (org.puremvc.as3.core.Model) package org.puremvc.as3.core { import org.puremvc.as3.interfaces.*; public class Model implements IModel { protected const SINGLETON_MSG:String = "Model Singleton already constructed!"; protected var proxyMap:Array; protected static var instance:IModel; public function Model(){ super(); if (instance != null){ throw (Error(SINGLETON_MSG)); }; instance = this; proxyMap = new Array(); initializeModel(); } protected function initializeModel():void{ } public function removeProxy(proxyName:String):IProxy{ var proxy:IProxy = (proxyMap[proxyName] as IProxy); if (proxy){ proxyMap[proxyName] = null; proxy.onRemove(); }; return (proxy); } public function hasProxy(proxyName:String):Boolean{ return (!((proxyMap[proxyName] == null))); } public function retrieveProxy(proxyName:String):IProxy{ return (proxyMap[proxyName]); } public function registerProxy(proxy:IProxy):void{ proxyMap[proxy.getProxyName()] = proxy; proxy.onRegister(); } public static function getInstance():IModel{ if (instance == null){ instance = new (Model); }; return (instance); } } }//package org.puremvc.as3.core
Section 117
//View (org.puremvc.as3.core.View) package org.puremvc.as3.core { import org.puremvc.as3.interfaces.*; import org.puremvc.as3.patterns.observer.*; public class View implements IView { protected const SINGLETON_MSG:String = "View Singleton already constructed!"; protected var observerMap:Array; protected var mediatorMap:Array; protected static var instance:IView; public function View(){ super(); if (instance != null){ throw (Error(SINGLETON_MSG)); }; instance = this; mediatorMap = new Array(); observerMap = new Array(); initializeView(); } public function removeObserver(notificationName:String, notifyContext:Object):void{ var observers:Array = (observerMap[notificationName] as Array); var i:int; while (i < observers.length) { if (Observer(observers[i]).compareNotifyContext(notifyContext) == true){ observers.splice(i, 1); break; }; i++; }; if (observers.length == 0){ delete observerMap[notificationName]; }; } public function hasMediator(mediatorName:String):Boolean{ return (!((mediatorMap[mediatorName] == null))); } public function notifyObservers(notification:INotification):void{ var observers_ref:Array; var observers:Array; var observer:IObserver; var i:Number; if (observerMap[notification.getName()] != null){ observers_ref = (observerMap[notification.getName()] as Array); observers = new Array(); i = 0; while (i < observers_ref.length) { observer = (observers_ref[i] as IObserver); observers.push(observer); i++; }; i = 0; while (i < observers.length) { observer = (observers[i] as IObserver); observer.notifyObserver(notification); i++; }; }; } protected function initializeView():void{ } public function registerMediator(mediator:IMediator):void{ var observer:Observer; var i:Number; if (mediatorMap[mediator.getMediatorName()] != null){ return; }; mediatorMap[mediator.getMediatorName()] = mediator; var interests:Array = mediator.listNotificationInterests(); if (interests.length > 0){ observer = new Observer(mediator.handleNotification, mediator); i = 0; while (i < interests.length) { registerObserver(interests[i], observer); i++; }; }; mediator.onRegister(); } public function removeMediator(mediatorName:String):IMediator{ var interests:Array; var i:Number; var mediator:IMediator = (mediatorMap[mediatorName] as IMediator); if (mediator){ interests = mediator.listNotificationInterests(); i = 0; while (i < interests.length) { removeObserver(interests[i], mediator); i++; }; delete mediatorMap[mediatorName]; mediator.onRemove(); }; return (mediator); } public function registerObserver(notificationName:String, observer:IObserver):void{ var observers:Array = observerMap[notificationName]; if (observers){ observers.push(observer); } else { observerMap[notificationName] = [observer]; }; } public function retrieveMediator(mediatorName:String):IMediator{ return (mediatorMap[mediatorName]); } public static function getInstance():IView{ if (instance == null){ instance = new (View); }; return (instance); } } }//package org.puremvc.as3.core
Section 118
//ICommand (org.puremvc.as3.interfaces.ICommand) package org.puremvc.as3.interfaces { public interface ICommand { function execute(:INotification):void; } }//package org.puremvc.as3.interfaces
Section 119
//IController (org.puremvc.as3.interfaces.IController) package org.puremvc.as3.interfaces { public interface IController { function registerCommand(_arg1:String, _arg2:Class):void; function hasCommand(org.puremvc.as3.interfaces:IController/org.puremvc.as3.interfaces:IController:registerCommand:String):Boolean; function executeCommand(:INotification):void; function removeCommand(:String):void; } }//package org.puremvc.as3.interfaces
Section 120
//IFacade (org.puremvc.as3.interfaces.IFacade) package org.puremvc.as3.interfaces { public interface IFacade extends INotifier { function removeCommand(:String):void; function registerCommand(_arg1:String, _arg2:Class):void; function removeProxy(C:\Documents and Settings\Owner.CapricornOne\My Documents\My Workspaces\PureMVC\PureMVC_AS3\src;org\puremvc\as3\interfaces;IFacade.as:String):IProxy; function registerProxy(:IProxy):void; function hasMediator(org.puremvc.as3.interfaces:IFacade/org.puremvc.as3.interfaces:IFacade:registerProxy:String):Boolean; function retrieveMediator(org.puremvc.as3.interfaces:String):IMediator; function hasCommand(org.puremvc.as3.interfaces:IFacade/org.puremvc.as3.interfaces:IFacade:registerProxy:String):Boolean; function retrieveProxy(C:\Documents and Settings\Owner.CapricornOne\My Documents\My Workspaces\PureMVC\PureMVC_AS3\src;org\puremvc\as3\interfaces;IFacade.as:String):IProxy; function notifyObservers(:INotification):void; function registerMediator(:IMediator):void; function removeMediator(org.puremvc.as3.interfaces:String):IMediator; function hasProxy(org.puremvc.as3.interfaces:IFacade/org.puremvc.as3.interfaces:IFacade:registerProxy:String):Boolean; } }//package org.puremvc.as3.interfaces
Section 121
//IMediator (org.puremvc.as3.interfaces.IMediator) package org.puremvc.as3.interfaces { public interface IMediator { function listNotificationInterests():Array; function onRegister():void; function handleNotification(org.puremvc.as3.interfaces:IMediator/org.puremvc.as3.interfaces:IMediator:getMediatorName:INotification):void; function getMediatorName():String; function setViewComponent(org.puremvc.as3.interfaces:IMediator/org.puremvc.as3.interfaces:IMediator:getMediatorName:Object):void; function getViewComponent():Object; function onRemove():void; } }//package org.puremvc.as3.interfaces
Section 122
//IModel (org.puremvc.as3.interfaces.IModel) package org.puremvc.as3.interfaces { public interface IModel { function removeProxy(C:\Documents and Settings\Owner.CapricornOne\My Documents\My Workspaces\PureMVC\PureMVC_AS3\src;org\puremvc\as3\interfaces;IModel.as:String):IProxy; function retrieveProxy(C:\Documents and Settings\Owner.CapricornOne\My Documents\My Workspaces\PureMVC\PureMVC_AS3\src;org\puremvc\as3\interfaces;IModel.as:String):IProxy; function registerProxy(:IProxy):void; function hasProxy(org.puremvc.as3.interfaces:IModel/org.puremvc.as3.interfaces:IModel:registerProxy:String):Boolean; } }//package org.puremvc.as3.interfaces
Section 123
//INotification (org.puremvc.as3.interfaces.INotification) package org.puremvc.as3.interfaces { public interface INotification { function getType():String; function getName():String; function toString():String; function setBody(C:\Documents and Settings\Owner.CapricornOne\My Documents\My Workspaces\PureMVC\PureMVC_AS3\src;org\puremvc\as3\interfaces;INotification.as:Object):void; function getBody():Object; function setType(C:\Documents and Settings\Owner.CapricornOne\My Documents\My Workspaces\PureMVC\PureMVC_AS3\src;org\puremvc\as3\interfaces;INotification.as:String):void; } }//package org.puremvc.as3.interfaces
Section 124
//INotifier (org.puremvc.as3.interfaces.INotifier) package org.puremvc.as3.interfaces { public interface INotifier { function sendNotification(_arg1:String, _arg2:Object=null, _arg3:String=null):void; } }//package org.puremvc.as3.interfaces
Section 125
//IObserver (org.puremvc.as3.interfaces.IObserver) package org.puremvc.as3.interfaces { public interface IObserver { function compareNotifyContext(void:Object):Boolean; function setNotifyContext(:Object):void; function setNotifyMethod(:Function):void; function notifyObserver(:INotification):void; } }//package org.puremvc.as3.interfaces
Section 126
//IProxy (org.puremvc.as3.interfaces.IProxy) package org.puremvc.as3.interfaces { public interface IProxy { function getData():Object; function onRegister():void; function getProxyName():String; function onRemove():void; function setData(C:\Documents and Settings\Owner.CapricornOne\My Documents\My Workspaces\PureMVC\PureMVC_AS3\src;org\puremvc\as3\interfaces;IProxy.as:Object):void; } }//package org.puremvc.as3.interfaces
Section 127
//IView (org.puremvc.as3.interfaces.IView) package org.puremvc.as3.interfaces { public interface IView { function notifyObservers(:INotification):void; function registerMediator(:IMediator):void; function removeMediator(void:String):IMediator; function registerObserver(_arg1:String, _arg2:IObserver):void; function removeObserver(_arg1:String, _arg2:Object):void; function hasMediator(String:String):Boolean; function retrieveMediator(void:String):IMediator; } }//package org.puremvc.as3.interfaces
Section 128
//SimpleCommand (org.puremvc.as3.patterns.command.SimpleCommand) package org.puremvc.as3.patterns.command { import org.puremvc.as3.interfaces.*; import org.puremvc.as3.patterns.observer.*; public class SimpleCommand extends Notifier implements ICommand, INotifier { public function SimpleCommand(){ super(); } public function execute(notification:INotification):void{ } } }//package org.puremvc.as3.patterns.command
Section 129
//Facade (org.puremvc.as3.patterns.facade.Facade) package org.puremvc.as3.patterns.facade { import org.puremvc.as3.interfaces.*; import org.puremvc.as3.core.*; import org.puremvc.as3.patterns.observer.*; public class Facade implements IFacade { protected const SINGLETON_MSG:String = "Facade Singleton already constructed!"; protected var controller:IController; protected var view:IView; protected var model:IModel; protected static var instance:IFacade; public function Facade(){ super(); if (instance != null){ throw (Error(SINGLETON_MSG)); }; instance = this; initializeFacade(); } public function removeProxy(proxyName:String):IProxy{ var proxy:IProxy; if (model != null){ proxy = model.removeProxy(proxyName); }; return (proxy); } public function registerProxy(proxy:IProxy):void{ model.registerProxy(proxy); } protected function initializeController():void{ if (controller != null){ return; }; controller = Controller.getInstance(); } protected function initializeFacade():void{ initializeModel(); initializeController(); initializeView(); } public function retrieveProxy(proxyName:String):IProxy{ return (model.retrieveProxy(proxyName)); } public function sendNotification(notificationName:String, body:Object=null, type:String=null):void{ notifyObservers(new Notification(notificationName, body, type)); } public function notifyObservers(notification:INotification):void{ if (view != null){ view.notifyObservers(notification); }; } protected function initializeView():void{ if (view != null){ return; }; view = View.getInstance(); } public function retrieveMediator(mediatorName:String):IMediator{ return ((view.retrieveMediator(mediatorName) as IMediator)); } public function removeMediator(mediatorName:String):IMediator{ var mediator:IMediator; if (view != null){ mediator = view.removeMediator(mediatorName); }; return (mediator); } public function hasCommand(notificationName:String):Boolean{ return (controller.hasCommand(notificationName)); } public function removeCommand(notificationName:String):void{ controller.removeCommand(notificationName); } public function registerCommand(notificationName:String, commandClassRef:Class):void{ controller.registerCommand(notificationName, commandClassRef); } public function hasMediator(mediatorName:String):Boolean{ return (view.hasMediator(mediatorName)); } public function registerMediator(mediator:IMediator):void{ if (view != null){ view.registerMediator(mediator); }; } protected function initializeModel():void{ if (model != null){ return; }; model = Model.getInstance(); } public function hasProxy(proxyName:String):Boolean{ return (model.hasProxy(proxyName)); } public static function getInstance():IFacade{ if (instance == null){ instance = new (Facade); }; return (instance); } } }//package org.puremvc.as3.patterns.facade
Section 130
//Mediator (org.puremvc.as3.patterns.mediator.Mediator) package org.puremvc.as3.patterns.mediator { import org.puremvc.as3.interfaces.*; import org.puremvc.as3.patterns.observer.*; public class Mediator extends Notifier implements IMediator, INotifier { protected var viewComponent:Object; protected var mediatorName:String; public static const NAME:String = "Mediator"; public function Mediator(mediatorName:String=null, viewComponent:Object=null){ super(); this.mediatorName = ((mediatorName)!=null) ? mediatorName : NAME; this.viewComponent = viewComponent; } public function listNotificationInterests():Array{ return ([]); } public function onRegister():void{ } public function onRemove():void{ } public function getViewComponent():Object{ return (viewComponent); } public function handleNotification(notification:INotification):void{ } public function getMediatorName():String{ return (mediatorName); } public function setViewComponent(viewComponent:Object):void{ this.viewComponent = viewComponent; } } }//package org.puremvc.as3.patterns.mediator
Section 131
//Notification (org.puremvc.as3.patterns.observer.Notification) package org.puremvc.as3.patterns.observer { import org.puremvc.as3.interfaces.*; public class Notification implements INotification { private var body:Object; private var name:String; private var type:String; public function Notification(name:String, body:Object=null, type:String=null){ super(); this.name = name; this.body = body; this.type = type; } public function setBody(body:Object):void{ this.body = body; } public function getName():String{ return (name); } public function toString():String{ var msg:String = ("Notification Name: " + getName()); msg = (msg + ("\nBody:" + ((body)==null) ? "null" : body.toString())); msg = (msg + ("\nType:" + ((type)==null) ? "null" : type)); return (msg); } public function getType():String{ return (type); } public function setType(type:String):void{ this.type = type; } public function getBody():Object{ return (body); } } }//package org.puremvc.as3.patterns.observer
Section 132
//Notifier (org.puremvc.as3.patterns.observer.Notifier) package org.puremvc.as3.patterns.observer { import org.puremvc.as3.interfaces.*; import org.puremvc.as3.patterns.facade.*; public class Notifier implements INotifier { protected var facade:IFacade; public function Notifier(){ facade = Facade.getInstance(); super(); } public function sendNotification(notificationName:String, body:Object=null, type:String=null):void{ facade.sendNotification(notificationName, body, type); } } }//package org.puremvc.as3.patterns.observer
Section 133
//Observer (org.puremvc.as3.patterns.observer.Observer) package org.puremvc.as3.patterns.observer { import org.puremvc.as3.interfaces.*; public class Observer implements IObserver { private var notify:Function; private var context:Object; public function Observer(notifyMethod:Function, notifyContext:Object){ super(); setNotifyMethod(notifyMethod); setNotifyContext(notifyContext); } private function getNotifyMethod():Function{ return (notify); } public function compareNotifyContext(object:Object):Boolean{ return ((object === this.context)); } public function setNotifyContext(notifyContext:Object):void{ context = notifyContext; } private function getNotifyContext():Object{ return (context); } public function setNotifyMethod(notifyMethod:Function):void{ notify = notifyMethod; } public function notifyObserver(notification:INotification):void{ this.getNotifyMethod().apply(this.getNotifyContext(), [notification]); } } }//package org.puremvc.as3.patterns.observer
Section 134
//Proxy (org.puremvc.as3.patterns.proxy.Proxy) package org.puremvc.as3.patterns.proxy { import org.puremvc.as3.interfaces.*; import org.puremvc.as3.patterns.observer.*; public class Proxy extends Notifier implements IProxy, INotifier { protected var data:Object; protected var proxyName:String; public static var NAME:String = "Proxy"; public function Proxy(proxyName:String=null, data:Object=null){ super(); this.proxyName = ((proxyName)!=null) ? proxyName : NAME; if (data != null){ setData(data); }; } public function getData():Object{ return (data); } public function setData(data:Object):void{ this.data = data; } public function onRegister():void{ } public function getProxyName():String{ return (proxyName); } public function onRemove():void{ } } }//package org.puremvc.as3.patterns.proxy
Section 135
//_activeButtonStyleStyle (_activeButtonStyleStyle) package { import mx.core.*; import mx.styles.*; public class _activeButtonStyleStyle { public static function init(_activeButtonStyleStyle:IFlexModuleFactory):void{ var fbs = _activeButtonStyleStyle; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".activeButtonStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".activeButtonStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ }; }; } } }//package
Section 136
//_activeTabStyleStyle (_activeTabStyleStyle) package { import mx.core.*; import mx.styles.*; public class _activeTabStyleStyle { public static function init(:IFlexModuleFactory):void{ var fbs = ; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".activeTabStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".activeTabStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; }; }; } } }//package
Section 137
//_alertButtonStyleStyle (_alertButtonStyleStyle) package { import mx.core.*; import mx.styles.*; public class _alertButtonStyleStyle { public static function init(:IFlexModuleFactory):void{ var fbs = ; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".alertButtonStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".alertButtonStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.color = 734012; }; }; } } }//package
Section 138
//_comboDropdownStyle (_comboDropdownStyle) package { import mx.core.*; import mx.styles.*; public class _comboDropdownStyle { public static function init(leading:IFlexModuleFactory):void{ var fbs = leading; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".comboDropdown"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".comboDropdown", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.shadowDirection = "center"; this.fontWeight = "normal"; this.dropShadowEnabled = true; this.leading = 0; this.backgroundColor = 0xFFFFFF; this.shadowDistance = 1; this.cornerRadius = 0; this.borderThickness = 0; this.paddingLeft = 5; this.paddingRight = 5; }; }; } } }//package
Section 139
//_dataGridStylesStyle (_dataGridStylesStyle) package { import mx.core.*; import mx.styles.*; public class _dataGridStylesStyle { public static function init(:IFlexModuleFactory):void{ var fbs = ; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".dataGridStyles"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".dataGridStyles", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; }; }; } } }//package
Section 140
//_dateFieldPopupStyle (_dateFieldPopupStyle) package { import mx.core.*; import mx.styles.*; public class _dateFieldPopupStyle { public static function init(_dateFieldPopupStyle.as$3:IFlexModuleFactory):void{ var fbs = _dateFieldPopupStyle.as$3; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".dateFieldPopup"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".dateFieldPopup", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.dropShadowEnabled = true; this.backgroundColor = 0xFFFFFF; this.borderThickness = 0; }; }; } } }//package
Section 141
//_errorTipStyle (_errorTipStyle) package { import mx.core.*; import mx.styles.*; public class _errorTipStyle { public static function init(borderColor:IFlexModuleFactory):void{ var fbs = borderColor; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".errorTip"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".errorTip", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; this.borderStyle = "errorTipRight"; this.paddingTop = 4; this.borderColor = 13510953; this.color = 0xFFFFFF; this.fontSize = 9; this.shadowColor = 0; this.paddingLeft = 4; this.paddingBottom = 4; this.paddingRight = 4; }; }; } } }//package
Section 142
//_globalStyle (_globalStyle) package { import mx.core.*; import mx.styles.*; import mx.skins.halo.*; public class _globalStyle { public static function init(horizontalGridLines:IFlexModuleFactory):void{ var fbs = horizontalGridLines; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("global"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("global", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fillColor = 0xFFFFFF; this.kerning = false; this.iconColor = 0x111111; this.textRollOverColor = 2831164; this.horizontalAlign = "left"; this.shadowCapColor = 14015965; this.backgroundAlpha = 1; this.filled = true; this.textDecoration = "none"; this.roundedBottomCorners = true; this.fontThickness = 0; this.focusBlendMode = "normal"; this.fillColors = [0xFFFFFF, 0xCCCCCC, 0xFFFFFF, 0xEEEEEE]; this.horizontalGap = 8; this.borderCapColor = 9542041; this.buttonColor = 7305079; this.indentation = 17; this.selectionDisabledColor = 0xDDDDDD; this.closeDuration = 250; this.embedFonts = false; this.paddingTop = 0; this.letterSpacing = 0; this.focusAlpha = 0.4; this.bevel = true; this.fontSize = 10; this.shadowColor = 0xEEEEEE; this.borderAlpha = 1; this.paddingLeft = 0; this.fontWeight = "normal"; this.indicatorGap = 14; this.focusSkin = HaloFocusRect; this.dropShadowEnabled = false; this.leading = 2; this.borderSkin = HaloBorder; this.fontSharpness = 0; this.modalTransparencyDuration = 100; this.borderThickness = 1; this.backgroundSize = "auto"; this.borderStyle = "inset"; this.borderColor = 12040892; this.fontAntiAliasType = "advanced"; this.errorColor = 0xFF0000; this.shadowDistance = 2; this.horizontalGridLineColor = 0xF7F7F7; this.stroked = false; this.modalTransparencyColor = 0xDDDDDD; this.cornerRadius = 0; this.verticalAlign = "top"; this.textIndent = 0; this.fillAlphas = [0.6, 0.4, 0.75, 0.65]; this.verticalGridLineColor = 14015965; this.themeColor = 40447; this.version = "3.0.0"; this.shadowDirection = "center"; this.modalTransparency = 0.5; this.repeatInterval = 35; this.openDuration = 250; this.textAlign = "left"; this.fontFamily = "Verdana"; this.textSelectedColor = 2831164; this.paddingBottom = 0; this.strokeWidth = 1; this.fontGridFitType = "pixel"; this.horizontalGridLines = false; this.useRollOver = true; this.verticalGridLines = true; this.repeatDelay = 500; this.fontStyle = "normal"; this.dropShadowColor = 0; this.focusThickness = 2; this.verticalGap = 6; this.disabledColor = 11187123; this.paddingRight = 0; this.focusRoundedCorners = "tl tr bl br"; this.borderSides = "left top right bottom"; this.disabledIconColor = 0x999999; this.modalTransparencyBlur = 3; this.color = 734012; this.selectionDuration = 250; this.highlightAlphas = [0.3, 0]; }; }; } } }//package
Section 143
//_headerDateTextStyle (_headerDateTextStyle) package { import mx.core.*; import mx.styles.*; public class _headerDateTextStyle { public static function init(bold:IFlexModuleFactory):void{ var fbs = bold; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".headerDateText"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".headerDateText", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; this.textAlign = "center"; }; }; } } }//package
Section 144
//_headerDragProxyStyleStyle (_headerDragProxyStyleStyle) package { import mx.core.*; import mx.styles.*; public class _headerDragProxyStyleStyle { public static function init(:IFlexModuleFactory):void{ var fbs = ; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".headerDragProxyStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".headerDragProxyStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; }; }; } } }//package
Section 145
//_linkButtonStyleStyle (_linkButtonStyleStyle) package { import mx.core.*; import mx.styles.*; public class _linkButtonStyleStyle { public static function init(http://adobe.com/AS3/2006/builtin:IFlexModuleFactory):void{ var fbs = http://adobe.com/AS3/2006/builtin; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".linkButtonStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".linkButtonStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.paddingTop = 2; this.paddingLeft = 2; this.paddingBottom = 2; this.paddingRight = 2; }; }; } } }//package
Section 146
//_opaquePanelStyle (_opaquePanelStyle) package { import mx.core.*; import mx.styles.*; public class _opaquePanelStyle { public static function init(Object:IFlexModuleFactory):void{ var fbs = Object; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".opaquePanel"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".opaquePanel", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.borderColor = 0xFFFFFF; this.backgroundColor = 0xFFFFFF; this.headerColors = [0xE7E7E7, 0xD9D9D9]; this.footerColors = [0xE7E7E7, 0xC7C7C7]; this.borderAlpha = 1; }; }; } } }//package
Section 147
//_plainStyle (_plainStyle) package { import mx.core.*; import mx.styles.*; public class _plainStyle { public static function init(backgroundImage:IFlexModuleFactory):void{ var fbs = backgroundImage; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".plain"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".plain", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.paddingTop = 0; this.backgroundColor = 0xFFFFFF; this.backgroundImage = ""; this.horizontalAlign = "left"; this.paddingLeft = 0; this.paddingBottom = 0; this.paddingRight = 0; }; }; } } }//package
Section 148
//_popUpMenuStyle (_popUpMenuStyle) package { import mx.core.*; import mx.styles.*; public class _popUpMenuStyle { public static function init(normal:IFlexModuleFactory):void{ var fbs = normal; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".popUpMenu"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".popUpMenu", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "normal"; this.textAlign = "left"; }; }; } } }//package
Section 149
//_richTextEditorTextAreaStyleStyle (_richTextEditorTextAreaStyleStyle) package { import mx.core.*; import mx.styles.*; public class _richTextEditorTextAreaStyleStyle { public static function init(_richTextEditorTextAreaStyleStyle:IFlexModuleFactory):void{ var fbs = _richTextEditorTextAreaStyleStyle; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".richTextEditorTextAreaStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".richTextEditorTextAreaStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ }; }; } } }//package
Section 150
//_swatchPanelTextFieldStyle (_swatchPanelTextFieldStyle) package { import mx.core.*; import mx.styles.*; public class _swatchPanelTextFieldStyle { public static function init(shadowCapColor:IFlexModuleFactory):void{ var fbs = shadowCapColor; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".swatchPanelTextField"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".swatchPanelTextField", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.borderStyle = "inset"; this.borderColor = 14015965; this.highlightColor = 12897484; this.backgroundColor = 0xFFFFFF; this.shadowCapColor = 14015965; this.shadowColor = 14015965; this.paddingLeft = 5; this.buttonColor = 7305079; this.borderCapColor = 9542041; this.paddingRight = 5; }; }; } } }//package
Section 151
//_textAreaHScrollBarStyleStyle (_textAreaHScrollBarStyleStyle) package { import mx.core.*; import mx.styles.*; public class _textAreaHScrollBarStyleStyle { public static function init(_textAreaHScrollBarStyleStyle:IFlexModuleFactory):void{ var fbs = _textAreaHScrollBarStyleStyle; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".textAreaHScrollBarStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".textAreaHScrollBarStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ }; }; } } }//package
Section 152
//_textAreaVScrollBarStyleStyle (_textAreaVScrollBarStyleStyle) package { import mx.core.*; import mx.styles.*; public class _textAreaVScrollBarStyleStyle { public static function init(_textAreaVScrollBarStyleStyle:IFlexModuleFactory):void{ var fbs = _textAreaVScrollBarStyleStyle; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".textAreaVScrollBarStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".textAreaVScrollBarStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ }; }; } } }//package
Section 153
//_todayStyleStyle (_todayStyleStyle) package { import mx.core.*; import mx.styles.*; public class _todayStyleStyle { public static function init(color:IFlexModuleFactory):void{ var fbs = color; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".todayStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".todayStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.color = 0xFFFFFF; this.textAlign = "center"; }; }; } } }//package
Section 154
//_weekDayStyleStyle (_weekDayStyleStyle) package { import mx.core.*; import mx.styles.*; public class _weekDayStyleStyle { public static function init(bold:IFlexModuleFactory):void{ var fbs = bold; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".weekDayStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".weekDayStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; this.textAlign = "center"; }; }; } } }//package
Section 155
//_windowStatusStyle (_windowStatusStyle) package { import mx.core.*; import mx.styles.*; public class _windowStatusStyle { public static function init(:IFlexModuleFactory):void{ var fbs = ; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".windowStatus"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".windowStatus", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.color = 0x666666; }; }; } } }//package
Section 156
//_windowStylesStyle (_windowStylesStyle) package { import mx.core.*; import mx.styles.*; public class _windowStylesStyle { public static function init(:IFlexModuleFactory):void{ var fbs = ; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".windowStyles"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".windowStyles", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; }; }; } } }//package
Section 157
//en_US$core_properties (en_US$core_properties) package { import mx.resources.*; public class en_US$core_properties extends ResourceBundle { public function en_US$core_properties(){ super("en_US", "core"); } override protected function getContent():Object{ var _local1:Object = {multipleChildSets_ClassAndInstance:"Multiple sets of visual children have been specified for this component (component definition and component instance).", truncationIndicator:"...", notExecuting:"Repeater is not executing.", versionAlreadyRead:"Compatibility version has already been read.", multipleChildSets_ClassAndSubclass:"Multiple sets of visual children have been specified for this component (base component definition and derived component definition).", viewSource:"View Source", badFile:"File does not exist.", stateUndefined:"Undefined state '{0}'.", versionAlreadySet:"Compatibility version has already been set."}; return (_local1); } } }//package
Section 158
//en_US$skins_properties (en_US$skins_properties) package { import mx.resources.*; public class en_US$skins_properties extends ResourceBundle { public function en_US$skins_properties(){ super("en_US", "skins"); } override protected function getContent():Object{ var _local1:Object = {notLoaded:"Unable to load '{0}'."}; return (_local1); } } }//package
Section 159
//en_US$styles_properties (en_US$styles_properties) package { import mx.resources.*; public class en_US$styles_properties extends ResourceBundle { public function en_US$styles_properties(){ super("en_US", "styles"); } override protected function getContent():Object{ var _local1:Object = {unableToLoad:"Unable to load style({0}): {1}."}; return (_local1); } } }//package

Library Items

Symbol 1 GraphicUsed by:16 46
Symbol 2 FontUsed by:3
Symbol 3 TextUses:2Used by:4
Symbol 4 MovieClipUses:3Used by:16 46
Symbol 5 FontUsed by:6 8 10 12 42 44
Symbol 6 TextUses:5Used by:7
Symbol 7 MovieClipUses:6Used by:16
Symbol 8 TextUses:5Used by:9
Symbol 9 MovieClipUses:8Used by:16
Symbol 10 TextUses:5Used by:11
Symbol 11 MovieClipUses:10Used by:16 46
Symbol 12 TextUses:5Used by:13
Symbol 13 MovieClipUses:12Used by:16 46
Symbol 14 GraphicUsed by:15
Symbol 15 MovieClipUses:14Used by:16 46
Symbol 16 MovieClip {com.violenceagainstwomen.view.GirlfriendFrameView_FINAL_MESSAGE} [GirlMessage]Uses:1 4 7 9 11 13 15
Symbol 17 BitmapUsed by:18
Symbol 18 GraphicUses:17Used by:19
Symbol 19 MovieClip {com.violenceagainstwomen.view.GirlfriendFrameView_GIRL_LINK} [BoyLink]Uses:18
Symbol 20 BitmapUsed by:22
Symbol 21 BitmapUsed by:22
Symbol 22 GraphicUses:20 21Used by:37
Symbol 23 BitmapUsed by:24
Symbol 24 GraphicUses:23Used by:25
Symbol 25 MovieClipUses:24Used by:37
Symbol 26 BitmapUsed by:27
Symbol 27 GraphicUses:26Used by:28
Symbol 28 MovieClipUses:27Used by:37
Symbol 29 BitmapUsed by:30
Symbol 30 GraphicUses:29Used by:36
Symbol 31 FontUsed by:32
Symbol 32 EditableTextUses:31Used by:36 52
Symbol 33 BitmapUsed by:34
Symbol 34 GraphicUses:33Used by:35
Symbol 35 MovieClipUses:34Used by:36
Symbol 36 MovieClipUses:30 32 35Used by:37
Symbol 37 MovieClip {com.violenceagainstwomen.view.GirlfriendFrameView_FRAME} [GirlFrame]Uses:22 25 28 36
Symbol 38 Bitmap {com.violenceagainstwomen.view.GirlfriendFrameView_BACKGROUND} [GirlBackground]
Symbol 39 BitmapUsed by:40
Symbol 40 GraphicUses:39Used by:41
Symbol 41 MovieClip {com.violenceagainstwomen.view.ui.ShareButtons_SHARE_BUTTONS} [ShareBoy]Uses:40
Symbol 42 TextUses:5Used by:43
Symbol 43 MovieClipUses:42Used by:46
Symbol 44 TextUses:5Used by:45
Symbol 45 MovieClipUses:44Used by:46
Symbol 46 MovieClip {com.violenceagainstwomen.view.BoyfriendFrameView_FINAL_MESSAGE} [BoyMessage]Uses:1 4 43 45 11 13 15
Symbol 47 BitmapUsed by:48
Symbol 48 GraphicUses:47Used by:52
Symbol 49 BitmapUsed by:50
Symbol 50 GraphicUses:49Used by:51
Symbol 51 MovieClipUses:50Used by:52
Symbol 52 MovieClipUses:48 32 51Used by:58
Symbol 53 BitmapUsed by:54
Symbol 54 GraphicUses:53Used by:58
Symbol 55 BitmapUsed by:56
Symbol 56 GraphicUses:55Used by:57
Symbol 57 MovieClipUses:56Used by:58
Symbol 58 MovieClip {com.violenceagainstwomen.view.BoyfriendFrameView_FRAME} [BoyFrame]Uses:52 54 57
Symbol 59 Bitmap {com.violenceagainstwomen.view.BoyfriendFrameView_BACKGROUND} [BoyBackground]
Symbol 60 BitmapUsed by:61
Symbol 61 GraphicUses:60Used by:62
Symbol 62 MovieClip {com.violenceagainstwomen.view.BoyfriendFrameView_GIRL_LINK} [GirlLink]Uses:61

Instance Names

"linkHit"Symbol 16 MovieClip {com.violenceagainstwomen.view.GirlfriendFrameView_FINAL_MESSAGE} [GirlMessage] Frame 301Symbol 15 MovieClip
"input"Symbol 36 MovieClip Frame 1Symbol 32 EditableText
"submit"Symbol 36 MovieClip Frame 1Symbol 35 MovieClip
"title"Symbol 37 MovieClip {com.violenceagainstwomen.view.GirlfriendFrameView_FRAME} [GirlFrame] Frame 1Symbol 28 MovieClip
"form"Symbol 37 MovieClip {com.violenceagainstwomen.view.GirlfriendFrameView_FRAME} [GirlFrame] Frame 1Symbol 36 MovieClip
"linkHit"Symbol 46 MovieClip {com.violenceagainstwomen.view.BoyfriendFrameView_FINAL_MESSAGE} [BoyMessage] Frame 301Symbol 15 MovieClip
"input"Symbol 52 MovieClip Frame 1Symbol 32 EditableText
"submit"Symbol 52 MovieClip Frame 1Symbol 51 MovieClip
"form"Symbol 58 MovieClip {com.violenceagainstwomen.view.BoyfriendFrameView_FRAME} [BoyFrame] Frame 1Symbol 52 MovieClip
"frame"Symbol 58 MovieClip {com.violenceagainstwomen.view.BoyfriendFrameView_FRAME} [BoyFrame] Frame 1Symbol 57 MovieClip

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata present, AS3.
SWFMetaData (77)Timeline Frame 1458 bytes "<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'><rdf:Description rdf:about='' xmlns ..."
ScriptLimits (65)Timeline Frame 1MaxRecursionDepth: 1000, ScriptTimeout: 60 seconds
ExportAssets (56)Timeline Frame 2Symbol 16 as "GirlMessage"
ExportAssets (56)Timeline Frame 2Symbol 19 as "BoyLink"
ExportAssets (56)Timeline Frame 2Symbol 37 as "GirlFrame"
ExportAssets (56)Timeline Frame 2Symbol 38 as "GirlBackground"
ExportAssets (56)Timeline Frame 2Symbol 41 as "ShareBoy"
ExportAssets (56)Timeline Frame 2Symbol 46 as "BoyMessage"
ExportAssets (56)Timeline Frame 2Symbol 58 as "BoyFrame"
ExportAssets (56)Timeline Frame 2Symbol 59 as "BoyBackground"
ExportAssets (56)Timeline Frame 2Symbol 62 as "GirlLink"
EnableDebugger2 (64)Timeline Frame 131 bytes "u.$1$2O$JEmkNSkM0FlFlsJ7Ralyw/."
DebugMX1 (63)Timeline Frame 1
SerialNumber (41)Timeline Frame 1

Labels

"com_violenceagainstwomen_DreamGirlfriendFactory"Frame 1
"com_violenceagainstwomen_DreamGirlfriend"Frame 2




http://swfchan.com/17/81970/info.shtml
Created: 1/4 -2019 15:42:52 Last modified: 1/4 -2019 15:42:52 Server time: 13/05 -2024 20:56:04