Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 03-17-2009, 12:29 AM   #1
Registered User
Join Date: Mar 2009
Posts: 1
Default [AS3] Published SWF Testing with SmartFox Help

Hi, I'm not entirely sure if this is the appropriate forum to be posting questions regarding SmartFoxServer but I've encountered a strange error....

I've been learning how to use smartfoxserver for about a week now and I've just been testing everything locally. The SFS is running in the background and the config file is configured to the best of my knowledge. Everything works fine when I run the flash game in Flash CS3 ( Test Movie, ctrl+enter ), it connects to the server, I had a friend also able to connect to the same server as well. Everything works fine in that scenario. But when I try to run the game by clicking on the published swf file in my file directory it doesn't seem to want to connect to smartfoxserver. It doesn't throw an error, or crash it just doesn't do anything. The onConnection event is never thrown. Does anyone have an idea on what the problem could be?

Here's my code... I'm using a dummy textfield for debugging, just outputting junk to figure out where along the process is. The first "something" is printed but nothing works after the connect call on the sfsclient object. Does that make sense? Thanks in advance!

// button click
function onServerClick(event:MouseEvent) : void
	this.txtRooms.text = "something";
	newClient.sfs.connect("", 9339);
	this.txtRooms.text = "something2";
	//if(newClient.bConnected == true)
		this.mcTextBox.visible = true;
		this.btnJoin.visible = true;
connect event handler

// replace with return type to display status on screen
private function smartFox_onConnection(e:SFSEvent):void
	refStage.txtRooms.text += "something else";
		refStage.txtServer.text = "Server Status: Online";
		// replace w/ isconnected
		bConnected = true;
	        //refStage.txtServer.text = "Server Status: Failed";
		refStage.txtServer.text = e.params.error;
		// replace w/ isconnected
		bConnected = false;
Tyler1989 is offline   Reply With Quote
Old 04-16-2009, 06:41 PM   #2
Registered User
Join Date: Sep 2008
Location: Florida
Posts: 9

Been following you around, hoping you'd get your issue solved. I have me teh same problemo. I be disappointed no one's answered you yet.
Mayhew is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
loading swf in container over other swf unloads previous swf?? Tereba ActionScript 2.0 14 09-23-2008 03:11 PM
New swf file looking for older published file radarguy Other Flash General Questions 2 06-12-2006 11:41 AM
TIP: Local testing of multipart swf fgf Other Flash General Questions 0 03-29-2004 03:40 AM
Testing FPS to maximize swf movie size you_rock ActionScript 2.0 0 03-24-2004 01:18 PM
controlling sound in external compressed SWF eggnogg ActionScript 1.0 (and below) 0 12-17-2003 07:22 AM

All times are GMT. The time now is 09:24 AM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.