Fixed twolevel nested debugging

This commit is contained in:
Jindra Petřík
2024-08-05 09:58:19 +02:00
parent 3f9e66c208
commit d505eeee6a
20 changed files with 176 additions and 103 deletions

View File

@@ -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;
}
}

View File

@@ -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);
}