Intelligent Full Screen Button
Intelligent Full Screen Button
Mar 03I think it’s a widely known fact that Flash Games are getting bigger. The resolutions are increasing as well as the file sizes. This may pose a problem if you use AV Arcade to manage your arcade sites’ content.
The area usable for containing the games in AV Arcade’s default template is about 650px, which is fine for most games. Some other templates, on the other hand, use an area a lot smaller to contain the main Flash Game.
Some games I have on my Online Arcade Games site use a width of up to 800px, which can over lap the sidebar and hide their content.
It’s a simple problem to fix and can even help boost your arcade sites earnings a little…
The Fix
Upload a button or picture to:
*Yoursite.com*/templates/*YourTemplate*/images/play-fullscreen.png
Open:
*Yoursite.com*/content/game.php
Search For:
else
{
echo '<object width="'.$row['width'].'" height="'.$row['height'].'">
<param name="movie" value="'.$row['url'].'">
<embed src="'.$row['url'].'" width="'.$row['width'].'" height="'.$row['height'].'">
</embed>
</object>';
}
}
else if (4 == $row['filetype'])
{
echo '<object width="'.$row['width'].'" height="'.$row['height'].'">
<param name="movie" value="'.$row['url'].'">
<embed src="'.$row['url'].'" width="'.$row['width'].'" height="'.$row['height'].'">
</embed>
</object>';
}
}
else if (4 == $row['filetype'])
Add Above:
if ($row['width'] > 640)
{
echo "<em style='font-size:1.4em;'><strong>{$row['name']}</strong> uses a large resolution.<br />
Click the button below to play in it's correct screen size!</em><br />";
echo '<a rel="nofollow" href="#"';
echo '" onclick="javascript:window.open(\'';
echo $row['url'];
echo '\',\'popup\',\'width=';
echo $row['width'];
echo ',height=';
echo $row['height'];
echo '\');"><img src="'.$template_url.'/images/play-fullscreen.png" alt="Full Size" title="Play Full Size" /></a>';
}
{
echo "<em style='font-size:1.4em;'><strong>{$row['name']}</strong> uses a large resolution.<br />
Click the button below to play in it's correct screen size!</em><br />";
echo '<a rel="nofollow" href="#"';
echo '" onclick="javascript:window.open(\'';
echo $row['url'];
echo '\',\'popup\',\'width=';
echo $row['width'];
echo ',height=';
echo $row['height'];
echo '\');"><img src="'.$template_url.'/images/play-fullscreen.png" alt="Full Size" title="Play Full Size" /></a>';
}
The above code will check if the game width is higher than 640px.
If 640px + then it will create a popup window with the game inside. It pulls the game URL and size from the SQL database.
When someone clicks the button the page will reload. So you should generate twice the adsense earnings from theses games… Which is a bonus.
You could link to the built in full screen mod, but I could never get it to act how I wanted.
I have been asked a few times about this, so thought I’d post a fix.
Hope someone finds it usefull.