4 Replies Latest reply on Feb 6, 2009 2:43 AM by Newsgroup_User

    load clip with a component

    Level 7
      I have a swf file made with flash 8 as2 that I load into a container (also
      flash8 as2).

      The swf file has a combo box in it which works fine within the swf but fails
      when it is loaded into the container and then it does nothing!!

      Any ideas? This one is really urgent and I can't see anything I'm doing
      wrong.

      Many thanks

      Dave


        • 1. Re: load clip with a component
          Ned Murphy Adobe Community Professional & MVP
          Neither can we. Can you show whatever code you are using for the combo box?
          • 2. Re: load clip with a component
            Level 7
            Thanks for the reply

            The code is as follws

            cbTOPIC.setStyle( "fontSize", "20" );
            cbTOPIC.setStyle( "color", "0x000000" );
            //cbTOPIC.setStyle( "fontWeight", "bold" );
            cbTOPIC.setStyle( "fontFamily", "arial" );
            cbTOPIC.dropdown.rowHeight = 30;
            cbTOPIC.rowCount = 17;
            aTOPICS=new Array();
            aTOPICS.push("");
            aTOPICS.push("Strategy - UK");
            aTOPICS.push("Strategy - Europe");
            aTOPICS.push("Ventures");
            aTOPICS.push("Finance");
            aTOPICS.push("Other");
            cbTOPIC.dataProvider=aTOPICS;

            This all works fine within the swf itself but when loaded into the container
            swf with a movie clip loader it all stops working!

            "NedWebs" <webforumsuser@macromedia.com> wrote in message
            news:gmf1im$oqf$1@forums.macromedia.com...
            > Neither can we. Can you show whatever code you are using for the combo
            > box?


            • 3. Re: load clip with a component
              Ned Murphy Adobe Community Professional & MVP
              As is, with the code you offered loading the cb in the one swf, and that swf being loaded into another swf, there is no problem. There must be something else you're doing that's causing the problem.
              • 4. Re: load clip with a component
                Level 7
                Ok, I have simplifed this to the absolute minimum code and still the problem
                exists.

                The container movie has the following code

                this.createEmptyMovieClip("mCONTAINER",10);
                var mcLoader:MovieClipLoader = new MovieClipLoader();
                var mclListener:Object = new Object();

                mclListener.onLoadInit=function(mc:MovieClip) {
                trace("onLoadInit: " + mc);
                }

                mcLoader.loadClip("combobox.swf", mCONTAINER);
                mcLoader.addListener(mclListener);

                The combobox.swf movie has the following code

                cbTOPIC.setStyle( "fontSize", "20" );
                cbTOPIC.setStyle( "color", "0x000000" );
                //cbTOPIC.setStyle( "fontWeight", "bold" );
                cbTOPIC.setStyle( "fontFamily", "arial" );
                cbTOPIC.dropdown.rowHeight = 30;
                cbTOPIC.rowCount = 17;
                aTOPICS=new Array();
                aTOPICS.push("");
                aTOPICS.push("Strategy - UK");
                aTOPICS.push("Strategy - Europe");
                aTOPICS.push("Ventures");
                aTOPICS.push("Finance");
                aTOPICS.push("Other");
                cbTOPIC.dataProvider=aTOPICS;
                stop();

                The combobox.swf works fine on its own, but the combobox does nothing when
                loaded into the container movie.

                I really need to sort this one, any further ideas?

                Thanks for your help

                Dave

                "NedWebs" <webforumsuser@macromedia.com> wrote in message
                news:gmf5jd$l7$1@forums.macromedia.com...
                > As is, with the code you offered loading the cb in the one swf, and that
                > swf being loaded into another swf, there is no problem. There must be
                > something else you're doing that's causing the problem.