Hello,
So, I have this line:
sfs.connect("localhost", 9933);
However, when I check right after it whether it is connected, it is not. So I changed to this line:
sfs.loadConfig("sfs-config.xml", true);
Now I get an Error #2148 on that line. I researched that error and everything says to add the directory as trusted by the Flash player, but when I checked it already is! In fact, my entire home directory is in the trusted list and it's supposed to apply to all sub-directories as well. Just for fun, I directly added the exact directory and then I even added the specific swf file to my trusted list but none of it changes that error.
The funny thing is that the demo applications don't work anymore either. They used to work fine, but now when I try to connect using the Simple Chat or Tris examples, it hangs and just sits there trying to connect endlessly. These applications used to work fine!
Please help.
Thanks,
Bryan
Suddeny can't connect
-
- Posts: 186
- Joined: 16 Oct 2011, 14:33
Re: Suddeny can't connect
try to run the examples from the browser, not from directly double clicking the swf of the examples provided by sfs.
Re: Suddeny can't connect
I'm not sure what you mean. I don't have a web server on my computer. I'm using Google Chrome to run the swf.
-
- Posts: 186
- Joined: 16 Oct 2011, 14:33
Re: Suddeny can't connect
hi,
may be you wanna take a look at this:
http://helpx.adobe.com/flash-player/kb/ ... hrows.html
sorry for the earlier reply i miss read error 2148 as 2048 in which case the solution was posted here and it worked for the guy:
viewtopic.php?f=18&t=13736&p=56006#p56006 (but its for error 2048 :p)
may be you wanna take a look at this:
http://helpx.adobe.com/flash-player/kb/ ... hrows.html
sorry for the earlier reply i miss read error 2148 as 2048 in which case the solution was posted here and it worked for the guy:
viewtopic.php?f=18&t=13736&p=56006#p56006 (but its for error 2048 :p)
Re: Suddeny can't connect
Thanks for the response. however I tried exiting the browser, eve rebooting the whole computer, but it didn't help
Re: Suddeny can't connect
The error seems to be with reading the config file, not with connecting because when I do this:
sfs.loadConfig("sfs-config.xml", false);
same error
sfs.loadConfig("sfs-config.xml", false);
same error
-
- Posts: 186
- Joined: 16 Oct 2011, 14:33
Re: Suddeny can't connect
hi,
you are right, it happens because when a swf is not in a trusted directory then it will not be allowed to access any other local file on your computer.
and hence your other demos are also not working.
well i hope you have setup the basic examples which come with sfs2x appropriately...
in your SmartFoxServer2X\SFS2X\www\root\examples directory of your sfs2x installation unzip the sfs2x_basic_examples zip that they give you.
if this is done just try this :
in the browser enter this URL :http://localhost:8080/examples/SFS2X_Basic_Examples/flash/tris/
it should work fine..
you are right, it happens because when a swf is not in a trusted directory then it will not be allowed to access any other local file on your computer.
and hence your other demos are also not working.
well i hope you have setup the basic examples which come with sfs2x appropriately...
in your SmartFoxServer2X\SFS2X\www\root\examples directory of your sfs2x installation unzip the sfs2x_basic_examples zip that they give you.
if this is done just try this :
in the browser enter this URL :http://localhost:8080/examples/SFS2X_Basic_Examples/flash/tris/
it should work fine..
Re: Suddeny can't connect
Ok, so I just discovered that this error only happens in Google Chrome. I tested in Firefox and no error. So, let's ignore that for right now and move on to the next problem.
This code:
results in "false" being written to lblErrors.text.
So does this code:
here is sfs-config.xml:
I can connect to the server using the Administration tool and the demo apps work just fine in Firefox
This code:
Code: Select all
try
{
sfs.loadConfig("sfs-config.xml", true);
lblErrors.text = sfs.isConnected.toString();
}
catch (ex:Error)
{
lblErrors.text = ex.message;
}
results in "false" being written to lblErrors.text.
So does this code:
Code: Select all
try
{
sfs.connect("localhost", 9933);
lblErrors.text = sfs.isConnected.toString();
}
catch (ex:Error)
{
lblErrors.text = ex.message;
}
here is sfs-config.xml:
Code: Select all
<SmartFoxConfig>
<!-- Mandatory Settings -->
<ip>127.0.0.1</ip>
<port>9933</port>
<zone>OHP</zone>
<!-- End Mandatory Settings -->
<debug>false</debug>
<httpPort>8080</httpPort>
<useBlueBox>false</useBlueBox>
<blueBoxPollingRate>500</blueBoxPollingRate>
</SmartFoxConfig>
I can connect to the server using the Administration tool and the demo apps work just fine in Firefox
Re: Suddeny can't connect
Nevermind, suddenly it's working for no apparent reason. Still not the Google Chrome issue but I can use Firefox to test. Thanks for the help.
Re: Suddeny can't connect
Have you tried clearing Chrome's cache? And are you using the default flash which comes with chrome or the debugger version? Please provide which flash version you're using by checking this website.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Return to “SFS2X ActionScript 3 API”
Who is online
Users browsing this forum: No registered users and 33 guests