-
1. Re: Convert ActionScript in HTML5
Colin Holgate Nov 21, 2017 7:08 AM (in response to Sabrina_PW)1 person found this helpfulWhen talking to buttons you need to add 'this.' before the button name. For the event part you use strings, like "click" instead of MouseEvent.CLICK. There are no typed variables, so in the function you would say (event) instead of (event:MouseEvent).
For what types of events there are you should read the documentation. Here's a page that tells you what different event types there are:
-
2. Re: Convert ActionScript in HTML5
kglad Nov 21, 2017 8:42 AM (in response to Sabrina_PW)1 person found this helpfulstage.enableMouseOver(10);
this.btn_Logo.addEventListener('mousedown', fl_ClickToGoToWebPage.bind(this));
this.btn_ball01.addEventListener('mouseover', fl_ClickToGoToAndStopAtFrame_2.bind(this));
etc
function fl_ClickToGoToWebPage(event):
{
window.open("http://www.adobe.com"), "_blank");
}function fl_ClickToGoToAndStopAtFrame_2(event)
{
this.gotoAndStop(1);
} -
3. Re: Convert ActionScript in HTML5
Sabrina_PW Nov 21, 2017 8:51 AM (in response to kglad)Thank you
-
4. Re: Convert ActionScript in HTML5
kglad Nov 21, 2017 11:20 AM (in response to Sabrina_PW)you're welcome.