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

Converting to HTML5 and Looping once.

Community Beginner ,
Feb 06, 2017 Feb 06, 2017

Copy link to clipboard

Copied

Hi,

I'm a rare user of Adobe Animate so please bear with.

I have a .swf that I created 5 years ago for a website. I wish to reuse it after converting it to HTML5.

The conversion seemed straightforward enough as there's a site online that could do it. When it came back however the animation looped recurrently.

Is there a way within Animate CC to convert the original .fla (which I still have) to HTML5 and keep the 'loop once' property?

Thanks

Jim

Views

2.0K

Translate

Translate

Report

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

Community Expert , Feb 06, 2017 Feb 06, 2017

Yeah - just use this.stop(); on teh final frame. There is also an option in the publish settings where you can turn looping off and on for HTML5 Canvas.

Votes

Translate

Translate
Community Expert ,
Feb 06, 2017 Feb 06, 2017

Copy link to clipboard

Copied

You can open the AS3 document .fla within Animate CC and choose Commands > Convert to other document formats from the application menu. From here, choose HTML5 Canvas and it will be saved to a new file targeting that platform.

To have it loop once (play twice?) you will need to create a variable to keep track on teh first frame and then increment it on the final frame. Additionally, check on the final frame whether the variable has been incremented or not and either stop or whatever.

FRAME 1:

var loop = true;

FRAME {LAST}:

if(loop){

    loop = false;

}else{

    this.stop();

}

Votes

Translate

Translate

Report

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
Community Beginner ,
Feb 06, 2017 Feb 06, 2017

Copy link to clipboard

Copied

Thanks Joseph,
  I think I meant 'play once' and then stop. Apologies if I misled: assuming I can salvage the last part of your script though and tag

this.stop();

onto the last frame?  Also, the method for getting it saved afterwards; do I now use 'publish' rather than export? (the latter steers me down the road of creating another .swf)

Regards,

Jim

Votes

Translate

Translate

Report

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
Community Expert ,
Feb 06, 2017 Feb 06, 2017

Copy link to clipboard

Copied

Yeah - just use this.stop(); on teh final frame. There is also an option in the publish settings where you can turn looping off and on for HTML5 Canvas.

Votes

Translate

Translate

Report

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
Community Beginner ,
Feb 06, 2017 Feb 06, 2017

Copy link to clipboard

Copied

Seems to be doing the trick – thanks Joseph. Just to confirm 'publish' is now the way to save the animations? (with export .swf soon to be a legacy)

And from there I pass the images + .js files etc to my web-developer so he can insert them on my site?

Votes

Translate

Translate

Report

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
Community Expert ,
Feb 06, 2017 Feb 06, 2017

Copy link to clipboard

Copied

Not at all. Publish is how you produce SWF for Flash Player as well. SWF is not going away.

Yeah, Publish should create a set of files and folders you can pass along - exactly.

Votes

Translate

Translate

Report

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
Community Beginner ,
Feb 06, 2017 Feb 06, 2017

Copy link to clipboard

Copied

You've been more than helpful, cheers for your assistance and insight Joseph.

Jim

Votes

Translate

Translate

Report

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
LEGEND ,
Feb 06, 2017 Feb 06, 2017

Copy link to clipboard

Copied

swf will continue to be used for any AS3 projects, including AIR for desktop and AIR for mobile.

With HTML5 you can try your file out with Test Movie, as you would with swf. When it does that it inserts a random number everyway, to avoid browser caching issues. Before sending the html, js, images and sounds to your developer, do use File/Publish one last time. Then it will not include those random numbers.

Votes

Translate

Translate

Report

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
Community Beginner ,
Feb 06, 2017 Feb 06, 2017

Copy link to clipboard

Copied

LATEST

A good tip too Colin, thanks.

Votes

Translate

Translate

Report

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
LEGEND ,
Feb 06, 2017 Feb 06, 2017

Copy link to clipboard

Copied

What was the site that did the conversion for you?

Votes

Translate

Translate

Report

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
Community Beginner ,
Feb 06, 2017 Feb 06, 2017

Copy link to clipboard

Copied

Hello Colin,

the site was: flash-to-html5(dot)net  and the conversion it returned was a single myfilename.HTML  file (wrapper?) with all the gubbins inside.

Rgds

Jim

Votes

Translate

Translate

Report

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