|
|
||||||||||||||||||
| 1) Posted by: Sev May 24, 2006 7:18 AM I am writing a GUI for the calculations on an excel spreadsheet. The spreadsheet was originally conceived to allow quick evaluations to be made on the distance from the camera to a specific part - it pertains to a peice of optical measuring equipment used in the motor industry to allow surfaces to be measured. The product is called Ondulo and the maker is a french company called Techlab. http://www.techlab.fr/Surface.htm I have designed the GUI, and with the help of Scott Manning's great maths calculations article on site point http://www.sitepoint.com/article/math-calculations-flash I managed to get the fields and the basic calculations to work. This is now the point where I need help- The movie only has one frame but many layers. I've kept all of the scripting on a separate layer. I have two buttons, one labelled calculate, the other - reset. They both were pulled from the UI components box in Flash MX. There are 18 text boxes, 5 of which are input, the rest dynamic text to show the results. I would like to round the visible results fields up to the nearest whole number (the remaining results fields are hidden in a layer positioned behind the background graphic), and would like the reset button to clear everything and allow the user to start again. If I could find out how, i'd upload the .fla for you to examine. Here is the code for your convenience: function onCalculate() {
The whole useing flash for math functionality is really poorly documented - loads on how to generate maths related effects, but not alot on real world applications such as engineering and such like. I know that if I had the AS know how, there would be so many small swf. files that could be written for students, engineers and scientists to use to assist them visually in calculations rather than having to resort to spreadsheets- and the greatest bebefit would be that they would be truly platform indipendent. And lets face it... who doesn't have a flash plug-in installed these days?! |