Created
January 5, 2023 22:20
-
-
Save JakeSteam/fc1614c3f5a92b281dba55f6081e7288 to your computer and use it in GitHub Desktop.
"Scary Maze Game" decompiled
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package | |
{ | |
import com.google.ads.instream.api.AdErrorEvent; | |
import com.google.ads.instream.api.AdEvent; | |
import com.google.ads.instream.api.AdLoadedEvent; | |
import com.google.ads.instream.api.AdSizeChangedEvent; | |
import com.google.ads.instream.api.AdsLoadedEvent; | |
import com.google.ads.instream.api.AdsLoader; | |
import com.google.ads.instream.api.AdsManager; | |
import com.google.ads.instream.api.AdsManagerTypes; | |
import com.google.ads.instream.api.AdsRequest; | |
import com.google.ads.instream.api.AdsRequestType; | |
import com.google.ads.instream.api.FlashAdCustomEvent; | |
import com.google.ads.instream.api.FlashAdsManager; | |
import com.google.ads.instream.api.VideoAdsManager; | |
import flash.display.MovieClip; | |
import flash.display.SimpleButton; | |
import flash.events.Event; | |
import flash.events.MouseEvent; | |
import flash.net.URLRequest; | |
import flash.net.navigateToURL; | |
import flash.ui.Mouse; | |
public class maze extends MovieClip | |
{ | |
public var Wall13:SimpleButton; | |
public var Wall22:SimpleButton; | |
public var Wall23:SimpleButton; | |
public var Wall24:SimpleButton; | |
public var Wall15:SimpleButton; | |
public var Wall1:SimpleButton; | |
public var Level1:SimpleButton; | |
public var bar_mc:MovieClip; | |
public var Wall16:SimpleButton; | |
public var Wall25:SimpleButton; | |
public var Level2:SimpleButton; | |
public var Wall2:SimpleButton; | |
public var Wall17:SimpleButton; | |
public var Wall26:SimpleButton; | |
public var Level3:SimpleButton; | |
public var Wall3:SimpleButton; | |
public var Wall18:SimpleButton; | |
public var Wall4:SimpleButton; | |
public var btnReplay:SimpleButton; | |
public var Wall19:SimpleButton; | |
public var Wall5:SimpleButton; | |
public var Wall6:SimpleButton; | |
public var btnTextPlay:SimpleButton; | |
public var Wall7:SimpleButton; | |
public var btnEnd:SimpleButton; | |
public var Wall8:SimpleButton; | |
public var Wall9:SimpleButton; | |
public var Dot:MovieClip; | |
public var btnWebsite:SimpleButton; | |
public var btnPlayMaze:SimpleButton; | |
public var Wall:SimpleButton; | |
public var Wall10:SimpleButton; | |
public var btnEmail:SimpleButton; | |
public var btn_Website:SimpleButton; | |
public var Wall11:SimpleButton; | |
public var Wall20:SimpleButton; | |
public var btnPlay:SimpleButton; | |
public var btnTwitter:SimpleButton; | |
public var btnFacebook:SimpleButton; | |
public var Wall21:SimpleButton; | |
public var Wall12:SimpleButton; | |
public var btnCopyRightLink:SimpleButton; | |
internal var themaze:MovieClip; | |
internal var adsManager:AdsManager; | |
internal var adsLoader:AdsLoader; | |
internal var currentNetStream:NetStream; | |
internal var contentNetStream:NetStream; | |
internal var flashVars:Object; | |
internal var useGUT:Boolean; | |
internal var counter:uint = 0; | |
public function maze() | |
{ | |
adsLoader = new AdsLoader(); | |
super(); | |
addFrameScript(0,frame1,1,frame2,2,frame3,3,frame4,4,frame5,5,frame6,6,frame7,163,frame164); | |
if(stage != null) | |
{ | |
initialize(); | |
} | |
else | |
{ | |
addEventListener(Event.ADDED_TO_STAGE,initialize); | |
} | |
} | |
public function loading(e:Event) : void | |
{ | |
var total:Number = this.stage.loaderInfo.bytesTotal; | |
var loaded:Number = this.stage.loaderInfo.bytesLoaded; | |
bar_mc.scaleX = loaded / total; | |
if(total == loaded) | |
{ | |
this.play(); | |
removeEventListener(Event.ENTER_FRAME,loading); | |
} | |
} | |
public function fl_MouseClickHandler(event:MouseEvent) : void | |
{ | |
this.play(); | |
} | |
public function fl_ClickToGoToWebPage(event:MouseEvent) : void | |
{ | |
navigateToURL(new URLRequest("http://www.winterrowd.com"),"_blank"); | |
} | |
public function fl_ClickToGoToAndPlayFromFrame(event:MouseEvent) : void | |
{ | |
this.play(); | |
} | |
public function fl_CustomMouseCursor(event:Event) : * | |
{ | |
Dot.x = this.stage.mouseX; | |
Dot.y = this.stage.mouseY; | |
} | |
public function Level1_MouseOverHandler(event:MouseEvent) : void | |
{ | |
this.play(); | |
} | |
public function Level1Wall_MouseOverHandler(event:MouseEvent) : void | |
{ | |
Dot.removeEventListener(Event.ENTER_FRAME,fl_CustomMouseCursor); | |
this.stage.removeChild(Dot); | |
this.gotoAndPlay(3); | |
} | |
public function Level2_MouseOverHandler(event:MouseEvent) : void | |
{ | |
this.play(); | |
} | |
public function Level2Wall_MouseOverHandler(event:MouseEvent) : void | |
{ | |
Dot.removeEventListener(Event.ENTER_FRAME,fl_CustomMouseCursor); | |
this.stage.removeChild(Dot); | |
this.gotoAndPlay(3); | |
} | |
public function Level3_MouseOverHandler(event:MouseEvent) : void | |
{ | |
this.play(); | |
} | |
public function fl_ClickToGoToAndPlayFromFrame_2(event:MouseEvent) : void | |
{ | |
this.gotoAndPlay(7); | |
} | |
public function Level3Wall_MouseOverHandler(event:MouseEvent) : void | |
{ | |
Dot.removeEventListener(Event.ENTER_FRAME,fl_CustomMouseCursor); | |
this.stage.removeChild(Dot); | |
this.gotoAndPlay(3); | |
} | |
public function fl_ClickToGoToWebPage_3(event:MouseEvent) : void | |
{ | |
navigateToURL(new URLRequest("http://www.winterrowd.com"),"_blank"); | |
} | |
public function fl_ClickToGoToWebPage_7(event:MouseEvent) : void | |
{ | |
navigateToURL(new URLRequest("http://www.winterrowd.com"),"_blank"); | |
} | |
public function fl_ClickToGoToWebPage_2(event:MouseEvent) : void | |
{ | |
navigateToURL(new URLRequest("mailto:winterrowd@gmail.com?subject=The Maze")); | |
} | |
public function fl_ClickToGoToWebPage_4(event:MouseEvent) : void | |
{ | |
navigateToURL(new URLRequest("http://www.winterrowd.com/maze"),"_top"); | |
} | |
public function fl_ClickToGoToWebPage_5(event:MouseEvent) : void | |
{ | |
navigateToURL(new URLRequest("http://www.facebook.com/sharer.php?u=http://www.winterrowd.com/maze&t=The+Maze"),"_blank"); | |
} | |
public function fl_ClickToGoToWebPage_6(event:MouseEvent) : void | |
{ | |
navigateToURL(new URLRequest("http://twitter.com/home?status=Currently+playing+The+Maze!+http://www.winterrowd.com/maze+The+best+games+via+@Winterrowd"),"_blank"); | |
} | |
private function initialize(event:Event = null) : void | |
{ | |
removeEventListener(Event.ADDED_TO_STAGE,initialize); | |
onLoadAdFunc(); | |
} | |
private function onLoadAdButtonClick(event:Event) : void | |
{ | |
cleanup(); | |
loadAd(); | |
} | |
private function onLoadAdFunc() : void | |
{ | |
cleanup(); | |
loadAd(); | |
} | |
private function loadAd() : void | |
{ | |
adsLoader = new AdsLoader(); | |
stage.addChild(adsLoader); | |
adsLoader.addEventListener(AdsLoadedEvent.ADS_LOADED,onAdsLoaded); | |
adsLoader.addEventListener(AdErrorEvent.AD_ERROR,onAdError); | |
adsLoader.addEventListener(Event.ENTER_FRAME,loading); | |
adsLoader.requestAds(createAdsRequest()); | |
log("Ad requested"); | |
} | |
private function cleanup() : void | |
{ | |
onUnloadAdButtonClick(); | |
log("cleanup"); | |
} | |
private function onUnloadAdButtonClick(event:Event = null) : void | |
{ | |
unloadAd(); | |
log("unLoadAdButtonClick"); | |
} | |
private function unloadAd() : void | |
{ | |
try | |
{ | |
if(adsManager) | |
{ | |
removeListeners(); | |
removeAdsManagerListeners(); | |
adsManager.unload(); | |
adsManager = null; | |
stage.removeChild(adsLoader); | |
log("Ad unloaded"); | |
} | |
} | |
catch(e:Error) | |
{ | |
log("Error occured during unload : " + e.message); | |
} | |
} | |
private function removeAdsManagerListeners() : void | |
{ | |
adsManager.removeEventListener(AdErrorEvent.AD_ERROR,onAdError); | |
adsManager.removeEventListener(AdEvent.CLICK,onAdClicked); | |
} | |
private function onAdClicked(event:AdEvent) : void | |
{ | |
logEvent(event.type); | |
} | |
private function onContentPauseRequested(event:AdEvent) : void | |
{ | |
logEvent(event.type); | |
if(contentNetStream) | |
{ | |
contentNetStream.pause(); | |
} | |
} | |
private function createAdsRequest() : AdsRequest | |
{ | |
var adsRequest:AdsRequest = new AdsRequest(); | |
adsRequest.adSlotWidth = 550; | |
adsRequest.adSlotHeight = 400; | |
adsRequest.publisherId = "ca-games-pub-3611966219536430"; | |
adsRequest.adType = AdsRequestType.GRAPHICAL_OVERLAY; | |
adsRequest.channels = ["games","pranks","scary","maze"]; | |
adsRequest.descriptionUrl = "http://www.winterrowd.com/maze/"; | |
adsRequest.contentId = "1"; | |
adsRequest.disableCompanionAds = false; | |
adsRequest.maxTotalAdDuration = 10; | |
flashVars = loaderInfo.parameters; | |
useGUT = flashVars != null && flashVars.useGUT == false ? false : true; | |
if(!useGUT) | |
{ | |
adsRequest.disableCompanionAds = true; | |
} | |
return adsRequest; | |
} | |
private function onAdsLoaded(adsLoadedEvent:AdsLoadedEvent) : void | |
{ | |
var adsManager:AdsManager = adsLoadedEvent.adsManager; | |
adsManager.addEventListener(AdErrorEvent.AD_ERROR,onAdError); | |
adsManager.addEventListener(AdEvent.COMPLETE,onVideoAdComplete); | |
var flashAdsManager:FlashAdsManager = adsManager as FlashAdsManager; | |
flashAdsManager.x = 0; | |
flashAdsManager.y = 10; | |
flashAdsManager.load(); | |
flashAdsManager.play(); | |
} | |
private function onAdError(adErrorEvent:AdErrorEvent) : void | |
{ | |
log("Ad Error: " + adErrorEvent.error); | |
} | |
private function onVideoAdComplete(event:AdEvent) : void | |
{ | |
logEvent(event.type); | |
removeListeners(); | |
if(adsManager.type == AdsManagerTypes.VIDEO) | |
{ | |
(adsManager as VideoAdsManager).clickTrackingElement = null; | |
} | |
} | |
private function metaDataHandler(infoObject:Object) : void | |
{ | |
log("content metadata"); | |
} | |
private function log(message:Object, overwrite:Boolean = false) : void | |
{ | |
} | |
private function onAdLoaded(event:AdLoadedEvent) : void | |
{ | |
logEvent(event.type); | |
if(!event.netStream) | |
{ | |
} | |
} | |
private function logEvent(eventType:String) : void | |
{ | |
log(eventType + " event raised"); | |
} | |
private function removeListeners() : void | |
{ | |
adsManager.removeEventListener(AdLoadedEvent.LOADED,onAdLoaded); | |
adsManager.removeEventListener(AdEvent.STARTED,onAdStarted); | |
var flashAdsManager:FlashAdsManager = adsManager as FlashAdsManager; | |
flashAdsManager.removeEventListener(AdSizeChangedEvent.SIZE_CHANGED,onFlashAdSizeChanged); | |
flashAdsManager.removeEventListener(FlashAdCustomEvent.CUSTOM_EVENT,onFlashAdCustomEvent); | |
} | |
private function onAdStarted(event:AdEvent) : void | |
{ | |
logEvent(event.type); | |
} | |
private function onFlashAdSizeChanged(event:AdSizeChangedEvent) : void | |
{ | |
logEvent(event.type); | |
} | |
private function onFlashAdCustomEvent(event:FlashAdCustomEvent) : void | |
{ | |
logEvent(event.type); | |
} | |
private function onVideoAdStopped(event:AdEvent) : void | |
{ | |
logEvent(event.type); | |
} | |
private function onVideoAdPaused(event:AdEvent) : void | |
{ | |
logEvent(event.type); | |
} | |
private function onVideoAdMidpoint(event:AdEvent) : void | |
{ | |
logEvent(event.type); | |
} | |
private function onVideoAdFirstQuartile(event:AdEvent) : void | |
{ | |
logEvent(event.type); | |
} | |
private function onVideoAdThirdQuartile(event:AdEvent) : void | |
{ | |
logEvent(event.type); | |
} | |
private function onVideoAdClicked(event:AdEvent) : void | |
{ | |
logEvent(event.type); | |
} | |
private function onVideoAdRestarted(event:AdEvent) : void | |
{ | |
logEvent(event.type); | |
} | |
private function onVideoAdVolumeMuted(event:AdEvent) : void | |
{ | |
logEvent(event.type); | |
} | |
internal function frame1() : * | |
{ | |
this.addEventListener(Event.ENTER_FRAME,loading); | |
this.stop(); | |
} | |
internal function frame2() : * | |
{ | |
btnTextPlay.addEventListener(MouseEvent.CLICK,fl_MouseClickHandler); | |
btnPlay.addEventListener(MouseEvent.CLICK,fl_MouseClickHandler); | |
btnCopyRightLink.addEventListener(MouseEvent.CLICK,fl_ClickToGoToWebPage); | |
this.stop(); | |
} | |
internal function frame3() : * | |
{ | |
this.stop(); | |
Mouse.show(); | |
btnPlayMaze.addEventListener(MouseEvent.CLICK,fl_ClickToGoToAndPlayFromFrame); | |
} | |
internal function frame4() : * | |
{ | |
this.stage.showDefaultContextMenu = false; | |
this.stage.addChild(Dot); | |
Dot.mouseEnabled = false; | |
Dot.addEventListener(Event.ENTER_FRAME,fl_CustomMouseCursor); | |
Mouse.hide(); | |
Level1.addEventListener(MouseEvent.MOUSE_OVER,Level1_MouseOverHandler); | |
Wall.addEventListener(MouseEvent.MOUSE_OVER,Level1Wall_MouseOverHandler); | |
Wall1.addEventListener(MouseEvent.MOUSE_OVER,Level1Wall_MouseOverHandler); | |
Wall2.addEventListener(MouseEvent.MOUSE_OVER,Level1Wall_MouseOverHandler); | |
Wall3.addEventListener(MouseEvent.MOUSE_OVER,Level1Wall_MouseOverHandler); | |
this.stop(); | |
} | |
internal function frame5() : * | |
{ | |
Level2.addEventListener(MouseEvent.MOUSE_OVER,Level2_MouseOverHandler); | |
Wall.addEventListener(MouseEvent.MOUSE_OVER,Level2Wall_MouseOverHandler); | |
Wall1.addEventListener(MouseEvent.MOUSE_OVER,Level2Wall_MouseOverHandler); | |
Wall2.addEventListener(MouseEvent.MOUSE_OVER,Level2Wall_MouseOverHandler); | |
Wall4.addEventListener(MouseEvent.MOUSE_OVER,Level2Wall_MouseOverHandler); | |
Wall5.addEventListener(MouseEvent.MOUSE_OVER,Level2Wall_MouseOverHandler); | |
Wall6.addEventListener(MouseEvent.MOUSE_OVER,Level2Wall_MouseOverHandler); | |
Wall7.addEventListener(MouseEvent.MOUSE_OVER,Level2Wall_MouseOverHandler); | |
Wall8.addEventListener(MouseEvent.MOUSE_OVER,Level2Wall_MouseOverHandler); | |
Wall9.addEventListener(MouseEvent.MOUSE_OVER,Level2Wall_MouseOverHandler); | |
this.stop(); | |
} | |
internal function frame6() : * | |
{ | |
Level3.addEventListener(MouseEvent.MOUSE_OVER,Level3_MouseOverHandler); | |
btnEnd.addEventListener(MouseEvent.MOUSE_OVER,fl_ClickToGoToAndPlayFromFrame_2); | |
Wall10.addEventListener(MouseEvent.MOUSE_OVER,Level3Wall_MouseOverHandler); | |
Wall11.addEventListener(MouseEvent.MOUSE_OVER,Level3Wall_MouseOverHandler); | |
Wall12.addEventListener(MouseEvent.MOUSE_OVER,Level3Wall_MouseOverHandler); | |
Wall13.addEventListener(MouseEvent.MOUSE_OVER,Level3Wall_MouseOverHandler); | |
Wall15.addEventListener(MouseEvent.MOUSE_OVER,Level3Wall_MouseOverHandler); | |
Wall16.addEventListener(MouseEvent.MOUSE_OVER,Level3Wall_MouseOverHandler); | |
Wall17.addEventListener(MouseEvent.MOUSE_OVER,Level3Wall_MouseOverHandler); | |
Wall18.addEventListener(MouseEvent.MOUSE_OVER,Level3Wall_MouseOverHandler); | |
Wall19.addEventListener(MouseEvent.MOUSE_OVER,Level3Wall_MouseOverHandler); | |
Wall20.addEventListener(MouseEvent.MOUSE_OVER,Level3Wall_MouseOverHandler); | |
Wall21.addEventListener(MouseEvent.MOUSE_OVER,Level3Wall_MouseOverHandler); | |
Wall22.addEventListener(MouseEvent.MOUSE_OVER,Level3Wall_MouseOverHandler); | |
Wall23.addEventListener(MouseEvent.MOUSE_OVER,Level3Wall_MouseOverHandler); | |
Wall24.addEventListener(MouseEvent.MOUSE_OVER,Level3Wall_MouseOverHandler); | |
Wall25.addEventListener(MouseEvent.MOUSE_OVER,Level3Wall_MouseOverHandler); | |
Wall26.addEventListener(MouseEvent.MOUSE_OVER,Level3Wall_MouseOverHandler); | |
this.stop(); | |
} | |
internal function frame7() : * | |
{ | |
Dot.removeEventListener(Event.ENTER_FRAME,fl_CustomMouseCursor); | |
this.stage.removeChild(Dot); | |
Mouse.hide(); | |
} | |
internal function frame164() : * | |
{ | |
btnWebsite.addEventListener(MouseEvent.CLICK,fl_ClickToGoToWebPage_3); | |
btn_Website.addEventListener(MouseEvent.CLICK,fl_ClickToGoToWebPage_7); | |
btnEmail.addEventListener(MouseEvent.CLICK,fl_ClickToGoToWebPage_2); | |
btnReplay.addEventListener(MouseEvent.CLICK,fl_ClickToGoToWebPage_4); | |
btnFacebook.addEventListener(MouseEvent.CLICK,fl_ClickToGoToWebPage_5); | |
btnTwitter.addEventListener(MouseEvent.CLICK,fl_ClickToGoToWebPage_6); | |
Mouse.show(); | |
this.stop(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment