Return to Snippet

Revision: 4240
at November 12, 2007 11:18 by justcaldwell

Initial Code
<?xml version="1.0"?>
<!-- usingas/FlexComponents.mxml -->
<mx:Application xmlns:mx="">
  public function changeLabel(s:String):void {
     s = "myButton" + s;

  <mx:Button id="myButton1" click="changeLabel('2')" label="Change Other
     Button's Styles"/>
  <mx:Button id="myButton2" click="changeLabel('1')" label="Change Other
     Button's Styles"/>

Initial URL

Initial Description
Using a string built at runtime to reference objects in Flex. From the help docs.

Initial Title
Using a compound String to get a reference to Flex 3 object

Initial Tags
actionscript, Flex

Initial Language
ActionScript 3