.class extension for dynamic rooms in SFS 1x

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

Post Reply
kuttoosan
Posts: 8
Joined: 25 Oct 2010, 10:01

.class extension for dynamic rooms in SFS 1x

Post by kuttoosan »

Please do help out in the below issue:


Please tell me whether the following lines of code are correct.

Am creating a room from client side (AS3 code) and I've to attach a .class extension to that room.
$roomData is my room Object.
My .class file is "mixupgame.class". This is stored in the folder:
/root/smarty/SmartFoxServer_PRO_1.6.6/Server/javaExtensions

Code: Select all

var $ext:Object = new Object(); 
                  
$ext.name = "mixupgame"; 
                
$ext.script = "/javaExtensions/mixupgame.class"; 
             
$roomData.extension = $ext; 

Thanks in advance
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Post by BigFIsh »

You do it like this:

var $ext:Object = new Object();
$ext.name = "mg";
$ext.script = "mixupgame"; //do include class path if there's one
$roomData.extension = $ext;

If your class path in your java project is:

com\project\mixupgame.java

then the script would be: com.project.mixupgame

Note: Do not add .class or .java at the end of the script name.
Smartfox's forum is my daily newspaper.
kuttoosan
Posts: 8
Joined: 25 Oct 2010, 10:01

.class extension for dynamic rooms in SFS 1x

Post by kuttoosan »

Thanks a lot BigFIsh.
Post Reply