5 Replies Latest reply on Jul 26, 2006 1:38 AM by Peter Lorent

    Function call from inside an onEnterFrame action

    CogDev Level 1
      I have a class file called MonsterGame. Inside of it, one of the methods called "queueAnim" creates an onEnterFrame function to wait till the current movie is done playing before making the next one visible.

      That works just fine, but I have certain conditions set up so that the function Main() will get called just after a certain movie gets played (called "eatMovie"). Everything works except the call to Main();

      I think it's some issue with referencing the wrong place, but I don't know why.

      The trace for "this should be the name of root" returns "MonsterGame", which is the name of the class where the Main() method is found. So if this._name returns MonsterGame, and MonsterGame has Main() in it, why wont Main() or this.Main() run the function???

      PS: It's NOT because I delete the onEnterFrame before calling Main(), at least I'm pretty sure it isn't because I have put a trace there, and it runs just fine, proving that lines after the delete are still executed.

      PM me if you want the link to the source code and the swf file