[X3D-Public] X3D + AJAX3D : addBrowserListener not always working
Joseba Beristain
joseba.beristain at cidemco.es
Thu Jul 9 04:00:50 PDT 2009
> Maybe try an earlier version: Flux.
>
> http://mediamachines.com/download/
Thanks. We will try it. But the performance in flux is quite low. And
more important, flux looks is dead (at least as far as I know) so it
does not seem the better option.
> we have had some luck with this, even cross-browser. Can you give a
> code example of what is failing?
The code is the base of AJAX 3D, taken from Ajax3d examples
(http://www.ajax3d.org/content/t3/indexa.html), done by Tony Parisi some
years ago.
The core code is this:
------------------------------------------------------
function initAjax3d(filename) {
browser = null;
context = null;
listenersSetup = false;
//browser = document.FLUX1.getBrowser();
browser = document.getElementById('FLUX1').getBrowser();
if (browser != null) {
listener = new Object();
listener.browserChanged = browserChanged;
browser.addBrowserListener(listener);
if (filename != null) browser.loadUrlS(filename);
else context = browser.getExecutionContext();
} }
function browserChanged(evt) {
if (evt == 0) // BROWSER_INITIALIZED
{
context = browser.getExecutionContext();
setupListeners();
}
}
-------------------------------------------------------------------
Is suposed browserChanged(evt) should execute each time the scene is
loaded.
I have used a "not-very-elegant" solution to solve the problem, but I
prefer to avoid it. I wanted to know if it was just our problem or it
was something general.
Thanks again!!
joseba beristain | CIDEMCO-Tecnalia
> Good Luck and Best Regards,
> Joe
>
> ----- Original Message ----- From: "Joseba Beristain"
> <joseba.beristain at cidemco.es>
> To: "X3D Graphics public mailing list" <x3d-public at web3d.org>
> Sent: Thursday, July 09, 2009 12:36 AM
> Subject: [X3D-Public] X3D + AJAX3D : addBrowserListener not always
> working
>
>
>> Dear X3D list members,
>>
>> My name is Joseba Beristain, I'm working in CIDEMCO-Tecnalia
>> tehcnological center developing a web application using X3D,
>> basically HTML + JavaScript + Ajax3D + X3D.
>>
>> Each element in the scene have a touchsensor sending callback to a
>> web page's JavaScript function. We realize these touchsensors have
>> extrange behavior since when loading or refreshing the web page they
>> just work sometimes. Other times callbacks just don't happend. It
>> looks they have random behavior. We guess the problem is related to
>> AJAX3D. We realize the "browserChanged" function does not execute
>> always, so we deduced "browser.addBrowserListener(listener)" function
>> is not working properly.
>>
>> Does anybody have similar behavior? Similar problem with this function?
>>
>> We are using Vivaty 0.8.7.916, the latest stable version we found.
>> (New versions are less stable, crashing very frequently, at least
>> with our application)
>> We did't found anything related to this topic in ajax3d forum (and
>> web in general) so any help will be wellcome.
>>
>> Thank you very much in advanced!!
>>
>> Best regards,
>>
>> -------------------------------------------------------
>>
>> Joseba Beristain - Inf.Systems R&D - CIDEMCO - Tecnalia
>>
>> ------------------------------------------
>>
>> Tel.: (+34) 943 81 59 00
>> Fax.: (+34) 943 81 60 74
>> http://www.cidemco.es
>>
>> --------------------------
>>
>> Área Anardi, nº 5
>> 20730 Azpeitia
>> (Gipuzkoa) / Spain
>>
>> ------------------
>>
>>
>>
>> _______________________________________________
>> X3D-Public mailing list
>> X3D-Public at web3d.org
>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>>
>
>
>
------------------
More information about the X3D-Public
mailing list