1 Reply Latest reply on Jan 11, 2013 1:06 AM by jbowden

    Problem about bindElementAction

    AkariKamigishi

      I have such code in compositionReady:

       

      var mySym = sym.createChildSymbol("mySym", sym.$("Stage"));

      Symbol.bindElementAction(compId, sym.lookupSelector(mySym), elementSeletor, "mousedown", function(sym, e) {

           alert("down");

      });

       

      I'm not sure what to fill in for elementSelector, I tried "${_mySym}" and it doesnt work.

       

      Thanks for help.

        • 1. Re: Problem about bindElementAction
          jbowden Adobe Employee

          Hi there,

           

          You are close!

           

          elementSelector should reference what you get when you getSymbolElement on the child symbol you created.

           

          Try this:

           

          var myChild = sym.createChildSymbol("mySym", sym.$("Stage"));

          var mySym = myChild.getSymbolElement();

          Symbol.bindElementAction(compId, symbolName, mySym, "mousedown", function(sym, e) {

               alert("down");

          });

           

          Hope this helps,

          Joe