AS 1&2 Yes, AS 3 No

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

User avatar
ptdgames
Posts: 39
Joined: 10 Mar 2008, 21:55

AS 1&2 Yes, AS 3 No

Postby ptdgames » 10 Mar 2008, 22:02

I'm having issues with the ActionScript 3 API. Everything works just fine while inside Flash. But outside in the player (or HTML) the API just seems to go away after I call connect(). The server sits there and acts like the call has never been sent.

Here's the strange part. Looking at the examples: the examples for AS1 and 2 work perfectly. The examples for AS3 do not. They just say "Connecting..."

Yes, I've read through the threads on Flash Player 9 security. It just doesn't make sense to me why the AS1-2 examples work just fine though. It's the same Flash 9 player. Or am I missing something here?

I'm using Flash Player 9,0,115,0 and SmartFox 1.6.1.
paintbrush
Posts: 19
Joined: 06 Mar 2008, 07:12

Postby paintbrush » 11 Mar 2008, 05:09

I actually JUST had this problem last week.. here's the thread I reported this on:

viewtopic.php?t=2630

apparently the security sandbox just got a hell lot stricter with AS3, so as a developer, you had to adjust your Flash security settings. Since you're testing from your local machine, you'll have to tell Flash Player which directories you trust. You can do that here:

http://www.macromedia.com/support/docum ... tml#117502

Just add the directories that contain the Flash movies that require socket access to the list.

When it's time to publish, however, 127.0.0.1 isn't going to cut it. If you're publishing on a remote server, you'll have to let your Flash app know that you want it to connect to SFS by telling it your machine's full IP address. In turn, you'll have to change the config.xml file for SFS to tell it that the server IP is your machine's true IP, not 127.0.0.1, between the <ServerIP> tags.

Those were the steps I took to get it up and running on my end. Hope that helped!

-Jay
User avatar
ptdgames
Posts: 39
Joined: 10 Mar 2008, 21:55

Postby ptdgames » 11 Mar 2008, 15:10

Yessss! It was the 127.0.0.1. Switch that to the "real" IP and I'm up. Thank you so much. Two days well spent. :oops:

That's a pretty nice hole in the docs.

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 79 guests