GhostWire Studios - Flash/Flex UI Components Development And Consulting Services
Quality User Interface Controls For Flash Application DevelopmentAspireUI Components

Nov 17 2009

uiToggleFrame Example

Published by sunny at 2:16 am under Aspire UI, Flash

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)

Get Adobe Flash player

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.

pixelstats trackingpixel
Share or Bookmark This Post:
  • StumbleUpon
  • email
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Live
  • Yahoo! Buzz
  • Netvibes
  • NewsVine
  • Reddit
  • Slashdot
  • Technorati
  • BlinkList
  • Mixx
  • Diigo
  • Faves
  • Suggest to Techmeme via Twitter
  • Twitter

Other Posts You Might Enjoy:

     

No responses yet

Trackback URI | Comments RSS

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word