A Flash Developer Resource Site

Results 1 to 20 of 21

Thread: Conversion Calculator

Hybrid View

  1. #1
    Relaxing tmoore935's Avatar
    Join Date
    Oct 2001
    Location
    colorado, usa
    Posts
    1,713
    Ok. I guess the forwardslash made it look like an equation or something.
    Thanks all.
    Any programming language is at its best before it is implemented and used.

  2. #2
    Relaxing tmoore935's Avatar
    Join Date
    Oct 2001
    Location
    colorado, usa
    Posts
    1,713
    Hello, I was able to get everything to work as Blanius suggested but I have a problem with temps. This is because the answer is sometimes negative and I cannot get any display unless an answer is positive.
    And what is the unicode for a math minus sign? I went online to look and I found 2212 as a unicode, but it still does not let me enter a minus sign. The same in Flash 8.
    Any ideas.

    This code works in flash 8 but not koolmoves.
    txt1.restrict = "0-9 - .";
    txt2.restrict = "0-9 - .";

    txt1.onChanged=function(){
    //to get F
    if (txt1.text!=""){
    t = txt1.text;
    b = ((5/9)*(t - 32));
    txt2.text = b;
    }
    }

    txt2.onChanged=function(){
    //to get C
    if(txt2.text!=""){
    t = txt2.text;
    b = ((9/5)*t) + 32;
    txt1.text = b;
    }

    }
    Any programming language is at its best before it is implemented and used.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center