Just for the sheer challenge and curiosity I've been trying to get a game of frogger to work in v3. So I started by first looking at the code used with the already included games in the v3 Arcade package. I noticed that the code example given in this thread are seperated.
Code:
if (_root.sessionstarted != 1)
{
_root.arcade = new LoadVars();
_root.sessionvars = new LoadVars();
_root.arcade.gamename = "Game Name";
_root.arcade.sessdo = "sessionstart";
_root.arcade.sendAndLoad("arcade.php", sessionvars, "POST");
_root.sessionstarted = 1;
} // end if
I found the above code usualy placed where the game begins playing.
Code:
if (this.askpermission != 1 && _root.sessionvars.connStatus == 1)
{
this.prequestvars = new LoadVars();
this.pranswer = new LoadVars();
this.prequestvars.gametime = _root.sessionvars.gametime;
this.prequestvars.fakekey = _root.sessionvars.initbar;
if (_root.score == 0)
{
this.prequestvars.score = -1;
}
else
{
this.prequestvars.score = _root.score;
} // end else if
this.prequestvars.id = _root.sessionvars.lastid;
this.prequestvars.sessdo = "permrequest";
this.prequestvars.note = this.prequestvars.id * this.prequestvars.score * this.prequestvars.fakekey;
this.prequestvars.sendAndLoad("arcade.php", this.pranswer, "POST");
this.askpermission = 1;
} // end if
if (this.pranswer.validate == 1 && this.finalsent != 1)
{
this.burnscore = new LoadVars();
this.burnscore.microone = this.pranswer.microone;
this.burnscore.gametime = this.prequestvars.gametime;
this.burnscore.id = this.prequestvars.id;
if (_root.score == 0)
{
this.burnscore.noscore = 1;
} // end if
this.burnscore.sessdo = "burn";
this.burnscore.send("arcade.php", "_self", "POST");
this.finalsent = 1;
} // end if
and I found the above code just like it is mentioned in this tutorial somewhere in a clip. But the placement of the above code eludes me. I'm a novice to flash animation and not sure how these clips are placed. I didnt notice a cominality.
and finaly I cant find "_root.gameover=1;" anywhere.
Seems a lot of work. Now I found a set of instructions on how to make a game work for IPBA, which consits of 3 lines of code.
Since v3 Supports IPBA games, should I go through the trouble of trying to figure out how to convert a game with the above code? or try the IPBA code?
Any advice would be appreciated.