没有按钮的actionscript 3演示文稿onclick
actionscript 3 presentation onclick without buttons
是否可以左键进入下一张幻灯片,我只能看到默认按钮中的按钮向右前进,向左前进后退。左键单击是否可以前进?没有任何按钮?
这是默认代码:
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(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();
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();
感谢您的帮助