Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
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.
Copy link to clipboard
Copied
it would be a smoother user experience if you copied and pasted the timelines into one file.