I am trying to compile this piece of code:
import it.gotoandplay.smartfoxserver.*;
import it.gotoandplay.smartfoxserver.data.*;
var smartfox:SmartFoxClient=new SmartFoxClient(true);
var extensionName:String="mydb";
butt_load.addEventListener("click", getData);
function getData() {
smartfox.sendXtMessage(extensionName, "getData", {}, "xml");
}
smartfox.onExtensionResponse = function(resObj:Object, type:String)
{
// We expect the response to be xml formatted
if (type == "xml")
{
// Let's check if it's a "getData" message
if (resObj._cmd == "getData")
{
// Cycle through the "db" object sent by
// the server and add it to the datagrid for visualization
for (var i = 0; i < resObj.db.length; i++)
{
/////grid_dg.addItem(resObj.db[i])
trace(debug_txt.text+=" query "+resObj.db[i])
}
}
}
}
it is showing some error. is it due to some missing class file?
1119: Access of possibly undefined property onExtensionResponse through a reference with static type it.gotoandplay.smartfoxserver:SmartFoxClient.
Suvroz
Access of possibly undefined property onExtensionResponse
You must be certain that your Flash/Flex classpath is correctly pointed to the SmartFoxServer classes, or your imports won't work.
Take a look here:
http://www.smartfoxserver.com/docs/docP ... alling.htm
Take a look here:
http://www.smartfoxserver.com/docs/docP ... alling.htm
Return to “SmartFoxServer 1.x Discussions and Help”
Who is online
Users browsing this forum: No registered users and 53 guests