Could not resolve Script

I am getting an error message "Could not resolve <Script>
to a component implementation." This is the code I am attempting to run, from
the tutorials offered by Adobe.
<Script>
{import mx.controls.Alert;}
</Script>
I've tried this without brackets, with <> symbols, around the import, and everytime I get an error. any suggestions? I'm brand new to flex, but for the most part find it rather simple to do. however, when i get an error it's impossible to figure out how to fix it!

the <fx:Script> worked. Thanks!!

Similar Messages

  • Could not resolve mx:Script

    I have tried many samples with script tags but everytime I
    get this error message:
    Could not resolve <mx:Script> to a component
    implementation.
    Sample :
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Script>
    </mx:Script>
    </mx:Application>
    What is this? What do I do false ?
    Thanks.

    No , it does not work:
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="init()">
    <mx:Canvas xmlns:mx="
    http://www.adobe.com/2006/mxml"
    width="400" height="300">
    <mx:Script>
    <![CDATA[
    ]]>
    </mx:Script>
    </mx:Canvas>
    </mx:Application>
    I have tried this simple code on 2 machines. Both is WinXP
    Pro ( Turkish version ). Is that the reason for the error : Turkish
    Windows ?
    I can build an ActionScript Project. That works.. Also,
    FlexProject works. But I just can not use script in it. It gives
    that error mentioned in that topic.( on 2 machines the same)

  • Error - Could not resolve s:Script to a component implementation?

    Flex Builder 4.6, 60-day trial version. New  to MXML / AS, but familiar with Java, Javascript, XML, OpenLaszlo. Ooooold, sloooow Vista box.
    I want a bare-bones proof-of-concept class extending <s:Label> with a script responding to a click. Here's what I have:
    Ptile.mxml (in package com.blackbird):
    <?xml version="1.0" encoding="utf-8"?>
    <s:Label xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:mx="library://ns.adobe.com/flex/mx"
        xmlns:comp="com.blackbird.*"
        click="talkToMe()">   
        <s:Script>
            <![CDATA[
            private function talkToMe() : void {
                trace("I'm alive, sarge");
            ]]>   
        </s:Script>
    </s:Label>
    Calling application is :
    TileTest.mxml (also package com.blackbird):
    <?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"
        xmlns:mx="library://ns.adobe.com/flex/mx"
        minWidth="955"     minHeight="600"
        xmlns:comp="com.blackbird.*">
        <s:BorderContainer  width="100%" height="100%">
            <comp:Ptile x="40" y="200" />
        <s:BorderContainer/>
    <s:Application>
    Ptile.mxml won't compile - Error message in the editor is "Could not resolve <s:Script> to a component implementation". I've banged and hammered this around - namespaces, typos and syntax all checked, documentation, Google. No luck. For a bet, I'd guess it's a namespace problem - I'm a little shaky on that - but I'm sugared if I can find it.
    Using the <mx:Script> or <fx:Script> tags also fails.
    I've edited the Eclipse.ini file, as detailed here : http://forums.adobe.com/thread/449232. Nothing.
    Anybody? Thanks.

    There is no s:Script, it will be fx:Script and you will need the new Spark namespaces.
        xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"

  • Could not resolve ms:script to a component implementation?

    hi, i am new at flex and tried to see a working porject.
    tried the code given in the url below:
    http://learn.adobe.com/wiki/display/Flex/1b.+Code+Files
    But i am getting the error:
    "Could not resolve <mx:Script> to a component
    implementation."
    I asked for the error to the above url as comment but no body
    suggested a solution. Also the same problem has been asked in this
    forum twice but there isn't a solution here, too.
    waiting for help...

    I think this error shows up with locales like Turkish ...
    look
    here.
    Do a Google search for: "Could not resolve <mx:Script>
    to a component implementation."
    TS

  • "Could not resolve fx:Script to a component implementation"

    I always get "Could not resolve <fx:Script> to a component implementation." error if I create a project with nightly build sdk (in this case: 4.0.7826) Switching sdk to 4.0 and then back to #7826 solves the problem.

    If you are using eclipse plugin; then find eclipse.ini file.
    Edit that file and add these lines to end of file;
    -Duser.language=en
    -Duser.location =us
    Then restart Eclipse.
    If you are Flash Builder standalone; then find Gumbo.ini file, probably in the same folder with Gumbo.exe;
    Edit that file and add these lines to end of file;
    -Duser.language=en
    -Duser.location =us
    Then restart Flash Builder.
    That's all folks...
    PS: We had same error in Flex Builder 3 with the "mx:Script" tag.

  • Could not resolve fx:Script (or fx: Declarations to a component implementation

    Hi,
    I am trying to compile a file into swf using mxmlc in command line.  When it is a very simple mxml, compile is successful. But when the file  contaion the fx name space, I get a compile error like: could not  resolve COMPONENT_NAME to a component implementation.
    I have to be able to do this, without the help of Flash Builder  because I am working on a project where I will need to generate swf  files from mxml files  which we generate the code of.
    I tried it with SDK version 4.0.0.,  version 4.1.0 build 16076 and 4.5.0. build 20967. And I also tried it in 3 different computers. Note: Our notebooks has Windows 7 OS - locale:Turkish.
     I read that this error is specific to some locales like Turkish here: http://forums.adobe.com/message/892431#892431, . But I couldnt find the solution.
    Any suggestions?
    The simple code I am trying to compile is(which is generated by Flash Builder 4 and can be compiled there):
    <?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"
                      xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
         <fx:Declarations>
              <!-- Place non-visual elements (e.g., services, value objects) here -->
         </fx:Declarations>
    </s:Application>

    Could you please file a bug at http://bugs.adobe.com/jira with sample code that fails to compile on a Turkish system, so that we can track this problem and fix it in a future release?
    Gordon Smith
    Adobe Flex SDK Team

  • Upgrade from Burrito to 4.5, Could not resolve MobileApplication tag?

    Hello:
    As the topic states, I just upgraded from Burrito to 4.5 today. I imported my app and I get the following error:
    Could not resolve <s:MobileApplication> to a component implementation.    ...    line 6    Flex Problem
    Did they take out MobileApplication? If so how can I support the back button on my Xoom device now?
    Paul

    MobileApplication was renamed to ViewNavigatorApplication.
    Here's an example of how you would cancel the back button in the final 4.5 release:
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView"
            backKeyPressed="view1_backKeyPressedHandler()">
        <fx:Script>
            <![CDATA[
                private function view1_backKeyPressedHandler():void {
                    event.preventDefault();
                    // do something else here 
            ]]>
        </fx:Script>
    </s:View>

  • Could not resolve mx:DataGrid to a component implementation

    I'm very new at this. Building a mobile app. Running the latest Flex/FlashBuilder (4.6). When I compile I get this error: "could not resolve <mx:DataGrid> to a component implementation". Here is my code:
    <?xml version="1.0" encoding="utf-8"?>
    <!-- dpcontrols/DataGridPassData.mxml -->
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
                        xmlns:s="library://ns.adobe.com/flex/spark"
                        xmlns:mx="library://ns.adobe.com/flex/mx"
                        title="Jobs List">
              <fx:Script>
                        <![CDATA[
                                  import mx.collections.*;
                                  private var DGArray:Array = [
                                            {Lease:'Bagby Heirs', Well:'1', Location:'Quitman', Customer:'Fair Oil Company', ScheduleDate:'2/23/2012', ServiceDate:'5/16/2012'},
                                            {Lease:'ITU', Well:'301', Location:'Ingram Trinity', Customer:'Southwest Operating, Inc.', ScheduleDate:'3/19/2012', ServiceDate:'4/25/2012'},
                                            {Lease:'ITU', Well:'81', Location:'ITU', Customer:'Southwest Operating, Inc.', ScheduleDate:'3/19/2012', ServiceDate:'4/25/2012'},
                                            {Lease:'Tolliver A', Well:'5', Location:'Turner Town', Customer:'SEDI', ScheduleDate:'4/16/2012', ServiceDate:'5/11/2012'},
                                            {Lease:'W R Cady', Well:'1', Location:'Coffield', Customer:'Green River Resource', ScheduleDate:'5/9/2012', ServiceDate:'4/10/2012'},
                                            {Lease:'Royal National Bar', Well:'2', Location:'Coffield', Customer:'Green River Resource', ScheduleDate:'5/9/2012', ServiceDate:'4/10/2012'},
                                            {Lease:'Pan American L', Well:'1', Location:'Chandler', Customer:'East Texas Oil & Gas', ScheduleDate:'5/14/2012', ServiceDate:'6/8/2012'},
                                            {Lease:'Paluxy B Sand', Well:'5', Location:'West Tyler', Customer:'Culver & Cain', ScheduleDate:'6/1/2012', ServiceDate:'5/25/2012'},
                                            {Lease:'Wh Pittman Hei', Well:'2', Location:'Quitman', Customer:'Southwest Operating, Inc.', ScheduleDate:'7/10/2012', ServiceDate:'6/18/2012'},
                                            {Lease:'Vivian Pruitt', Well:'1', Location:'Crow - Hwy 80M', Customer:'Buffco Productions, Inc.', ScheduleDate:'8/7/2012', ServiceDate:'8/29/2012'}
                                  [Bindable]
                                  public var initDG:ArrayList;
                                  //Initialize initDG ArrayList variable from the Array.
                                  //If you use this technique to process an HTTPService,
                                  //WebService, or RemoteObject result, use an ArrayCollection
                                  //rather than an ArrayList.
                                  public function initData():void {
                                            initDG=new ArrayList(DGArray);
                        ]]>
              </fx:Script>
              <!--s:states>
              <s:State name="loginState"/>
              <s:State name="State1"/>
              </s:states-->
              <fx:Declarations>
                        <!-- Place non-visual elements (e.g., services, value objects) here -->
                          <fx:Component className="AlertMsgDay">
                                  <s:SkinnablePopUpContainer x="70" y="300">
                                            <s:TitleWindow title="Filtering" close="close()">
                                                      <s:VGroup horizontalAlign="center" paddingTop="8" paddingBottom="8" paddingLeft="8" paddingRight="8" gap="5" width="100%">
                                                                <s:Label text="This button will filter jobs to show only TODAY."/>
                                                                <s:Button label="OK" click="close()"/>
                                                      </s:VGroup>
                                            </s:TitleWindow>
                                  </s:SkinnablePopUpContainer>
                        </fx:Component>
                        <fx:Component className="AlertMsgWeek">
                                  <s:SkinnablePopUpContainer x="70" y="300">
                                            <s:TitleWindow title="Filtering" close="close()">
                                                      <s:VGroup horizontalAlign="center" paddingTop="8" paddingBottom="8" paddingLeft="8" paddingRight="8" gap="5" width="100%">
                                                                <s:Label text="This button will filter jobs to show only THIS WEEK."/>
                                                                <s:Button label="OK" click="close()"/>
                                                      </s:VGroup>
                                            </s:TitleWindow>
                                  </s:SkinnablePopUpContainer>
                        </fx:Component>
              </fx:Declarations>
              <s:BorderContainer x="10"  y="111" borderColor="#808080" cornerRadius="5" borderWeight="2" width="98%" height="369">
                        <s:Scroller width="100%" height="363" verticalScrollPolicy="on">
                                  <s:Group width="100%" height="100%">
                                            <mx:DataGrid id="myGrid" width="900" height="350" dataProvider="{initDG}" >  <<<< THE ERROR IS HERE
                                                      <mx:columns>
                                                                <mx:DataGridColumn dataField="Lease" />
                                                                <mx:DataGridColumn dataField="Well" />
                                                                <mx:DataGridColumn dataField="Location" />
                                                                <mx:DataGridColumn dataField="Customer" />
                                                                <mx:DataGridColumn dataField="ScheduleDate" headerText="Schedule Date" />
                                                                <mx:DataGridColumn dataField="ServiceDate" headerText="Service Date" />
                                                      </mx:columns>
                                            </mx:DataGrid>
                                  </s:Group>
                        </s:Scroller>
              </s:BorderContainer>
              <s:Label x="10" y="10" width="96" height="53" fontSize="24" text="Sort by:"
                                   verticalAlign="middle"/>
              <s:Button id="btn_show_today" x="104" y="11" width="105" height="53" label="Today"
                                    fontSize="13" fontWeight="bold" click="(new AlertMsgDay()).open(this, false);"/>
              <s:Button id="btn_show_week" x="216" y="11" width="105" height="53" label="Week"
                                    fontSize="13" fontWeight="bold" click="(new AlertMsgWeek()).open(this, false);"/>
              <s:Button x="348" y="10" width="184" height="53" label="Edit this Job" fontSize="18" click="navigator.pushView(views.JobFormView);"/>
    </s:View>

    I'm very new at this. Building a mobile app. Running the latest Flex/FlashBuilder (4.6). When I compile I get this error: "could not resolve <mx:DataGrid> to a component implementation". Here is my code:
    <?xml version="1.0" encoding="utf-8"?>
    <!-- dpcontrols/DataGridPassData.mxml -->
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
                        xmlns:s="library://ns.adobe.com/flex/spark"
                        xmlns:mx="library://ns.adobe.com/flex/mx"
                        title="Jobs List">
              <fx:Script>
                        <![CDATA[
                                  import mx.collections.*;
                                  private var DGArray:Array = [
                                            {Lease:'Bagby Heirs', Well:'1', Location:'Quitman', Customer:'Fair Oil Company', ScheduleDate:'2/23/2012', ServiceDate:'5/16/2012'},
                                            {Lease:'ITU', Well:'301', Location:'Ingram Trinity', Customer:'Southwest Operating, Inc.', ScheduleDate:'3/19/2012', ServiceDate:'4/25/2012'},
                                            {Lease:'ITU', Well:'81', Location:'ITU', Customer:'Southwest Operating, Inc.', ScheduleDate:'3/19/2012', ServiceDate:'4/25/2012'},
                                            {Lease:'Tolliver A', Well:'5', Location:'Turner Town', Customer:'SEDI', ScheduleDate:'4/16/2012', ServiceDate:'5/11/2012'},
                                            {Lease:'W R Cady', Well:'1', Location:'Coffield', Customer:'Green River Resource', ScheduleDate:'5/9/2012', ServiceDate:'4/10/2012'},
                                            {Lease:'Royal National Bar', Well:'2', Location:'Coffield', Customer:'Green River Resource', ScheduleDate:'5/9/2012', ServiceDate:'4/10/2012'},
                                            {Lease:'Pan American L', Well:'1', Location:'Chandler', Customer:'East Texas Oil & Gas', ScheduleDate:'5/14/2012', ServiceDate:'6/8/2012'},
                                            {Lease:'Paluxy B Sand', Well:'5', Location:'West Tyler', Customer:'Culver & Cain', ScheduleDate:'6/1/2012', ServiceDate:'5/25/2012'},
                                            {Lease:'Wh Pittman Hei', Well:'2', Location:'Quitman', Customer:'Southwest Operating, Inc.', ScheduleDate:'7/10/2012', ServiceDate:'6/18/2012'},
                                            {Lease:'Vivian Pruitt', Well:'1', Location:'Crow - Hwy 80M', Customer:'Buffco Productions, Inc.', ScheduleDate:'8/7/2012', ServiceDate:'8/29/2012'}
                                  [Bindable]
                                  public var initDG:ArrayList;
                                  //Initialize initDG ArrayList variable from the Array.
                                  //If you use this technique to process an HTTPService,
                                  //WebService, or RemoteObject result, use an ArrayCollection
                                  //rather than an ArrayList.
                                  public function initData():void {
                                            initDG=new ArrayList(DGArray);
                        ]]>
              </fx:Script>
              <!--s:states>
              <s:State name="loginState"/>
              <s:State name="State1"/>
              </s:states-->
              <fx:Declarations>
                        <!-- Place non-visual elements (e.g., services, value objects) here -->
                          <fx:Component className="AlertMsgDay">
                                  <s:SkinnablePopUpContainer x="70" y="300">
                                            <s:TitleWindow title="Filtering" close="close()">
                                                      <s:VGroup horizontalAlign="center" paddingTop="8" paddingBottom="8" paddingLeft="8" paddingRight="8" gap="5" width="100%">
                                                                <s:Label text="This button will filter jobs to show only TODAY."/>
                                                                <s:Button label="OK" click="close()"/>
                                                      </s:VGroup>
                                            </s:TitleWindow>
                                  </s:SkinnablePopUpContainer>
                        </fx:Component>
                        <fx:Component className="AlertMsgWeek">
                                  <s:SkinnablePopUpContainer x="70" y="300">
                                            <s:TitleWindow title="Filtering" close="close()">
                                                      <s:VGroup horizontalAlign="center" paddingTop="8" paddingBottom="8" paddingLeft="8" paddingRight="8" gap="5" width="100%">
                                                                <s:Label text="This button will filter jobs to show only THIS WEEK."/>
                                                                <s:Button label="OK" click="close()"/>
                                                      </s:VGroup>
                                            </s:TitleWindow>
                                  </s:SkinnablePopUpContainer>
                        </fx:Component>
              </fx:Declarations>
              <s:BorderContainer x="10"  y="111" borderColor="#808080" cornerRadius="5" borderWeight="2" width="98%" height="369">
                        <s:Scroller width="100%" height="363" verticalScrollPolicy="on">
                                  <s:Group width="100%" height="100%">
                                            <mx:DataGrid id="myGrid" width="900" height="350" dataProvider="{initDG}" >  <<<< THE ERROR IS HERE
                                                      <mx:columns>
                                                                <mx:DataGridColumn dataField="Lease" />
                                                                <mx:DataGridColumn dataField="Well" />
                                                                <mx:DataGridColumn dataField="Location" />
                                                                <mx:DataGridColumn dataField="Customer" />
                                                                <mx:DataGridColumn dataField="ScheduleDate" headerText="Schedule Date" />
                                                                <mx:DataGridColumn dataField="ServiceDate" headerText="Service Date" />
                                                      </mx:columns>
                                            </mx:DataGrid>
                                  </s:Group>
                        </s:Scroller>
              </s:BorderContainer>
              <s:Label x="10" y="10" width="96" height="53" fontSize="24" text="Sort by:"
                                   verticalAlign="middle"/>
              <s:Button id="btn_show_today" x="104" y="11" width="105" height="53" label="Today"
                                    fontSize="13" fontWeight="bold" click="(new AlertMsgDay()).open(this, false);"/>
              <s:Button id="btn_show_week" x="216" y="11" width="105" height="53" label="Week"
                                    fontSize="13" fontWeight="bold" click="(new AlertMsgWeek()).open(this, false);"/>
              <s:Button x="348" y="10" width="184" height="53" label="Edit this Job" fontSize="18" click="navigator.pushView(views.JobFormView);"/>
    </s:View>

  • Could not resolve Application to a component implementation.

    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..

    That's a different topic. Please mark this one as answered (by me ) and start a new topic.
    If this post answers your question or helps, please mark it as such.

  • Error: "Could not resolve [public class] to a component implementation

    Here's another clueless newbie question! :-(
    I define a public class "DynamicTextArea" at the top of the file, and get the compiler error message "Could not resolve <DynamicTextArea> to a component implementation" at the bottom of the same file.
    Clearly, I don't understand something very basic.
    (The code between the commenrted asterisks was originally in a separate package file, which I couldn't get either mxmlc or FlexBuilder to find, so rather than fight that issue now, I moved it into the same file.)
    Here's the file:
    <?xml version="1.0" encoding="utf-8" ?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    >
    <!--****************************************************************-->
        <mx:Script>
        <![CDATA[
      import flash.events.Event;
      import mx.controls.TextArea;
    public class DynamicTextArea extends TextArea{
        public function DynamicTextArea(){
          super();
          super.horizontalScrollPolicy = "off";
          super.verticalScrollPolicy = "off";
          this.addEventListener(Event.CHANGE, adjustHeightHandler);
        private function adjustHeightHandler(event:Event):void{
          trace("textField.getLineMetrics(0).height: " + textField.getLineMetrics(0).height);
          if(height <= textField.textHeight + textField.getLineMetrics(0).height){
            height = textField.textHeight;    
            validateNow();
        override public function set text(val:String):void{
          textField.text = val;
          validateNow();
          height = textField.textHeight;
          validateNow();
        override public function set htmlText(val:String):void{
          textField.htmlText = val;
          validateNow();
          height = textField.textHeight;
          validateNow();
        override public function set height(value:Number):void{
          if(textField == null){
            if(height <= value){
              super.height = value;
          }else{      
            var currentHeight:uint = textField.textHeight + textField.getLineMetrics(0).height;
            if (currentHeight<= super.maxHeight){
              if(textField.textHeight != textField.getLineMetrics(0).height){
                super.height = currentHeight;
            }else{
                super.height = super.maxHeight;        
        override public function get text():String{
            return textField.text;
        override public function get htmlText():String{
            return textField.htmlText;
        override public function set maxHeight(value:Number):void{
          super.maxHeight = value;
        ]]>
      </mx:Script>
    <!--****************************************************************-->
         <mx:Script>
        <![CDATA[
          import mx.controls.Alert;
          private var str:String = "This text will be long enough to trigger " +
            "the TextArea to increase its height.";
          private var htmlStr:String = "This <b>text</b> will be <font color='#00FF00'>long enough</font> to trigger " +
            "the TextArea to increase its height.";
          private function setLargeText():void{
            txt1.text = str;
            txt2.text = str;
            txt3.text = str;
            txt4.text = str;
            txt5.htmlText = htmlStr;
            txt6.htmlText = htmlStr;
            txt7.htmlText = htmlStr;
            txt8.htmlText = htmlStr;
        ]]>
      </mx:Script>
      <DynamicTextArea id="txt1" width="300" height="14"/>
      <DynamicTextArea id="txt2" width="300" height="20"/>
      <DynamicTextArea id="txt3" width="300" height="28"/>
      <DynamicTextArea id="txt4" width="300" height="50"/>
      <DynamicTextArea id="txt5" width="300" height="14"/>
      <DynamicTextArea id="txt6" width="300" height="20"/>
      <DynamicTextArea id="txt7" width="300" height="28"/>
      <DynamicTextArea id="txt8" width="300" height="50"/>
      <mx:Button label="Set Large Text" click="setLargeText();"/>
    </mx:Application>
         Thanks for any insight you can provide!
    Harvey

    Gordon:
        As you've noted, there were multiple  misunderstandings.
        Some are due to references in the language which are  different from uses in pre-existing languages.
        Take "name spaces". They look like URLs but they're  not. One of the first errors I made when starting Flex was to try to browse to  http://www.adobe.com/2006/mxml. I  figured that it would have some description of the language. But it didn't. In  spite of LOOKING like a URL, it doesn't point to anything; it's really just an  arbitrary magic incantation, like "Open Sesame".
        But, then when I wanted to use my OWN namespace, I  find that it's NOT arbitrary, and does have to point to something, but it's  still not a URL. The "AHA" moment was when Michael told me that "*" means "look  in this directory for a file with the name later named in an import statement,  but not named here". And if the file was in subfolder  "X" I'd have to use "X.*", while if it were a URL I'd use slash instead of  dot, but never an asterisk.
        When the language syntax is so contrary to the  expectations of people coming from a declarative language or web programming  background, I think it is important to explicitly address the differences and  disabuse them of their preconceptions. I think the same should apply to the ways  in which ActionScript differs from ECMAScript.
        Another problem adding to my confusion is the habit  of naming variables with the names of keywords but with capitalization changes.  Not only does that set readers up for subtle "gotchas", but makes it unclear  which names are truly arbitrary, and which are required by the  compiler.
    It might be a good idea to have a convention of an  identifiable format for user variables. Many authors use names like  myButton for that purpose.
        It would also be helpful if printed text could  simulate the syntax coloring of the better editors, or at least have more  in-source comments saying exactly what each line does. (Or both)
        Another aid to understanding would be to provide a  reference to the alternative (MXML or AS) way of doing anything, whenever you  demonstrate one of the ways.
        I find that the emphasis on using FlexBuilder  distracts from a sense of what is really going on behind the scenes. E,g.: If  FlexBuilder automatically sets up the folder structure, I don't learn to do it  myself. I like to work at the code level, so when something goes wrong I don't  have to worry about what level it went wrong at.
        Also, not everyone is willing to drop $600 or $250  BEFORE they've learned whether they even like Flex. Your tutorials are, by  definition, addressed to newcomers who may well not yet have committed to the  expense of FlexBuilder. So more emphasis on using mxmlc would be nice. It would  also be helpful to discuss how to use local servers, like Tomcat, during the  development stage.
        Thanks for asking my opinion. I'm afraid that my 40  years of programming experience may make it harder for me to adapt to this new  style of programming than it would be for a kid with a tabula rasa. But, it  looks like it'll be fun once I get over the hump!
    Harvey

  • Could not resolve fx:Declarations to a component implementation.

    Hi..
    Am getting an error message
    Could not resolve  <fx:Declarations> to a component implementation.
    and
    Could not resolve  <fx:Script> to a component implementation.
    Am trying  the following mxml code.
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx"
                   minWidth="955" minHeight="600"
                   creationComplete="application2_creationCompleteHandler(event)">
        <fx:Style source="Styles.css" />
        <fx:Declarations>
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
            ]]>
        </fx:Script>
    </s:Application>

    Hi Hakan,
    Was this problem ever solved, and if so, could you please tell me how?
    TIA,
    mlavie

  • FABridge in AIR: Could not resolve fab:FABridge to a component implementation

    Hi all,
    I'm trying to use the FABridge in my HTML-based AIR app to communicate between a swf file and my JavaScript code. Browsing through the forums, it appears that ExternalInterface is not advisable in AIR, so I turned to FABridge instead. Can anyone on this forum advise me on whether FABridge is the correct route to take if I want to communicate betweeen flex and javascript.
    If FABridge is the recommended protocol, can someone please advise on how to include the FABridge.as file as part of a amxmlc compiler option. I've tried the following:
    seanosheas-macbook-pro:bin seanoshea$ ./amxmlc -sp+=${FLEX_3_HOME}/frameworks/javascript/fabridge/src/bridge ${PROJECT_HOME}/GMapsController.mxml
    but I keep getting this error:
    Error: Could not resolve <fab:FABridge> to a component implementation.
    Looking at Mike Chambers' blog post here: http://www.mikechambers.com/blog/2005/12/22/compiling-actionscript-3-and-mxml-on-mac-and-l inux/, it looks like the air-config.xml file could be modified to include the FABridge.as file. I've tried modifying the air-config.xml file to point at the fabridge/src/bridge directory, but no luck.
    Sean

    Hi Paul,
    Thanks for the reply. I was drawn to the FABridge because the documentation said it's useful if:
    "You want to use a rich Flex component in an Ajax application but do not want to write a lot of Flex code. If you wrap the component in a FABridge-enabled stub application, you can script it entirely from JavaScript, including using JavaScript generated remotely by the server."
    The rich Flex component I'm trying to control in my Ajax application is a Google Maps swf. The swf is pretty simple ... it just looks like this:
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
        <maps:Map xmlns:maps="com.google.maps.*" id="map" mapevent_mapready="onMapReady(event)" width="100%" height="100%"
            url="http://code.google.com/apis/maps/" key="ABQIAAAAirgZjEoCu9a3euq95spKkBR_S1ecsaBoILwOJWQZL62AsG_vrBT---yI8NYfu5nSGRvZPcpZobSH zA"/>
        <mx:Script>
            <![CDATA[
                import com.google.maps.LatLng;
                import com.google.maps.Map;
                import com.google.maps.MapEvent;
                import com.google.maps.MapType;
                private function onMapReady(event:Event):void {
                    this.map.setCenter(new LatLng(40.736072,-73.992062), 14, MapType.NORMAL_MAP_TYPE);
                public function setLocation(lat:Number, long:Number):void {
            ]]>
        </mx:Script>
    </mx:Application>
    I'm including the .swf file with an embed tag as outlined in the Google Maps for Flash API documentation:
        <div id="map_canvas">
            <object
              classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
              codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
              width="800px"
              height="600px">
                  <!-- <param name="movie" value="app:/flex/GMapsController.swf">  -->
                  <!-- <param name="movie" value="app:/GMapsController.swf">   -->
                  <param name="movie" value="http://mysite.eye.fi/GMapsController.swf">
                  <param name="quality" value="high">
                  <param name="flashVars" value="key=ABQIAAAAirgZjEoCu9f3eua95spKkBR_S1ecsaBoILwOJWQZL62AsG_vrBT---yI8NYfu5nSGRvZPc pZobSHzA">
                  <embed
                    width="800px"
                    height="600px"
                    quality="high"
                    flashVars="key=ABQIAAAAirgZjEoCu9f3euq95spKkBR_S1ecsaBoILwOaWQZL62AsG_vrBT---yI8NYfu5nSGR vZPcpZobSHzA"
                    pluginspage="http://www.macromedia.com/go/getflashplayer"
                    type="application/x-shockwave-flash">
            </object>
         </div>
    I'm not sure I can include it as a library of classes as you describe in your post.
    It would be really sweet if I could attach an id attribute to the embed tag and be able to call the functionality within the swf file in JavaScript.
    Do you know whether this is possible or not? I'm pretty new to flex (if you guys havent already guessed), so I could be missing something pretty simple.
    Any help is greatly appreciated
    Cheers
    Sean

  • Problem with child tag - Could not resolve x to a component implementation.

    Hello.
    I am writing some chart component and got a problem setting property via child tag. Property is a custom class.
    My directory structure:
    Makefile  oxcharts  Session.vim  stats.as  stats.mxml  stats.swf
    ./oxcharts:
    ColumnChart.as MyTest.as
    stats.mxml:
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:oxcharts="oxcharts.*">
        <oxcharts:ColumnChart id="myChart" showDataTips="true" width="600" height="310">
            <oxcharts:test x="5"></oxcharts:test>
         </oxcharts:ColumnChart>
    </mx:Application>
    ColumnChart.as:
    package oxcharts {
        public class ColumnChart extends UIComponent {
            public var test:MyTest;
    MyTest.as:
    package oxcharts {
        public class MyTest {
            public var x:Number;
    I got this error:
    Error: Could not resolve <oxcharts:test> to a component implementation.
    I guess something wrong with imports. Setting Number property via child tag works just fine.

    I'm gonna give a clerear example, I hope it'll help you better understand what I mean let's say I have a custom class named Login:
    package ec
             [Bindable]
         public class Login
              public var ID:int;
              public var Role:String;         
              public function Login()
    And I need to use this class within MyAmazingCanvas, so my main app will be like this:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:oxcharts="ec.*">
         <mx:Script>
              <![CDATA[
                   import ec.Login;
                   [Bindable]
                   private var myLoginStatus:Login=new Login();
                   private function setLoginData():void{
                        myLoginStatus.ID=myID.text
                        myLoginStatus.Role=myRole.text;
              ]]>
         </mx:Script>
         <oxcharts:MyAmazingCanvas id="myCustomComp" myPublicNumber="323" LoginStatus="{myLoginStatus}" />
         <mx:TextInput id="myID" />
         <mx:TextInput id="myRole" />
         <mx:Button id="setData" label="Set Data" click="setLoginData()" />
    </mx:Application>
    When I said at the top level I meant outside the scope of any function, altough is not a requierement, you can as well set it at a function level.

  • Could not resolve s:ViewNavigatorApplication to a component implementation

    Hi,
    I am getting this error while building my Flex mobile project using ant build. It compiles preopely through flash Builder but gives the error : "Could not resolve <s:ViewNavigatorApplication> to a component implementation" when compiling with ant. I am using the config file airmobile-config.mxml . Here is my build script mcmlc task is below:
    <mxmlc file="${Src.dir}/${Application.name}.mxml" incremental="false" actionscript-file-encoding="UTF-8"
                 output="${Deploy.dir}/${Application.name}.swf" debug="${Debug.Boolean}" keep-generated-actionscript="false">
                 <load-config filename="${FLEX_HOME}/frameworks/airmobile-config.xml" />
                 <compiler.source-path path-element="${Src.dir}" />
              <source-path path-element="${externalLib.dir}/libraries/CommonMobile/src"/>
              <library-path dir="${FLEX_HOME}/frameworks/libs" includes="*.swc" append="true"/>
              <library-path dir="${FLEX_HOME}/frameworks/libs/mobile" includes="mobilecomponents.swc" append="true"/>
              <library-path dir="${FLEX_HOME}/frameworks/libs/air" includes="*.swc" append="true"/>
              <library-path dir="${FLEX_HOME}/frameworks/libs/automation" includes="*.swc" append="true"/>
              <library-path dir="${FLEX_HOME}/frameworks/libs/mx" includes="*.swc" append="true"/>
              <library-path dir="${FLEX_HOME}/frameworks/libs/player" includes="*.swc" append="true"/>
              <library-path dir="${FLEX_HOME}/frameworks/locale/en_US" append="true"/>
              <library-path dir="${externalLib.dir}/libraries/external/robotlegs/1.4.0/bin" includes="robotlegs-framework-v1.4.0.swc" append="true"/>
              <library-path dir="${tomcat.dir}/webapps/MobilityServer/WEB-INF/flex/libs" includes="fds.swc" append="true"/>  
              <library-path dir="${tomcat.dir}/webapps/MobilityServer/WEB-INF/flex/libs/air" includes="airfds.swc" append="true"/>
              <library-path dir="${tomcat.dir}/webapps/MobilityServer/WEB-INF/flex/libs" includes="fiber.swc" append="true"/>
              <library-path dir="${externalLib.dir}/libraries/CustomMobilelib/bin" includes="CommonMobile.swc" append="true"/>         
             </mxmlc>

    Thanks for the reply. I tried changing to the airmobile-config.xml but then I got the same error with a different componenet.
    Error: Could not resolve <r:QContainer> to a component implementation. <r:QContainer id="d">
    Could this related to a missing SWC from my build path do you think?

  • Could not resolve method to a component implementation

    Hello,
    I have created an action script class extending httpservice while using in mxml page i am trying to set some requests.
    Example
    <Utils:CustomHTTPService id="httpGetAllStations" url="Stations.aspx" method="POST" resultFormat="e4x"
            result="httpGetAllStationsResultHandler(event)" fault="httpGetAllStationsFaultHandler(event)">
            <Utils:request>
                 <method>{onMove}</method>
            </Utils:request>
        </Utils:CustomHTTPService>
    but this line (<method>{onMove}</method>) throws error(Could not resolve <method> to a component implementation).
    How can i resolve this?
    Thanks in Advance.

    yeah, i know that
    are you sure you have xmlns:mx="xmlns:mx="http://www.adobe.com/2006/mxml"

Maybe you are looking for

  • Submitting a user's file to an applet.

    Hi, I am fairly new to Java, but I have spent a large part of this year learning about and using Java to write a program for biochemists, to allow them to study a particular class of enzymes. I have used Java because I wanted to enable to program to

  • Video Card Addition (need 3 monitors)

    I am currently using a 2 X 2.8GHz Quad-Core Mac Pro with the NVIDIA GeForce 8800 GT card and I am needing 3 monitors on this machine. (2 monitors is cutting it) What is the best upgrade to do this? Am I better off purchasing another 8800 card or woul

  • How to use a user over the network???

    My point is, that i have a Mac on my room and let's say that i want to use my user on my mac which is in my room in another Mac which is connected to my tv. I dont think there's a way to do that, but in my opinion is why not to make it possible... lo

  • Screen field for Production Order CO01

    I want to add an additional field to enter shift in Production order screen CO01. How can I do this and what is the screen exit. Thanks

  • Motion 3 Help !!

    I need your help with an upgrade decision. I upgraded last fall and currently to Finalk Cut Studio Pro. I cannot find my discs(due to a very nosy kid of mine) or the installation icon in the applications folder for motion 3 . I am uncertain whether o