as3.0有没有办法用一条代码控制所有的影片剪辑
1个回答
展开全部
import flash.events.Event;
var i:int;
//首先把所有可视实例摆放好档手芦。(特别是滑块,把它放在进度条最左端)
//然后给影片实例中最后一帧添加如下代码:gotoAndStop(1);
//伪代码如下:
ks_btn.addEventListener(MouseEvent.CLICK,ksc);
zt_btn.addEventListener(MouseEvent.CLICK,ztc);
tz_btn.addEventListener(MouseEvent.CLICK,tzc);
this.addEventListener(Event.ENTER_FRAME,<a href="https://www.baidu.com/s?wd=ef&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YLrjPhmWFBPju-n103rHb40ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6K1TL0qnfK1TL0z5HD0IgF_5y9YIZ0lQzqlpA-bmyt8mh7GuZR8mvqVQL7dugPYpyq8Q1D3rHfLPWDLPjRLPH6zn1b1Pj0" target="_blank" class="baidu-highlight">ef</a>);
function ksc(e:MouseEvent):void{
yp_mc.play();
}
function ztc(e:MouseEvent):void{
yp_mc.stop();
}
function tzc(e:MouseEvent):void{
yp_mc.gotoAndStop(1);
}
function <a href="https://www.baidu.com/s?wd=ef&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YLrjPhmWFBPju-n103rHb40ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6K1TL0qnfK1TL0z5HD0IgF_5y9YIZ0lQzqlpA-bmyt8mh7GuZR8mvqVQL7dugPYpyq8Q1D3rHfLPWDLPjRLPH6zn1b1Pj0" target="_blank" class="baidu-highlight">ef</a>(e:Event):void{
i=yp_mc.currentFrame;
hk_mc.x=滑薯袭块初始x坐标值行带+((i-1)/yp_mc.totalFrames)*(当播放完时滑块的x坐标值-滑块初始x坐标值);
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询