Prev: Change published icon
Next: Authoware Webplayer
From: SudsMalone on 25 Sep 2008 22:59 Hi, I know a bit about JavaScript and a bit about Authorware and I am trying to use Javascript in Authorware. I am stuck on something and can't seem to work out how to get the value from an interaction icon using Javascript... I know with Authorware it is : valueToRound := EntryText My problem is that I am trying to round a value to the nearest whole number or ..5 ie 2.3 becomes 2 and 2.4 becomes 2.5 I can do it with Javascript code, I don't know how to do it with Authorware (only to a whole number). If you know how to round to a whole number or .5 in Authorware that would be a huge bonus, otherwise I am just happy finding out how to get the value from an interaction icon using Javascript Help in either direction would be most appreciative! Thanks
From: Chris Forecast on 26 Sep 2008 04:41 "SudsMalone" <webforumsuser(a)macromedia.com> wrote in message news:gbhj6c$pfl$1(a)forums.macromedia.com... > If you know how to round to a whole number or .5 in Authorware that would > be a huge bonus, Something like: roundedvalue:=Round(2*value)/2 should do it. (presumably you'd want 2.3 rounded to 2.5 and not 2.0 though......) Chris Forecast
From: SudsMalone on 26 Sep 2008 05:13 Thanks Chris! I only just worked out an answer using INT and Round, a much longer way of doing it than what you came up with!!! Thanks a lot! Most appreciated
|
Pages: 1 Prev: Change published icon Next: Authoware Webplayer |