simple AS3 converter not working :(
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: simple AS3 converter not working :(

Hybrid View

  1. #1
    Registered User
    Join Date
    Mar 2012
    Posts
    2

    Unhappy simple AS3 converter not working :(

    Hi guys

    I am really stuck with this assignment i am supposed to hand in tomarrow ! so would appreciate any help.

    I have been told to make a simple converter using as3 in flash to convert kilometers to miles, even though I am kinda sure my code is correct, when i test the movie, type a random number and press enter, nothing happens

    here is the code:
    kilometers_txt.addEventListener(KeyboardEvent.KEY_ DOWN,convertKilometers);
    function convertKilometers(k:KeyboardEvent)void:{
    var kilometers:Number;
    var miles:Number;
    {
    if (k.keyCode==Keyboard.ENTER) {
    kilometers=Number(km_txt.text);
    miles=kilometers / 1.61;
    miles_txt.text=String(miles);


    }
    }
    I really reallly would appreciate any help. p.s i can even send u the .flv file
    thank you

  2. #2
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,808
    please don't double post
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

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

Poll by Flashkit.com