Hi,
Trying to figure this out.

I want to create dynamic movieclips within a for loop and assign
actions to each created movieclip.

When I try to do it this way, it does not seem to work:

if (screen_Name == "Tab") {
                _root.depth++;
                var Tab_Int_MC = mainMC.createEmptyMovieClip("TabMenu_Int", 
_root.depth);
                for (var i = 0; i<3; i++) {
                        _root.depth++;
                        Tab_Int_MC.attachMovie("GR_BG_TAB_icon_unselect_theme1",
"GR_BG_TAB_icon_unselect_theme1_"+i, _root.depth);
                        this["Tab"+i] = 
Tab_Int_MC["GR_BG_TAB_icon_unselect_theme1_"+i];
                        this["Tab"+i]._x = 35*i;
                        this["Tab"+i]._y = 19;
                        _root.depth++;
                        Tab_Int_MC.attachMovie("GR_BG_TAB_icon_select_Theme1",
"GR_BG_TAB_icon_select_Theme1_"+i, _root.depth);
                        this["TT_hlt"+i] = 
Tab_Int_MC["GR_BG_TAB_icon_select_Theme1_"+i];
                        this["TT_hlt"+i]._x = 35*i;
                        this["TT_hlt"+i]._y = 19;
                        this["TT_hlt"+i]._visible = false;
                        this["Tab"+i].onRollOver = function() {
                                this["TT_hlt"+i]._visible = true;
                                drawOutline(this["Tab"+i], "TL");
                        };
                        this["Tab"+i].onRollOut = function() {
                                this["TT_hlt"+i]._visible = false;
                                removeOutline(this["Tab"+i]._parent.Highlight);
                        };
                        this["Tab"+i].onRelease = function() {
                                DisplayData(this["Tab"+i], xPos, yPos, width, 
height, "left");
                        };
                }

So I tried it this way also and it didnt work:

        if (screen_Name == "Tab") {
                _root.depth++;
                var Tab_Int_MC = mainMC.createEmptyMovieClip("TabMenu_Int", 
_root.depth);
                for (var i = 0; i<3; i++) {
                        _root.depth++;
                        Tab_Int_MC.attachMovie("GR_BG_TAB_icon_unselect_theme1",
"GR_BG_TAB_icon_unselect_theme1_"+i, _root.depth);
                        TT = this["Tab"+i];
                        TT = Tab_Int_MC["GR_BG_TAB_icon_unselect_theme1_"+i];
                        TT._x = 35*i;
                        TT._y = 19;
                        _root.depth++;
                        Tab_Int_MC.attachMovie("GR_BG_TAB_icon_select_Theme1",
"GR_BG_TAB_icon_select_Theme1_"+i, _root.depth);
                        TT_hlt = this["TT_hlt"+i];
                        TT_hlt = Tab_Int_MC["GR_BG_TAB_icon_select_Theme1_"+i];
                        TT_hlt._x = 35*i;
                        TT_hlt._y = 19;
                        TT_hlt._visible = false;
                        TT.onRollOver = function() {
                                TT_hlt._visible = true;
                                drawOutline(TT, "TL");
                        };
                        TT.onRollOut = function() {
                                TT_hlt._visible = false;
                                removeOutline(TT._parent.Highlight);
                        };
                        TT.onRelease = function() {
                                DisplayData(TT, xPos, yPos, width, height, 
"left");
                        };
                }

Can someone help me debug this?

Thanks
_______________________________________________
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

Reply via email to