actionscript小问题

varonbtnNum:int;varoffbtnNum:int;varbg:MovieClip=newMovieClip();bg.graphics.beginFill... var onbtnNum:int;
var offbtnNum:int;
var bg:MovieClip = new MovieClip();
bg.graphics.beginFill(0x999999, 1);
bg.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
bg.graphics.endFill();
bg.alpha = 0;
all.addChildAt(bg, 0);
stage.addEventListener(MouseEvent.MOUSE_OVER, overBtn);
function overBtn(evt:MouseEvent):void
{
switch (evt.target)
{
case all.bt1 :
onbtnNum = 1;
all.pic1.alpha = 1;
all.pic4.alpha = 0;
all.pic2.alpha = 0;
all.pic3.alpha = 0;
all.pic5.alpha = 1;
all.shadowmc.alphaoff.addTarget(all.pic5,1);
break;
case all.bt2 :
onbtnNum = 2;
all.pic2.alpha = 1;
all.pic5.alpha = 1;
all.pic1.alpha = 0;
all.pic4.alpha = 0;
all.pic3.alpha = 0;
all.shadowmc.alphaoff.addTarget(all.pic5,1);
break;
case all.bt3 :
onbtnNum = 3;
all.pic3.alpha = 1;
all.pic5.alpha = 1;
all.pic1.alpha = 0;
all.pic2.alpha = 0;
all.pic4.alpha = 0;
all.shadowmc.alphaoff.addTarget(all.pic5,1);
break;
case all.bt4 :
onbtnNum = 4;
all.pic5.alpha = 1;
all.pic4.alpha = 1;
all.pic1.alpha = 0;
all.pic2.alpha = 0;
all.pic3.alpha = 0;
all.shadowmc.alphaoff.addTarget(all.pic5,1);
break;
}
}

实现了鼠标移上去触发切换图片的效果,但是现在要求图片还能自动过段时间切换,应该怎么做,谢谢了
展开
 我来答
meneye
2010-07-06 · TA获得超过120个赞
知道小有建树答主
回答量:181
采纳率:0%
帮助的人:129万
展开全部
继续添加一个事件侦听:鼠标移开 -> 触发,Timer类控制的图片切换
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式