DevalVR support

 

It is currently Wed Jun 19, 2013 2:59 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Replace panos in one page (or frame) with “writecode” ?
PostPosted: Sat Jul 28, 2007 9:21 am 
Offline

Joined: Mon Jun 11, 2007 11:20 am
Posts: 33
Hello !

I have a button for each pano and I understood well how to change pano with the .dvl file (pano1) (pano2) etc.
But I would like to know if it is possible to make the same thing with “writecode” (or detect.js) without reloading the page?

detect.js is "multi plugin" and I would like to preserve this feature.

When I make a script as below I have my new pano, but it opens in a new page (without the buttons).

Code:
<SCRIPT type="text/javascript" src="detectvr.js"></SCRIPT>
<SCRIPT type="text/javascript">

// Pano1 when page load
viewerparameters(---------------);
viewerparameters(---------------);
writecode(qtfile, devalvrfile, javafile, flashfile, spivfile, sizex, sizey);

function ChangePano2() {
   viewerparameters(---------------);
   writecode2(qtfile, qtfile, devalvrfile, javafile, flashfile, spivfile, sizex, sizey);
}

function ChangePano3() {
   viewerparameters(---------------);
   writecode2(qtfile, qtfile, devalvrfile, javafile, flashfile, spivfile, sizex, sizey);
}
</SCRIPT>

// boutons or links
<a href="javascript:ChangePano2()">Play pano 1</a>
<a href="javascript:ChangePano3()">Play pano 3</a>


Thanks for your help !


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 28, 2007 6:32 pm 
Offline
I only was walking somewhere...
User avatar

Joined: Tue Aug 09, 2005 1:55 am
Posts: 2009
Hi winini,

If you use detectvr script, the plugin object has the id=PANORAMAID, so you can change "src" parameter from Javascript. Maybe something like this:

Code:
function ChangePano(qtfile, devalvrfile, javafile, flashfile, spivfile)
{
    ref=document.getElementById("PANORAMAID");
    if(ref){
        if (writePluginVR == 1) ref.src=devalvrfile;
        else if(writePluginVR == 2) ref.src=qtfile;
        else if(writePluginVR == 3) ref.src=flashfile;
        else if(writePluginVR == 4) ref.file=javafile;
        else if(writePluginVR == 5) ref.swURL=spivfile;
    }
}


If this method does not work for all plugins, maybe it's possible to replace all code wrote by the function "writecode". But I must create some code to do this.

regards


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Sun Jul 29, 2007 1:20 pm 
Offline

Joined: Mon Jun 11, 2007 11:20 am
Posts: 33
Thank you Fiero for your always fast and relevant answer.
The possibilities of your script are large.
With your help, I succeeded in doing what I wanted.
I have make a "mix" of your idea in my code.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 31, 2008 5:12 pm 
Offline

Joined: Fri Oct 31, 2008 5:08 pm
Posts: 1
Hello,

I'm not a programmer.
How to modify the script, if I could ask for example?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group