I have two swf files that I have published using flash cs5.5, one is called game.swf and the other is called addon.swf. I want addon.swf to be able to call functions from game.swf, but it always returns an error.
The two swf files are loaded into visual basic 2010, because I want to add more functionality to the game.swf through VB.
game.swf is loaded as layer 0 and addon.swf is loaded as layer 1 in visual basic. Then in addon.swf, I have this code:
import flash.external.ExternalInterface;
var success:Boolean = ExternalInterface.addCallback("myMethod",this, test);
function test()
{
_root0.poo(50);
}
_root0.poo(50); is supposed to call the function poo() with argument 50 from game.swf. So I thought since game.swf is loaded on layer 0, i should use root0.poo(50); otherwise it wouldn't know which layer the game.swf is on. Is there something I'm missing that connects the 2 swf files in visual basic? Any help is appreciated, thanks.