Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology
Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered
You are not logged in.
Pages: 1
Hi, 
Im very new to Openspace3d. It would be great if you guys could tell me how to save my project as a web site locally without using ftp.
Thank you,
Rithesh
Offline
Hi !
If you want to execute you project on local system but integrated in the web page, you can create an html page like this :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <title>Example</title>
  <link rel="stylesheet" href="style.css" type="text/css" />
  <script type="text/javascript" src="scol.js"></script>
  <script type="text/javascript">
    function scolMessageCallback(msg)
    {
      // manage call formated with "keyword param"
      // get first word
      // Warning IE doesn't return the same result as others
      var reg = /^([A-Z0-9]*) ([?]*)/im;
      var word = msg.match(reg);
      
      var param ="";
      if (word)
      {
        //IE !!
        var keyword = word[0];
        //IE force trimm !!
        keyword = keyword.replace(/^\s+|\s+$/g,"");
        
        //Get param value
        param = msg.slice(keyword.length);
        switch (keyword)
        {
        case "OS3DPlayerLoading":
          //document.getElementById("info").innerHTML = document.getElementById("info").innerHTML + param + "<br/>";
          break;
        case "OS3DPlayerError":
          document.getElementById("scoldiv").innerHTML = "<div style=\"background-color:#ffffff; text-align:center; color:#000000;\">" + param + "</div>";
          break;
        //try to execute msg as JS code
        default:
          eval(msg);
        }
      }
      //try to execute msg as JS code
      else eval(msg);
    }
    
    function scolEndCallback()
    {
      //Your code here
      //window.location = "http://mysite.com/end.html"
    }
    
    function scolErrorCallback(div, dlurl, error)
    {
      var n=document.getElementById(div);
      n.innerHTML="<div style=\"background-color:#ffffff; text-align:center; color:#000000;\">The Scol Voyager plugin is not detected, please download it and install from <a href=\"" + dlurl + "\" style=\"color:#0000ff;\">" + dlurl + "</a></div>";
    }
    
  </script>
</head>
<body style="background-color:#$BGCOLOR;">
  <div align="center" id="scoldiv">
    <script type="text/javascript">
      var scolObj = new SCOLObject ("scol", "%5fload+%22tools%2Fos3dplayer%2Fos3dload%2Epkg%22%0amain+%22SAMPLEDIRECTORY%2FSAMPLE.xos%22+%22SAMPLEAPP%22+%22800%22+%22600%22+0", "", "", "100%", "100%", 1, "scolMessageCallback", "scolErrorCallback", "scolEndCallback");
      scolObj.write("scoldiv");
      scolObj.launch();
    </script>
  </div>
  
  <p align="center"><img src="logo_os3d.png" width="150" height="114"></p>
</body>
</html>you must have the scol.js in the same directory of you html page.
the scol.js is in your program files\scol voyager\Partition_LockedApp\tools\os3dlib\res\web\scol.js
Offline
then after. i put that code of html and my javascript at my xampp/htdocs..... it's only appear scol navigator plugin........ how to open the file that i have exported?
or i should call the xos file???
Offline
I forgot to explain 
replace SAMPLEDIRECTORY%2FSAMPLE.xos
by :
yourprojectfolder(in scol partition)%2fyourprojectfile.xos
you don't need http serveur for this
Offline
yes... it's like a localhost server right.... i have replace that.. it should be like this right??
var scolObj = new SCOLObject ("scol", "%5fload+%22tools%2Fos3dplayer%2Fos3dload%2Epkg%22%0amain+%22C:\Documents and Settings\addrian\My Documents\Scol Voyager\Partition_LocalUsr\last.xos%22+%22SAMPLEAPP%22+%22800%22+%22600%22+0", "", "", "100%", "100%", 1, "scolMessageCallback", "scolErrorCallback", "scolEndCallback");
Offline
without the C:\Documents and Settings\addrian\My Documents\Scol Voyager\Partition_LocalUsr\
%2f correspond to / ans %20 to the space for example, but in your case you only need :
%5fload+%22tools%2Fos3dplayer%2Fos3dload%2Epkg%22%0amain+%22last.xos%22+%22SAMPLEAPP%22+%22800%22+%22600%22+0
Offline
if i change like that then it doesn't appears anything... just a white page and a text like thi "scol navigator plugin" there is nothing there.... just a white screen
here if i put the xos file at the same folder with the HTML file... how should i change the code???? i was bad at web
Offline
The xos file must be in your scol partition (here C:\Documents and Settings\addrian\My Documents\Scol Voyager\Partition_LocalUsr\) for example
In the html params you only need the xos file relativ to the scol partition (not the full path)
var scolObj = new SCOLObject ("scol", "%5fload+%22tools%2Fos3dplayer%2Fos3dload%2Epkg%22%0amain+%22last.xos%22+%22SAMPLEAPP%22+%22800%22+%22600%22+0", "", "", "100%", "100%", 2, "scolMessageCallback", "scolErrorCallback", "scolEndCallback");sorry my mistake ^^ the next param must be 2 not 1 for local script
Offline
yeahhh i ce then... it finally works.. thanks mr arkeons..... verry2 helping..... and you are a quick respons guy i have ever seen from a forum.... in another forum i must wait about an hours to get the answer.... thanks very much
Offline
ah one more thins... i tried to change the height of the frame to 200% but it doesn't work... why it is???
Offline
ahahahha i didn't look at the %..... lol.....overall my project was at the finishing touch.... some guide... i'll write it at my thread
Offline
hi there! it's my first time here 
how can i fix this? i mean, change sizes to 800 x 600
thank you!!
Offline
yep thank you... works perfecty 
Offline
Pages: 1