Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in /homepages/34/d258180810/htdocs/phpAR/viewtopic.php on line 954

Strict Standards: getdate(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in /homepages/34/d258180810/htdocs/phpAR/viewtopic.php on line 954
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2088: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2088: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2088: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2088: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2088: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2088: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2088: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2088: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3778: Cannot modify header information - headers already sent by (output started at /viewtopic.php:954)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3780: Cannot modify header information - headers already sent by (output started at /viewtopic.php:954)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3781: Cannot modify header information - headers already sent by (output started at /viewtopic.php:954)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3782: Cannot modify header information - headers already sent by (output started at /viewtopic.php:954)
Arcade Room • View topic - Making a Game Work with phpAR

Making a Game Work with phpAR

Games that work with phpAR are posted here.

Moderator: Game Creator

Making a Game Work with phpAR

Postby patrikStar » Tue Oct 07, 2008 2:36 pm

Making a game work may require that you have ActionScript knowledge if the game breaks from the decompiler

Editing a game to work with the phpAR scoring method.

Use this code in the submit button after editing the <gamescore_variable> part to what the game uses as the variable

Code: Select all
on (release) {
    score = <gamescore_variable>;
    _root.score = <gamescore_variable>;
    g = _level0.g;
    _root.g = _level0.g;
    url_loc = "viewgame.php?action=newhighscore&g=" + _level0.g;
    getURL(url_loc, "_self", "POST");
}
User avatar
patrikStar
Site Admin
Site Admin
 
Posts: 244
Cash: 442
Donate
Joined: Tue Sep 16, 2008 8:17 am
Location: Phoenix, AZ

Trophies

gold: 5
silver: 4
bronze: 2

Re: Making a Game Work with phpAR

Postby Gleasonator » Tue Oct 07, 2008 4:31 pm

It doesn't need _root.score = <gamescore_variable>; ?
User avatar
Gleasonator
VIP
VIP
 
Posts: 39
Cash: 59
Donate
Joined: Wed Sep 17, 2008 10:41 pm

Trophies

gold: 1
silver: 0
bronze: 2

Re: Making a Game Work with phpAR

Postby patrikStar » Tue Oct 07, 2008 4:48 pm

Gleasonator wrote:It doesn't need _root.score = <gamescore_variable>; ?


actually it does because not all games use the score variable as just score some games use bestscore or points
User avatar
patrikStar
Site Admin
Site Admin
 
Posts: 244
Cash: 442
Donate
Joined: Tue Sep 16, 2008 8:17 am
Location: Phoenix, AZ

Trophies

gold: 5
silver: 4
bronze: 2

Re: Making a Game Work with phpAR

Postby Gleasonator » Tue Oct 07, 2008 4:53 pm

patrikStar wrote:
Gleasonator wrote:It doesn't need _root.score = <gamescore_variable>; ?


actually it does because not all games use the score variable as just score some games use bestscore or points


I have a text file saved from a while ago and I have this:

Code: Select all
on (release) {
    score = <gamescore_variable>;
    _root.score = <gamescore_variable>;
    g = _level0.g;
    _root.g = _level0.g;
    $url_loc = "viewgame.php?action=newhighscore&g=" + _level0.g;
    getURL($url_loc, "_self", "POST");
}
User avatar
Gleasonator
VIP
VIP
 
Posts: 39
Cash: 59
Donate
Joined: Wed Sep 17, 2008 10:41 pm

Trophies

gold: 1
silver: 0
bronze: 2


Return to Games

Who is online

Users browsing this forum: No registered users and 0 guests

cron