Packagecom.cmiscm.utils.display
Classpublic class ErrorMsg
InheritanceErrorMsg Inheritance flash.display.Sprite

Error Message.

View the examples



Public Methods
 MethodDefined By
  
ErrorMsg($str:String, $color:uint = 0x000000, $bgColor:uint = 0xFFFFFF)
Show error message
ErrorMsg
Public Constants
 ConstantDefined By
  ERROR_CASE_DATA : String = Unable to load Data SWF file due to temporary error
Please refresh the page and try again
[static] failed to load data file
ErrorMsg
  ERROR_CASE_MAIN : String = Unable to load Main SWF file due to temporary error
Please refresh the page and try again
[static] failed to load main file
ErrorMsg
  ERROR_CASE_SWF : String = Unable to load SWF file due to temporary error
Please refresh the page and try again
[static] failed to load swf file
ErrorMsg
  ERROR_CASE_VIDEO : String = failed to load Video file
Please refresh the page and try again
[static] failed to load video file
ErrorMsg
  ERROR_CASE_XML : String = Failure to load XML due to temporary error
Please refresh the page and try again
[static] failed to load xml file
ErrorMsg
Constructor Detail
ErrorMsg()Constructor
public function ErrorMsg($str:String, $color:uint = 0x000000, $bgColor:uint = 0xFFFFFF)

Show error message

Parameters
$str:String — - Message
 
$color:uint (default = 0x000000) — - Font color
 
$bgColor:uint (default = 0xFFFFFF) — - Bg color
Constant Detail
ERROR_CASE_DATAConstant
public static const ERROR_CASE_DATA:String = Unable to load Data SWF file due to temporary error
Please refresh the page and try again

failed to load data file

ERROR_CASE_MAINConstant 
public static const ERROR_CASE_MAIN:String = Unable to load Main SWF file due to temporary error
Please refresh the page and try again

failed to load main file

ERROR_CASE_SWFConstant 
public static const ERROR_CASE_SWF:String = Unable to load SWF file due to temporary error
Please refresh the page and try again

failed to load swf file

ERROR_CASE_VIDEOConstant 
public static const ERROR_CASE_VIDEO:String = failed to load Video file
Please refresh the page and try again

failed to load video file

ERROR_CASE_XMLConstant 
public static const ERROR_CASE_XML:String = Failure to load XML due to temporary error
Please refresh the page and try again

failed to load xml file

Examples
 
      package {
        import flash.display.Sprite;
        import com.cmiscm.utils.display.ErrorMsg;
        import flash.events.Event;
        
        public class TestError extends Sprite
        {
            public function TestError()
            {
                 super();
                 this.addEventListener(Event.ADDED_TO_STAGE, onAdd);
             }
     
             private function onAdd(evt:Event):void
             {
                 evt.currentTarget.removeEventListener(evt.type, arguments.callee);
     
                 var error:ErrorMsg = new ErrorMsg(ErrorMsg.ERROR_CASE_CONFIG);
                 this.addChild(error);
            }
        }
     }
     

Result: