-
1. Re: Play an animation by dragging an element
mobly Jun 5, 2013 3:41 PM (in response to AmintaAdobe)I may not be much help, I looked at the file, but not sure what you want to do. do you want to play the main time line by starting the drag action of 'slider'- however that seems to duplicate the animation. Slider is animated on the stage left to right with the text fading in, but you also want to drag it left to right? I'm sure this is just a proof of concept, but just not sure what the concept is.
regards
Alistair
-
2. Re: Play an animation by dragging an element
AmintaAdobe Jun 5, 2013 3:58 PM (in response to mobly)Hi mobly!
It's the same concept of the parallax websites: there, when you scroll the bar up and down, the timeline goes forth an back; here, I would that when you drag to right the animation goes forth (so text fade in) and when you drag to left the animation goes back until it returns to 0 milliseconds.
Thanks or your attention!
Davide
-
3. Re: Play an animation by dragging an element
resdesign Jun 5, 2013 5:10 PM (in response to AmintaAdobe)Hey Davide,
Just curious- why not use paralax?
I will try to look at your file tonight.
I can send you a sample with paralax.js if you want.
-
4. Re: Play an animation by dragging an element
AmintaAdobe Jun 5, 2013 5:27 PM (in response to resdesign)Hi resdesign! Simply because I want that the element I drag be part of the animation, instead in parallax you scroll horizontal or vertical the viewport, not single elements.
Many thanks for your attention!
Davide
-
5. Re: Play an animation by dragging an element
resdesign Jun 5, 2013 6:23 PM (in response to AmintaAdobe)Hey Davide,
I made your animation slider a symbol and I have something working but I am not sure it is what you wanted. Please check.
-
6. Re: Play an animation by dragging an element
AmintaAdobe Jun 6, 2013 2:16 AM (in response to resdesign)Hi resdesign!
Thanks for your work! Actually, my goal is a little bit different. I would that the red box moves only in the boundaries of the parent (the dotted rectangle) and that - when you drag it to the right or to the left - the animation goes forth and back according to the dragging. It's like the parallax, only applied to a single element. It's because of that that I used, in the code, the formula:
/* pos = (X * animation duration in millisecond) / width of sliding (from 4 to 259 top left) */
var pos = (x *1000) / 255;
sym.stop(pos);
Still many thanks for your precious work!
Davide
-
7. Re: Play an animation by dragging an element
AmintaAdobe Jun 6, 2013 3:09 AM (in response to AmintaAdobe)Hi!
I've modified a little bit the code, now if you take a glance to http://www.terredainventare.it/slide/scrubber.html you'll see, in the second example, what I mean (tough it still doesn't work: the red box - when dragged to right - gets out of the parent (the dotted box) and the text fades in only out of the parent).
Project files here: http://www.terredainventare.it/slide/Scrubber.zip
Thanks for the help!
Davide
-
8. Re: Play an animation by dragging an element
AmintaAdobe Jun 10, 2013 5:02 AM (in response to AmintaAdobe)Hi res! I wonder if you had time to see my last file!
Many thanks,
Davide -
9. Re: Play an animation by dragging an element
resdesign Jun 10, 2013 9:51 AM (in response to AmintaAdobe)Yes I looked at it and I have not found a solution so far.
-
10. Re: Play an animation by dragging an element
resdesign Jun 12, 2013 7:11 AM (in response to resdesign)Davide,
I think the problem is the same as mentioned in this post:
http://forums.adobe.com/message/5401423#5401423
You need to delete the left and top in your symbol and parent. Let me know if that works.



