Guest User

Untitled

a guest
May 22nd, 2013
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package ro.dose.freedom13.models {
  2.     import com.demonsters.debugger.MonsterDebugger;
  3.     /**
  4.      * ...
  5.      * @author Adrian Dumitrescu (aka Virusescu) @ Dose Digital
  6.      */
  7.     public class Config {
  8.        
  9.         //public static const DEBUG:Boolean = false;
  10.         public static const DEBUG:Boolean = true;
  11.         public static const GATEWAY:String = "https://freedom13.ileo-dev.ro/services/amf/";
  12.         //public static const GATEWAY:String = "http://localhost/remote/";
  13.        
  14.         public static var STATUS:String = "precampaign"; // valori posibile: [precampaign, campaign, postcampaign]
  15.        
  16.         public function Config() {
  17.  
  18.         }
  19.        
  20.         public static function setupExternals(params:Object):void {
  21.             if (params.status) {
  22.                 var allowedValues:Array = ["precampaign", "campaign", "postcampaign"];
  23.                 if (allowedValues.indexOf(params.status) >= 0) {
  24.                     Config.STATUS = params.status;
  25.                     MonsterDebugger.trace(Config, "Config.STATUS set from flashVars as:" + params.status);
  26.                 } else {
  27.                     throw new Error("Invalid status param, set in FlashVars. status = '" + params.status + "'");
  28.                 }
  29.             }
  30.         }
  31.        
  32.     }
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment