Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
Where is the loading/splash page in Habbo.swf?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Menkz" data-source="post: 441577" data-attributes="member: 346"><p>Double post because it was too long.</p><p>[SPOILER="LoadingBarWidget"]</p><p>[CODE=javascript]package §_-2DV§</p><p>{</p><p> import §_-01O§.IBorderWindow;</p><p> import §_-01O§.IDisplayObjectWrapper;</p><p> import §_-01O§.IRegionWindow;</p><p> import §_-0iX§.XmlAsset;</p><p> import §_-0iX§.§_-47Z§;</p><p> import §_-0iX§.§_-4x7§;</p><p> import §_-1NT§.§_-69x§;</p><p> import §_-1vS§.NetworkResource;</p><p> import §_-2-m§.AssetLoaderEvent;</p><p> import §_-3KB§.§_-6cw§;</p><p> import §_-4RP§.VideoControlsEvent;</p><p> import §_-4zd§.MediaFile;</p><p> import §_-4zd§.TrackingEvent;</p><p> import §_-4zd§.VideoAdServingTemplate;</p><p> import §_-4zd§.VideoAdV2;</p><p> import §_-5Wx§.§_-254§;</p><p> import §_-6-Z§.§_-2zN§;</p><p> import §_-GU§.§_-0xW§;</p><p> import §_-L3§.§_-4z§;</p><p> import §_-SI§.ApdevVideoPlayer;</p><p> import §_-SI§.§_-3WQ§;</p><p> import §_-YN§.§_-K9§;</p><p> import flash.display.BitmapData;</p><p> import flash.display.Sprite;</p><p> import flash.events.Event;</p><p> import flash.events.IEventDispatcher;</p><p> import flash.events.IOErrorEvent;</p><p> import flash.events.MouseEvent;</p><p> import flash.events.SecurityErrorEvent;</p><p> import flash.events.TimerEvent;</p><p> import flash.net.URLLoader;</p><p> import flash.net.URLRequest;</p><p> import flash.utils.Dictionary;</p><p> import flash.utils.Timer;</p><p> </p><p> public class LoadingBarWidget extends §_-2zN§</p><p> {</p><p> </p><p> private static const §_-5DB§:String = "close";</p><p> </p><p> private static const §_-4ka§:String = "complete";</p><p> </p><p> private static const §_-38P§:String = "firstQuartile";</p><p> </p><p> private static const §_-1Ks§:String = "midpoint";</p><p> </p><p> private static const §_-46O§:String = "mute";</p><p> </p><p> private static const §_-29F§:String = "pause";</p><p> </p><p> private static const §_-sh§:String = "resume";</p><p> </p><p> private static const §_-1LH§:String = "thirdQuartile";</p><p> </p><p> private static const §_-Cg§:String = "unmute";</p><p> </p><p> private static const §_-3zH§:String = "start";</p><p> </p><p> </p><p> private var §_-0Bj§:IBorderWindow;</p><p> </p><p> private var §_-59D§:§_-6cw§;</p><p> </p><p> private var §_-1Dn§:BitmapData;</p><p> </p><p> private var §_-08B§:String = "";</p><p> </p><p> private var §_-2E9§:Sprite = null;</p><p> </p><p> private var §_-4dw§:ApdevVideoPlayer;</p><p> </p><p> private var §in§:String = "";</p><p> </p><p> private var §_-YH§:Array;</p><p> </p><p> private var §_-yy§:Boolean = false;</p><p> </p><p> private var §_-5js§:Dictionary;</p><p> </p><p> private var §_-09f§:Timer;</p><p> </p><p> private var §_-5TP§:Number;</p><p> </p><p> private var §_-5l5§:String;</p><p> </p><p> private var §_-1fs§:Boolean = false;</p><p> </p><p> private var §_-Ap§:String;</p><p> </p><p> public function LoadingBarWidget(param1:§_-254§, param2:§_-K9§, param3:§_-4x7§, param4:§_-4z§, param5:§_-6cw§)</p><p> {</p><p> this.§_-YH§ = [];</p><p> super(param1,param2,param3,param4);</p><p> this.§_-59D§ = param5;</p><p> }</p><p> </p><p> override public function dispose() : void</p><p> {</p><p> if(this.§_-2E9§ != null)</p><p> {</p><p> this.§_-2E9§.removeEventListener(MouseEvent.CLICK,this.§_-2L1§);</p><p> this.§_-2E9§ = null;</p><p> }</p><p> if(this.§_-1Dn§ != null)</p><p> {</p><p> this.§_-1Dn§.dispose();</p><p> this.§_-1Dn§ = null;</p><p> }</p><p> if(this.§_-0Bj§ != null)</p><p> {</p><p> this.§_-0Bj§.dispose();</p><p> this.§_-0Bj§ = null;</p><p> }</p><p> this.§_-59D§ = null;</p><p> super.dispose();</p><p> }</p><p> </p><p> override public function registerUpdateEvents(k:IEventDispatcher) : void</p><p> {</p><p> if(k == null)</p><p> {</p><p> return;</p><p> }</p><p> k.addEventListener(§_-69x§.§_-3Lu§,this.§_-DL§);</p><p> k.addEventListener(§_-69x§.§_-2iI§,this.§_-4bz§);</p><p> super.registerUpdateEvents(k);</p><p> }</p><p> </p><p> override public function unregisterUpdateEvents(k:IEventDispatcher) : void</p><p> {</p><p> if(k == null)</p><p> {</p><p> return;</p><p> }</p><p> k.removeEventListener(§_-69x§.§_-3Lu§,this.§_-DL§);</p><p> k.removeEventListener(§_-69x§.§_-2iI§,this.§_-DL§);</p><p> k.removeEventListener(§_-69x§.§_-2iI§,this.§_-4bz§);</p><p> }</p><p> </p><p> private function §_-2GK§(k:AssetLoaderEvent) : void</p><p> {</p><p> §_-3E2§.log("Error loading xml: " + this.§in§ + ", " + k);</p><p> }</p><p> </p><p> private function §_-0aV§(k:SecurityErrorEvent) : void</p><p> {</p><p> }</p><p> </p><p> private function §_-DL§(k:§_-69x§) : void</p><p> {</p><p> if(k == null || k.type != §_-69x§.§_-3Lu§)</p><p> {</p><p> return;</p><p> }</p><p> if(!this.createWindow())</p><p> {</p><p> return;</p><p> }</p><p> this.§_-0Bj§.visible = true;</p><p> this.§_-0Bj§.center();</p><p> }</p><p> </p><p> private function §_-4bz§(k:§_-69x§) : void</p><p> {</p><p> if(k == null || k.type != §_-69x§.§_-2iI§)</p><p> {</p><p> return;</p><p> }</p><p> if(this.§_-4dw§ && (this.§_-4dw§.§_-07c§ == §_-3WQ§.§_-4rF§ || this.§_-4dw§.§_-07c§ == §_-3WQ§.§_-35l§))</p><p> {</p><p> return;</p><p> }</p><p> if(this.§_-0Bj§ != null)</p><p> {</p><p> this.§_-0Bj§.dispose();</p><p> this.§_-0Bj§ = null;</p><p> }</p><p> }</p><p> </p><p> private function createWindow() : Boolean</p><p> {</p><p> var _loc4_:int = 0;</p><p> if(this.§_-0Bj§ != null)</p><p> {</p><p> return true;</p><p> }</p><p> var _loc1_:XmlAsset = assets.getAssetByName("room_loading_bar") as XmlAsset;</p><p> if(_loc1_ == null)</p><p> {</p><p> return false;</p><p> }</p><p> this.§_-0Bj§ = windowManager.buildFromXML(_loc1_.content as XML) as IBorderWindow;</p><p> if(this.§_-0Bj§ == null)</p><p> {</p><p> return false;</p><p> }</p><p> this.§_-0Bj§.visible = false;</p><p> var _loc2_:IRegionWindow = this.§_-0Bj§.findChildByName("region") as IRegionWindow;</p><p> if(_loc2_ != null)</p><p> {</p><p> }</p><p> var _loc3_:IDisplayObjectWrapper = this.§_-0Bj§.findChildByName("image") as IDisplayObjectWrapper;</p><p> if(_loc3_ != null)</p><p> {</p><p> _loc4_ = _loc3_.height;</p><p> this.§_-0Bj§.scale(0,-_loc4_);</p><p> }</p><p> return true;</p><p> }</p><p> </p><p> private function §_-3sV§(param1:AssetLoaderEvent) : void</p><p> {</p><p> var _loc2_:§_-47Z§ = null;</p><p> var _loc3_:XmlAsset = null;</p><p> var _loc4_:XML = null;</p><p> var _loc5_:VideoAdServingTemplate = null;</p><p> _loc2_ = param1.target as §_-47Z§;</p><p> _loc2_.removeEventListener(AssetLoaderEvent.§_-l5§,this.§_-3sV§);</p><p> _loc2_.removeEventListener(AssetLoaderEvent.§_-mK§,this.§_-3sV§);</p><p> if(param1.type == AssetLoaderEvent.§_-l5§)</p><p> {</p><p> _loc3_ = _assets.getAssetByName(_loc2_.assetName) as XmlAsset;</p><p> _loc4_ = _loc3_.content as XML;</p><p> if(_loc4_ != null)</p><p> {</p><p> _loc5_ = new VideoAdServingTemplate();</p><p> _loc5_.§_-3vh§(_loc4_);</p><p> this.§_-YH§ = _loc5_.ads;</p><p> this.playVideo();</p><p> }</p><p> }</p><p> }</p><p> </p><p> private function §_-4aA§(param1:int = 760, param2:int = 480) : void</p><p> {</p><p> this.§_-4dw§ = new ApdevVideoPlayer(param1,param2);</p><p> this.§_-4dw§.§_-Y9§ = false;</p><p> this.§_-4dw§.§_-zu§ = false;</p><p> this.§_-4dw§.§_-wF§ = this.§_-1Dn§;</p><p> this.§_-4dw§.autoPlay = false;</p><p> this.§_-4dw§.§_-16h§.mute.visible = true;</p><p> this.§_-4dw§.§_-16h§.fullscreen.visible = false;</p><p> this.§_-4dw§.§_-16h§.bar.§_-1ya§ = false;</p><p> this.§_-4dw§.addEventListener(VideoControlsEvent.§_-3FO§,this.§_-0tf§,false,0,true);</p><p> this.§_-4ls§();</p><p> this.§_-4dw§.addEventListener(VideoControlsEvent.§_-0AB§,this.§_-5l3§);</p><p> this.§_-4dw§.addEventListener(VideoControlsEvent.§_-Xh§,this.§_-5l3§);</p><p> this.§_-4dw§.addEventListener(MouseEvent.CLICK,this.§_-6UJ§);</p><p> }</p><p> </p><p> private function §_-1x§(param1:Array, param2:String) : void</p><p> {</p><p> var _loc3_:TrackingEvent = null;</p><p> if(param1)</p><p> {</p><p> this.§_-5js§ = new Dictionary();</p><p> this.§_-5js§[§_-3zH§] = param2;</p><p> for each(_loc3_ in param1)</p><p> {</p><p> this.§_-5js§[_loc3_.eventType] = _loc3_;</p><p> }</p><p> }</p><p> }</p><p> </p><p> private function §_-4ls§() : void</p><p> {</p><p> if(this.§_-4dw§ == null || this.§_-0Bj§ == null)</p><p> {</p><p> return;</p><p> }</p><p> var _loc1_:IDisplayObjectWrapper = this.§_-0Bj§.findChildByName("image") as IDisplayObjectWrapper;</p><p> if(_loc1_ == null)</p><p> {</p><p> return;</p><p> }</p><p> var _loc2_:int = Math.max(0,this.§_-4dw§.width - _loc1_.width);</p><p> var _loc3_:int = Math.max(0,this.§_-4dw§.height - _loc1_.height);</p><p> this.§_-0Bj§.scale(_loc2_,_loc3_);</p><p> _loc1_.setDisplayObject(this.§_-4dw§);</p><p> this.§_-4dw§.autoPlay = true;</p><p> this.§_-0Bj§.visible = true;</p><p> this.§_-0Bj§.center();</p><p> }</p><p> </p><p> private function playVideo() : void</p><p> {</p><p> var _loc2_:VideoAdV2 = null;</p><p> var _loc5_:MediaFile = null;</p><p> var _loc6_:String = null;</p><p> var _loc7_:NetworkResource = null;</p><p> var _loc1_:int = this.§_-YH§.length;</p><p> if(_loc1_ == 0)</p><p> {</p><p> return;</p><p> }</p><p> if(_loc1_ > 0)</p><p> {</p><p> _loc2_ = this.§_-YH§[0] as VideoAdV2;</p><p> }</p><p> var _loc3_:String = "";</p><p> var _loc4_:Array = _loc2_.getImpressionList();</p><p> if(_loc4_.length > 0)</p><p> {</p><p> _loc3_ = String(_loc4_[0]);</p><p> }</p><p> if(_loc2_ && _loc2_.hasAds(false))</p><p> {</p><p> _loc5_ = _loc2_.linearVideoAd.mediaFiles[0] as MediaFile;</p><p> if(_loc5_ == null)</p><p> {</p><p> return;</p><p> }</p><p> _loc6_ = _loc5_.url.url;</p><p> this.§_-1x§(_loc2_.trackingEvents,_loc3_);</p><p> if(_loc2_.linearVideoAd.clickThroughs.length > 0)</p><p> {</p><p> _loc7_ = _loc2_.linearVideoAd.clickThroughs[0] as NetworkResource;</p><p> if(_loc7_ != null)</p><p> {</p><p> this.§_-5l5§ = _loc7_.url;</p><p> }</p><p> }</p><p> this.§_-4aA§(int(_loc5_.width),int(_loc5_.height));</p><p> this.§_-4dw§.load(_loc6_);</p><p> this.§_-4dw§.play();</p><p> this.§_-5NM§(§_-3zH§);</p><p> if(this.§_-09f§ == null)</p><p> {</p><p> this.§_-09f§ = new Timer(500);</p><p> this.§_-09f§.addEventListener(TimerEvent.TIMER,this.§_-1qS§);</p><p> }</p><p> if(this.§_-09f§.running)</p><p> {</p><p> this.§_-09f§.reset();</p><p> }</p><p> this.§_-09f§.start();</p><p> }</p><p> }</p><p> </p><p> private function §_-5NM§(param1:String) : void</p><p> {</p><p> var _loc2_:TrackingEvent = null;</p><p> var _loc3_:Array = null;</p><p> var _loc4_:URLLoader = null;</p><p> _loc2_ = this.§_-5js§[param1] as TrackingEvent;</p><p> if(_loc2_ != null || param1 == §_-3zH§)</p><p> {</p><p> if(param1 == §_-3zH§)</p><p> {</p><p> _loc3_ = [this.§_-5js§[§_-3zH§]];</p><p> }</p><p> else</p><p> {</p><p> _loc3_ = _loc2_.getURLList();</p><p> }</p><p> if(_loc3_ && _loc3_.length > 0)</p><p> {</p><p> _loc4_ = new URLLoader();</p><p> _loc4_.addEventListener(Event.COMPLETE,this.§_-2ez§);</p><p> _loc4_.addEventListener(IOErrorEvent.IO_ERROR,this.§_-6Ss§);</p><p> _loc4_.load(new URLRequest(_loc3_[0]));</p><p> }</p><p> }</p><p> }</p><p> </p><p> private function §_-1qS§(param1:TimerEvent) : void</p><p> {</p><p> var _loc2_:Number = NaN;</p><p> if(this.§_-4dw§)</p><p> {</p><p> _loc2_ = this.§_-4dw§.§_-4TT§();</p><p> if(this.§_-4dw§.§_-07c§ == §_-3WQ§.§_-4rF§)</p><p> {</p><p> if(this.§_-5TP§ < 0.25 && _loc2_ >= 0.25)</p><p> {</p><p> this.§_-5NM§(§_-38P§);</p><p> }</p><p> else if(this.§_-5TP§ < 0.5 && _loc2_ >= 0.5)</p><p> {</p><p> this.§_-5NM§(§_-1Ks§);</p><p> }</p><p> else if(this.§_-5TP§ < 0.75 && _loc2_ >= 0.75)</p><p> {</p><p> this.§_-5NM§(§_-1LH§);</p><p> }</p><p> }</p><p> this.§_-5TP§ = _loc2_;</p><p> }</p><p> }</p><p> </p><p> private function §_-0tf§(k:VideoControlsEvent) : void</p><p> {</p><p> if(k.data == §_-3WQ§.§_-07f§)</p><p> {</p><p> this.§_-09f§.reset();</p><p> this.§_-5NM§(§_-4ka§);</p><p> this.§_-5NM§(§_-5DB§);</p><p> this.§_-4bz§(new §_-69x§(§_-69x§.§_-2iI§));</p><p> }</p><p> else if(k.data == §_-3WQ§.§_-4rF§ && this.§_-Ap§ == §_-3WQ§.§_-35l§)</p><p> {</p><p> this.§_-5NM§(§_-sh§);</p><p> }</p><p> else if(k.data == §_-3WQ§.§_-35l§ && this.§_-Ap§ != §_-3WQ§.§_-35l§)</p><p> {</p><p> this.§_-5NM§(§_-29F§);</p><p> }</p><p> this.§_-Ap§ = k.data;</p><p> }</p><p> </p><p> private function §_-2L1§(k:Event) : void</p><p> {</p><p> if(this.§_-08B§ != "")</p><p> {</p><p> §_-0xW§.§_-4U9§(this.§_-08B§);</p><p> }</p><p> }</p><p> </p><p> private function §_-6UJ§(k:Event) : void</p><p> {</p><p> if(this.§in§ != "" && this.§_-5l5§ != "" && !this.§_-1fs§)</p><p> {</p><p> §_-0xW§.§_-4U9§(this.§_-5l5§);</p><p> this.§_-1fs§ = true;</p><p> }</p><p> }</p><p> </p><p> private function §_-6Ss§(k:IOErrorEvent) : void</p><p> {</p><p> }</p><p> </p><p> private function §_-2ez§(k:Event) : void</p><p> {</p><p> }</p><p> </p><p> private function §_-4l0§() : void</p><p> {</p><p> this.§_-5NM§(§_-46O§);</p><p> }</p><p> </p><p> private function §_-510§() : void</p><p> {</p><p> this.§_-5NM§(§_-Cg§);</p><p> }</p><p> </p><p> private function §_-5l3§(k:VideoControlsEvent) : void</p><p> {</p><p> if(this.§_-4dw§.§_-2HE§ == 0)</p><p> {</p><p> this.§_-yy§ = true;</p><p> this.§_-4l0§();</p><p> }</p><p> else</p><p> {</p><p> if(this.§_-yy§)</p><p> {</p><p> this.§_-510§();</p><p> }</p><p> this.§_-yy§ = false;</p><p> }</p><p> }</p><p> }</p><p>}</p><p>[/CODE]</p><p>[/SPOILER]</p></blockquote><p></p>
[QUOTE="Menkz, post: 441577, member: 346"] Double post because it was too long. [SPOILER="LoadingBarWidget"] [CODE=javascript]package §_-2DV§ { import §_-01O§.IBorderWindow; import §_-01O§.IDisplayObjectWrapper; import §_-01O§.IRegionWindow; import §_-0iX§.XmlAsset; import §_-0iX§.§_-47Z§; import §_-0iX§.§_-4x7§; import §_-1NT§.§_-69x§; import §_-1vS§.NetworkResource; import §_-2-m§.AssetLoaderEvent; import §_-3KB§.§_-6cw§; import §_-4RP§.VideoControlsEvent; import §_-4zd§.MediaFile; import §_-4zd§.TrackingEvent; import §_-4zd§.VideoAdServingTemplate; import §_-4zd§.VideoAdV2; import §_-5Wx§.§_-254§; import §_-6-Z§.§_-2zN§; import §_-GU§.§_-0xW§; import §_-L3§.§_-4z§; import §_-SI§.ApdevVideoPlayer; import §_-SI§.§_-3WQ§; import §_-YN§.§_-K9§; import flash.display.BitmapData; import flash.display.Sprite; import flash.events.Event; import flash.events.IEventDispatcher; import flash.events.IOErrorEvent; import flash.events.MouseEvent; import flash.events.SecurityErrorEvent; import flash.events.TimerEvent; import flash.net.URLLoader; import flash.net.URLRequest; import flash.utils.Dictionary; import flash.utils.Timer; public class LoadingBarWidget extends §_-2zN§ { private static const §_-5DB§:String = "close"; private static const §_-4ka§:String = "complete"; private static const §_-38P§:String = "firstQuartile"; private static const §_-1Ks§:String = "midpoint"; private static const §_-46O§:String = "mute"; private static const §_-29F§:String = "pause"; private static const §_-sh§:String = "resume"; private static const §_-1LH§:String = "thirdQuartile"; private static const §_-Cg§:String = "unmute"; private static const §_-3zH§:String = "start"; private var §_-0Bj§:IBorderWindow; private var §_-59D§:§_-6cw§; private var §_-1Dn§:BitmapData; private var §_-08B§:String = ""; private var §_-2E9§:Sprite = null; private var §_-4dw§:ApdevVideoPlayer; private var §in§:String = ""; private var §_-YH§:Array; private var §_-yy§:Boolean = false; private var §_-5js§:Dictionary; private var §_-09f§:Timer; private var §_-5TP§:Number; private var §_-5l5§:String; private var §_-1fs§:Boolean = false; private var §_-Ap§:String; public function LoadingBarWidget(param1:§_-254§, param2:§_-K9§, param3:§_-4x7§, param4:§_-4z§, param5:§_-6cw§) { this.§_-YH§ = []; super(param1,param2,param3,param4); this.§_-59D§ = param5; } override public function dispose() : void { if(this.§_-2E9§ != null) { this.§_-2E9§.removeEventListener(MouseEvent.CLICK,this.§_-2L1§); this.§_-2E9§ = null; } if(this.§_-1Dn§ != null) { this.§_-1Dn§.dispose(); this.§_-1Dn§ = null; } if(this.§_-0Bj§ != null) { this.§_-0Bj§.dispose(); this.§_-0Bj§ = null; } this.§_-59D§ = null; super.dispose(); } override public function registerUpdateEvents(k:IEventDispatcher) : void { if(k == null) { return; } k.addEventListener(§_-69x§.§_-3Lu§,this.§_-DL§); k.addEventListener(§_-69x§.§_-2iI§,this.§_-4bz§); super.registerUpdateEvents(k); } override public function unregisterUpdateEvents(k:IEventDispatcher) : void { if(k == null) { return; } k.removeEventListener(§_-69x§.§_-3Lu§,this.§_-DL§); k.removeEventListener(§_-69x§.§_-2iI§,this.§_-DL§); k.removeEventListener(§_-69x§.§_-2iI§,this.§_-4bz§); } private function §_-2GK§(k:AssetLoaderEvent) : void { §_-3E2§.log("Error loading xml: " + this.§in§ + ", " + k); } private function §_-0aV§(k:SecurityErrorEvent) : void { } private function §_-DL§(k:§_-69x§) : void { if(k == null || k.type != §_-69x§.§_-3Lu§) { return; } if(!this.createWindow()) { return; } this.§_-0Bj§.visible = true; this.§_-0Bj§.center(); } private function §_-4bz§(k:§_-69x§) : void { if(k == null || k.type != §_-69x§.§_-2iI§) { return; } if(this.§_-4dw§ && (this.§_-4dw§.§_-07c§ == §_-3WQ§.§_-4rF§ || this.§_-4dw§.§_-07c§ == §_-3WQ§.§_-35l§)) { return; } if(this.§_-0Bj§ != null) { this.§_-0Bj§.dispose(); this.§_-0Bj§ = null; } } private function createWindow() : Boolean { var _loc4_:int = 0; if(this.§_-0Bj§ != null) { return true; } var _loc1_:XmlAsset = assets.getAssetByName("room_loading_bar") as XmlAsset; if(_loc1_ == null) { return false; } this.§_-0Bj§ = windowManager.buildFromXML(_loc1_.content as XML) as IBorderWindow; if(this.§_-0Bj§ == null) { return false; } this.§_-0Bj§.visible = false; var _loc2_:IRegionWindow = this.§_-0Bj§.findChildByName("region") as IRegionWindow; if(_loc2_ != null) { } var _loc3_:IDisplayObjectWrapper = this.§_-0Bj§.findChildByName("image") as IDisplayObjectWrapper; if(_loc3_ != null) { _loc4_ = _loc3_.height; this.§_-0Bj§.scale(0,-_loc4_); } return true; } private function §_-3sV§(param1:AssetLoaderEvent) : void { var _loc2_:§_-47Z§ = null; var _loc3_:XmlAsset = null; var _loc4_:XML = null; var _loc5_:VideoAdServingTemplate = null; _loc2_ = param1.target as §_-47Z§; _loc2_.removeEventListener(AssetLoaderEvent.§_-l5§,this.§_-3sV§); _loc2_.removeEventListener(AssetLoaderEvent.§_-mK§,this.§_-3sV§); if(param1.type == AssetLoaderEvent.§_-l5§) { _loc3_ = _assets.getAssetByName(_loc2_.assetName) as XmlAsset; _loc4_ = _loc3_.content as XML; if(_loc4_ != null) { _loc5_ = new VideoAdServingTemplate(); _loc5_.§_-3vh§(_loc4_); this.§_-YH§ = _loc5_.ads; this.playVideo(); } } } private function §_-4aA§(param1:int = 760, param2:int = 480) : void { this.§_-4dw§ = new ApdevVideoPlayer(param1,param2); this.§_-4dw§.§_-Y9§ = false; this.§_-4dw§.§_-zu§ = false; this.§_-4dw§.§_-wF§ = this.§_-1Dn§; this.§_-4dw§.autoPlay = false; this.§_-4dw§.§_-16h§.mute.visible = true; this.§_-4dw§.§_-16h§.fullscreen.visible = false; this.§_-4dw§.§_-16h§.bar.§_-1ya§ = false; this.§_-4dw§.addEventListener(VideoControlsEvent.§_-3FO§,this.§_-0tf§,false,0,true); this.§_-4ls§(); this.§_-4dw§.addEventListener(VideoControlsEvent.§_-0AB§,this.§_-5l3§); this.§_-4dw§.addEventListener(VideoControlsEvent.§_-Xh§,this.§_-5l3§); this.§_-4dw§.addEventListener(MouseEvent.CLICK,this.§_-6UJ§); } private function §_-1x§(param1:Array, param2:String) : void { var _loc3_:TrackingEvent = null; if(param1) { this.§_-5js§ = new Dictionary(); this.§_-5js§[§_-3zH§] = param2; for each(_loc3_ in param1) { this.§_-5js§[_loc3_.eventType] = _loc3_; } } } private function §_-4ls§() : void { if(this.§_-4dw§ == null || this.§_-0Bj§ == null) { return; } var _loc1_:IDisplayObjectWrapper = this.§_-0Bj§.findChildByName("image") as IDisplayObjectWrapper; if(_loc1_ == null) { return; } var _loc2_:int = Math.max(0,this.§_-4dw§.width - _loc1_.width); var _loc3_:int = Math.max(0,this.§_-4dw§.height - _loc1_.height); this.§_-0Bj§.scale(_loc2_,_loc3_); _loc1_.setDisplayObject(this.§_-4dw§); this.§_-4dw§.autoPlay = true; this.§_-0Bj§.visible = true; this.§_-0Bj§.center(); } private function playVideo() : void { var _loc2_:VideoAdV2 = null; var _loc5_:MediaFile = null; var _loc6_:String = null; var _loc7_:NetworkResource = null; var _loc1_:int = this.§_-YH§.length; if(_loc1_ == 0) { return; } if(_loc1_ > 0) { _loc2_ = this.§_-YH§[0] as VideoAdV2; } var _loc3_:String = ""; var _loc4_:Array = _loc2_.getImpressionList(); if(_loc4_.length > 0) { _loc3_ = String(_loc4_[0]); } if(_loc2_ && _loc2_.hasAds(false)) { _loc5_ = _loc2_.linearVideoAd.mediaFiles[0] as MediaFile; if(_loc5_ == null) { return; } _loc6_ = _loc5_.url.url; this.§_-1x§(_loc2_.trackingEvents,_loc3_); if(_loc2_.linearVideoAd.clickThroughs.length > 0) { _loc7_ = _loc2_.linearVideoAd.clickThroughs[0] as NetworkResource; if(_loc7_ != null) { this.§_-5l5§ = _loc7_.url; } } this.§_-4aA§(int(_loc5_.width),int(_loc5_.height)); this.§_-4dw§.load(_loc6_); this.§_-4dw§.play(); this.§_-5NM§(§_-3zH§); if(this.§_-09f§ == null) { this.§_-09f§ = new Timer(500); this.§_-09f§.addEventListener(TimerEvent.TIMER,this.§_-1qS§); } if(this.§_-09f§.running) { this.§_-09f§.reset(); } this.§_-09f§.start(); } } private function §_-5NM§(param1:String) : void { var _loc2_:TrackingEvent = null; var _loc3_:Array = null; var _loc4_:URLLoader = null; _loc2_ = this.§_-5js§[param1] as TrackingEvent; if(_loc2_ != null || param1 == §_-3zH§) { if(param1 == §_-3zH§) { _loc3_ = [this.§_-5js§[§_-3zH§]]; } else { _loc3_ = _loc2_.getURLList(); } if(_loc3_ && _loc3_.length > 0) { _loc4_ = new URLLoader(); _loc4_.addEventListener(Event.COMPLETE,this.§_-2ez§); _loc4_.addEventListener(IOErrorEvent.IO_ERROR,this.§_-6Ss§); _loc4_.load(new URLRequest(_loc3_[0])); } } } private function §_-1qS§(param1:TimerEvent) : void { var _loc2_:Number = NaN; if(this.§_-4dw§) { _loc2_ = this.§_-4dw§.§_-4TT§(); if(this.§_-4dw§.§_-07c§ == §_-3WQ§.§_-4rF§) { if(this.§_-5TP§ < 0.25 && _loc2_ >= 0.25) { this.§_-5NM§(§_-38P§); } else if(this.§_-5TP§ < 0.5 && _loc2_ >= 0.5) { this.§_-5NM§(§_-1Ks§); } else if(this.§_-5TP§ < 0.75 && _loc2_ >= 0.75) { this.§_-5NM§(§_-1LH§); } } this.§_-5TP§ = _loc2_; } } private function §_-0tf§(k:VideoControlsEvent) : void { if(k.data == §_-3WQ§.§_-07f§) { this.§_-09f§.reset(); this.§_-5NM§(§_-4ka§); this.§_-5NM§(§_-5DB§); this.§_-4bz§(new §_-69x§(§_-69x§.§_-2iI§)); } else if(k.data == §_-3WQ§.§_-4rF§ && this.§_-Ap§ == §_-3WQ§.§_-35l§) { this.§_-5NM§(§_-sh§); } else if(k.data == §_-3WQ§.§_-35l§ && this.§_-Ap§ != §_-3WQ§.§_-35l§) { this.§_-5NM§(§_-29F§); } this.§_-Ap§ = k.data; } private function §_-2L1§(k:Event) : void { if(this.§_-08B§ != "") { §_-0xW§.§_-4U9§(this.§_-08B§); } } private function §_-6UJ§(k:Event) : void { if(this.§in§ != "" && this.§_-5l5§ != "" && !this.§_-1fs§) { §_-0xW§.§_-4U9§(this.§_-5l5§); this.§_-1fs§ = true; } } private function §_-6Ss§(k:IOErrorEvent) : void { } private function §_-2ez§(k:Event) : void { } private function §_-4l0§() : void { this.§_-5NM§(§_-46O§); } private function §_-510§() : void { this.§_-5NM§(§_-Cg§); } private function §_-5l3§(k:VideoControlsEvent) : void { if(this.§_-4dw§.§_-2HE§ == 0) { this.§_-yy§ = true; this.§_-4l0§(); } else { if(this.§_-yy§) { this.§_-510§(); } this.§_-yy§ = false; } } } } [/CODE] [/SPOILER] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Where is the loading/splash page in Habbo.swf?
Top