Skip to main content
May 27, 2006
Question

Links between swfs

  • May 27, 2006
  • 1 reply
  • 132 views
HI ALL,

I am writing a script to communicate between flash and Visual Basic.

My main problem is that my swf is composed of two swf : Clip1 which contains clip 2.

and when I want to get a variable of clip 2 (getVariable function) : i get a communication error


Code in clip 1 to load clip2 : loadMovieNum ("/clip2.swf", 1);

Inside clip 2 I define a variable abc that I want to access. Abc is declared in clip 2 at _level0

Does any one have an idea on how to access level from the first swf clip 1 ?

Thank you .
This topic has been closed for replies.

1 reply

Inspiring
May 27, 2006
If you where to run clip2.swf alone, any variable declared in clip2.swf can be referenced as varName or _level0.varName. But if the clip is been loaded from another clip like clip1.swf. Then the variable is not declared on _level0 but on the level specified as the second parameter of the loadMovie method. That is. if you loaded the movie like this: loadMovieNum ("/clip2.swf", 1); then clip2.swf becomes _level1 and not _level0. So if you want to access this variables you need to write _level1.varName