title: Opening a swf file from within another swf with different than default values
body: <p>Hopefully this won't be taken as asking the same question twice...</p>
  
  <p>So I'm working on a Flash website (in AS2) which has an outer index swf which loads sub swf files using <code>loadMovie("subfoo1.swf", placeToShowSwf)</code>. These in turn load an xml file which tells it what content to load. Everything works peachy, but we'd like to add a button to the index swf that opens a sub swf file with one or two different values for one or two variables.</p>
  
  <p>Unfortunately, just adding a button that says</p>
  
  <pre><code>loadMovie("foo1.swf", placeToShowSwf);
  placeToShowSwf.openProject(x);
  </code></pre>
  
  <p>doesn't work, I assume because <code>openProject(x)</code> is called on a file that isn't fully loaded. I know that there's not a problem with the code, because I made a button elsewhere that only calls <code>placeToShowSwf.openProject(x)</code> and there aren't any problems. </p>
  
  <p>I see two solutions, both of which I'm unsure how to do.</p>
  
  <ol>
  <li>Change the desired value when the swf file is made, like a constructor for a class. But is there some sort of constructor function for swf files? It'd be really nice just to say <code>loadMovie(new foo1.swf(x), placeToShowSwf)</code> or something equivalent.</li>
  <li>Wait until after swf (and probably xml) is loaded, and then call <code>placeToShowSwf.openProject(x)</code>. </li>
  </ol>
  
  <p>Anyone got any guidance towards either of these solutions, or perhaps some other way that my pea-like brain has been unable to fathom?</p>