尝试在flash actionscript 2.0中配置幻灯片时出错
感谢所有能够在这种情况下伸出援助之手的人 所以 我用flash制作了一个幻灯片,可以在我选择调试电影之前预览。这时出现了一个关于MouseeEvent类的错误 错误状态为无法加载类或接口“MouseeEvent”。 从我所读到的内容来看,我需要导入这个MouseEvent的假设正确吗 为了准确了解我所拥有的,以下是我的完整代码尝试在flash actionscript 2.0中配置幻灯片时出错,flash,actionscript-2,mouseevent,slideshow,cs3,Flash,Actionscript 2,Mouseevent,Slideshow,Cs3,感谢所有能够在这种情况下伸出援助之手的人 所以 我用flash制作了一个幻灯片,可以在我选择调试电影之前预览。这时出现了一个关于MouseeEvent类的错误 错误状态为无法加载类或接口“MouseeEvent”。 从我所读到的内容来看,我需要导入这个MouseEvent的假设正确吗 为了准确了解我所拥有的,以下是我的完整代码 stop() btn1.addEventListener(MouseEvent.CLICK,backward); btn2.addEventListener(Mouse
stop()
btn1.addEventListener(MouseEvent.CLICK,backward);
btn2.addEventListener(MouseEvent.CLICK,forward);
function forward(event:MouseEvent){
if(this.currentFrame == this.totalFrames){
gotoAndStop(1);
}
else{
nextFrame();
}
}
function backward(event:MouseEvent){
if(this.currentFrame == 1){
gotoAndStop(this.totalFrames);
}
else{
prevFrame();
}
}
这看起来更像as2,但我可能会错过一些东西:
btn1.onPress = function (event){
if(this.currentFrame == 1){
gotoAndStop(this.totalFrames);
}
else{
prevFrame();
}
}
btn2.onPress = function(event){
if(this.currentFrame == this.totalFrames){
gotoAndStop(1);
}
else{
nextFrame();
}
}
这应该是AS2还是AS3?是的,这不是AS2,这是AS3,这是你的问题。如果您想要AS2代码,那么@www0z0k已在下面为您提供了正确答案。