Get time used by renderer the application

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
applicationComplete="getElapsedTime(event)">
<mx:Script>
import mx.collections.ArrayCollection;
[Bindable]
public var myData:ArrayCollection = new ArrayCollection([
{Country:"A", GDP:1},
{Country:"B", GDP:6},
{Country:"C", GDP:4},
{Country:"D", GDP:2}
]);
[Bindable]
public var elapsedTime:Number;
public function getElapsedTime(evt:Event):void {
elapsedTime = getTimer();
}
</mx:Script>
<mx:Panel title="TabNavigator" height="90%" width="90%">
<mx:Label width="100%" text="Time elapsed till applicationComplete is {elapsedTime} milliseconds"/>
<mx:TabNavigator id="tn1" width="100%" height="100%" creationPolicy="all">
<mx:VBox label="Panel 1">
<mx:Label text="Panel 1" />
<mx:DataGrid dataProvider="{myData}" />
<mx:PieChart dataProvider="{myData}" showDataTips="true">
<mx:series>
<mx:PieSeries field="GDP" nameField="Country" labelPosition="callout"/>
</mx:series>
</mx:PieChart>
<mx:PieChart dataProvider="{myData}" showDataTips="true">
<mx:series>
<mx:PieSeries field="GDP" nameField="Country" labelPosition="callout"/>
</mx:series>
</mx:PieChart>
<mx:PieChart dataProvider="{myData}" showDataTips="true">
<mx:series>
<mx:PieSeries field="GDP" nameField="Country" labelPosition="callout"/>
</mx:series>
</mx:PieChart>
</mx:VBox>
<mx:VBox label="Panel 2">
<mx:Label text="Panel 2" />
<mx:PieChart dataProvider="{myData}" showDataTips="true">
<mx:series>
<mx:PieSeries field="GDP" nameField="Country" labelPosition="callout"/>
</mx:series>
</mx:PieChart>
</mx:VBox>
<mx:VBox label="Panel 3">
<mx:Label text="Panel 3" />
<mx:List dataProvider="{myData}" labelField="Country" id="list1"/>
<mx:DataGrid dataProvider="{myData}" />
<mx:DataGrid dataProvider="{myData}" />
<mx:DataGrid dataProvider="{myData}" />
<mx:DataGrid dataProvider="{myData}" />
<mx:DataGrid dataProvider="{myData}" />
<mx:DataGrid dataProvider="{myData}" />
<mx:DataGrid dataProvider="{myData}" />
<mx:DataGrid dataProvider="{myData}" />
</mx:VBox>
</mx:TabNavigator>
</mx:Panel>
</mx:Application>
Related examples in the same category
| 1. | Set min width and height of Application | | |
| 2. | The application logs the component sizes to flashlog.txt, so you can confirm the sizing effect. | |  |
| 3. | Call a function when application is created completed | | |
| 4. | Set the Application container size by using the tag | | |
| 5. | width and height percentage values can resize as your application resizes | |  |
| 6. | Use explicit pixel values to size the Application container | |  |
| 7. | Set horizontal alignment for application | |  |
| 8. | Set view source url for application | |  |
| 9. | Embed swf file into application | | |
| 10. | Add Labels to Application | |  |
| 11. | Reference top level application | |  |
| 12. | Load the module when the application first starts | | |
| 13. | Empty Application | | |
| 14. | Reference Application.application.parameters | |  |
| 15. | Set application domain | | |
| 16. | To view all the flashVars properties, you can iterate over the FlexGlobals.topLevelApplication.parameters properties, as the following example shows: | |  |
| 17. | When Flex finishes initializing the Label control, and before the application appears, Flex calls the initDate() function. | |  |
| 18. | The following tag, for example, sets explicit Application dimensions: | |  |
| 19. | Reference application parameters | |  |
| 20. | Flex application calls a PHP page with the POST method | |  |
| 21. | Flex application calls a ColdFusion page with POST method | | |
| 22. | Adding some contact data to your ContactManager application | |  |
| 23. | Flex Application Container | |  |
| 24. | Set scroll policy consistently for all scroll bars in the application | |  |
| 25. | Communicating with the host application | |  |
| 26. | Moving through the application with the Navigation containers | |  |
| 27. | Application's URL and parameters | |  |
| 28. | Application with two namespaces | | |
| 29. | Set the size of the Application container to one-half of the width and height of the browser window: | | |
| 30. | components can resize as your application resizes | |  |
| 31. | Use explicit pixel values to size the application container: | |  |
| 32. | Register a Server-Side Data Type Within a Flex Application | |  |
| 33. | Set selectedIndex property to 4 to select California by default when the application starts: | |  |
| 34. | Interacting with a loaded Flex application | | |
| 35. | Use SWFLoader control to load it into another Flex application | | |
| 36. | Embed gif file into the application at compile time | |  |
| 37. | Load gif file into the application at run time | |  |
| 38. | Show Application Initialization Time | |  |
| 39. | Align application to the left, removes margins, and sets the background image to be empty | |  |
| 40. | Remove button from application after adding | |  |
| 41. | Define a view state that adds a Button control to application | |  |
| 42. | Set the viewSourceURL property by using MXML, not ActionScript | |  |
| 43. | View all flashVars properties, iterate over the parameters object | |  |
| 44. | sets the scriptTimeLimit property to 30 | | |