home *** CD-ROM | disk | FTP | other *** search
/ PCGUIA 2010 Software/Programs / PCGuia_programas.iso / Software / Utils / Livebrush / Install-LivebrushLite.air / livebrush.swf / scripts / com / livebrush / data / Help.as < prev    next >
Encoding:
Text File  |  2009-10-26  |  1.1 KB  |  44 lines

  1. package com.livebrush.data
  2. {
  3.    public class Help
  4.    {
  5.       private static var singleton:Help = null;
  6.       
  7.       public static var helpRoot:String = "http://www.livebrush.com/help/";
  8.       
  9.       private var fileManager:FileManager;
  10.       
  11.       public var xml:XML;
  12.       
  13.       public function Help(fileManager:FileManager)
  14.       {
  15.          super();
  16.          this.fileManager = fileManager;
  17.          this.xml = fileManager.loadHelp();
  18.       }
  19.       
  20.       public static function loadHelp(id:String) : void
  21.       {
  22.          var helpURL:String = null;
  23.          helpURL = Help.getInstance().xml.ITEM.(@ID == id);
  24.          FileManager.getURL(helpRoot + helpURL);
  25.       }
  26.       
  27.       public static function getInstance(fileManager:FileManager = null) : Help
  28.       {
  29.          var instance:Help = null;
  30.          if(singleton == null)
  31.          {
  32.             singleton = new Help(fileManager);
  33.             instance = singleton;
  34.          }
  35.          else
  36.          {
  37.             instance = singleton;
  38.          }
  39.          return instance;
  40.       }
  41.    }
  42. }
  43.  
  44.