User Tag List

Results 1 to 8 of 8

Thread: Silly question on multiplying numbers.

  1. #1
    No Products Registered

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

    Silly question on multiplying numbers.

    Hello people. I only got mmf 2 (build 246) yesterday. I am trying to write a small painters estimator application program of my own, instead of buying one. Well, what I'd like to do is know how to multiply 2 numbers together.
    I am using an 3 Edit boxes (not even sure that I should), and I want to be able to store the number zero in them initially. The first two boxes are the length and height, the 3rd box is the output of the contents of the first two boxes multiplied together.
    I would like to be able to get the last box to change automatically once I have changed the contents of the first two boxes.

    I have been up all night trying to do this, but the manual is no help and I am completely lost.

    Can anyone please help? Remember, I am new to this. Be gentle.

  2. #2
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module

    Join Date
    Jun 2006
    Posts
    1,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Silly question on multiplying numbers.

    Not a silly question at all. The hard part is making sure that the user only enters number characters - with no letters or special characters.

    Take a look at Marcello's Input object (in Bonus Pack 2 I think) and see if this meets your needs. If it doesn't, it gets a bit more complicated...

    Hmmm, that Input object only allows you to type in whole numbers - no decimals. So unless you ask people to type values in centimetres or millimetres, it won't work.

  3. #3
    No Products Registered

    Join Date
    Jul 2006
    Posts
    2,289
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Re: Silly question on multiplying numbers.

    I uploaded an example for you in the file section here.

    I think all you needed from the example are the conditions in the first line, but there is also a line that warns if the input is text.

    You can also use decimals with the example.

  4. #4
    No Products Registered

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

    Re: Silly question on multiplying numbers.

    Thank you Sarah and Novabrain.
    Sarah - I tried that input object - but kept crashing. Some kind of error. Could be a problem with my Vista - maybe it don't like it. but ...
    Novabrain - I tried your program and it works a treat. With a little alteration on my part - and no doubt a few late nights - I should be able to get it perfectly to do what I want - Thank you.
    Note for anyone working for Clickteam - You really need to improve on the software and make it easier to do something as basic as multiply a few numbers together. It shouldn't be This difficult!

    Thank you both again - Sarah & Novabrain!

    novelidea.

  5. #5
    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: Silly question on multiplying numbers.

    Novabrain's example seems fairly simple to me (though perhaps given a bit of overcomplexity by pulling things in and out of the global variables).

    Your problem isn't multiplying two numbers together - that's simply done through entering, say, Global Value A * Global Value B in the expression editor. The difficulty comes from the way that the numbers are actually entered - they're sequences of characters, or Strings, rather than numbers at first, so they have to be converted to values and the result converted into a string again to be displayed in an edit box. On top of that, you have to get the text content of the edit boxes in the same step. The result is:

    Str$(val(Edittext$("Edit Box 1")) * val(Edittext$("Edit Box 2")))

  6. #6
    No Products Registered

    Join Date
    Jul 2006
    Posts
    2,289
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Re: Silly question on multiplying numbers.

    Yeah, David, that may be a better way to illustrate and it explain it rather than using the GV's. I didn't want to get too complex with the expressions

    String and value conversion are not hard to get used to, once you understand them.

    I wanted to note that using Editboxes is fine, and they are rather powerful. You just have to learn how to use the various conditions to get the most out of them.

  7. #7
    No Products Registered

    Join Date
    Jul 2006
    Posts
    2,289
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Re: Silly question on multiplying numbers.

    Quote Originally Posted by novelidea
    Thank you Sarah and Novabrain.
    Sarah - I tried that input object - but kept crashing. Some kind of error. Could be a problem with my Vista - maybe it don't like it. but ...
    Novabrain - I tried your program and it works a treat. With a little alteration on my part - and no doubt a few late nights - I should be able to get it perfectly to do what I want - Thank you.
    Note for anyone working for Clickteam - You really need to improve on the software and make it easier to do something as basic as multiply a few numbers together. It shouldn't be This difficult!

    Thank you both again - Sarah & Novabrain!

    novelidea.
    You are welcome!

    I work for Clicteam and we always appreciate suggestions. I am not sure how we would make this easier to do. We do like to improve the software, especially for new users.

    Do you have any ideas or suggestions?

    What comes to mind as a potential is a Numeric Editbox that only accepts numbers and a period, (maybe + and -, also) and gives a value as a result. Maybe add some masking options like amount of digits and decimal places. How about an optional up/down control to allow it to be incremented by clicking? That could also use a righ/left justify, I guess.

  8. #8
    No Products Registered

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

    Re: Silly question on multiplying numbers.

    Good Ideas...

    I like your suggestion on having a Numeric Editbox that only accepts numbers. You could have specific things that you can only do with 2 or more of these boxes, like multiplication and divide and other maths functions, and output them to another box.
    I really love the idea of having an optional up/down control (I need one now, actually). Justification would be very good, and setting the colour of the txt when the output is printed to the screen.
    Another suggestion - you could use the data stored in these Numeric Editbox's with drawing commands. A simple number can do so much - converting a string to a number like we have to do right now is just a little long winded - I don't see the logic of such a design.
    One other thing on Global Variables - Why only 26??
    I used to write programs using AMOS and STOS, and setting up variables and loops and storing data was much easier than it seems to be with MMF2.
    I am new to this software, that's very true, but I remember writing basic stuff in only a few hours back then - now, with MMF2, after spending 10 hours straight trying unsuccessfully to multiply 2 numbers together (very unhelpful manual) - something is not right.
    Finally, are there any good books on MMF2? I love what this program is capable of. I can see the results for myself, but I need a REAL manual, that goes into detail.

    novelidea

Similar Threads

  1. Silly animation question...
    By Warmachine in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 7th July 2012, 04:40 PM
  2. Maybe a silly question.....
    By Warmachine in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 23rd January 2012, 10:43 PM
  3. Another Silly 3D question
    By Aikikame in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 31st December 2010, 11:57 PM
  4. Really silly question...
    By RGBreality in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 1st October 2010, 11:33 PM
  5. Silly question
    By Keli in forum Vitalize
    Replies: 6
    Last Post: 29th November 2007, 07:49 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
  •