我尝试在 Flash ActionScript 2.0 中配置幻灯片时遇到错误
感谢任何能够在这种情况下伸出援手的人...
所以,
我用 Flash 制作了一个幻灯片,在我选择调试电影之前可以预览它。就在那时,出现了关于 MouseEvent 类的错误...
错误指出“无法加载类或接口‘MouseEvent’”。 根据我所读到的内容,我认为我需要导入此 MouseEvent 的假设是否正确?
为了准确了解我所拥有的内容,以下是我的完整代码;
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();
}
}
thanks to anyone who is able to give a helping hand with this situation...
So,
I've made a slideshow in flash, it was able to be previewed before i chose to debug movie. that was when an error appeared, regarding the class of MouseEvent...
The error states "The class or interface 'MouseEvent' could not be loaded".
Gathered from what i have read, am i correct in my assumption that i need to import this MouseEvent?
To get an exact look at what i have, the following is my complete code as it is;
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();
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这看起来更像 as2 但我可能会错过一些东西:
this looks more like as2 but i might miss something: