1 Reply Latest reply on Jul 19, 2012 6:09 AM by hsoft_project

    problem in C# CallFunction and action Script(instant)

    hsoft_project

      hi to all.

      i using from external api in flash cs 5.5 and create script in a scene under as.

       

      import flash.external.ExternalInterface;

      ExternalInterface.addCallback ("tempinhot",tempinhot);

      function tempinhot (temp:String): Void

                                     {

      t1.text =temp;

         

      }

       

      and in C# call it  to under as.

       

      string com = "<invoke name=\"tempinhot\"  returntype=\"xml\"><arguments><string>test</string></arguments></invoke>";

               flash_argham.SetVariable("temp", temp.ToString());

                flash_argham.CallFunction(com);

       

      but Occur an error . this error is Error HRESULT E_FAIL has been returned from a call to a COM component.

       

      now i do What practical ? please help me, instant instant instant instant

        • 1. Re: problem in C# CallFunction and action Script(instant)
          hsoft_project Level 1

          hello guys

          tank you . my problem is fixed So that  , i chenged action script to:

           

          import flash.external.ExternalInterface;

          ExternalInterface.addCallback ("tempinhot",temp,tempinhot);

          function tempinhot (temp:String): Void

                                         {

          t1.text =temp;

             

          }

           

          and i chenged c# code to :

           

             string com = "<invoke name=\"tempinhot\"  returntype=\"xml\"><arguments><string>test</string></arguments></invoke>";

           

                        flash_argham.CallFunction(com);