1 Reply Latest reply on May 18, 2017 6:06 PM by Paul Darky

    How to add a movie clip from the library to the stage while being in other movie clip?

    Paul Darky Level 1



      I am building an app which has a scrollable list with buttons to select some item from the list.


      The list is a movie clip (LIST) with the names (just text) of each item.


      Each one of the items has a button to the right so when that button is clicked a movie clip is added from the library.


      The problem is that the movie clip is added inside the movie clip of the LIST as there is where the buttons are.


      I need the movie clips to load in the main timeline instead of inside the movie clip LIST.


      If I put the buttons in the main time line the movie clips are added correctly into the main timeline. But then the problem is that the buttons don´t scroll with the LIST.


      As I don´t know AS3 I am using the code snippet to “Add Instance from Library” with an Event Listener for each button. This is what I´m using.



      btn1.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_1);


      function fl_MouseClickHandler_1(event:MouseEvent):void


        // Start your custom code

        var fl_MyInstance:mc_1 = new mc_1();



        // This example code displays the words "Mouse clicked" in the Output panel.

        trace("Mouse clicked");





        // End your custom code




      I need the buttons to be inside the movie clip LIST so they scroll with the names of the items, but I need the movie clips to be added to the main timeline.


      Can anyone help me?