How to run a open space from web server

Post here your questions about the OpenSpace 1.x or notify bugs and suggestions.

Moderators: Lapo, Bax

sankarganesh86
Posts: 104
Joined: 06 Jan 2010, 09:50
Location: chennai
Contact:

How to run a open space from web server

Postby sankarganesh86 » 04 Mar 2010, 11:20

if i create a World using open space
i will load the skin and tiles.swf using loader function in flash it is working good in local

if i open the the game.swf i will get
security sand box violation error or Security Error

i will get the problem at the time of loading the smartFox.loadConfig(config/sfsclient.xml)

what to do ?
User avatar
Bax
Site Admin
Posts: 4381
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 05 Mar 2010, 17:07

Are you using the standalone Flash Player? As this problem doesn't occur if you use the browser's Flash plugin. Search Google for more informations on this error.
Paolo Bax
The SmartFoxServer Team
sankarganesh86
Posts: 104
Joined: 06 Jan 2010, 09:50
Location: chennai
Contact:

Postby sankarganesh86 » 06 Mar 2010, 05:03

i create a new world using open space and i used the local server XAMPP
so i upload all the files to my htdocs folder
1)editordata folder
2)config folder
3)libraries folder

and i changed the os.configPath="http://10.199.50.47/config/OpenSpace.xml";

and i load all the datas to my 'game.fla' from
"http://10.199.50.47/libraries/bg.swf"
"http://10.199.50.47/editordata/tileslibrary"(etc)
and Maps.xml file also i upload it to my local Server.....

i call the game.swf from browser "http://10.199..50.47/game.swf"
At the time of create a avatar

os.createMyAvatar("box",null,initialSkin);
i will get Error #2007: Parameter child must be non-null


If i worked in local (for ex): if i load the data to my 'game.fla' from
"libraries/bg.swf"
"editordata/mapfiles"

i didnt get any problem avatar is created and working fine

at the time of Accessing the files from the server only i will get the problem
what is the reason ? help me .....
User avatar
Bax
Site Admin
Posts: 4381
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 06 Mar 2010, 09:03

Do you only get a "Error #2007: Parameter child must be non-null"? No other informations?
Paolo Bax
The SmartFoxServer Team
sankarganesh86
Posts: 104
Joined: 06 Jan 2010, 09:50
Location: chennai
Contact:

Postby sankarganesh86 » 06 Mar 2010, 09:45

TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/addChild()
at com.smartfoxserver.openspace.avatar::Avatar()
at com.smartfoxserver.openspace.avatar::AvatarsManager/createAvatar()
at com.smartfoxserver.openspace.mvc::IsoEngineModel/createAvatar()
at com.smartfoxserver.openspace::OpenSpace/createMyAvatar()
at openSpace/openSpaceMapRendered()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at com.smartfoxserver.openspace::OpenSpace/forwardOpenSpaceEvent()
at com.smartfoxserver.openspace::OpenSpace/onMapRendered()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at com.smartfoxserver.openspace.mvc::IsoEngineModel/onMapBuilt()
at com.smartfoxserver.openspace.map::MapManager/onMapGenerationCompleted()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at com.smartfoxserver.openspace.utils.executor::MultiFrameExecutor/runStep()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()

This is the Complete Error i am Getting Bax, if i run the game from Server.

and the logging message is stopped at
"Populating pathfinder nodes for user avatar"
or i am ready to send the complete code to your mail address ? if you need .... help me ...
User avatar
Bax
Site Admin
Posts: 4381
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 07 Mar 2010, 14:45

It seems that the class corresponding to the "box" avatar type can't be instantiated. Are you sure you are loading the avatar library and it contains the proper class?
Paolo Bax
The SmartFoxServer Team
sankarganesh86
Posts: 104
Joined: 06 Jan 2010, 09:50
Location: chennai
Contact:

Postby sankarganesh86 » 08 Mar 2010, 05:08

Yes bax i loaded the avatar library
if i change the URLRequest to :

smartFox.loadConfig("config/sfsClient.xml", true);
avatarsLoader.load(new URLRequest("libraries/AvatarTest.swf"));
tilesLoader.load(new URLRequest("libraries/tiles.swf"));
backgroundsLoader.load(new URLRequest("libraries/bg.swf"))

It is working Fine and avatar is also loaded Properly.........

else if i change the URLRequest to :

smartFox.loadConfig("http://10.199.50.47/config/sfsClient.xml", true);
avatarsLoader.load(new URLRequest("http://10.199.50.47/libraries/AvatarTest.swf"));
tilesLoader.load(new URLRequest("http://10.199.50.47/libraries/tiles.swf"));
backgroundsLoader.load(new URLRequest("http://10.199.50.47/libraries/bg.swf"))
allDisplay.os.configPath = "http://10.199.50.47/config/OpenSpace.xml";

I will get "Parameter child must be non-null." Error .

Actually i am using class file ...
i use the constructor in fla to call the class file.
In the constructor i will pass one parameter "this" in the fla file..
In class file i will get "this" as a MovieClip . Name as "allDisplay"
So i use
allDisplay.os.configPath = "http://10.199.50.47/config/OpenSpace.xml";
User avatar
Bax
Site Admin
Posts: 4381
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 08 Mar 2010, 10:59

Now I understand. You have to use those relative urls, even if you upload the files on a webserver.
Paolo Bax
The SmartFoxServer Team
sankarganesh86
Posts: 104
Joined: 06 Jan 2010, 09:50
Location: chennai
Contact:

Postby sankarganesh86 » 28 Nov 2012, 06:00

Thank you very much Bax now it is working ....


Last bumped by sankarganesh86 on 28 Nov 2012, 06:00.

Return to “OpenSpace v1 discussions and help”

Who is online

Users browsing this forum: No registered users and 1 guest