User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 19

Thread: working with numbers...

  1. #1
    No Products Registered

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

    working with numbers...

    I have used many programs over the years, from basic, to Stos and Amos, Blitz and the like. I recently purchased MMF 2, the $99 version, as I wanted to write my own Painters Estimator Program. This I thought would be easy, but alas no. I am finding the program frustrating to say the least.
    The manual that came with it was pretty well pointless, so I bought the 'Power User's Guide to Windows Development' a book by Jason Darby. He definitely knows his stuff - but the problem is, it's of no use to me.
    You see, all I would like to so is use numbers. Plain and simple. Lots of numbers, to multiply and divide, work out percentages and ratios and averages, and print out the results to the screen.
    Simple I thought for a program costing $99 and purporting to be able to write applications, but I am at a loss.
    There are many ways to manipulate strings in MMF 2, but when it comes to a simple thing like adding 2 and 2 together, there seams to be no simple way.
    I am very disappointed with the program that can't do such a simple thing, so I've gone back to Blitz for now, a program that lets me calculate 5+6*300 in just a few seconds.
    Come on ClickTeam, sort this out, pleeaassee!!

    novelidea

  2. #2
    Forum Moderator Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    Sphax's Avatar
    Join Date
    Jun 2006
    Location
    Paris, France
    Posts
    4,454
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: working with numbers...

    Don't understand at all your problem...

    Manipulating numbers in MMF2 is very easy...

    You want to display the result of "5+6*300" in a counter ? Just do that :

    * always: Counter > Set counter to 5+6*300

    You want to parse the result of a string which contain an operation ? Use "Expression evaluator object".

    You want to work with float numbers ? Just add ".0" at the end of the used numbers...

    What do you want to do exactly ?

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,367
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)

    Re: working with numbers...

    Well, first thing you should do when you have a problem, is coming to this forum and ask for help. Don't wait till you have tried everything else..

    In MMF2, it is extremely easy to work with numbers, and there are lots of ways you can do this.

    The simplest way is to use counters.

    To retrieve values from counters:

    * upon pressing Enter
    - set counter1 to counter2 + counter3

    To retrieve values from strings:

    The only thing you need to think about is to conver the string to a number. Do this by surrounding the stringvalue with val()

    * upon user pressing Enter
    - set counter1 to val(value of string1)+val(value of string2)

    To display values as strings:

    Here you need to convert the other way round, using str$().

    * Always
    - set alterable string of String1 to str$(value of counter1)


  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall Creator ProPatch Maker
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    DJFuego's Avatar
    Join Date
    Jul 2006
    Location
    UK
    Posts
    1,416
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: working with numbers...

    Mmmm I think someone is making a fuss about nothing.
    Maybe someone could create an example to show how easy it is to manipulate numbers in MMF.

  5. #5
    Clicker Multimedia Fusion 2 Developer

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

    Re: working with numbers...

    I will have an example after I get home from school 7 hours from now. Stay tuned.

  6. #6
    Clicker Multimedia Fusion 2

    Join Date
    Sep 2006
    Location
    Britain, South Coast
    Posts
    1,030
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: working with numbers...

    MMF is object orientated, so where you would normally use a variable, you usually need to use an object.

    So for example, you can't just define a variable like 'hours worked'. You'd need to create a counter, or some other type of object to hold that data. You can name that counter something like "hours worked" and then refer to it like this:

    value("hours worked")


    Doing that, you can use operators (+, -, /, *, etc) as much as you like.

    A little note about divide though; you need to divide using decimals, because MMF uses a simplified version of divide for speed.

    So 1/2 will give you 0
    But 1.0/2.0 will give you 0.5

  7. #7
    No Products Registered

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

    Re: working with numbers...

    Thanks for all the replies everyone. It does seem that you are all a lot cleverer that I am. Ok, this is exactly what I'd like to do...
    On the screen I have 4 combo boxes in a row - Length, Width, Height, and Number of Coats. I have numbers in them only, from 1 to 50 in first 3 boxes and 1 to 5 in last box.
    I also have a Check Box button, a simple Yes/No on Painting the Ceiling, and Under them, I have 2 Edit Boxes where I'm trying to output the results of my calculations. The first box I want Total Wall Area to Paint in sq ft, second box should have Cost of Painting @ 0.20cents per sq ft, per coat (number from 4th combo box.)
    I would like the results to change in the Edit Boxes in Real Time, as soon as I change any of the data in any of the Combo Boxes and the Check Box.
    I'd like to store all these figures, plus lots more data (like room name, Job Name, Client Name, Work Details, Material Costs, etc) - all specific to each job and easily changeable.
    I know with the use of variables this would be very easy, but I am at a loss on how to do it here with MMF 2. Am I going about this all wrong?

    So, over to you ...

    P.S. Thank you all for your help, much appreciated.

    novelidea

  8. #8
    Forum Moderator Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    Sphax's Avatar
    Join Date
    Jun 2006
    Location
    Paris, France
    Posts
    4,454
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: working with numbers...

    Post a MFA with what you want in it and somebody will maybe take a look for you.

  9. #9
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    14,022
    Mentioned
    279 Post(s)
    Tagged
    3 Thread(s)

    Re: working with numbers...

    Edit Box and Combo Box objects contain strings. You need to use the string conversion functions to convert the strings to numbers and reciprocally :

    Val(string) => converts a string to number
    Str$(number) => converts a number to a string

  10. #10
    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...

    I think that's most likely the source of the problem too - you have to remember the difference between values and strings, even if they look the same on the surface.

Page 1 of 2 1 2 LastLast

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
  •