3 Replies Latest reply: Oct 13, 2009 11:09 AM by chris_songer RSS

    Variable to String Mapping

    chris_songer Community Member

      I'm new to flash and working to embed the flash player in a .NET application. It's going "well" for the definition of "well" that adding the COM control and getting it to play a movie was easy and took about 3 minutes.

       

      What's not going well is that I cannot find documentation on the variable to string mapping used the SetParameter variable parameter. To coordinate between the apps, I want to be able to say: "flashPlayer.SetVariable("flash_variable", "value_to_set"). Obviously SetVariable does this. What's not obvious is how "flash_variable" is constructed.

       

      For example, in the actionscript for a button called "OneBigButton" I have the following code:

       

      OneBigButton.addEventListener( MouseEvent.CLICK, onClick );
      var testSetValue = "value";
      function onClick(evt:MouseEvent):void {
          trace("got the click " + testSetValue);
          outputText.text = testSetValue;
      }

       

      When I try this:

       

      flashPlayer.SetVariable( "testSetValue", "foo" );

       

      The results do not get set in testSetValue.

       

      I'd love a pointer to the documentation on how namespaces, class instances, etc affect the string construction used in SetVariable and GetVariable as I can't find it anywhere.

       

      Thanks in advance!