_levelN.onEnterFrame not working.
I have some ActionScript in a frame that loads an external SWF onto a level and then executes a function
Code:
loadMovieNum("index-new.swf", 2);
trace(_level2);
_level2.onEnterFrame = function(){
trace("function executed");
}
Unfortunately, I can't get it to work. The SWF loads at the top-left corner of my SWF, but I can't manipulate it with ActionScript after that. The first trace comes back undefined and the onEnterFrame function doesn't even work. How can I manipulate _level2 if the player won't let me access it?
I'm using Macromedia Flash MX Professional 2004.