Welcome to TalkGraphics.com
Results 1 to 5 of 5

Thread: a challenge

  1. #1
    Join Date
    Nov 2000
    Location
    sydney, australia
    Posts
    4

    Default

    i may be a little slow, but i am still having trouble with this passing variables thing. if anyone could post a very simple working example of one .swf passing a variable to another .swf that has loaded in it's place, you can't imagine how happy i would be!
    IP

  2. #2
    Join Date
    Nov 2000
    Location
    sydney, australia
    Posts
    4

    Default

    i may be a little slow, but i am still having trouble with this passing variables thing. if anyone could post a very simple working example of one .swf passing a variable to another .swf that has loaded in it's place, you can't imagine how happy i would be!
    IP

  3. #3
    Join Date
    Aug 2000
    Location
    Toronto, Ontario, Canada
    Posts
    432

    Default

    This example sets a variable in frame one of firstmovie.swf - then it loads loadIt.swf. loadIt.swf loads the variable from the first movie and displays it all in the first frame.


    hth,
    Deep (just a guy)

    <pre><font face="courier" size="2">,-----------------------------.

    | Pradeep Kumar Nair, B.Math |

    | Graphic/Multimedia Designer |

    | ICQ#: 39102360 |

    | Medius Communications, Inc. |

    | http://www.medius.com |

    `-----------------------------'</font></pre>
    Moderator - i/us Flash Forum
    Attached Files Attached Files
    hth,
    Deep (just a guy)
    --
    Pradeep Kumar Nair, B.Math
    CTO
    9 Story Entertainment
    http://www.9story.com
    IP

  4. #4
    Join Date
    Nov 2000
    Location
    sydney, australia
    Posts
    4

    Default

    you're a champion!
    only problem is, i'm working with flash 4 on a pc
    and i can't seem to open you're files.
    sorry to be such a goose. [img]/infopop/emoticons/icon_eek.gif[/img]
    IP

  5. #5
    Join Date
    Aug 2000
    Location
    Toronto, Ontario, Canada
    Posts
    432

    Default

    d-oh!!!

    those files were for flash 5 on a pc. [img]/infopop/emoticons/icon_frown.gif[/img] i didn't realize you were in flash 4. hmmm...try this:

    set variable "myvariable" = _levelX/movieclipname:variablename

    where X is the level, movieclipname (if applicable) is the name of the movieclip that contains the variable, and variablename is the name of the variable. So, for example, if you have a variable called "foo" in the main timeline of level 0, then reference it like so:

    set variable "bar" = _level0:foo

    if foo is in a movieclip called "plugh" then use:

    set variable "bar" = _level0/plugh:foo

    and that SHOULD do it. it's been a while, though, so i might be misremembering, but this should put you on the right track...


    hth,
    Deep (just a guy)

    <pre><font face="courier" size="2">,-----------------------------.

    | Pradeep Kumar Nair, B.Math |

    | Graphic/Multimedia Designer |

    | ICQ#: 39102360 |

    | Medius Communications, Inc. |

    | http://www.medius.com |

    `-----------------------------'</font></pre>
    Moderator - i/us Flash Forum
    hth,
    Deep (just a guy)
    --
    Pradeep Kumar Nair, B.Math
    CTO
    9 Story Entertainment
    http://www.9story.com
    IP

 

 

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
  •