PDA

View Full Version : functions of a .swf into a new one with the "loadmovie" method


lizuka
02-13-2002, 03:22 PM
i'm new to this...
the first .swf works fine on its own, with its own function. but when i call it into an empty MC in another .swf it doesn't work at all.
what it the right syntax to call a function in a new .swf?

my code:
function atteindrePage(deQuelleManiere)

Ricod
02-13-2002, 03:35 PM
If u have a function on the _root of the loaded swf, and u load that one into _level1, then the path to the function is now :
_level1.myFunction();

If u loaded the swf into a mc (for instance _level0.container), and the function is still in the _root of the loaded swf, the new path to the function would be :
_level0.container.myFunction();
or if u call it from _level0, u could use :
_root.container.myFunction();

If the function would be in a mc (let's say _root.functions), then u need to include that in the path :
_level1.functions.myFunction();

Check the paths tutorial.