Variable ObjectMessageRequest is not defined.
Posted: 10 Feb 2012, 03:50
Hi all,
Well, since its my first post quick Intro : I've been using the smartfox Tools and applications for now a year, and Im loving it, nice to use, and the docs are greatly detailed.
Only now i have a little problem i haven't been able to get myself rid of now. Well my game was working fine until yesterday when i couldnt send any request
through ObjectMessageRequest for i would get this error :
UPDATE : I have checked the Strict Mode and this is the new Error code i get at Debug :
Could it imply that the API I have possess a flaw in the declaration of the ObjectMessageRequest constructor ?
Now I have applied all the solutions I could think of such as verifying all my classes declarations, and is definitively present. It does not come from a typo error since all the rest of my script runs fine only when it comes to movement of the character, done by mouse, where the pathfinder works but impossible to send any data to the server because of the above cited problem.
I verified every file i have in my project and they all possess the necessary Public tag. After further research I have come to the conclusion that maybe, in my SWC the ObjectMessageRequest is not declared as Public, which is preposterous, since if it was the case, i wouldnt be alone having this problem. I have tried downloading several others version of the AS3 api, and found the same problem which leads me to think that I may have either a code problem, or the migration from CS4 to CS5 has not gone down as smoothly as I had hoped and something went wrong somewhere, but I can't still pinpoint it.
Does anybody has an idea on the how to fix this please ? Thank you very much for your time and attention!
_____________________
I want to mention too that i have the latest RC3 patch as well as the latest AS3 API patch.
Well, since its my first post quick Intro : I've been using the smartfox Tools and applications for now a year, and Im loving it, nice to use, and the docs are greatly detailed.
Only now i have a little problem i haven't been able to get myself rid of now. Well my game was working fine until yesterday when i couldnt send any request
through ObjectMessageRequest for i would get this error :
Code: Select all
ReferenceError: Error #1065: Variable ObjectMessageRequest is not defined.
at com.scenes::GameScene/handleObject()
at com.scenes::GameScene/runGame()Code: Select all
ReferenceError: Error #1065: Variable com.smartfoxserver.v2.requests::ObjectMessageRequest is not defined.
at com.scenes::GameScene/handleObject()
at com.scenes::GameScene/runGame()
Could it imply that the API I have possess a flaw in the declaration of the ObjectMessageRequest constructor ?
Now I have applied all the solutions I could think of such as verifying all my classes declarations, and
Code: Select all
import com.smartfoxserver.v2.requests.*;Code: Select all
private function handleObject(ob:*, type:String) {
var sfmov:ISFSObject = new SFSObject();
var moveOb:Object = new Object();
switch (type)
{
case "Send" :
sfmov.putInt("px", ob.px);
sfmov.putInt("py", ob.py);
sfmov.putInt("dirx", ob.dirx);
sfmov.putInt("diry", ob.diry);
sfmov.putInt("sprNum", ob.sprNum);
sfmov.putIntArray("anim", ob.anim);
refDocument.smartFox.send(new ObjectMessageRequest(sfmov));
break;
case "Receive" :
moveOb.px = ob.getInt("px");
moveOb.py = ob.getInt("py");
moveOb.dirx = ob.getInt("dirx");
moveOb.diry = ob.getInt("diry");
moveOb.sprNum = ob.getInt("sprNum");
moveOb.anim = ob.getIntArray("anim");
return moveOb;
}
}Does anybody has an idea on the how to fix this please ? Thank you very much for your time and attention!
_____________________
I want to mention too that i have the latest RC3 patch as well as the latest AS3 API patch.