dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: loading movies and variables in another movie

  1. #1
    Junior Member
    Join Date
    Apr 2002
    Posts
    1
    I'm trying to load a movie containing a variable (let's say it's aiming to object "x") into another movie. This last movie has a target (a dynamic text, "x", and its correspondent variable)
    Whe I load the first movie into the second, the variable doesnt automatically load to the target. That is, the dynamic text block doesn't get the var from the nested movie.
    I've been testing with different actionscripts and the only one which works is the tellTarget command.
    It is recommended not to use that command in Falsh 5 and MX. How do I replace it? The suggested "dot" notation and the "with" command doesnt work, at least doing it following the MX help guide.
    Thanks so much in advance to all !!!

  2. #2
    Senior Member
    Join Date
    Jun 2000
    Posts
    705
    When you load a movie, all its variables stay within that movie. They don't become global. So to use any of the variable from the loaded movie, you will have to retrieve them.
    If you movie is loaded into a level you can use something like this:
    myvar = _level1.myvar;
    If you loaded it into another MC you will have to use
    myvar = MCname.myvar;

    just a matter of resolving the path or pointer (which ever you prefer to call it)

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center