การทำ Flash animation แบบ smooth

By oyukyiko

วิธีการทำ animation แบบ smooth ในกรณีที่ใช้ mouseOver ซ้ำๆ

ที่เฟรมแรก ใส่ script ดังนี้
[กำหนด event ก่อน]
this.onRollOver = function(){
over = true;
}
this.onEnterFrame = function(){
over = false;
}
////////////////////////////////////////////////////////////////////////////////
[เขียน function ตรวจสอบการทำงาน]
this.onEnterFrame = function(){
if(over){
nextFrame();
}else{
prevFrame();
}
}
stop();

ป้ายกำกับ:

ใส่ความเห็น