Global.as

/** -----------------------------------------------------------
 * Class Name: Global.as
 * ------------------------------------------------------------
 * Description: Global(Singleton) is a sort of _global where
 * all global vars - including FlashVars - and functions exist.
 * ------------------------------------------------------------
 * Created by: Bobby Berberyan - 09.09.09
 * Modified by:
 * Date Modified:
 * ------------------------------------------------------------
 * Copyright ©2009 FOX SPORTS Interactive
 * For license and usage information, please review the company
 * or News Corp manual.
 * ------------------------------------------------------------
 * Usage: Global.vars.name = value;
 * ------------------------------------------------------------
 *
 */
 package utils
{
	import flash.display.LoaderInfo;
	import flash.net.URLRequest;
	import flash.net.navigateToURL;

	import utils.ExternalInterfaces.BasicExternalInterface;
	import utils.HTTPCookies.HTTPCookie;
	import utils.SharedObjects.BasicSharedObjects;
	import utils.Tweeners.BasicTween;
	import utils.loaders.data.DataLoader;
	import utils.loaders.media.MediaLoader;

	public class Global extends Object
	{
		private static var _dataLoader:DataLoader;
		private static var _mediaLoader:MediaLoader;
		private static var _basicExternalInterface:BasicExternalInterface;
		private static var _basicSharedObject:BasicSharedObjects;
		private static var _basicTween:BasicTween;
		private static var _httpCookies:HTTPCookie;
		public static var vars:Object = {};

		//Ingests the FlashVars in the Global Var too.
		public static function getFlashVars():void
		{
			var varsAll:String = "";
			var varName:String;
			var paramObj:Object = LoaderInfo(vars.root.loaderInfo).parameters;
			for (varName in paramObj)
			{
				vars[varName] = String(paramObj[varName]);
			}
		}

No more…

This entry was posted in Flash AS3. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *