Hi..
Am getting an error message Could not resolve <Application> to a component implementation. Am trying the following mxml code.
<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2008/08/25/saving-files-locally-using-the-filereference-classs-save-method-in-flash-player-10/ -->
<Application name="FileReference_save_test"
xmlns="http://ns.adobe.com/mxml/2009" xmlns:mx="library:adobe/flex/halo" xmlns:net="flash.net.*" layout="flex.layout.BasicLayout" creationComplete="init();"> <Script> <![CDATA[private function init():void {
textArea.text = describeType(FileReference).toXMLString(); } private function btn_click(evt:MouseEvent):void { fileReference.save(textArea.text, "describeType.txt"); } ]]> </Script> <Declarations> <net:FileReference id="fileReference" /> </Declarations> <mx:Panel id="panel" width="500" height="300" verticalCenter="0" horizontalCenter="0"> <mx:TextArea id="textArea" editable="true" width="100%" height="100%" /> <mx:ControlBar horizontalAlign="right"> <Button id="btn" label="Save Text" click="btn_click(event);" /> </mx:ControlBar> </mx:Panel></Application>..
Help plz..
Thanks for the reply.
I replace the <Application> to <s:Application>. I checked in both the compiler sdk 3 and sdk 4. For sdk 4 <s:Application>. and for sdk 3<mx:Application>.
<s:Application> gives me a error "The prefix "s" for element "s:Application" is not bound."
<mx:Application>. giving Could not resolve <mx:Application> to a component implementation.
I refer the mxml code from http://blog.flexexamples.com/2008/08/25/saving-files-locally-using-the -filereference-classs-save-method-in-flash-player-10/
You are missing the namespaces:
<s:Application name="Spark_Scroller_hasFocusableChildren_test"
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark">
If this post answers your question or helps, please mark it as such. ![]()
Hi Gregory,
These are the contents of my file, in accordance with the new namespaces that you have suggested.
--
<?xml version="1.0" encoding="utf-8"?>
<s:Application
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" >
<s:Script>
</s:Script>
</s:Application>
--
Hower I still get the error "Error: Could not resolve <s:Application> to a component implementation."
Could you please let me know what could be the problem?
Regards,
Karthik.
North America
Europe, Middle East and Africa
Asia Pacific