Scolring - Forum

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.

#1 21-May-2014 14:52:36

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,541
Website

communicating bewteen 2 scol voyager instances in one web page

after running into a bug that prevents widgets from being rendered in a hierarchy of windows where the 3d buffer is the parent window, I'd like to do the following:

have os3d send a string from one cell of an .html table to
a scol window in another cell of the same table

what I am thinking here is taking my chat interface, removing the relevant code from my multiplayer code (as per iri and arkeon's suggestion), and using the scol vm to create a separate chat window in the same web page, like this:

table
table cell
os3d window
table cell
scol comptext interface
table

where would I start with this. I would want to send and append strings in both directions (from os3d to browser to comptext interface, and from comptext interface to browser to os3d.)

thx!

Offline

#2 21-May-2014 15:41:04

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,161
Website

Re: communicating bewteen 2 scol voyager instances in one web page

hmm, Scol navigator plugin can only use one scol window at once.
It should be possible by having a totally independent project (2 OS3D project in one web page).
I think the first  this is a bad approach.


You can also code the html interface in your webpage, and use the ActiveX Message plugIT to communicate between OS3D and your integrated html functions


you should better use widgets to create your chat interface and keep them in the 3D view.
The chat plugIT allows to change the default chat.html interface. you can change all the colors and looking, just by copying the default chat.html and changing the CSS properties.

Offline

#3 22-May-2014 15:28:54

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,541
Website

Re: communicating bewteen 2 scol voyager instances in one web page

arkeon wrote:

hmm, Scol navigator plugin can only use one scol window at once.
It should be possible by having a totally independent project (2 OS3D project in one web page).
I think the first  this is a bad approach.


You can also code the html interface in your webpage, and use the ActiveX Message plugIT to communicate between OS3D and your integrated html functions


you should better use widgets to create your chat interface and keep them in the 3D view.
The chat plugIT allows to change the default chat.html interface. you can change all the colors and looking, just by copying the default chat.html and changing the CSS properties.

thx arkeon. I checked out the chat plugit .css and .js source files, but they are too complicated for me to understand how to modify.  I think I will have the browser move messages back and forth to the os3d player from a text display area and text entry area in <div> tags with javascript.  perhaps that will be less cpu intensive since the browser will just be handling some strings.  then I will take all that chat stream code out of my multiplayer plugit.

on the other hand, is it possible to embed the scol voyager in a web page without the os3d components?

Offline

#4 22-May-2014 15:38:51

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,161
Website

Re: communicating bewteen 2 scol voyager instances in one web page

>>  checked out the chat plugit .css and .js source files
just change the colors in the css file to start, don't mind of javascript functions it's all functionnal

>> on the other hand, is it possible to embed the scol voyager in a web page without the os3d components?
you mean a simple scol app ? you can get the current navigator window with the function _GETactiveXWindow
set winAX = _GETactiveXWindow _channel 0 "axscol";

Offline

#5 22-May-2014 16:35:28

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,541
Website

Re: communicating bewteen 2 scol voyager instances in one web page

arkeon wrote:

>>  checked out the chat plugit .css and .js source files
just change the colors in the css file to start, don't mind of javascript functions it's all functionnal

>> on the other hand, is it possible to embed the scol voyager in a web page without the os3d components?
you mean a simple scol app ? you can get the current navigator window with the function _GETactiveXWindow
set winAX = _GETactiveXWindow _channel 0 "axscol";

perhaps this would make things easier. Let's say I have a .pkg file named 'hello world.pkg'

fun main()=
_DLGMessageBox _channel nil "hello world" "hello world" 0;
0;;

and the .scol file is: hello_world.scol:

_load "hello_world.pkg"
main

what would the html look like? where and how would I post the .scol and .pkg files to my domain, (ifam.net/openspace/helloworld/)? I've only published scol apps to servers with os3d.

thx

Offline

#6 22-May-2014 16:44:43

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,161
Website

Re: communicating bewteen 2 scol voyager instances in one web page

hu ^^ there is a lot of things to do ^^

I'll try to find some documentation about that

Offline

#7 22-May-2014 17:04:40

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,541
Website

Re: communicating bewteen 2 scol voyager instances in one web page

arkeon wrote:

hu ^^ there is a lot of things to do ^^

I'll try to find some documentation about that

ok, no rush

Offline

#8 22-May-2014 17:20:52

iri
Admin. / Scol language & Scol apps developer
From: France
Registered: 22-Feb-2009
Posts: 2,024
Website

Re: communicating bewteen 2 scol voyager instances in one web page

There is an example in the Scol's tuto :
http://redmine.scolring.org/projects/tu … /documents

Offline

#9 22-May-2014 17:40:27

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,161
Website

Re: communicating bewteen 2 scol voyager instances in one web page

what you will need to manage that :
- more advanced scol dev skill
- html skills
- javascript skills

this work like this :
- the scol application manage the activeX window and can use it to display it's content in it and also communicate with javascript fonctions in the webpage _GETactiveXWindow function and _onX channel messages
- the pkg files are compressed, the file signature and download url are defined in a text file
- the scol script file content is moved in the same text file
- the webpage javascript code, check if the scol voyager is present on the computer
- the javascript launch the scol voyager plugin and start your app as descripted in the text file

Offline

#10 22-May-2014 19:20:27

iri
Admin. / Scol language & Scol apps developer
From: France
Registered: 22-Feb-2009
Posts: 2,024
Website

Re: communicating bewteen 2 scol voyager instances in one web page

iri wrote:

There is an example in the Scol's tuto :
http://redmine.scolring.org/projects/tu … /documents

Chapter XIII.

Offline

#11 22-May-2014 19:57:55

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,161
Website

Re: communicating bewteen 2 scol voyager instances in one web page

I made some changes in the navigator plugins when a made them working for mozilla and IE, so this is a bit different from the book I think

Offline

#12 23-May-2014 14:56:37

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,541
Website

Re: communicating bewteen 2 scol voyager instances in one web page

I guess what I will do is have the browser append data to a <div> container with javascript. I enjoy scripting in javascript, as it's the language I've used the most in various projects over the last 14 years.

Last edited by hebdemnobad (23-May-2014 15:31:07)

Offline

Board footer

Powered by FluxBB