Skip to main content
raphjac
Participating Frequently
May 1, 2019
Answered

html5, play(), stop(),gotoandPlay(), gotoAndStop() and timeline ?

  • May 1, 2019
  • 1 reply
  • 542 views

Hello !

I'im trying to create a timeline with  2 movieclips ( movieclips A and B for example)

Movieclip A is located at frame 1

Movieclip B at frame 5

There are 4 layers

1) for moveclip A

2)for movieclip B

3) for  labels

4) for actions

On layer 4 I put at frame 1 this.stop(); to stop the reading head for allowing it to play movieclip A

Movieclips A &B finish both with this.stop();

I woulld like to read now movieclip B at frame 5.

Who could help me to write the right Js code at  the right place ?

Thank you

Jack

This topic has been closed for replies.
Correct answer kglad

i don't know what you mean by 'read now movieclip B', but assuming you want the playhead to go to frame 5 where movieclip B is located, on the last frame of movieclip A, place:

this.parent.gotoAndStop(5);  // noting the first frame is frame 0 and frame 5 looks to most people like frame 6.

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
May 1, 2019

i don't know what you mean by 'read now movieclip B', but assuming you want the playhead to go to frame 5 where movieclip B is located, on the last frame of movieclip A, place:

this.parent.gotoAndStop(5);  // noting the first frame is frame 0 and frame 5 looks to most people like frame 6.

raphjac
raphjacAuthor
Participating Frequently
May 3, 2019

Thank you !!!

That's exactly what I was looking for!

I knew the parent' concept, and I didn't thought about !

Best regards

kglad
Community Expert
Community Expert
May 3, 2019

you're welcome.