Created
August 6, 2012 13:29
-
-
Save illuzor/3274478 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
public function Main():void { | |
var loader:Loader = new Loader(); | |
loader.load(new URLRequest("TestToLoad.swf")); | |
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoaded); | |
} | |
private function onLoaded(e:Event):void { | |
e.target.removeEventListener(Event.COMPLETE, onLoaded); | |
var TestClass:Class = e.target.applicationDomain.getDefinition("com.illuzor.test.LoadedClass") as Class; | |
var loadedClassInstance:Object = new TestClass() as Object; | |
trace(loadedClassInstance.getTestNumber()); | |
trace(loadedClassInstance.getTestText()); | |
trace(loadedClassInstance.testGetterVar); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment