# Metric to feet convertor not working

**URL:** <https://forum.kirupa.com/t/metric-to-feet-convertor-not-working/251618>\
**Category:** Uncategorized\
**Created:** [February 11, 2008, 6:33am UTC](https://forum.kirupa.com/t/metric-to-feet-convertor-not-working/251618 "2008-02-11T06:33:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nukegara](https://avatars.discourse-cdn.com/v4/letter/n/71c47a/32.png) [@nukegara](https://forum.kirupa.com/u/nukegara)\
**Post date:** [February 11, 2008, 6:33am UTC](https://forum.kirupa.com/t/metric-to-feet-convertor-not-working/251618/1 "2008-02-11T06:33:28Z")

</div>

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:

```auto
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 -\_-

---

<div class="post-metadata">

**Author:** ![gdjones](https://avatars.discourse-cdn.com/v4/letter/g/e0b2c6/32.png) [@gdjones](https://forum.kirupa.com/u/gdjones)\
**Post date:** [May 28, 2008, 11:49am UTC](https://forum.kirupa.com/t/metric-to-feet-convertor-not-working/251618/2 "2008-05-28T11:49:30Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![sparkdemon](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@sparkdemon](https://forum.kirupa.com/u/sparkdemon)\
**Post date:** [May 28, 2008, 7:01pm UTC](https://forum.kirupa.com/t/metric-to-feet-convertor-not-working/251618/3 "2008-05-28T19:01:52Z")

</div>

there are many types of metrics… what do you need ?

---

<div class="post-metadata">

**Author:** ![cooldude88](https://avatars.discourse-cdn.com/v4/letter/c/e0b2c6/32.png) [@cooldude88](https://forum.kirupa.com/u/cooldude88)\
**Post date:** [May 28, 2008, 7:07pm UTC](https://forum.kirupa.com/t/metric-to-feet-convertor-not-working/251618/4 "2008-05-28T19:07:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![gdjones](https://avatars.discourse-cdn.com/v4/letter/g/e0b2c6/32.png) [@gdjones](https://forum.kirupa.com/u/gdjones)\
**Post date:** [May 28, 2008, 8:32pm UTC](https://forum.kirupa.com/t/metric-to-feet-convertor-not-working/251618/5 "2008-05-28T20:32:27Z")

</div>

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
