2 Replies Latest reply on Feb 15, 2016 9:21 AM by Colin Holgate

    Call function MC from Stage

    Florentine3D

      Question: How can i call function of MC in first frame of Stage?


      Example:

      First MC: ToggleButton have function:

      function setSelected( b )

      {

          selected = b;   

          if( selected )

              _this.gotoAndStop("dn");

          else

              _this.gotoAndStop("up");

      }

       

      This code work fine inside MC..

       

      This button place on the stage with instance name: btn_mc

      When i write Action in first frame of Stage: this.btn_mc.setSelected(true) in Output window of browser i have a error message: setSelected is not a function.