Examples

Primative Pong Game
Primative Black Jack Game
Basic OO Black Jack Game
Basic Form
Complex Form
JavaScript from ActionScript
Basic Image Animation
Hello World on a Timer
Tads Basic Checker Class
A Simple FLV Player
Simple getter use
A liaison Class
Parent Child Control
Wrapper to server bridge
Primative Space Shooter Game
Simple XML Loader
Primative Speed Simulation
Simple Sound Mixing
Simple XML Loader Class
 



/* This class loads a xml file with a random number added to the call, to ensure
   that the file is always loaded fresh, request headers are also added.
   Just like the Checker class it will get imported in and used in the simple flv player. */

package classes
{

/* Just like the Checker class, this package is in a folder named classes */

 import flash.display.Sprite; 
 import flash.events.*; 
 import flash.net.*; 


 public class LoadSomeXML
 {


/* The difference with this class (from the Checker class) is that its method is static.
   so basically you can think of this class as a holder of a funtion that can
   be reused more easily. 
   The Checker class needs to be instantiated before it can be used.
   This class can just be used once it has been imported into a package. */

    public static function freshXMLFile(fileToLoad:String, completeFunc:Function, 
    errorFunc:Function, cache:Boolean = false):void 
    {

	var theRequest:String = fileToLoad;
	var thefheads:Array;
	
        if (cache == false) {

	var nocaches:URLRequestHeader = new URLRequestHeader("Cache-Control", "no-store, no-cache, must-revalidate");
     	var nocachets:URLRequestHeader = new URLRequestHeader("Cache-Control", "post-check=0, pre-check=0");
     	var expiresheads:URLRequestHeader = new URLRequestHeader("Expires", "Tue, 24 April 1994 04:00:00 GMT");
     	var pragmaheads:URLRequestHeader = new URLRequestHeader("Pragma", "no-cache");


	var adate:Date = new Date();
        var atime:String = ""+adate.getTime()+"";
        thefheads = new Array(nocaches, nocachets, pragmaheads, expiresheads);
	theRequest += (theRequest.indexOf("?")!=-1) ? "&"+atime+"=1"+"" : "?"+atime+"";

	}
	
	var fxreq:URLRequest = new URLRequest(theRequest);
	
        
	var floader:URLLoader = new URLLoader();
        
	if (theRequest!=fileToLoad) {fxreq.requestHeaders = thefheads;}

        floader.addEventListener(Event.COMPLETE, completeFunc);
        floader.addEventListener(IOErrorEvent.IO_ERROR, errorFunc);

        
        floader.load(fxreq);

    }





 }
}

Compiled Result: