Created
August 8, 2012 05:41
-
-
Save tvdsluijs/3292499 to your computer and use it in GitHub Desktop.
Read out system memory using Adobe Flex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" | |
xmlns:s="library://ns.adobe.com/flex/spark" | |
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" width="659" height="352" | |
creationComplete="SySMem();"> | |
<fx:Declarations> | |
<!-- Place non-visual elements (e.g., services, value objects) here --> | |
</fx:Declarations> | |
<fx:Script> | |
<![CDATA[ | |
public function SySMem():void{ | |
var memoryUsedInKb:int = int(System.totalMemory / 1024); | |
lblSysMem.text = memoryUsedInKb.toString()+" KB"; | |
} | |
]]> | |
</fx:Script> | |
<s:Label text="Label" width="185" id="lblSysMem" left="5" top="5"/> | |
</s:Application> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment