6 Replies Latest reply on Nov 25, 2010 11:23 PM by Flex harUI

    Could not resolve <fx:script> to a component implementation

    naz2003

       

      Hi All,

       

       

       

         I have installed Flex 4 SDK (flex_sdk_4.1.0.16076)  into Flex Builder version 3.0. All went fine except I recived the following error. I found few solutions to use various flex 4 releases to fix this issue but no luck. I'm not sure what I'm missing here.

       

      I see the following error while executing the below simple MXML file.

       

       

      Here is the error message

       

       

      Severity and Description    Path    Resource    Location    Creation Time    Id
      Could not resolve <fx:script> to a component implementation.    myFacebook/src    myFacebook.mxml    line 3    1290617936062    8526

       


      Here is my simple program.

       

       

       

      <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" layout="absolute" creationComplete="init()" >
           <fx:script>
               import com.facebook.graph.Facebook
                   import mx.controls.Alert
                   private function init():void{
                       Facebook.init(" ",loginHandler)
                   }
                    
                   private function loginHandler(success:Object,fail:Object):void{
                       trace("SUCCESS" +success)
                       trace("FAIL "+fail)
                   }
                   
                   private function login():void{
                       Alert.show("Logging In");
                       Facebook.login(loginHandler,{perms:"user_birthday,read_stream, publish_stream"});
                   }
                  
              
           </fx:script>
          
           <mx:Button label="Login" click="login()" />
              
          
      </s:Application>

       

       

       

      Your help would be mush appreciated

       

       

       

      Nazeer