建一个外部的AS,再在FLA导入它,实现左移,或者右移,发声!谢谢
我要参加一个FLASH中级证书的考试,有道题我不知怎么做,想请教下各位:这题考点是建一个外部的AS,再在FLA导入它,实现左移,或者右移,发声!谢谢了,我写了外部AS:class sprite{
var x:Number;
var 0:string;
function sprite(s:string){
0=s;
trace(0)}
function move left(){
setProperty(this.0,_x,this.x-5);
this.x=this.x-5}
function move right(){
setProperty(this.0,_x,this.x+5);
this.x=this.x+5}
function playSound(s1:Sound){
_global.Behoviors.Sound.s1.start(0)
};
不知如何导入到向左向右移动的按钮处 先import,然后触发事件时调用你写的函数
页:
[1]