Passing variables between scripts

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

  1. #1

    Default Passing variables between scripts

    Hi there

    Director and Lingo beginner her, and I've googled for this in this
    group and others and on the web. I am not sure that what I want is
    possible at all, hopefully someone in here can enlighten me.

    I have a movie clip where two overlaying sprites take up half the
    screen each. For each of the sprites I have a script incrementing a
    counter for every mouseWithin.

    At the end of the movie clip, I would like the value of the two
    incrementers (sp?) to be passed on to a third script triggered at the
    end of the movie. However, I haven't succeeded in passing these
    variables yet.

    I've made them global in each script for the sprites (by using global
    variable at the top of each script), and then made them global in the
    endMovie script, where I try to print them to screen via an alert, but
    they are empty.

    I haven't got the code I've used readily available right now, but if
    you need any code to be able to help, please let me know.

    --
    | Jonas @ 55.75, 12.42 | <http://verture.net/> |

    BOFH-excuse: excess surge protection
    Jonas Voss Guest

  2. Similar Questions and Discussions

    1. Users editing PHP variables or scripts
      Hi, I have a PHP template that contains an include for a page header but this script requires three variables that are pass to the header.php page...
    2. Passing Variables from swf to swf
      Is there a good tutorial to do this? I am building greeting cards - I am loading a seperate file before I print them out so I am trying to pass...
    3. Launching shell scripts using PERL and passing arguments
      Hello All, I have a very basic question. I need to launch a Bourne shell script using PERL and automate the responses required by the script. I...
    4. Passing Objects between scripts and guarateeing that a language has been choosen.
      Hi, I am just starting to understand how the session handling routines work in php. I can pass objects to other scripts. So I can put the...
    5. [PHP] Passing Objects between scripts and guarateeing thata language has been choosen.
      How can I guarantee that a language is always choosen? I mean how is this done professionally? What do I have to write at the beginning of every...
  3. #2

    Default Re: Passing variables between scripts

    In macromedia.director.lingo, Jonas Voss <voss@null.dk> wrote:

    [...]
    > I've made them global in each script for the sprites (by using global
    > variable at the top of each script), and then made them global in the
    > endMovie script, where I try to print them to screen via an alert, but
    > they are empty.
    > I haven't got the code I've used readily available right now, but if
    > you need any code to be able to help, please let me know.
    Ok, scratch that. I've just read through the code again, and it was a
    blatant fault on my behalf. Just two lines down from declaring the
    variables global, I declared them again as a property, which I
    understand is only in the local scope. Naturally, the variables
    weren't passed between the scripts then.

    So, no alarm, nothing to see here, move along (:

    --
    | Jonas @ 55.75, 12.42 | <http://verture.net/> |

    BOFH-excuse: Bit rot
    Jonas Voss 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