Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
???? #1
How to see the .AS file that .MXML file is translated tobefore being compiled to SWF?
I am trying to dynamically load some other Applications in one Application, use
ActionScript but not SWFLoader tag, it looks like:
<mx:Application>
<mx:Script>
<![CDATA[
private var loader:SWFLoader = new SWFLoader();
private function loadSWF(url:String):void{
var baseURL:String = this.url.substr(0, this.url.lastIndexOf("/"));
var url = baseURL + "/"+ name;
//even if I did not add any event listener!
loader.load(url);
}
]]>
</mx:Script>
<mx:Button label="B" click="loadSWF('Top_2.swf');" y="10" x="58"/>
</mx:Application>
then when me click the button, always occured an error like this:(even if
every method I add try...catch... )
TypeError: Error #1009: Cannot access a property or method of a null object
reference.
at
mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::updateCallbacks
()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\ core\UIComponent.as:5043]
at mx.core::UIComponent/set
nestLevel()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\ core\UIComponent.a
s:2522]
at
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::addingChi
ld()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\ managers\SystemManager.as
:1583]
at
mx.managers::SystemManager/initializeTopLevelWindow()[E:\dev\3.0.x\frameworks\pr
ojects\framework\src\mx\managers\SystemManager.as: 2481]
at
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::docFrameH
andler()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\ managers\SystemManage
r.as:2330]
however, if I use <mx:SWFLoader source="Top_2.swf" /> tag, there is no such
problem! So I think it must be I didn't init SWFLoader correctly!
I hope someone can tell me how to crrect this mistake directly, but I more
wish someone to tell me how to view the .as file that the .mxml file translated
to before being compiled to a SWF( If there is a such step!)
Thanks!
???? Guest
-
CSS file compiled into SWF...
Hello, I have a problem with all my css files in my Flex project. I need them to be compiled into SWF because its the only way to load and switch... -
How to get swf file of any mxml file in flex1.5
hi all, can anybody tell i have one mxml file now when i run this i file server generate swf file dynemically ....now my requirement is i... -
How to link a .mxml file and a .as file ?
Hello, I don't like so much the idea about mixing action Script ( processing code ) and form description ( end user presentation) even if the... -
how to load external html file into mxml file
hi all plz tell me how i can load external html file in mcml file just like say when we receive mail in inbox and see our mail data .. i have... -
Can I embed external MXML in another MXML file?
Hi - I'm new to this so please bear with me. I'm trying to do something like you do in JSP's with a JSP include where I can import prewritten code... -
???? #2
Re: How to see the .AS file that .MXML file istranslated to before being compiled to SWF?
Maybe the SWFLoader must be one child of one DisplayObject!??
I found when the swfloader is been added to some DisplayObject in actionScript
like below, the problem didn't occure any more.
swfloader.visible = false;
this.addChild(swfloader); // 'this' is current Application
swfloader.addEventListener(".....", someHandler);
swfloader.load("someurl");
Why? Is this a bug or not?
I am still waiting someone to tell me where a .mxml file can be translated to
a .as file which could be visited!
???? Guest
-
mab_bond #3
Re: How to see the .AS file that .MXML file istranslated to before being compiled to SWF?
add this para: -keep-generated-actionscript to the compiler options and you'll be able to see all the action script that flex generate for your app.
mab_bond Guest
-
Suneel Saguturu #4
Re: How to see the .AS file that .MXML file is translated tobefore being compiled to
Thanks for providing the option... it's cool.
Suneel Saguturu Guest



Reply With Quote

