User Tag List

Page 2 of 2 FirstFirst 1 2
Results 11 to 19 of 19

Thread: working with numbers...

  1. #11
    No Products Registered

    Join Date
    Jun 2006
    Posts
    625
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: working with numbers...

    Since you've been using many different programming languages, you must be pretty used to this separation anyway. Edit Object has a function to retrieve its numeric value too.

  2. #12
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: working with numbers...

    But the edit object's function only seems to return integers. You need to do val(edittext("Edit 1")) to get a floating point number.

  3. #13
    No Products Registered

    Join Date
    Sep 2007
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: working with numbers...

    I know the difference between strings and numbers - been using them in other languages before for years, and I know all about variables and arrays, but I'm more used to A=5, B=23, C=A*5, Print C.
    Very simplistic, but user friendly.
    I know how to use Val(string) and Str$(number). Problem I have is HOW do I do this in MMF2?
    Where do I put it? I tried A=whatever, but I get an error.
    The manual tells WHAT a command does, but not HOW to do it.
    This all sounds counter-intuitive to me. I need to store numbers in an array at the beginning. The manual does NOT give examples on HOW to do this.
    I want to multiply 2 numbers together, both taken from 2 combo boxes that only contains numbers. I tried multiplying the contents of the boxes called length and width, and outputting to an Edit Box. But, this does not work and I have no idea why.
    I need a step by step on How to do this, but more importantly, I need to know Why so I can work this into my hurting brain!

    Thanks - novelidea

  4. #14
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Nov 2006
    Posts
    696
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: working with numbers...

    80% done with that example

  5. #15
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: working with numbers...

    You don't define things in the expression editor in MMF2 - instead, assignments like that are done through the event editor. Instead of "C= A * 5", you would directly create an action "Set alterable value C to..." on object "Object" and enter (Alterable Value A("Object") * 5) in the expression editor (or anything else, but I'm using the same letters you have for clarity).

    So, to retrieve the contents of two combo boxes and put the product into an edit box, use "Set text" on the Edit box and set it to:

    Code:
    Str$(val(Contents of "length") * val(Contents of "width"))
    (I don't know offhand the exact expression for getting the currently entered contents of a combo box object, but that's the general idea.)

  6. #16
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Nov 2006
    Posts
    696
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: working with numbers...

    ...
    >=( MMF2 crashed and I didn't save.

    Sorry, that example isn't happening.

  7. #17
    Clicker Multimedia Fusion 2 DeveloperHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    drnebula's Avatar
    Join Date
    Jul 2006
    Location
    Pennsylvania, USA
    Posts
    908
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: working with numbers...

    novelidea,
    I've created a rough app that does what you have asked for. You can find it in the File Archive forum.
    Steve

  8. #18
    No Products Registered

    Join Date
    Sep 2007
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: working with numbers...

    Thank you all for your help. I've downloaded the file from drnebula and I'll be looking it over this weekend. Also, thanks to DavidN, I think I got what you mean.

    novelidea

  9. #19
    Clicker Multimedia Fusion 2 DeveloperHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    drnebula's Avatar
    Join Date
    Jul 2006
    Location
    Pennsylvania, USA
    Posts
    908
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: working with numbers...

    novelidea,
    I realized that I forgot to include the $0.20 per square foot in the calculations. I've uploaded a new file to include this. I've also started to limit the values that the counters and edit boxes can have to 1-50, so you can see how to do this.
    Steve

Page 2 of 2 FirstFirst 1 2

Similar Threads

  1. Random Numbers and expiring the result numbers.
    By Corlen in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 26th April 2013, 04:11 PM
  2. Random Numbers Greater then Random Numbers...
    By Hordolur in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 15th April 2009, 06:24 AM
  3. hex numbers?
    By Chokito in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 1st August 2008, 05:39 PM
  4. How do I get only these numbers: 2 to 48?
    By Dynamite in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 19th December 2007, 10:27 AM
  5. working with Big, Big Numbers..
    By MelliGeorgiou in forum Multimedia Fusion 2 - Technical Support
    Replies: 17
    Last Post: 27th July 2007, 06:46 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
  •