Hi,
I’ve copied motion as AS3 and amend the XML and use it fine.
What I would like to do though is use a variable in place of the XML e.g.
import fl.motion.Animator;
var testObject_xml:XML = <Motion duration="10" xmlns="fl.motion.*" xmlns:geom="flash.geom.*" xmlns:filters="flash.filters.*">
<source>
<Source frameRate="24" x="-9.25" y="8.75" scaleX="1" scaleY="1" rotation="0" elementType="graphic" symbolName="block">
<dimensions>
<geom:Rectangle left="0" top="0" width="35.5" height="35.5"/>
</dimensions>
<transformationPoint>
<geom:Point x="0.5" y="0.5"/>
</transformationPoint>
</Source>
</source>
<Keyframe index="0" tweenSnap="true" tweenSync="true">
<tweens>
<SimpleEase ease="0"/>
</tweens>
</Keyframe>
[COLOR=red] <Keyframe index="9" scaleX="3.645"/>[/COLOR]
</Motion>;
var testObject_animator:Animator = new Animator(testObject_xml, testObject);
testObject_animator.play();
I would like to change the highlighted line to use a variable instead e.g.
<Keyframe index="9" scaleX=myVar/>
This doesn’t work! :diss: Is there something that will achieve directly or is there a quick way to set it using the XML?