3 Replies Latest reply on Mar 19, 2015 7:34 AM by 100michaelmcleod100

    sym.getSymbol

    100michaelmcleod100 Level 1

      Hello all,

       

      I have been trying to understand the very basics of Flash, Actionscript, and other languages for about 10 years.

      (This means that my brain is not tuned into programming languages although I did a lot of basic in the 80s)

       

      I am proficient at Photoshop, Illustrator, After Effects (my fav), Blender, you name it; but when it comes to interactive programs with the simplest

      of languages, I hit a brick wall.

       

      So, getting finally to the point. I have arrived at Adobe Edge and feel that it will do everything that I am wanting.

      And of course, I have hit that wall again....a kindergarten wall, things like this.play(); and stop(); seeming to simply not do anything under any circumstances.

       

      I have made a little progress (still a mystery why those simple commands wouldn't work, but they seem fine now).

       

      So this is me, saying that I'm not giving up and could use help to stop getting in my own way, please and thank you.

       

      Today's dilemma:

      1. I made a little movie of a ball bouncing.

      2. I turned it into a symbol

      3. I looked up how to get that symbol and play it:

      var mySymbolObject = sym.getSymbol("ballfilm");

      mySymbolObject.play();

       

      4. I attached this action to the clicking of an oval on my stage for a button.

      5. I ran the simple idea in a web browser (safari) and TA-DA, nothing happened.

       

      My problems are so simple that no one seems to be covering them in most places, the answer must be so obvious. I feel that if I could just get a few tiny successes under my belt I would bloom into interactive media like a true 1st grader (I'm soooo tired of kindergarten).

       

      My questions:

      1. Does the symbol need to be on the time line to work, or just sitting in the library?

      2. If the symbol needs to be on the timeline, won't it just be visible the whole time?

       

      Any help appreciated, I'm determined not to give up and sense that this is really, really, really easy; but for me it has been a brick wall, read books, watched videos, nothing.

      So take pity and throw me that bone somebody, I'll make you proud!

      Thanks.

        • 1. Re: sym.getSymbol
          Franck Payen MVP & Adobe Community Professional

          Hi Michael.

          1. Yep, if it sits in the library, it's ok to "create" it (check the current Edge Animate JS API), but if it's not somewhere on stage it won't play anything.

          2. You've got "Activate/Deactivate" as the top of your button's property, that usually helps a lot

          • 2. Re: sym.getSymbol
            100michaelmcleod100 Level 1

            Thank you Frank,

            I was wondering, but since it didn't work whether on the timeline or not, I wasn't sure.

            So, must be on the timeline (I thought so from other programs MO)

            Now, it's on the timeline, and still nothing like before, but at least that piece of the puzzle is done.

             

            About the "Activate/Deactivate"...is that in the actions or the properties? (I looked throughout both, but there is nothing by those names).

             

            As I said....unsure kindergartner (I hate to ask these things, but I'd rather be incompetent asking for education rather than try to look competent and continue to be ignorant.)

            Thanks for the help.

            MD

            • 3. Re: sym.getSymbol
              100michaelmcleod100 Level 1

              Well, strangest thing, it's working this morning.

              I suppose these commands tend to work differently depending on the context and knowing context is everything.

              Just now I made a symbol of a ball and square just moving around.

              I put it on the timeline.

              I made a blue oval for a button and told it to sym.getSymbol("ballfilm").play();

              and it indeed did what it was supposed to do.

               

              I also figured out that the symbol needed a stop command otherwise it would just play with or without the button.

              Next I will figure out how to hide the animation until the button calls for it. I think I can handle that in the next 5 minutes.

               

              I'm one of those solo kinda learners and keep to myself so I appreciate everybody's patience as my journey unfolds here. I know this is basic stuff.

              Thanks again.

              MD