Currently I Am trying to modify a motion xml file that makes an object start from one position (from user input) and move to another position (0,0).
Here is the code I am using:
<Motion duration="60" xmlns="fl.motion.*" xmlns:geom="flash.geom.*" xmlns:filters="flash.filters.*"> <source> <Source frameRate="30" x="274.95" y="163.95" scaleX="1" scaleY="1" rotation="0" elementType="movie clip" symbolName="Text caption"> <dimensions> <geom:Rectangle left="-87.95" top="-32" width="175.95" height="64"/> </dimensions> <transformationPoint> <geom:Point x="0.5" y="0.5"/> </transformationPoint> </Source> </source> <effect_config effect_type="motion_path"> <config_item display_name="Starting X"> <effect_property type="number" property_value="STARTX" default_value="100" valid_range="{{-1000,1000}}" increment= "1" > </effect_property> </config_item> <config_item display_name="Starting Y"> <effect_property type="number" property_value="STARTY" default_value="100" valid_range="{{-1000,1000}}" increment= "1" > </effect_property> </config_item> </effect_config> <Keyframe index="0" tweenSnap="true" tweenSync="true" y="STARTY" x="STARTX"> <tweens> <SimpleEase ease="0"/> </tweens> </Keyframe> <Keyframe index="59" x="0" y="0" /></Motion>
Overview: Lines 13-22, Get Input from User
Lines 23-28 Set Keyframe info for motion tweening
Problem: Object doesn't move, in fact it wont appear until the last frame. I believe it is due to line 23. If i replace STARTY and STARTX with number values e.g "100" the effect works as expected. Can you explain why this is happening? and is other way of using user input to control the motion?