I was wondering if anyone knew of a way or even the best way to go about
attaching a single movieClip multiple times along the x axis when the actual
width of the clip is determined my the content that it loads.

In this case I am just trying to serve up a number of "buttons" that look
like tabs. The clip being attached handles the creation of a text field,
loading and formatting its text (or label) then drawing up the graphic which
makes it look lie a tab.

I would like to attach them all at once using a loop and the main problem I
encountered is getting flash to instantiate and recognize the previously
loaded clip on the stage so that its x position and width can be determined
before the loop recommences.

I tried something like

if (tabArray.length != 0) {

        var i:Number = 0;
        var clipPositioner:Number;
        var previouslyLoadedClip:MovieClip;

        while (i < tabArray.length) {
        var tabName = "TabBtn" + i;
        var level = i + 1;

        if (tabName == "TabBtn0) {
            previouslyLoadedClip = tabName;
        } else {
            previouslyLoadedClip = tabName.substring(0, 5) + (i-1);
            
        clipPositioner = [previouslyLoadedClip]_x +
[previouslyLoadedClip]_width + 1;

        this.attachMovie("TabBtn_mc",  tabName , level, { _x: clipPositioner
});
        updateAfterEvent(); // THIS DOESN'T WORK - NEITHER DOES :
        onClipEvent(load) { i++ }

        i++;
        }
    }

I understand why the updateAfterEvent() and onClipEvent(load) methods don't
work within the context above, but I am still uncertain how would be the
best way to go about accomplishing this.

I would appreciate it if someone could point me in the right direction.

Thanks

Dennis
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to