mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-29 18:34:42 +00:00
Fixed twolevel nested debugging
This commit is contained in:
@@ -2,6 +2,8 @@ package
|
||||
{
|
||||
import flash.display.Sprite;
|
||||
import flash.events.Event;
|
||||
import flash.text.TextField;
|
||||
import flash.text.TextFormat;
|
||||
|
||||
public class InnerMain extends Sprite
|
||||
{
|
||||
@@ -13,10 +15,24 @@ package
|
||||
else addEventListener(Event.ADDED_TO_STAGE, init);
|
||||
}
|
||||
|
||||
private function init(e:Event = null):void
|
||||
private function init(e:Event = null):void
|
||||
{
|
||||
removeEventListener(Event.ADDED_TO_STAGE, init);
|
||||
// entry point
|
||||
|
||||
var textField:TextField = new TextField();
|
||||
|
||||
textField.text = "Main inner1.";
|
||||
|
||||
var textFormat:TextFormat = new TextFormat();
|
||||
textFormat.size = 24;
|
||||
textFormat.color = 0x000000;
|
||||
textField.setTextFormat(textFormat);
|
||||
textField.width = 200;
|
||||
|
||||
addChild(textField);
|
||||
|
||||
textField.x = 50;
|
||||
textField.y = 125;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -43,14 +43,17 @@ package
|
||||
var byteArray:ByteArray = new binaryData2Class() as ByteArray;
|
||||
var loader:Loader = new Loader();
|
||||
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoaderComplete);
|
||||
//trace("loading innerSwf 2");
|
||||
loader.loadBytes(byteArray);
|
||||
}
|
||||
|
||||
private function onLoaderComplete(event:Event):void {
|
||||
var loaderInfo:LoaderInfo = event.target as LoaderInfo;
|
||||
var className:String = "MyInnerClass2";
|
||||
//trace("getting definition of " + className);
|
||||
var LoadedClass:Class = loaderInfo.applicationDomain.getDefinition(className) as Class;
|
||||
var instance:* = new LoadedClass();
|
||||
//trace("calling innerSwf 2 instance");
|
||||
instance.run(root);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user