A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Trying to create a calculator in Flash 8

  1. #1
    Junior Member
    Join Date
    Jul 2006
    Posts
    11

    Trying to create a calculator in Flash 8

    Hi, I'm sitting at work right now trying to use flash professional 8, and I could really use some help from somebody who knows something about script (I'm a complete idiot when it comes to flash)...anyways, here's my problem

    The company I work for wants me to design a specialty calculator in flash that will help customers decide on the proper size of equipment to order (they make parts handling conveyers and feeders and things of that nature)..anyways, the basic formula is:


    B * 4800
    ------------- = A
    C * D * E

    Now I was able to create the calculator and make it work fine, but the problem is that I also need to create some rules for this calculator, and that's where my problem is... I need to make it so that
    if "C" > than half of "A" then A needs to display some type of error message rather than the calculation...

    I dunno if this is a really stupid question or not, but I'm really in a bind, and any help would be very appreciated...thanks in advance

  2. #2
    Senior Member
    Join Date
    Jun 2006
    Posts
    136
    well i dont no flash 8 but ill tell you how i would do it.


    Ill just assume that B, C, D, E are input vars. And A is the output. So i would make 5 text boxes, 4 being input and 1 being dynamic. Label the vars correctly. in the action script i would write A=b*4800/ (c*d*e)


    then i would just make if statements

    for flash mx (could be the same?)

    if(C> (.5*A)){

    message=this is the message.

    }

    and u might want another dymanic text box for the var message.


    hope this helps
    If anyone can help me Please feel free it IM colbyneedshelp99 (AIM).

  3. #3
    Junior Member
    Join Date
    Jul 2006
    Posts
    11
    Hey man, thanks a bunch...I'm not at work, so I haven't been able to try it, but I'll let you know if it works...maybe you could help me with another problem I'm having with the same calculator...

    The company I work for has 2 main divisions...light industry and heavy industry...and one of the variables in the formula listed earlier needs to change according to which industry is being used...

    Basically what I wanted to do was have 2 radio buttons and depending on which one was clicked (light industry or heavy industry) certain numbers would show up in a combobox below...

    For example if i had 2 radio buttons "A" and "B" and i clicked "A"...the combo box would display 1, 2, and 3...but if I clicked "B", that same combo box would instead display 4, 5, and 6...

    It's kinda hard to explain, but hopefully that gives the idea of what i need (I think they're called dependable comboboxes or something)...if anybody could tell me how to script that, i would greatly appreciate it...
    ---
    AllstarJason: stealthninja45 = God Account
    *brushes shoulder off*...oh yeah..I went there.

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