Search In
• More options...
Find results that contain...
Find results in...

GusAugust had the most liked content!

# GusAugust

Members

9

• #### Days Won

1

GusAugust had the most liked content!

• Gender
Not Telling

2

1. ## How to obtain elapsed time?

TweenMax.to(tlA, 5, { timeScale:20 } ); tlA.add(TweenMax.to(rect, 5, { x:400, repeat:2, onComplete:timelineB } )); function timelineB():void { tlB.to(rect, 5, { y:200 } ); }
2. ## How to obtain elapsed time?

Timeline tlA translates a rectangle horizontally three times, with constant acceleration across all three. When tlA completes, tlB is supposed to translate the rectangle once vertically. The sequence works properly only if I provide a position value for tlB. The value 2.5 was determined by trial and error. The issue remains if they are made children of a parent timeline. The repeat value will be a variable provided by the user. This means that the position value for tlB will vary and needs to be determined in code. How can the position value be determined elegantly? Thank you, Gus var rect:Sprite = new Sprite; rect.graphics.beginFill(0xFF0000); rect.graphics.drawRect(50, 75, 50, 50); // x, y, width, height rect.graphics.endFill(); addChild(rect); var tlA:TimelineMax = new TimelineMax(); var tlB:TimelineMax = new TimelineMax(); TweenMax.to(tlA, 5, { timeScale:20 } ); tlA.repeat(2); tlA.to(rect, 5, { x:400 } ); tlB.to(rect, 5, { y:200}, 2.5 ); // 2.5 is trial and error value
3. ## v11 - v12 differences page not available

This link is shown in several places in the forum: http://www.greensock.com/v12/ The page that appears is: http://greensock.com/gsap-as The v11 - v12 information would be helpful to supplement the docs and old code. Gus
4. ## recent method of timeline won't compile

Thank you Carl. It's good to know what your priorities are - and that you'll continue to support the AS3 environment. Gus
5. ## recent method of timeline won't compile

This code is copied from this page on your website: http://greensock.com/docs/#/HTML5/GSAP/TimelineMax/recent/ (Semicolons at the end of lines 3 and 4 were removed.) The page is HTML5 documentation but I'm using AS3. tl = new TimelineLite(); tl.to(e1, 999, {x:100, repeat:5}) //very long tween .to(e2, 1, {y:200}, 0.5) //insert this tween at 0.5 seconds (toward the beginning of the timeline) .to(e3, 1, {scaleX:2}, tl.recent().endTime() + 3) //inserts the new tween 3 seconds after the e2 tween which was added most recently. The compiler reports this error, pointing to tl.recent() in the last line: Call to a possibly undefined method recent through a reference with static type com.greensock:TimelineLite TimelineLite, TweenLite, and core.Animation classes are all imported. GreenSock is current version. FlashDevelop is the development environment. I don't understand.
6. ## Yoyo in a tween in a timeline

It's a pleasure to use your engine and work with you. Thank you Jack.
7. ## Yoyo in a tween in a timeline

This works properly - a stand-alone tween: TweenMax.to(rect, 2, {x:200, repeat:1, yoyo:true}); This does not - the same tween in a timeline - the initial translation works, but no repeat: tl = new TimeLineMax(); tl.to(rect, 2, {x:200, repeat:1, yoyo:true}) I know that the timeline can be set to repeat and yoyo, but I just want a single tween in the timeline to repeat and yoyo. Thanks, Gus
8. ## x and y values not reported correctly after tween

Thank you professor - I'm still learning animation and appreciate your guidance.
9. ## x and y values not reported correctly after tween

Why does the rendering work properly but the values after the tween are not correct? var rect:Sprite = new Sprite; rect.graphics.beginFill(0xFF0000); rect.graphics.drawRect(0, 0, 20,20); // x, y, width, height rect.graphics.endFill(); addChild(rect); trace(rect.x, rect.y); // 0 0 correct rect.x = rect.y = 100; trace(rect.x, rect.y); // 100 100 correct TweenMax.to(rect, 1, { x:200, y:200 } ); // renders properly on stage trace(rect.x, rect.y); // 100 100 NOT CORRECT should be 200 200
×