Viewpoint Forums
Viewpoint Forums
Viewpoint Media Player Support
Firefox 1.5 bug|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Member |
Hey Guys,
I don't know what happens, but my javascript functions stopped to work on this new firefox release. Does anyone else had the same problem? Is it a firefox issue or a VMP issue? Thanks, Marcelo Muniz |
||
|
|
Member |
Marcelo,
Which version of the VMP are you using? |
|||
|
|
Junior Member |
i see this bug in VMP 3.3 In FireFox 1.0.7 all function work but in FF1.5 not
|
|||
|
|
Member |
I found the bug. I'm using the latest VMP.
when I run the following javascript line: var loc = vmp.GetProperty('MTSInstance.Wheel_FrontLeft', 'loc_', 'mts_pnt3d'); I receive the following string: "n,nnnn n,nnnnn n,nnnn" where n is a number. The problem is that now the decimal divisor is ',' instead of '.'. If I run the same javascript line on the older firefox or IE it returns me "n.nnnn n.nnnnn n.nnnn" As I need to do math operations if the numbers, and the decimal divisor is wrong it crashes my application. It seems that the new firefox 1.5 plugin communication gets regional setting for decimal divisor. I'm from Brazil and in portugues we use ',' as decimal divisor. I've already posted this bug at bugzilla.mozilla.org at firefox bugs too. Please fix this. It crashes all viewpoint javascript programs. |
|||
|
|
Member |
Bugzilla link:
https://bugzilla.mozilla.org/show_bug.cgi?id=319318 What do the viewpoint developers say about this? |
|||
|
|
Member |
Marcelo,
What version of MTS3Interface.js are you using? I believe scripting issues for Firefox has been addressed with the latest version (5.00.01.03) which can be downloaded from Dev Central under "New Web Installer / MTS3Interface". Please let me know if this solves the issue. This message has been edited. Last edited by: Admin, |
|||
|
|
Member |
I'm using the latest MTS3Interface.js (version 5.00.01.03).
And it keeps the error. To solve it I needed to create an auxiliary function to replace "," by ".".
function replaceAll( str, from, to ) {
var idx = str.indexOf( from );
while ( idx > -1 ) {
str = str.replace( from, to );
idx = str.indexOf( from );
}
return str;
}
var loc = vmp.GetProperty('MTSInstance.Wheel_FrontLeft', 'loc_', 'mts_pnt3d');
loc = replaceAll(loc,",",".");
vmp.SetProperty('MTSInstance.wheel_01', 'loc_',loc, 'mts_pnt3d');
But it's a shame as I don't need to use this code this on Internet Explorer. |
|||
|
|
Member |
There is another annoying problem about this bug.
I don't think there is a workaround for this one. I was playing with svg in mtx code. I could not understand why a basic shape (rect) with opacity was not working. Without opacity everything is ok, but when i set 'fill-opacity: 0.5' nothing appears on the screen. The problem is the same (with FF1.5 and W2K). On FF 1.07 everything is fine. I'm french, and we also use ',' as decimal separator. For the 'fill-opacity' attribute, if i replace '0.5' by '0,5' i get transparency on my rect. It seems the way you get attribute's values from a 'style' attribute is bad. If in windows i set '.' as decimal separator my code with '0.5' works good in FF 1.5... Are you aware of this bug ? For this one i think it's more a VPT bug than a FF bug. You consider the '.' character as the decimal separator for your mtx parser and vetscript code. You should do the same when parsing svg code. Regards, Lionel PS: Sample code taken from 'vmp 3.12 release notes' pdf file [MTSTimeElem Type="SWFView" Name="barry" On="1" ] [svg width="512" height="512" ] [rect x="50" y="70" width="335" height="320" style="fill: blue; fill-opacity: 0.5; stroke: green; stroke-width: 2" /] [/svg] [/MTSTimeElem] |
|||
|
|
Member |
Yes, this is a problem exposed by FFox_1.5’s way of treating locale info.
Most likely it’s local for SVG. This will be fixed in next VMP release (no solid time yet). For now the workaround (ugly one) would be to have different content for FFox_1.5 + French on client’s machine. Regards, Viewpoint Support |
|||
|
| Powered by Eve Community |
| Please Wait. Your request is being processed... |
|

