Hi - I need to programmatically create a series of "boxes" with labels. The goal is to make a custom set of "Tabs" that are configured by a list of tab names, can be clicked, etc. I'm a pretty basic AS / Flash user w/ a programming background, and inherited this project in the current state, which I'll call "basic tabs" and need to get it to "fancy tabs".
Right now I have this working with simple text boxes, but I'm trying to make it look better. Specifically, I have an image for a tab that I can 9-slice as the background, and then want to draw the name for the Tab on top of this image. Currently, the AS for the creation, label setting, and resizing looks like this (Entryset is a tabular data structure that we use): var columns:Array = entryset.getColumns(); var rows:Array = entryset.getRows(); rowLength = rows.length; //For every row in the Entryset, create a tab, give it a label of the value in the current row, //change its width to fit its label, displace it horizontally to fit next to adjacent tab, and //then set its y coord. this.mcContent = this.createEmptyMovieClip("mcContent", this.getNextHighestDepth()); for (var i = 0; i < rowLength; i++) { mcContent.attachMovie("Tab_MC", "mov" + i + "_mc", i); mcContent["mov"+i+"_mc"].label_txt.text = rows[i][columns[0].name]; newColumns[i] = new ProtoEntrysetColumn(mcContent["mov"+i+"_mc"].label_txt.text, "Any"); mcContent["mov"+i+"_mc"]._width = mcContent["mov"+i+"_mc"].label_txt.length*8 + 40; mcContent["mov"+i+"_mc"]._x = mcContent["mov"+i+"_mc"]._width/2 + spacing; spacing = mcContent["mov"+i+"_mc"]._x + mcContent["mov"+i+"_mc"]._width/2; mcContent["mov"+i+"_mc"]._y = mcContent["mov"+i+"_mc"]._height/2; } I can't seem to find the right tutorial or info that will show me how to make a new movie clip that has 1) an image and 2) some text overlay. I'd like to be able to make this clip, stretch the image as needed, center the text overlay, and set the text with a few lines similar to those above. Do I need to group a textbox and image and then convert that to a clip? Or make a class with more than one movie clip in it? If anyone either has the right guidance / steps or possibly a link to a tutorial that covers wrapping multiple movie clips into one so that they can be worked with together through AS, that would be awesome. Thanks in advance for your help, Byron Byron Binkley Proto | 140 W. 30th St. | 3rd floor New York, New York 10001 _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com