I am using adobe air to create a mobile application. I want to dynamically add a container or group that can contain some elements, and has a border and a background color. Since these are added dynamically, I use Actionscript 3. A bordercontainer works fine, however according to: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/BorderContainer.html this component is not meant to be used for mobile.
So my queston is: What lightweight component can contain other elements, and has a settable background color and border?
Try simply using the Group spark component. You would add a Rect with a filled background and a solid line:
<s:Group>
<s:Rect>
<s:stroke>
<s:SolidColorStroke />
</s:stroke>
<s:fill>
<s:SolidColor />
</s:fill>
</s:Rect>
</s:Group>
For an additional performance enhancement, you might want to look at FXG precompilation. Some article about that here .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.