Page 1 of 1

How to run a open space from web server

Posted: 04 Mar 2010, 11:20
by sankarganesh86
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 ?

Posted: 05 Mar 2010, 17:07
by Bax
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.

Posted: 06 Mar 2010, 05:03
by sankarganesh86
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 .....

Posted: 06 Mar 2010, 09:03
by Bax
Do you only get a "Error #2007: Parameter child must be non-null"? No other informations?

Posted: 06 Mar 2010, 09:45
by sankarganesh86
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 ...

Posted: 07 Mar 2010, 14:45
by Bax
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?

Posted: 08 Mar 2010, 05:08
by sankarganesh86
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";

Posted: 08 Mar 2010, 10:59
by Bax
Now I understand. You have to use those relative urls, even if you upload the files on a webserver.

Posted: 28 Nov 2012, 06:00
by sankarganesh86
Thank you very much Bax now it is working ....