Undefined property

Hello, I just had an error and I am a beginner in Flash and even less experienced in AS3.

1120: Access of undefined property sfc_onDebugMessage.
1120: Access of undefined property sfc_onConnectionLost.

package
{
import it.gotoandplay.smartfoxserver.SmartFoxClient
import it.gotoandplay.smartfoxserver.SFSEvent
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.utils.*;

public class Main extends MovieClip
    {
        
private var sfc:SmartFoxClient;


        function Main() : void
        {
            loginButton.addEventListener( MouseEvent.CLICK, loginButton_click )
        }


private function loginButton_click(e:MouseEvent):void
{
    if (sfc == null)
    {
        sfc = new SmartFoxClient()
        sfc.addEventListener(SFSEvent.onDebugMessage, sfc_onDebugMessage)
        sfc.addEventListener(SFSEvent.onConnection, sfc_onConnection)
        sfc.addEventListener(SFSEvent.onConnectionLost, sfc_onConnectionLost)
    }
    if (sfc.isConnected)
    {
        sfc.disconnect();
    }
    else
    {
        sfc.connect("127.0.0.1", 5588);
    }
}

private function sfc_onConnection(e:SFSEvent):void
{
    if (e.params.success)
    {
        gotoAndPlay("loading");
        //debugText.text += "We are connected to the server." + "
";
    }
    else
    {
        
        //debugText.text += "The connection failed. Try again." + "
";
    }
 
}

    }
}

Tips are appreciated.

Please help me find a fix,
Divien.