home *** CD-ROM | disk | FTP | other *** search
- package ENGINE.CORE
- {
- import flash.display.Sprite;
- import flash.events.Event;
- import flash.system.System;
- import flash.text.TextField;
- import flash.text.TextFieldAutoSize;
- import flash.utils.getTimer;
-
- public class OSystem extends Sprite
- {
-
- public static var iUserText1:String = "";
-
- public static var iUserText:String = "";
-
- public static var iUserText2:String = "";
-
-
- private var iLastTime:int;
-
- private var iCount:int;
-
- private var iText:TextField;
-
- private var iSTimer:String;
-
- public function OSystem()
- {
- super();
- this.iText = new TextField();
- this.iText.autoSize = TextFieldAutoSize.LEFT;
- this.iText.mouseEnabled = false;
- this.addChild(this.iText);
- this.addEventListener(Event.ENTER_FRAME,OnEnterFrame);
- this.iLastTime = getTimer();
- this.iSTimer = "";
- }
-
- public function OnEnterFrame(param1:Event) : void
- {
- var _loc2_:uint = 0;
- var _loc3_:int = 0;
- _loc2_ = System.totalMemory;
- _loc3_ = getTimer() - this.iLastTime;
- ++this.iCount;
- if(_loc3_ >= 1000)
- {
- this.iSTimer = String(Math.round(_loc3_ / this.iCount * 100) / 100);
- this.iLastTime = getTimer();
- this.iCount = 0;
- }
- iText.text = _loc2_.toString() + " " + this.iSTimer + " " + OGlobal.prStage.frameRate + " | " + OSystem.iUserText + " " + OSystem.iUserText1 + " " + OSystem.iUserText2;
- }
- }
- }
-