Most menus in the Flash SDK are opened using the toggleInterface function. It has one argument that is a string. The argument tells the SDK what menu to display.

The toggleInterface function is available in the sdk variable. The sdk varaible is available by referencing the Y8 class, if you are using it.

Login Menu


Registration Menu


Response Data

After login, registration, and automatic login, an event will be sent to handleSDK. Make an if statement to catch the event and the login data.

function handleSDK(e:Event) {
	if (sdk.type == 'login') {
		trace('hello '+sdk.userData.nickname+' your pid is ';

Asynchronous Calls

Take note of how we use handleSDK to get data instead of return data from a function. Because data takes time to travel over the internet, most functions will not return any data directly. The use of handleSDK is repeated throughout the Flash SDK.


Adding a logout button is discouraged as users can logout at if using a public computer. If you need to logout for testing, please use the secret menu by pressing Ctrl+Alt+Shift.