Hi, I’m trying to make a simple metric to feet conversion and no result shows up in the dynamic text field.
I have an input text field on the stage with the instance name x, then the convertButton, and then a dynamic text field with the instance name of result. If you need the fla I can uplaod it, but I think this is a simple problem that is eluding me…
here is my code:
x = '' ;
result = '';
//convert meters to feet
_global.convertm2ft = function (x) {
x = x * 3.28029999;
return x;
trace(x);
}
convertButton.onRelease = function() {
result = convertm2ft(x);
trace("button hit");
}
I found a starter code somewhere else, so I really don’t know what I’m doing -_-
Has anyone got an answer to the above question? I’m having the same issues, better yet if anyone could give me a summary of how to create the metric converter in actionscript 3.0 I’d really appreciate it, thanks.
(obviously I understand that the last question would belong in the actionscript 3.0 board but I just thought I’d ask quickly here first, thanks)
there are many types of metrics… what do you need ?
nukegara im not sure i quite understand your second problem it only converts when the user puts 3 in the input? and gdjones for an as3 version i would suggest the as3 forum im sure someone else has done it before.
its alright, i just woked it out, instead of
x.text = metersToFeet(3); i had to put in ‘metersToFeet(meter.text)’ thanks for the help anyway