0 Replies Latest reply on Aug 22, 2008 1:21 PM by (Daniel_Telfer)

    callAS getting string to swf movie

    Level 1
      I have fixed the problem that I posted this original message for.

      Below is the code for both sides to pass text from a pdf field to a Flash swf text box.

      /* JavaScript */
      var GuestNamez = this.getField("TestText");

      // Get hold of the second page and the first Flash object
      var annot = getAnnotsRichMedia(1)[0];

      if ( annot )
      {
      // if exists, call the function called "GuestNam"
      // and pass an item ID as an argument
      annot.callAS( "GuestNam", GuestNamez.value);
      }

      Flash
      /* ActionScript 2.0*/
      import flash.external.*;

      ExternalInterface.addCallback("GuestNam", null, setState);

      function setState(stateData:String):Void {
      GuestsNames.text = stateData;
      }

      Hope this may help someone.