mercredi 14 décembre 2016

actionscript 3 presentation onclick without buttons

Is there a possibility to go to the next slide with left click, I can only see buttons in the default one right to go forward and left to go backwards. is this possible with the left click to go forward? without any buttons?

This is the default code:

stage.addEventListener(KeyboardEvent.KEY_DOWN, fl_changeSlide);
function fl_changeSlide(evt:KeyboardEvent):void
{
    if(evt.keyCode == 37) // LEFT
    {
    gotoAndStop(this.currentFrame-1);
    }
    else if (evt.keyCode == 39 || evt.keyCode == 32) // RIGHT OR SPACE
    { 
        gotoAndStop(this.currentFrame+1);
    }
}stop();

Aucun commentaire:

Enregistrer un commentaire