Share Posted March 28, 2013 I'm aware that TweenAlign.START requires a plugin etc.. but i've only seen material resolving the issue for (AS*). Where can I find the plugin to allow TimelineMax.insertMultiple to accept TweenAlign.START as an argument? Link to comment Share on other sites More sharing options...
Share Posted March 28, 2013 In actionscript, TweenAlign is just there to provide a shortcut to access some constants that return the alignment strings. In javascript, there are no constants (well at least if you are supporting IE), plus the entire 'program' of GSAP needs to be instantiated on every page load, plus the total byte count of the .js files matters when it's being transferred over the internet, so TweenAlign was left out as it's not super important and would just add extra overhead when there aren't that many options anyway (please correct me if I misunderstood this Jack). You can just replace TweenAlign.TYPE with the returned string values: "sequence", "start", and "normal" (the default). If you absolutely need to have TweenAlign, just paste the following somewhere in your page before you use TweenAlign the first time, and TweenAlign should work as you expect: window.TweenAlign = { NORMAL: "normal", SEQUENCE: "sequence", START: "start" }; For your reference: the code for actionscript TweenAlign: public class TweenAlign { public static const NORMAL:String = "normal"; public static const SEQUENCE:String = "sequence"; public static const START:String = "start"; }. 1 Link to comment Share on other sites More sharing options...
Share Posted March 28, 2013 In addition to what Jamie said, in V12 insertMultiple has been replaced with add() To add multiple tweens: add 3 tweens at a time of 0, with start times staggered by 0.5 seconds tl.add([tween1, tween2, tween3], 0, "stagger", 0.5); Check out the docs to learn more about the position property which allows you to add your tweens at an absolute position (similar to insert/insertMultiple) or at a relative position (similar to append/appendMultiple) http://api.greensock.com/js/com/greensock/TimelineLite.html#add() 2 Link to comment Share on other sites More sharing options...
Author Share Posted March 28, 2013 Thanks "carl schooff" & "jamiejefferson", Problem Solved. Link to comment Share on other sites More sharing options...
Author Share Posted March 28, 2013 In addition to what Jamie said, in V12 insertMultiple has been replaced with add() To add multiple tweens: add 3 tweens at a time of 0, with start times staggered by 0.5 seconds tl.add([tween1, tween2, tween3], 0, "stagger", 0.5); Check out the docs to learn more about the position property which allows you to add your tweens at an absolute position (similar to insert/insertMultiple) or at a relative position (similar to append/appendMultiple) http://api.greensock.com/js/com/greensock/TimelineLite.html#add() In actionscript, TweenAlign is just there to provide a shortcut to access some constants that return the alignment strings. In javascript, there are no constants (well at least if you are supporting IE), plus the entire 'program' of GSAP needs to be instantiated on every page load, plus the total byte count of the .js files matters when it's being transferred over the internet, so TweenAlign was left out as it's not super important and would just add extra overhead when there aren't that many options anyway (please correct me if I misunderstood this Jack). You can just replace TweenAlign.TYPE with the returned string values: "sequence", "start", and "normal" (the default). If you absolutely need to have TweenAlign, just paste the following somewhere in your page before you use TweenAlign the first time, and TweenAlign should work as you expect: window.TweenAlign = { NORMAL: "normal", SEQUENCE: "sequence", START: "start" }; For your reference: the code for actionscript TweenAlign: public class TweenAlign { public static const NORMAL:String = "normal"; public static const SEQUENCE:String = "sequence"; public static const START:String = "start"; }. You guys are Amazing, I really appreciate the help and love the thought of having TweenMax revolutionize the Web. Any chance of an IRC channel available or being setup so the community can bounce idea's / problems and solutions around a bit more freely? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now