flex - What undocumented alchemy is necessary to get parentApplication to work -
i load swf swfloader. within loaded .swf, this.parentapplication returning null. been searching internet 8 hours.
code listing requested:
<?xml version="1.0"?> <mx:application xmlns:mx="http://www.adobe.com/2006/mxml" initialize= "init();" visible="false" > <mx:script> <![cdata[ import flextrace.dumper; private var txt_event:textevent = new textevent(textevent.link,false,false,"next.xml"); private var timer:timer = new timer(10000); private function init():void { timer.addeventlistener(timerevent.timer,timer_handlr); timer.start(); } private function timer_handlr(event:event) { dumper.info("timer_handlr"); if (this.parentapplication == null) dumper.info("null"); parentapplication.dispatchevent(new textevent(textevent.link,false,false,"next.xml")); } ]]> </mx:script> </mx:application>
i looking through flex docs , saw answer on question, if understood correctly:
the parentapplication property of application object never itself; either application object loaded, or it null (for application object).
since, calling application, should null.
just quick link accessing nested applications (i haven't tested solution yet tho, still, may give ideas): nesting flex applications - weird issues..
hope, :)
Comments
Post a Comment