-
1. Re: Controlling animated elements in a custom mask?
elainefinnell Jan 22, 2014 10:44 AM (in response to rossfranks)Hey, pancreasboy12-
No answer on the custom mask, given that non-canvas HTML only has rectangular clipping.
As for your second question, though, you can use keydown and keyup to do what you want to do. If you click on the Stage actions, you'll find the keydown and keyup events. If you need up and down to do different things, you'll need to check for the proper keycodes and then can call sym.play() or sym.playReverse(). And finally, you can test for keyUp and call sym.stop().
Hope this gets you going in the right direction!
-Elaine
-
2. Re: Controlling animated elements in a custom mask?
rossfranks Jan 22, 2014 2:58 PM (in response to elainefinnell)Hmm ok that's a little disappointing in regards to the custom shape issue (hopefully that will be addressed in the future), maybe I could just use a copy of the image around the circle and cut a transparent hole and place it over this graphic to pretend to be a mask.
And thanks for the keyup and down idea, although this will be running on mobile devices too so I might just use clicks and touches with your idea.
Thanks.
-
3. Re: Controlling animated elements in a custom mask?
rossfranks Jan 22, 2014 8:05 PM (in response to rossfranks)Hmm hit a snag.
Ok seems if I got too deep into some symbols the movement in the yAxis clicking doesn't work anymore.
See my files here...
http://twistedpancreas.com/edge/misc/yAxis.zip
The files in "yAxis" work because they only go 1 level deep into a symbol, but in "yAxisChem" if I go a 2nd level into the symbol then the code doesn't work anymore, is there a reason for that? The reason I'm doing it is to get around also moving the clipping.
Thanks in advance.
-
4. Re: Controlling animated elements in a custom mask?
elainefinnell Jan 23, 2014 11:40 AM (in response to rossfranks)Hi, pancreasboy-
- I moved your trigger from where it was to 0:00 seconds, because the event isn't bound until close to a minute on the main timeline.
- You have a JavaScript error which is preventing execution of your code. Specifically, you need a getSymbol call before "numbers" instead of $, because $('numbers').$('labMarks') means nothing to jQuery.
- You probably want to use -= instead of += for top, because your numbers are moving out of range.
Hope that helps!
-Elaine
-
5. Re: Controlling animated elements in a custom mask?
rossfranks Jan 23, 2014 3:36 PM (in response to elainefinnell)Ah yes, slaps my face, thanks for that
One other small thing, I've changed the click to a "mousedown" so that the numbers animate whilst the student holds the button down, but how do I make the numbers continue to animate downwards until "mouseup"?
And also (probably not a small thing) can the code check how far the numbers have moved in the y-axis so that eventually I can have a button that checks to see if the students have moved the numbers to a defined distance in the y-axis (within a range)?
Thanks in advance.
-
6. Re: Controlling animated elements in a custom mask?
rossfranks Jan 27, 2014 8:33 PM (in response to rossfranks)Too hard?
-
7. Re: Controlling animated elements in a custom mask?
rossfranks Jan 29, 2014 2:46 PM (in response to rossfranks)Hmm maybe I'm not getting a response here because the post has been marked as "Correct". I'll make a new post.





