Skip to main content
Participant
October 16, 2020
Question

Flash converted to HTML Canvas - What do I do with the different "scene" files?

  • October 16, 2020
  • 2 replies
  • 386 views

Hi All,

I'm completely new to AS3, but have used Flash for years. I've converted a 5-scene flash file to HTML5 Canvas, but I need to know what the script is to play the next file. I have the following 5 files that I want to automatically play them in sequence. Can someone please give me the action that I need to add to the end of each file? I'm wasting so much time hunting and searching!

2020_AnnualReport_Video_HTML5.html

2020_AnnualReport_Video_HTML5_Scene 2.html

2020_AnnualReport_Video_HTML5_Scene 3.html

2020_AnnualReport_Video_HTML5_Scene 4.html

2020_AnnualReport_Video_HTML5_Scene 5.html

This topic has been closed for replies.

2 replies

kglad
Community Expert
Community Expert
October 16, 2020

it would be a smoother user experience if you copied and pasted the timelines into one file.

JoãoCésar17023019
Community Expert
Community Expert
October 16, 2020

Hi.

 

Write this instruction in the last frame of each FLA's main timeline:

location.href = "your-next-file.html";

 

Learn more about the Window Location object here:

https://www.w3schools.com/js/js_window_location.asp

 

Regards,

JC

 

Participant
January 3, 2022

window.location.replace('http://example.com');

 

It's better than using window.location.href = 'http://example.com';

Using replace() is better because it does not keep the originating page in the session history, meaning the user won't get stuck in a never-ending back-button fiasco.

 

  • If you want to simulate someone clicking on a link, use window.location.href
  • If you want to simulate an HTTP redirect, use window.location.replace

 

You can use assign() methods to JavaScript redirect to other pages like the following:

 

location.assign("http://example.com");

 

The difference between replace() method and assign() method(), is that replace() removes the URL of the current document from the document history, means it is not possible to use the "back" button to navigate back to the original document. So Use the assign() method if you want to load a new document, andwant to give the option to navigate back to the original document.