/ Published in: ActionScript 3
This is a dynamic label generator for a project I'm working on. (Source files coming soon)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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; } } }