Return to Snippet

Revision: 24203
at February 23, 2010 11:47 by alvincrespo


Initial Code
package{
	
	import flash.display.MovieClip;
	
	public class InputManager extends MovieClip{
		
		public function InputManager():void{
			
			var fields:Object = new Object();
			fields.uploadinput = 'upload song';
			fields.albuminput = 'album';
			fields.taginput = 'tags';
			fields.artistinput = 'artist';
			fields.genreinput = 'genre';
			
			for (var aField:String in fields){
				setLabels(aField, fields[aField]);
			}
		}
		
		private function setLabels(aParent:String, labelName:String):void{
			MovieClip(getChildByName(aParent)).labelfield.text = labelName;
		}
	}
}

Initial URL

                                

Initial Description
This is a dynamic label generator for a project I'm working on.  (Source files coming soon)

Initial Title
AS3 - Dynamic Label Generator

Initial Tags
actionscript

Initial Language
ActionScript 3