<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16705" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Speaking of scripting - I have an odd issue with
Flash CS3 (AS 2.0) and a simple piece of scripting I have used many times
before.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>A simple and crude calculator</FONT></DIV>
<DIV><FONT face=Arial size=2>Create 2 input text boxes with variable names,
'num1' and 'num 2' respectively.</FONT></DIV>
<DIV><FONT face=Arial size=2>Create a dynamic text box with the variable
name 'answer'.</FONT></DIV>
<DIV><FONT face=Arial size=2>A button with the following script</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>on (press) {<BR> answer = Number(num1) +
Number(num2); //Adds 2 numbers entered into num1 and num2, converting num1 &
2 from strings to numbers<BR>}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>It produces the correct output on a teachers PC eg
2 + 3 =5, but not on the students or my laptop where it produces NaN (Not a
number).</FONT></DIV>
<DIV><FONT face=Arial size=2>A check of the datatypes using
'trace(typeof(num1)); etc, shows that num1 and num2 remain as
strings.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>A trace(answer) command shows a lot of html
code?!?!?</FONT></DIV>
<DIV><FONT face=Arial size=2>It appears different machines compile them
differently, is there a setting or formatting I am not finding??</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Any clues, anyone?</FONT></DIV>
<DIV><FONT face=Arial size=2>Glenn Drew</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>