You are here

Firefox 1.5 / Shockwave float() workaround

While waiting from a fix from either 'formerly Macromedia' or the Firefox team, here's what I use to work around the float() deficiency on European systems with Firefox 1.5:

Instead of using float() to convert a string to a float, I am now using myFloat(). myFloat() first checks if the current system is affected (seeing if a float is actually a float), and if so changes periods to commas.

on myfloat aValue
 case aValue.ilk of
   #float, #integer:
     return float(aValue)
     if not floatP(float("1.0")) then
       tLength = aValue.length
       tOffset=offset(".", aValue)
       repeat while tOffset>0
         aValue = chars(aValue,0,tOffset-1)&","&chars(aValue,tOffset 1,tLength)
         tOffset=offset(".", aValue)
       end repeat
     end if
     return float(aValue)
     return VOID
 end case
end myfloat

Unfortunately, I have found out that the float() and value() methods are not the only things that break in Firefox 1.5; If you use behaviors with a propertyDescriptionList that includes floats (ie: behaviors with fancy dialogs to set float properties), the stored values will be wrong on affected Firefox 1.5 browsers. No workaround yet, other than not using floats in propertyDescriptionLists.



The issue was fixed with a new release of Firefox