All pastes #232697 Raw Edit

Skrot

public text v1 · immutable
·published 2006-11-01 13:55 UTC
rendered paste body
class databaseaccess
{
	public static var a_pictures;
	private static var url;
	private static var sendVars;
	private static var replyVars;
	public static var  done;

	public static function search(query)
	{
    	url = new String();
		replyVars = new LoadVars();
		sendVars  = new LoadVars();
		a_pictures = new Array();
		done=0;
		url = "http://calciosalentino.altervista.org/search.php";
		sendVars.name = query.pictureName;
		
		replyVars.onLoad = function( bSuccess)
		 {
			if( bSuccess )
			{
				for(this.a=1;this.a<=this.total;this.a++)
				{
					var tmp = new Array();
					tmp = this["object"+this.a].split("|");
					var picture_ = new Picture (tmp[0],tmp[1],tmp[2],tmp[3],tmp[4],tmp[5],tmp[6],tmp[7],tmp[8],tmp[9],tmp[10],tmp[11]);
					databaseaccess.a_pictures.push(picture_); 
					trace(databaseaccess.a_pictures[this.a-1].picName);
				}
			}
			else
			{
				trace( "error" );
			}
		}
		sendVars.sendAndLoad(url, replyVars, "POST");
                return a_pictures;
	}
}