1 person found this helpful
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!
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.
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...
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.
- 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 probably want to use -= instead of += for top, because your numbers are moving out of range.
Hope that helps!
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.
Hmm maybe I'm not getting a response here because the post has been marked as "Correct". I'll make a new post.