flashLGSL

(Last updated: July 6, 2010)
flashLGSL is an interface for the PHP Web program Live Game Server List (LGSL). I modified a couple of the PHP files that generate the server data so they dynamically generate an XML file that is read by the SWF for display. There are some key variables that must be set in the flashVars to work with your server, as well as a CSS file so you can control more of the look and feel of it.

Download flashLGSL (567kb ZIP)

Instructions:
I've only test this with the 5.7 Stand Alone version of LGSL, so no guarantees it will work with any other version. This is also set up to make the SWF have a transparent background, so if you want to make it a solid color, then you'll need to adjust the HTML code that places it on the page.

Copy the following files to your LGSL directory:

  • indexFlash.php
  • lgsl_styleFlash.css

Edit the CSS file as needed to work with your color scheme.

Copy the following file to your LGSL/lgsl_files directory:

  • lgsl_detailsFlash.php

In the directory where the web page is that you want to display this, copy the following files to that directory:

  • flashLGSL.swf
  • AC_RunActiveContent.js (if it doesn't already exist there)

Now you need to copy and edit some code to put the SWF onto your page. Open the flashLGSL1.html or the flashLGSL2.html file to get the code for your page. Each file is numbered with the default dimensions set for style=1 and style=2 respectively (explained on next page).

Copy the two lines of code below and paste it into the <head> area of your web page if it is not aready there.

<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="AC_RunActiveContent.js" language="javascript"></script>

There are THREE areas that you will NEED to edit that contain the FlashVars information that is needed to display the LGSL server info properly...

The structure of my test site is:
wwwroot/lgsl/
The file I put this code is in the wwwroot directory.

lgslDir=(full URL path to your LGSL director relative to the page you are placing this code)

lgslPage=(name of the page for generating the variables needed – default is "indexFlash.php")

mainLGSL=(name of the main LGSL page – default is "index.php")

sNum=(the number of your server found in the LGSL admin.)

sBg=(the background color for the server text box. Format like 0xFFFFFF (white).)

pBg=(the background color for the player listing text box. Format like 0xFFFFFF (white).)

style=(either 1 or 2, illustrated below)

LGSL Style 1LGSL Style 2
LGSL Style 1LGSL Style 2
Default dimensions for style=1 are:
Width=200
Height=220
This takes up the same amount of space as the normal LGSL installation. You may need to adjust the height if you server name wraps to two lines.
Default dimensions for style=2 are:
Width=160
Height=120
Since the default map size for LGSL is 160x120, that is the size set by default. If you map sizes are larger, then you'll need to adjust the dimensions accordingly.

Cooresponding styles for text in the flash piece are:
Server name = .serverName
IP and map name are links, so their style is controlled by the a:link, a:hover, a:active, and a:visited styles
Player count line = .playerInfoBox

If you wish to have a different size, then you need to edit all of the GREEN highlighted areas to match the dimensions you want. Default map size is 160x120, so to make the width less than 160 will cut off the sides of the map images. If you change the dimensions you will want to make adjustments to font size in the CSS file so text fits the adjusted size.

HTML code with highlighted areas for editing

VERSON HISTORY:

  • 5.7
    • Added the lgslPage variable to the flashVars for greater user control.
    • Added the mainLGSL variable to the flashVars for greater user control.
  • 5.5
    • Fixed the player listing info, which wasn't displaying at all before.
  • 5.4.1
    • Added the ability to have two different styles, the default style and the new compact style.
  • 5.4
    • Changed version numbering to match lgsl version numbering (this would be 2.1 otherwise).
    • Updated indexFlash.php and lgsl_detailsFlash.php to work with lgsl 5.4.
  • 2.0
    • Code rewritten in Flash CS3/ActionScript 3.
    • Added variables in flashVars to control background color of player listing and server info listing.
    • flashLGSL is now scaleable. You can set the dimensions of the SWF as it appears on your site via the HTML code used to place it on the page.
    • The map images dimensions are now dynamically detected, so you can use different size maps if you wish.

If you find bugs or have a feature request for this Flash element, please feel free to email me or leave a post in the LGSL forums.

Projects in Development

Flash Slideshow

  • Manual or automatic viewing of images
  • Next and Previous buttons for manual viewing
  • Volume and mute controls when music is added
  • Control of number of seconds of each slide during automatic playback

AS3 Live Chat

  • Dynamic size to work for user defined area
  • Ability to send private chats