Now, your new code causes this error:
Events for 'Scene': For expression should be 'v in expr'
from scripts.SceneEvents_0
line: 123
columns: 4-11
Then, if I remove the "for(......)" line, the tween works incorrectly, causing these two issues:
- The actor position is suddenly changed just before it starts moving. (half of its width and half of its height)
- Also, strangely, I get the #1009 error if I reload the scene while the tween is running:
TypeError: Error #1009: No se puede acceder a una propiedad o a un método de una referencia a un objeto nulo.
at com.stencyl.models::Actor/setX()[C:/Program Files (x86)/Stencyl_v34_B9328/plaf/haxe/lib/stencyl/1,00/com/stencyl/models/Actor.hx:2556]
at MethodInfo-6344()[Source/scripts/SceneEvents_0.hx:127]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at Function/<anonymous>()
at motion.actuators::GenericActuator/change()[C:/Program Files (x86)/Stencyl_v34_B9328/plaf/haxe/lib/actuate/1,8,6/motion/actuators/GenericActuator.hx:140]
at motion.actuators::MotionPathActuator/update()[C:/Program Files (x86)/Stencyl_v34_B9328/plaf/haxe/lib/actuate/1,8,6/motion/actuators/MotionPathActuator.hx:225]
at motion.actuators::SimpleActuator$/stage_onEnterFrame()[C:/Program Files (x86)/Stencyl_v34_B9328/plaf/haxe/lib/actuate/1,8,6/motion/actuators/SimpleActuator.hx:579]
at com.stencyl::Engine/update()[C:/Program Files (x86)/Stencyl_v34_B9328/plaf/haxe/lib/stencyl/1,00/com/stencyl/Engine.hx:2324]
at com.stencyl::Engine/postUpdate()[C:/Program Files (x86)/Stencyl_v34_B9328/plaf/haxe/lib/stencyl/1,00/com/stencyl/Engine.hx:2619]
at com.stencyl::Engine/onUpdate()[C:/Program Files (x86)/Stencyl_v34_B9328/plaf/haxe/lib/stencyl/1,00/com/stencyl/Engine.hx:2595]
Sorry, I don't have much idea about Haxe code, so I hope you can solve these issues.