0
votes

I have a movie clip (symbol 2) inside another movie clip on the main frame. I want to get back to the main timeline in frame 2 when the movie clip is finish to play (frame 200). Then I do this on my last movie clip frame (frame 200) :

MovieClip(root).gotoAndStop(2);

It works, I go to the main frame (frame 2) but I also get an error:

TypeError: Error #1009: Cannot access a property or method of a null object reference. at hehe_fla::Symbol2_2/frame200()[hehe_fla.Symbol2_2::frame200:1]

1
Try and be more specific, does it work at all? show your mouse click function, is the gotoAndStop call on frame 200 of symbol 2? or is some other code there?BadFeelingAboutThis
I just want to get back to my main frame, when the movie clip is over (frame 200)Indonesia Belajar
Are you stopping your symbol 2 timeline after goto?BadFeelingAboutThis
can you help me please sir.Indonesia Belajar
Can you post your fla?BadFeelingAboutThis

1 Answers

0
votes

I think that you should do like this : ( comments are in the code )

symbol_2.addEventListener(MouseEvent.CLICK, function(e){

    trace(e.currentTarget.name)             // trace the name of symbol_2, gives you of course symbol_2
    trace(e.currentTarget.parent.name)      // trace the name of the parent of symbol_2, gives the name of your object (the parent clip of symbole_2)

    trace(e.currentTarget.root.name)        // trace the name of the root of symbol_2 : root1
    trace(e.currentTarget.parent.root.name) // trace the name of the root of the parent of symbol_2 : root1
                                            // here you should get the same name, because it's the same root
                                            // and that's why we can do like this : 

    e.currentTarget.root.gotoAndStop(2)
                                            // or like this, to go to and stop in the frame 2 of root

    e.currentTarget.parent.root.gotoAndStop(2)

})