7 Replies Latest reply on Mar 26, 2014 2:51 PM by resdesign

    Showing and hiding symbols

    GraphicsGeezer Level 1

      I just want to do someting very simple. I have nine symbols all lined up on top of each other on my stage. I set Display to Off in the first frame, and then added actions at every label telling the main timeline to stop and then to set the corresponding symbol to show and setting the other variables to hide.

       

      Each timeline action looks like this: (using only 4 symbols as an example)

      sym.stop();

      sym.getSymbol("symbol1").getSymbolElement().hide();

      sym.getSymbol("symbol2").getSymbolElement().hide();

      sym.getSymbol("symbol3").getSymbolElement().hide();

      sym.getSymbol("symbol4").getSymbolElement().hide();

      sym.getSymbol("symbol3").getSymbolElement().show();

       

      Is this a reasonable way of doing things? I'm allergic to code so if the solution is more complicated than this, I'll just use Powerpoint which does everything Animate can do,

       

      Help apprecited

        • 1. Re: Showing and hiding symbols
          resdesign Adobe Community Professional & MVP

          You need to use this instead:

           

           

          sym.getSymbol("symbol1").$('symbolname').hide();

          sym.getSymbol("symbol2").$('symbolname').hide();

          sym.getSymbol("symbol3").$('symbolname').hide();

          sym.getSymbol("symbol4").$('symbolname').hide();

          sym.getSymbol("symbol3").$('symbolname').show();

          1 person found this helpful
          • 2. Re: Showing and hiding symbols
            GraphicsGeezer Level 1

            Thanks for your help but that doesn't work.

             

            I am alternately impressed and annoyed with this program. Seems to work great but the action script part is ridiculously overcomplicated. Surely there must be a simpler way of doing this?

             

            Here is the code from one action on one label:

             

            sym.stop();

            // Change the text of an element

            sym.$("Toptext").html("Poor vision causes falls");

            sym.getSymbol("PeventVisionFalls").$('symbolname').hide();

            sym.getSymbol("additionalSteps").$('symbolname').hide();

            sym.getSymbol("ageingeye").$('symbolname').show();

            sym.getSymbol("AmslerGrid").$('symbolname').hide();

            sym.getSymbol("cataracts").$('symbolname').hide();

            sym.getSymbol("colorPerception").$('symbolname').hide();

            sym.getSymbol("diabeticRetinopathy").$('symbolname').hide();

            sym.getSymbol("glaucoma").$('symbolname').hide();

            sym.getSymbol("macular").$('symbolname').hide();

            sym.getSymbol("MorePreventSteps").$('symbolname').hide();

            sym.getSymbol("prevention").$('symbolname').hide();

            sym.getSymbol("second2").$('symbolname').hide();

            sym.getSymbol("groupofpeople2").$('symbolname').hide();

            • 3. Re: Showing and hiding symbols
              resdesign Adobe Community Professional & MVP

              You need to change symbolname with the actual names of your symbols inside your symbols.

              • 4. Re: Showing and hiding symbols
                resdesign Adobe Community Professional & MVP

                i work a lot with arrays since it makes things a lot easier to deal with and you also can run for loops to show and hide elements.

                • 5. Re: Showing and hiding symbols
                  resdesign Adobe Community Professional & MVP

                  could you tell me exactly what you have?

                  symbol names

                  nested symbol names in what symbol

                  etc...

                  • 6. Re: Showing and hiding symbols
                    GraphicsGeezer Level 1

                    Really appreciate the time you're taking with this.

                     

                    You can see the file, for what it's worth, here: http://www.wordpix.ca/vision4/vision4.html

                     

                    What I'm trying to do is create a series of animated slides, based on a Powerpoint slide show. The slides are Edge Animate symbols but at this point there's only animation in one or two of them. The rest are just text placeholders.

                     

                    I thought my first method of moving from one slide to the next by placing symbols in the timeline was overcomplicated because each symbol had its own timeline and I had to place them exactly to make sure there were no sections overlapping, etc.

                     

                    So I thought if I defined labels and placed htem a tenth of a second or so apart, you could move between one and the next, and in reverse, by just usig a couple of arrows, one with a 'play' command, the other with a play in reverse command. I could adopt the code you showed me a month or two ago, but I hate having to work with code.

                     

                    That works but of course each label needs an action command to make each symbol visible. I imported all the symbols and turned their displays off, then at each label, created an action script that turned off all the symbols and turned only one on. That doesn't work.

                     

                    There is no other code and no other symbols

                     

                    <Rant>Seems to me Edge is a great replacement for Flash if you have the patience of Job and a computer science degree. I'm just a designer trying to get a job done.  I've spent the better part of two days watching videos and trying to find solution in Adobe's useless manual. I just can't afford to waste time like this. </Rant>

                     

                    edgeanim.jpg

                    • 7. Re: Showing and hiding symbols
                      resdesign Adobe Community Professional & MVP

                      Well everyone does things differently but I like it simple.

                      I would make a symbol with all my symbols turned on and off like for an animation and I would add labels and stops.

                      I would make an array with the names of the symbols contained in the container symbol as well as the labels.

                      Then I would write something like this:

                      // symbol names

                      var mySymbols = ['symname1','symname2','symname3'];

                      // stops in the symbol container

                      var stops = ['slide1','slide2','slide3','slide4','slide5','slide6'];

                      // slideContainer contains the symbols and the labels

                      i=-1;

                      sym.$('nextBtn').click(function(){

                                i++;

                                sym.$('prevBtn').show();

                                sym.getSymbol('slideContainer').stop(stops[i]);

                                sym.getSymbol('slideContainer').getSymbol(mySymbols[i]).play();

                                if (i>=stops.length-1){

                                i=stops.length-1;

                                sym.$('nextBtn').hide();

                                }

                       

                       

                      });

                       

                       

                      sym.$('prevBtn').click(function(){

                                i--;

                                sym.getSymbol('slideContainer').stop(stops[i]);

                                sym.getSymbol('slideContainer').getSymbol(mySymbols[i]).play();

                                sym.$('nextBtn').show();

                                if (i<=0){

                                i=0;

                                sym.$('prevBtn').hide();

                       

                       

                                }

                      });

                      1 person found this helpful