2 Replies Latest reply on Jun 17, 2014 7:59 PM by jbowden

    Is there a way to call child symbol functions

    randyFuse

      I'm trying to create an interactive slideshow, and each slide will have it's own interaction.  I'm wondering is there a way to call functions in a child symbols "creationComplete" event from the stage "compositionReady" event? Or is there any other method of calling functions in symbols? Thanks!

        • 1. Re: Is there a way to call child symbol functions
          randyFuse Level 1

          So I found that I can call a childs function by setting up the child function with sym.myfunc = function(){};

           

          My other problem is there a way for a child function to call stage function?

          • 2. Re: Is there a way to call child symbol functions
            jbowden Adobe Employee

            Hi there,

             

            You're getting close...

             

            If you want to access a function in a child symbol, then declare it as you have, i.e, sym.myfunc = function(){}; and as long as you're calling from the same symbol timeline, you can use sym.myfunc(). If you're calling the function from another symbol, then you'd have to get the child symbol first, i.e., sym.getSymbol("symbolName").myfunc()


            To get a function on the main Stage, you'd declare it similarly, e.g., sym.myfunc = function(){}  and to call it from a child symbol you get the composition and Stage, like so: sym.getComposition().getStage().myfunc()


            hth,

            Joe

            1 person found this helpful