AS3.0TypeError: Error #1010: 术语尚未定义,并且无任何属性。 at flash1210new_fla::MainTimeline
staticvar是我弄的一个类,定义全局变量staticvar.act和staticvar.overimportstatic1.staticvar;staticvar....
staticvar是我弄的一个类,定义全局变量staticvar.act和staticvar.over
import static1.staticvar;
staticvar.act =5;
staticvar.over = staticvar.act;
for (i=1; i<=5; i++) {
this["b"+i].mainText1.gotoAndStop(i);
this["b"+i].mainText2.gotoAndStop(i);
this["b"+i].rect1.gotoAndStop(i);
this["b"+i].bg.addEventListener(MouseEvent.MOUSE_OVER,on_rollover1);
function on_rollover1(e:MouseEvent)
{
staticvar.over=this.parent.name;
}
this["b"+i].bg.addEventListener(MouseEvent.MOUSE_OUT,on_rollout1);
function on_rollout1(e:MouseEvent)
{
staticvar.over = staticvar.act;
}
this["b"+i].bg.addEventListener(MouseEvent.MOUSE_DOWN,on_down1);
function on_down1(e:MouseEvent)
{
}
this["b"+i].addEventListener(Event.ENTER_FRAME,enterFrameHandler1);
function enterFrameHandler1(e:Event)
{
if (over == this.name)
{
this.nextFrame();
} else
{
this.prevFrame();
}
}
}
speed = [4, 2, 6, 9, 3];
this.addEventListener(Event.ENTER_FRAME,enterFrameHandler);
function enterFrameHandler(e:Event){
for (i=1; i<=5; i++) {
this["image"+i]._y += (-over*200-this["image"+i]._y)/speed[i-1];
}
} 展开
import static1.staticvar;
staticvar.act =5;
staticvar.over = staticvar.act;
for (i=1; i<=5; i++) {
this["b"+i].mainText1.gotoAndStop(i);
this["b"+i].mainText2.gotoAndStop(i);
this["b"+i].rect1.gotoAndStop(i);
this["b"+i].bg.addEventListener(MouseEvent.MOUSE_OVER,on_rollover1);
function on_rollover1(e:MouseEvent)
{
staticvar.over=this.parent.name;
}
this["b"+i].bg.addEventListener(MouseEvent.MOUSE_OUT,on_rollout1);
function on_rollout1(e:MouseEvent)
{
staticvar.over = staticvar.act;
}
this["b"+i].bg.addEventListener(MouseEvent.MOUSE_DOWN,on_down1);
function on_down1(e:MouseEvent)
{
}
this["b"+i].addEventListener(Event.ENTER_FRAME,enterFrameHandler1);
function enterFrameHandler1(e:Event)
{
if (over == this.name)
{
this.nextFrame();
} else
{
this.prevFrame();
}
}
}
speed = [4, 2, 6, 9, 3];
this.addEventListener(Event.ENTER_FRAME,enterFrameHandler);
function enterFrameHandler(e:Event){
for (i=1; i<=5; i++) {
this["image"+i]._y += (-over*200-this["image"+i]._y)/speed[i-1];
}
} 展开
2个回答
威孚半导体技术
2024-08-19 广告
2024-08-19 广告
威孚(苏州)半导体技术有限公司是一家专注生产、研发、销售晶圆传输设备整机模块(EFEM/SORTER)及核心零部件的高科技半导体公司。公司核心团队均拥有多年半导体行业从业经验,其中技术团队成员博士、硕士学历占比80%以上,依托丰富的软件底层...
点击进入详情页
本回答由威孚半导体技术提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询