-
-
Save JordanMilne/145722dd2ca31bc96f86 to your computer and use it in GitHub Desktop.
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 hotspotGallery_fla { | |
import flash.events.*; | |
import flash.display.*; | |
import flash.text.*; | |
import adobe.utils.*; | |
import flash.accessibility.*; | |
import flash.errors.*; | |
import flash.external.*; | |
import flash.filters.*; | |
import flash.geom.*; | |
import flash.media.*; | |
import flash.net.*; | |
import flash.printing.*; | |
import flash.system.*; | |
import flash.ui.*; | |
import flash.utils.*; | |
import flash.xml.*; | |
public dynamic class MainTimeline extends MovieClip { | |
public var Upath; | |
public var exteriorXML1:String; | |
public var LoaderClip:MovieClip; | |
public var txt:TextField; | |
public var enginePath; | |
public var exteriorXML:String; | |
public var loadinfo:MovieClip; | |
public var DATA3:XML; | |
public var DATA2:XML; | |
public var temp:TextField; | |
public var dataPath; | |
public function MainTimeline(){ | |
addFrameScript(0, frame1); | |
} | |
public function loadXML2():void{ | |
var ldr:* = null; | |
var loader_IO_ERROR:* = null; | |
var ldrEventHandler:* = null; | |
loader_IO_ERROR = function ():void{ | |
}; | |
ldrEventHandler = function (_arg1:Event):void{ | |
DATA3 = new XML(_arg1.target.data); | |
temp.text = DATA3; | |
loadAnim((enginePath + "/angfront.swf"), -10, -10); | |
}; | |
ldr = new URLLoader(); | |
try { | |
ldr.load(new URLRequest(dataPath + "/" + exteriorXML1)); | |
} catch(error:SecurityError) { | |
trace("A SecurityError has occurred."); | |
}; | |
ldr.addEventListener(IOErrorEvent.IO_ERROR, loader_IO_ERROR); | |
ldr.addEventListener(Event.COMPLETE, ldrEventHandler); | |
} | |
public function angFront_Anim(){ | |
while (LoaderClip.numChildren > 0) { | |
LoaderClip.removeChildAt(0); | |
}; | |
loadAnim((enginePath + "/angfront.swf"), -10, -10); | |
} | |
public function loadAnim(_arg1:String, _arg2:Number, _arg3:Number){ | |
var MCLoader:* = undefined; | |
var ldrComplete:* = null; | |
var param:* = _arg1; | |
var xPos:* = _arg2; | |
var yPos:* = _arg3; | |
ldrComplete = function (_arg1:Event){ | |
MCLoader.x = xPos; | |
MCLoader.y = yPos; | |
}; | |
trace(("DATA " + param)); | |
MCLoader = new Loader(); | |
MCLoader.load(new URLRequest(param)); | |
LoaderClip.addChild(MCLoader); | |
loadinfo.visible = true; | |
MCLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, ldrComplete); | |
} | |
public function angRear_Anim(){ | |
while (LoaderClip.numChildren > 0) { | |
LoaderClip.removeChildAt(0); | |
}; | |
loadAnim((enginePath + "/angrear.swf"), -10, -10); | |
} | |
public function loadXML():void{ | |
var ldr:* = null; | |
var loader_IO_ERROR:* = null; | |
var ldrEventHandler:* = null; | |
loader_IO_ERROR = function ():void{ | |
}; | |
ldrEventHandler = function (_arg1:Event):void{ | |
DATA2 = new XML(_arg1.target.data); | |
temp.text = DATA2; | |
loadXML2(); | |
txt.text = DATA2; | |
}; | |
ldr = new URLLoader(); | |
try { | |
ldr.load(new URLRequest(dataPath + "/" + exteriorXML)); | |
} catch(error:SecurityError) { | |
trace("A SecurityError has occurred."); | |
}; | |
ldr.addEventListener(IOErrorEvent.IO_ERROR, loader_IO_ERROR); | |
ldr.addEventListener(Event.COMPLETE, ldrEventHandler); | |
} | |
function frame1(){ | |
Security.allowDomain("*"); | |
Upath = this.loaderInfo.url.split("?"); | |
exteriorXML = "angfront.xml"; | |
exteriorXML1 = "angrear.xml"; | |
dataPath = this.loaderInfo.parameters.dataPath; | |
enginePath = Upath[0].substr(0, (Upath[0].length - 19)); | |
txt.text = ((dataPath + " ") + enginePath); | |
loadXML(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment