Hi All,
I have a function that receives scale information each frame as a percentage (from After Effects) that needs to be turned in to a decimal to work in flash. ie. values like 94.2627118644068 need to be 0.94.
I've tried this:
ActionScript Code:
if (prop == "Transform_Scale"){ // if cue point is scale related then,
var resultsS:Array = val.split(",",[3]); // splits string into 3 figures of which im interested in only one which is a percentage like 94.2627118644068.
faceParent.faceContainer.scaleY = Number(("."+resultsS[1])*10);
faceParent.faceContainer.scaleX = Number(("."+resultsS[1])*10); // trying to make it 0.94 and apply to movieclip.
};
Because i am placing a decimal point manually its breaking as theres multiple decimal points along with the percentage decimals. i.e. this is clearly a noob attempt.
Is this just basic maths or does it require certain commands in AS3? I'm dealing with percentages that vary from sub 100 to over 100 but below 200.
Thanks for reading!