Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Navigating between scenes with WebGL

New Here ,
Nov 17, 2017 Nov 17, 2017

Hi,

I have a WebGL animation and I'm trying to switch between scenes using buttons. I want to goto a scene and play from a certain frame.

I got as far as:

player.play('Scene 1');

Which plays the scene but:

player.play('Scene 1', 20);

won't play the scene from frame 20.

Does anyone know what I'm missing and how to achieve this??

Thanks

474
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Nov 18, 2017 Nov 18, 2017

According to the Adobe Animate CC documentation for the WebGL API, it looks like player.play() only takes one argument (the scene to be played), and not the frame number in that scene.

Flash Professional Help | Player

That's still one up on the regular canvas 2d export, which does not support scenes at all.

If you define a variable in one scene.

this.frameDesired = 45;

...then go to scene...

player.play('Scene 2');

... in that scene's first frame ...

this.gotoAndPlay(this.frameDesired);

This worked for m

...
Translate
Explorer ,
Nov 18, 2017 Nov 18, 2017

According to the Adobe Animate CC documentation for the WebGL API, it looks like player.play() only takes one argument (the scene to be played), and not the frame number in that scene.

Flash Professional Help | Player

That's still one up on the regular canvas 2d export, which does not support scenes at all.

If you define a variable in one scene.

this.frameDesired = 45;

...then go to scene...

player.play('Scene 2');

... in that scene's first frame ...

this.gotoAndPlay(this.frameDesired);

This worked for me in testing.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 18, 2017 Nov 18, 2017
LATEST

Thanks!

Always seems to need a workaround...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines