function scale(e:Event):void{
plane1_mc.scaleX += .1;
plane1_mc.scaleY += .1;
plane1_mc.x -= 5;
plane1_mc.y -= 3;
}
function prop(evt:Event):void{
plane1_mc.prop_mc.rotation += 100;
}
plane1_mc.prop_mc.addEventListener(Event.ENTER_FRAME, prop);
plane1_mc.addEventListener(Event.ENTER_FRAME, scale);
this is what im using to try to get plane1_mc to scale and move. it was doing both before but now its only doing the scale. Anybody feel free to tell me
这就是我试图让plane1_mc进行缩放和移动的方法。它之前做过这两件事,但现在它只做了规模。任何人都可以随意告诉我
1 个解决方案
#1
0
Your code is correct. Try increasing the amount you move it and post what happens. Something like this:
你的代码是正确的。尝试增加移动量并发布会发生的事情。像这样的东西:
plane1_mc.x -= 50;
plane1_mc.y -= 30;
Also make sure you aren't scaling plane1_mc anywhere else. It's possible that another event is being fired instead of this one, so it looks like the scaleX and scaleY values are being modified from this function when they really aren't. I'd suggest putting some trace statements in this function and seeing if they show up.
还要确保你没有在其他任何地方缩放plane1_mc。可能会触发另一个事件而不是这个事件,所以看起来scaleX和scaleY值正在从这个函数中被修改,而实际上并非如此。我建议在这个函数中加入一些跟踪语句,看看它们是否显示出来。
#1
0
Your code is correct. Try increasing the amount you move it and post what happens. Something like this:
你的代码是正确的。尝试增加移动量并发布会发生的事情。像这样的东西:
plane1_mc.x -= 50;
plane1_mc.y -= 30;
Also make sure you aren't scaling plane1_mc anywhere else. It's possible that another event is being fired instead of this one, so it looks like the scaleX and scaleY values are being modified from this function when they really aren't. I'd suggest putting some trace statements in this function and seeing if they show up.
还要确保你没有在其他任何地方缩放plane1_mc。可能会触发另一个事件而不是这个事件,所以看起来scaleX和scaleY值正在从这个函数中被修改,而实际上并非如此。我建议在这个函数中加入一些跟踪语句,看看它们是否显示出来。