Skip to content

Instantly share code, notes, and snippets.

@tvdsluijs
Created August 8, 2012 05:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tvdsluijs/3292499 to your computer and use it in GitHub Desktop.
Save tvdsluijs/3292499 to your computer and use it in GitHub Desktop.
Read out system memory using Adobe Flex
<?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