Hi, I'm trying to find a way to get the fields in a form visible or enabled based on a value received from an Object. I'm sure I'm not far from the solution. But as I am not skilled in ActioScript, I need some help to figure out this one. I would like to get a generic script that could be applied to any containers or controls.
Thanks Code: //Object returned by the RemoteObject call var initVal:Object = result; // function to configure the visible & enabled attributes function controlBehavior(x:String):Void{ switch (x){ case 0: this.visible = false; this.enabled = true; case 1: this.visible = true; this.enabled = false; case 2: this.visible = false; } } <mx:TextInput id="myInput" text="{iniVal.isoValue}" creationComplete="controlBehavior(iniVal.isoStatus)"/> -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/