Written by Philip
The Singleton class, which can be used in Flex / Flash, which are of course coded in AS3, is designed to restrict instantiation of a class to only one object. It's great when you only want one object across the whole of your application. An example could be you load in a load of xml data and you want to store the values of the xml for use throughout the application. In Flex / Flash we can write a Singleton Class like the following. We use the getInstance() to return the object created.
1 |
package com.howtocode |
To access a variable from the Singleton class we use the following.
1 |
import com.howtocode.Singleton; |
You can of course do something really cool which is place something like place
1 |
<mx:Button id="flexButton" label="{model.flexData}">
|
into you're MXML and when flexData is changed in your Singleton Class it automatically updates you're MXML as we've set the whole Singleton Class as [bindable].
Written by Philip
Article on Flex Application Performance and how to improve it.
http://www.adobe.com/devnet/flex/articles/client_perf_06.html
Written by Philip
Contact : ( Your Email ie. This e-mail address is being protected from spambots. You need JavaScript enabled to view it )
Contact : This e-mail address is being protected from spambots. You need JavaScript enabled to view it
The Flex 3 Component Explorer is a good way to browse through Flex 3 Components. http://examples.adobe.com/flex3/componentexplorer/explorer.html
If you're looking at this you might be interested in looking at Tour de Flex as well! Which is another component based explorer apart from with 3rd party components that are amazing!
Written by Philip
Contact : This e-mail address is being protected from spambots. You need JavaScript enabled to view it
The Flex 3 Style Explorer is a great way to check UI Components and see what they look like using CSS to style them. You're then able to copy and paste the CSS into your own work.
http://examples.adobe.com/flex3/consulting/styleexplorer/Flex3StyleExplorer.html#
Page 1 of 2