Nov 17 2009
uiToggleFrame Example
This is a small SWF featuring the new uiToggleFrame component from Aspire UI Standard Edition (the component was added to the library in the recent Version 1.3 Update):
(39kb)
The content contained within the uiToggleFrame container can be toggled enabled/disabled by clicking on the checkbox title.
The following is an excerpt of the code:
// ** textinput to be set as the content of the toggleframe container ** var keyInput:uiTextInput = new uiTextInput(); keyInput.hint = "Enter Secret Key"; keyInput.fillX = true; keyInput.displayAsPassword = true; // ** toggleframe container ** var tfrm:uiToggleFrame = new uiToggleFrame("Enable Encryption?"); tfrm.toggled = false; tfrm.content = keyInput; // ** submit pushbutton ** var submitButton:uiPushButton = new uiPushButton("Submit"); submitButton.alignX = ALIGN.CENTER; // ** vertical box layout container ** var keyBox:uiVBox = new uiVBox(); keyBox.fillX = true; keyBox.spacing = 4; keyBox.addChild(tfrm); keyBox.addChild(submitButton); // ** top level form container ** var submitForm:uiForm = new uiForm(); submitForm.defaultButton = submitButton; submitForm.addChild(keyBox); submitForm.move(10, 10); addChild(submitForm);
In the above example, the “classic” theme skin assets were embedded (about 6kb):
[Embed(source="../bin/assets/skins/classicbin/rules.xml", mimeType="application/octet-stream")] private static const assetsbin:Class;
And used thus:
uiSkins.initialize(null, null, new assetsbin() as ByteArray);
Aspire UI Components
Aspire UI is a library of Actionscript 3.0 (AS3) classes for building flexible and lightweight UI elements in Adobe Flash applications. Key features include easy skinning using PNG image files, automatic tab focus ordering, CSS text styles, and layout management. This is a pure AS3 library with no dependency on the Flex framework.
You may experiment with the various features by downloading the trial version.







