It has been a while since I used AS2, as AS3 rocks, but I believe that you need to give an instance ID to the attached movie clip. And you also need to wait until the movie is ready.
//MovieClip with function hello() in it.
hello():Void
{
trace('Hello world!');
}
//Root timeline of main movie.
container.attachMovieClip("nameInLibraryToAttach", "instanceID", depth);
//The following will not trace because it happens to soon.
container.instanceID.hello();
//The following works
var runOnceNumber:Number = 0;
var interval:Number = setInterval(someFunction, 1000);
someFunction():Void
{
container.instanceID.hello();
runOnceNumber++;
clearInterval(interval);
}
What you need to do is either setup the MovieClip with the embedded function to broadcast an event when ready and to listen to it from the main, or something like setInterval which only probably needs one tick. I tested it with setInterval and it worked first go. Again you need to wait until it is "INITIALIZED" meaning all of its code on frame 1 is loaded and available. Consider actionscript 3 because with its event driven flow, things like this are very very easy.
Brian Hodge
hodgedev.com
blog.hodgedev.com