Professional Web Applications Themes

Passing variable - Macromedia Director Lingo

How do I pass variable from a projector to a MIAW? Sahring of cast I have tried but di failed while the projector calls the MIAW. Actually I want to pass a random variable to the MIAW from the base projector....

  1. #1

    Default Passing variable

    How do I pass variable from a projector to a MIAW?
    Sahring of cast I have tried but di failed while the projector calls the
    MIAW.
    Actually I want to pass a random variable to the MIAW from the base
    projector.


    Sudipto Guest

  2. #2

    Default Re: Passing variable

    I know of two ways to pass a variable to a MIAW, but there may be more. The easiest way is probably to declare the variable as a global in both the projector and the MIAW. Then both movies will be able to use it. The other way, which doesn't require global variables, is to have the projector call a function in the MIAW that declares the variable. Something like this:

    Projector:
    tell window(miaw)
    initVars(var1, var2, var3)
    end tell


    MIAW:
    on initVars var1, var2, var3
    myVar1 = var1
    myVar2 = var2
    myVar3 = var3
    end initVars


    Let me know if this helps, or if you have any questions. Thanks

    Nathan
    Nathan Guest

  3. #3

    Default Re: Passing variable

    Variables are variables. If you have a global variable in one movie,
    it's available to any other movie, just use the global keyword.

    If you want to reference a local or property variable then you'll have
    to include the reference.

    Can you show an example of what you're attempting to do?

    --
    Rob
    _______
    Rob Dillon
    Team Macromedia
    http://www.ddg-designs.com
    412-243-9119

    http://www.macromedia.com/software/trial/
    Rob Guest

Similar Threads

  1. passing SQL in a variable
    By Beards247 in forum Coldfusion Database Access
    Replies: 2
    Last Post: May 4th, 11:45 AM
  2. Passing a variable to asp
    By SteveW in forum Macromedia Flash Data Integration
    Replies: 6
    Last Post: April 19th, 08:40 PM
  3. URL Variable Passing
    By DManson in forum Macromedia ColdFusion
    Replies: 0
    Last Post: April 27th, 03:18 PM
  4. passing variable
    By Troy in forum ASP Components
    Replies: 2
    Last Post: June 16th, 07:48 PM
  5. Replies: 7
    Last Post: July 17th, 04:54 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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