importing text into a field member pt2

Ask a Question related to Macromedia Director Lingo, Design and Development.

  1. #1

    Default importing text into a field member pt2

    All works fine when I import text (menu items) from an external txt file using fileIO xtra. However, forgetting security restrictions, I forgot that fileIO is not shockwave safe and will not import external menu items.

    Does any body have a decent idea...probably using xml.

    to see the example look at the attached.

    PS. thank to NED for the previous help in prt 1 of this thread.

    steve

    [url]http://webforums.macromedia.com/attachments/importing_text.zip[/url]


    s1howes webforumsuser@macromedia.com Guest

  2. Similar Questions and Discussions

    1. putting transform data from field text member
      i have a scene that I want to set the transforms of the object to one's that I recorded from a startmovie handler. Ive tested the code for the...
    2. importing an exetrnal textfile into a field member
      hi there. I use the following behaviour and director's own 'dropdown menu' script on a field sprite to pick up a text list from an external...
    3. text of a field member to file --> ugly characters instead of RETURN
      Hello, I have stored text within a field member. The text is line by line, that is to say after each line a RETURN. When writing this into a...
    4. Print text field member
      I would like to allow the users to print a text field member when they play the projector. when I use: print member ("printable text...
    5. importing text into a field
      Hello all, I´ve imported text from a text file into a field box and for some reason everywhere where there is a new line character a small square...
  3. #2

    Default Re: importing text into a field member pt2

    If you want the text file to be local to the user then use setPref/getPref. If
    you want the text file to reside on the server then use
    preloadNetThing(whateverURL), wait for the download to finish, then
    member(x).fileName=whateverURL. The Lingo Dictionary has examples of waiting for
    the d/l to finish.

    Andrew

    Andrew Morton Guest

  4. #3

    Default Re: importing text into a field member pt2

    I don't have time to watch your files, but you can quite easily import text
    data in shockwave with xml, using FlashObject (refer to help and MM
    technotes about that)

    --
    ----------------
    -- Ned
    ----------------------------------------
    Bien faire et laisser braire
    ----------------------------------------
    "s1howes" <webforumsuser@macromedia.com> a écrit dans le message de
    news:bq20vc$qpl$1@forums.macromedia.com...
    | All works fine when I import text (menu items) from an external txt file
    using fileIO xtra. However, forgetting security restrictions, I forgot that
    fileIO is not shockwave safe and will not import external menu items.
    |
    | Does any body have a decent idea...probably using xml.
    |
    | to see the example look at the attached.
    |
    | PS. thank to NED for the previous help in prt 1 of this thread.
    |
    | steve
    |
    | [url]http://webforums.macromedia.com/attachments/importing_text.zip[/url]
    |
    |


    Ned Guest

  5. #4

    Default Re: importing text into a field member pt2

    Thanx Andrew,
    I think you have to setpref firstly in order to retrieve data back.

    I need something that will be shockwave safe and that imports data (menu items) and propogates a menu field in all my dcr movies as this will save on 'Housekeeping' if movies are deleted or created as I would only have to update one file.

    cheers

    steve


    s1howes webforumsuser@macromedia.com Guest

  6. #5

    Default Re: importing text into a field member pt2

    > I think you have to setpref firstly in order to retrieve data back.

    That's right. I thought that maybe you had a menu which could be personalised,
    in which case you would have a default menu built-in to the Shockwave movie and
    setPref that if there wasn't one already there.
    > I need something that will be shockwave safe and that imports data (menu
    items) and propogates a menu field in all my dcr movies as this will save on
    'Housekeeping' if movies are deleted or created as I would only have to update
    one file.

    The text file you're using is small, right? In which case downloading it from
    the server every time will take a very small amount of time. It will be cached
    anyway. It might be a good idea to use a CGI script to retrieve the text file so
    that you can set the content-expires header in case you want to occasionally
    change the menu(s).

    Andrew

    Andrew Morton Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139