2 Replies Latest reply on Feb 27, 2007 9:00 AM by billaddison

    Save .txt file from Director

    billaddison Level 1
      Hello,

      I'm trying to house a flash file in Director and I need to parse information from the Flash SWF to the Director file to save to disk as a .txt file.

      1. How do I house a Flash SWF in Director?
      2. How do I parse variables from an SWF to Director?
      3. How can I save those variables as a .txt file to the users disk?

      thanks,
      Susan
        • 1. Re: Save .txt file from Director
          Level 7
          Hi Susan,

          It's all possible, I do this quite a lot!

          1. Just import a flash file (swf) into the Director cast and the drag it to
          the stage (just make sure the version of Flash you use is not newer than
          Director! eg/ Director MX can only import flash up to version 6)

          2. In the flash file, use the GetURL command to send data or commands to
          director. This can be done in 1 of 3 ways..
          i - use... getURL("lingo:yourLingoScript");
          ii- use... getURL("event:doMyFunction"); -> in Director you need to add your
          function/event (eg on doMyFunction)
          iii - use just... GetURL: anytextyouwant -> with this you need Direct to
          have an 'on GetURL' event.

          There can be used as a 'trigger'. Director can grab the variables directly
          using 'getVariable'.
          eg. newVariable = sprite (1).getVariable(variableName) ...assuming the
          flash file is sprite number 1.

          3. Look into 'setPref' and 'getPref' - these are the simplest way of saving
          data. If you want more functionality, you'll need to use the FileIO Xtra

          Try here for a better description and a few examples to download:
          http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_14796


          Hope this helps :)

          Tim Dixon.



          "brooklynconcept.com" <webforumsuser@macromedia.com> wrote in message
          news:es1f02$juv$1@forums.macromedia.com...
          > Hello,
          >
          > I'm trying to house a flash file in Director and I need to parse
          > information
          > from the Flash SWF to the Director file to save to disk as a .txt file.
          >
          > 1. How do I house a Flash SWF in Director?
          > 2. How do I parse variables from an SWF to Director?
          > 3. How can I save those variables as a .txt file to the users disk?
          >
          > thanks,
          > Susan
          >


          • 2. Re: Save .txt file from Director
            billaddison Level 1
            Thank you so much Tim!
            Very well explained and helpful!