AS3:由于eventListener而调整大小
我编写了一个地图,当点击省物体时,它应该移动到屏幕的中心并增加宽度的百分比,同时显示许多不同的东西。
问题是,为了调整图像大小,需要点击两次。它移动,并且所有子项都按照设计的方式显示,但调整大小在第一次单击时不起作用。任何想法如何解决这个问题?
menuItem4_mc.addEventListener(MouseEvent.CLICK, onClick);
public function onClick(mc:MouseEvent):void {
menuItem4_mc.width = width * .65;
menuItem4_mc.height = height * .7;
//brings Ontario To the front of the stage
setChildIndex(menuItem4_mc,numChildren - 1);
menuItem4_mc.x= 670/2;
menuItem4_mc.y= 480/2;
...
}
谢谢!
没有找到相关结果
已邀请:
1 个回复
秃拳割