Welcome to Welcome to DNF.com™ - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars

If you are new to domains and looking to buy, sell and learn about domains then you have come to the right place. DNForum is the largest domain name community on the internet and continues to grow every day. There are over 105,000 domainers on DNForum doing everything from buying domains, selling domains, learning about domains and discussing domains. Take a minute and Register.

Register Today on DNForum IT'S FREE!

Results 1 to 4 of 4
  1. #1
    DNF Addict
    Mr.Domains's Avatar
    Join Date
    Sep 2004
    Location
    Geneva, Switz.
    Posts
    1,868
    Country

    Great Britain
    DNF$
    3,233
    Bank
    6,090
    Total DNF$
    9,323
    Donate  

    Question V3 Arcade (vBulletin) - how does it work!?

    Hello,

    (I've been a Developer/coder for several years, but am stumped with this one, so I hoping one of you Geniuses can help me figure it out...)

    V3 Arcade is the popular arcade games add-on for vBulletin forums.

    SWF games are modified to include a blank movie clip containing the following code:

    Code:
    // HERE THE ARCADE SESSION IS INITIATED
    // DON'T FORGET TO CHANGE THE GAMENAME VALUE!
    if (this.sessionstarted != 1) {
        this.arcade = new LoadVars();
        this.sessionvars = new LoadVars();
        this.arcade.gamename = "towerball";
        this.arcade.sessdo = "sessionstart";
        this.arcade.sendAndLoad("arcade.php", sessionvars, "POST");
        this.sessionstarted = 1;
    }
    
    // IF GAMEOVER=1, SUBMIT THE SCORE AND REDIRECT THE PAGE
    if (_root.gameover == 1) {
        if ((this.askpermission != 1) && (this.sessionvars.connStatus == 1)) {
            this.prequestvars = new LoadVars();
            this.pranswer = new LoadVars();
            this.prequestvars.gametime = this.sessionvars.gametime;
            this.prequestvars.fakekey = this.sessionvars.initbar;
            if (_root.score == 0) {
                this.prequestvars.score = -1;
            } else {
                this.prequestvars.score = _root.score;
            }
            this.prequestvars.id = this.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;
        }
        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;
            }
            this.burnscore.sessdo = "burn";
            this.burnscore.send("./arcade.php", "_self", "POST");
            this.finalsent = 1;
        }
    }
    These SWF games are them embeded in the page in the usual way:

    Code:
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
      codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,14,0" width="600" height="600">
      <param name="movie" value="./games/snake.swf">
      <param name="quality" value="high">
      <embed src="./games/snake.swf" quality="high" width="600" height="600" quality="high"
      pluginspage="http://www.macromedia.com/go/getflashplayer"
      type="application/x-shockwave-flash"></embed>
    </object>
    When the game is over and the "_root.gameover == 1" variable is set, the SWF submits the LoadVars() via a sendAndLoad() using the "POST" method to "./arcade.php", and the page reloads to display your highscore, etc.

    I am trying to recreate this to embed a few of these games on my site, and I have called the page "./arcade.php", but when the games finish they don't seem to post to the page?

    Is there some extra javascript or AJAX that you need on the "./arcade.php" page, to listen or receive the sendAndLoad() vars and reload the page?

    Any help would be greatly appreciated!
    Last edited by Mr.Domains; 10-11-2011 at 01:27 PM.
    Neil Hillman - Web Developer, Pixel Pusher...

  2. #2
    Platinum Lifetime Member

    Join Date
    Jun 2003
    Posts
    772
    Country

    United States
    DNF$
    2,487
    Bank
    0
    Total DNF$
    2,487
    Donate  
    First, a game player after the game has ended, has to click on the game window somewhere to instigate the post to arcade.php.

    Second, a page of fixes if the above isnt related, one fix directly related to posting the scores.

  3. #3
    DNF Addict
    Mr.Domains's Avatar
    Join Date
    Sep 2004
    Location
    Geneva, Switz.
    Posts
    1,868
    Country

    Great Britain
    DNF$
    3,233
    Bank
    6,090
    Total DNF$
    9,323
    Donate  
    Thanks smirkley, but I don't think you've understood the question completely.

    Quote Originally Posted by smirkley View Post
    First, a game player after the game has ended, has to click on the game window somewhere to instigate the post to arcade.php.
    The player doesn't have to click anything. Inside the converted SWF files a variable "_root.gameover == 1" is set, whenever a game is lost. A blank movie clip inside the SWF looks for that variable, if (_root.gameover == 1) and submits the high score, and other variables in a LoadVars() via a sendAndLoad() using the "POST" method to "./arcade.php". The trouble is, I think it is looking for a session Var or something, to make it submit the "POST".

    Quote Originally Posted by smirkley View Post
    Second, a page of fixes if the above isnt related, one fix directly related to posting the scores.
    I don't need a bug fix, I want to get a couple of these games working on stand-alone php pages. I just want the high score variables to get returned, in the same way they do on the v3 Arcade script.
    Neil Hillman - Web Developer, Pixel Pusher...

  4. #4
    Platinum Lifetime Member

    Join Date
    Jun 2003
    Posts
    772
    Country

    United States
    DNF$
    2,487
    Bank
    0
    Total DNF$
    2,487
    Donate  
    I stand corrected. Yes I did misunderstand the question. I have been only using the vB Pro Arcade, mostly with the default settings and games.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Domain name forum recommended by Domaining.com