ActionScript 3演示文稿无需按钮



是否有可能使用左键单击到下一个幻灯片,我只能在默认一个中看到按钮向前左右前向后移动。左键单击可以向前推进吗?没有任何按钮?

这是默认代码:

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();

解决了。

stage.addEventListener(MouseEvent.CLICK, Test);
function Test(event:MouseEvent):void
{
    gotoAndStop(this.currentFrame+1);
}stop();

感谢您的帮助

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();

最新更新