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

Javascript

New Here ,
Feb 24, 2021 Feb 24, 2021

Hi there,

 

Hope y'all are well.

Someone can give a hand.

I'm converting a code form AC to JS, most of the job is already done, the problem that I am facing is how can I close the flash.

I'm using this function that I checked in Convert your ActionScript code to HTML5 (adobe.com)

window.open("javascript:flashFinished()", "_self").

Am I right, or is there another way to do it?

This is my code

this.stop();

var frequency = 3;
var exitStr = termi

stage.enableMouseOver(frequency);

this.btFinish.addEventListener("mouseover", function fl_MouseEventFinish()
{
mcFinish.gotoAndStop();
});

this.btFinish.addEventListener("mouseover", function fl_MouseEventFinish()
{
mcFinish.gotoAndStop();
});

this.btFinish.addEventListener("click", fl_MouseEventFinish.bind(this));

function fl_MouseEventFinish()
{
window.open("flashFinished()", "_self");

//this.gotoAndStop("S1");
}

Hope you guys can help me.
Hasta luego amigos




TOPICS
ActionScript , Code , How to , Import and export
182
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
LEGEND ,
Feb 24, 2021 Feb 24, 2021

That code is correct... IF you're trying to navigate to a website named "javascript:flashFinished()".

 

Are you?

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 ,
Feb 24, 2021 Feb 24, 2021

thank you for your help,

I just wanted to close the flash (at the meantime I have realsed wrote wrong), BTW I found a way to do it, using the line below
window.open('','_self').close()

 

 

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
LEGEND ,
Feb 24, 2021 Feb 24, 2021
LATEST

Umm... why would you not just use window.close()?

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