Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
That code is correct... IF you're trying to navigate to a website named "javascript:flashFinished()".
Are you?
Copy link to clipboard
Copied
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()
Copy link to clipboard
Copied
Umm... why would you not just use window.close()?