User Tag List

Results 1 to 4 of 4

Thread: How To Have a User Input A Number

  1. #1
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jan 2011
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How To Have a User Input A Number

    I have an application where the user needs to type in a number, but I'm not sure how to do it. If I used the edit box, Multimedia Fusion assumes that it is a string. How can I make it so that the user can only type in a number, and Multimedia fusion with recognise it as a numerical value, not a string?

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleFirefly 3D ModuleInstall Creator Pro
    twister's Avatar
    Join Date
    Jan 2007
    Location
    Pacific Northwest USA
    Posts
    376
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)

    Re: How To Have a User Input A Number

    you can create a pseudo

    make you edit box read only.

    event1; upon pressing "0" set text editbox Edittext$( "Edit Box" )+"0"
    event2; upon pressing "1" set text editbox Edittext$( "Edit Box" )+"1"
    event3; upon pressing "2" set text editbox Edittext$( "Edit Box" )+"2"
    and so forth through "9"

    you can len the editbox with each entry for the number length.

    edit: you should also include events for your key pad along with the key board numbers, or use the "OR" operator.

    example:
    event1;
    upon pressing "0" set text editbox Edittext$( "Edit Box" )+"0"
    OR
    upon pressing "0 (Num.keypad)"

  3. #3
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,393
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)

    Re: How To Have a User Input A Number

    Just use the "numeric up/down control" extension instead of an editbox.
    btw: You can use val() to convert a string to a value, or str$() to do the opposite (do NOT use "get numeric value", as it can't handle floats).

  4. #4
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jan 2011
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How To Have a User Input A Number

    Thanks. It makes sense now.

Similar Threads

  1. Feature suggestion for Android object to allow for super-easy custom user input.
    By BrashMonkey in forum Android Export Module Version 2.0
    Replies: 1
    Last Post: 27th May 2013, 03:54 PM
  2. User input in Flash
    By King_Cool in forum SWF/Flash Export Module Version 2.0
    Replies: 2
    Last Post: 21st November 2012, 09:10 PM
  3. Set Input Number crashes
    By Keith in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 28th September 2011, 09:04 PM
  4. Number Input Extension
    By Gullyking in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 19th June 2011, 04:44 AM
  5. How to delay user input momentarily...
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 7th October 2007, 06:33 PM

Posting Permissions

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