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?
开发者_Go百科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();
}
}
this looks more like as2 but i might miss something:
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();
}
}
精彩评论