5 Replies Latest reply on Nov 25, 2015 9:00 PM by jhtmk

    Click for a nested symbol is not working.

    awhitesong Level 1

      I have a design of a smartphone. In that, to represent the screen containing apps, i have created a parent symbol "Slider" which contains all these apps(images) as nested symbols. Now when this slider symbol is clicked/swipeleft, the slider swipes left and shows the next menu of apps, just like a smartphone. But now i want to open these apps by double-clicking, as these app images are nested inside a slider, the slider again swipes and i'm unable to double-click the nested apps. I've tried many posts here on nested symbol clicking, but none of them seem to work. 

       

      If app's symbol is "settings" (which is nested inside "Slider") and i create an action over it for double-click/mouseover to open a different "Screen", the code i used for the action of "settings" is:

       

      // insert code to be run when the mouse hovers over the object

       

      // Show an element

      sym.getComposition().getStage().$("Screen").show();

       

      But this doesn't work and its parent symbol "Slider" 's action executes everytime. How should i resolve this? Thanks.

        • 1. Re: Click for a nested symbol is not working.
          jhtmk Level 3

          Hi

           

          it's hard to visualise without having the project files in front of me but have you tried placing the action for the nested symbol onto the parent symbol instead?

           

          i.e on double click/mouseover (on parent symbol) > get the nested symbol > do something

           

          I don't know how your composition is set up but you could place a transparent rectangle over the nested symbols (app images) and apply an action to that??

          • 2. Re: Click for a nested symbol is not working.
            awhitesong Level 1

            Hi

             

            The parent symbol is the main screen which already has an action of swipeleft on click. So i cannot put the app's action on the main screen, as that will then be common for the whole screen. For just the app's region, i tried using the transparent rectangle approach earlier but then the actions for the parent symbol (screen) are overlapped. This seems to work fine but then i've to copy the actions of the parent symbol also, to each of these rectangular regions. Isn't there a workaround for this?

            • 3. Re: Click for a nested symbol is not working.
              jhtmk Level 3

              It's really hard to say without seeing, that could possibly be the only way depending on how your composition has been constructed (may be easier to just do this instead of starting again) It sounds like what you would have wanted to do was place the "apps" on top of a background layer with a seperate swipe function, but it sounds like it's not an actual swipe but just emulating a swipe on a click event? you could have maybe done a click and drag event to emulate a swipe, which may not have interfered the rest of your events but I couldn't say for sure the same thing wouldn't have happened.

               

              As for copy and pasting the actions you could use the full code window instead of going into the individual actions for each one? Not sure if it's faster or not.

               

              Hope that helps.

              • 4. Re: Click for a nested symbol is not working.
                awhitesong Level 1

                ya,  I tried using swipeleft action but it doesn't seem to work(through mouse), so using click instead. Not sure about click and drag event. Anyway, although couldn't figure nested clicks yet but for now full code window seems to help a bit with the rectangles. Thanks for the help!

                1 person found this helpful
                • 5. Re: Click for a nested symbol is not working.
                  jhtmk Level 3

                  I've used hammer.js before as a swipe function to play the main timeline which also worked if you used the mouse to click and drag left or right (play / play reverse)

                   

                  Enabling Gestures in Edge Animate Compositions | ANDREW TRICE

                  1 person found this helpful