Skip to main content
aldor10080202
Participating Frequently
August 17, 2018
Answered

AS3 to HTML5 - very simple code

  • August 17, 2018
  • 1 reply
  • 716 views

Hi everyone,

I'm not really able to write codes but I really need your help in order to translate this very simple Action Script 3 code into an HTML5 one.

Thank you!

stop();

stage.addEventListener(MouseEvent.CLICK, _onStageMouseDown);

function _onStageMouseDown(e:MouseEvent):void

{

    nextFrame();

}

    This topic has been closed for replies.
    Correct answer JoãoCésar17023019

    Hi.

    One way would be this:

    this.stop();

    stage.on("stagemousedown", onStageMouseDown);

    function onStageMouseDown(e)

    {

        exportRoot.gotoAndStop(exportRoot.currentFrame + 1);

    }

    Please don't hesitate to ask if you still have any further questions.

    Regards,

    JC

    1 reply

    JoãoCésar17023019
    Community Expert
    JoãoCésar17023019Community ExpertCorrect answer
    Community Expert
    August 17, 2018

    Hi.

    One way would be this:

    this.stop();

    stage.on("stagemousedown", onStageMouseDown);

    function onStageMouseDown(e)

    {

        exportRoot.gotoAndStop(exportRoot.currentFrame + 1);

    }

    Please don't hesitate to ask if you still have any further questions.

    Regards,

    JC

    aldor10080202
    Participating Frequently
    August 18, 2018

    Thank you very much Joao!

    It works perfectly!!