Jump to content
GreenSock

Search the Community

Showing results for tags 'Tween'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • GreenSock Forums
    • GSAP
    • Banner Animation
    • Jobs & Freelance
  • Flash / ActionScript Archive
    • GSAP (Flash)
    • Loading (Flash)
    • TransformManager (Flash)

Product Groups

  • Club GreenSock
  • TransformManager
  • Supercharge

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Personal Website


Twitter


CodePen


Company Website


Location


Interests

  1. Simple question with perhaps a complicated answer. Is it possible to animate multiple objects towards a central point in GSAP? Rather than adding positioning tweens to each individual object? For example I have a scene with objects around the canvas, I'd like them to slide onto the canvas towards the middle of the canvas.
  2. Hi! I have a HTML5 banner advertisement that I'd like to automatically replay the animation on a loop. Is this possible? I have attached the HTML5 banner advertisement source files. Please let me know how to accomplish this. Thank you for your help! 120x600_v2.zip
  3. Hi, i'm trying to get tweenmax bezier tween fit with a canvas quadraticCurve. The canvas QuadraticCurve is supposed to draw the trajectory of a tweening object. That curve datas are given by BezierPlugin.bezierThrough So far, start and end point seems to fit, but the canvas bezier curve middle point is higher than the tween bezier curve. Could please someone help me understand what i'm doing wrong?
  4. Making an animation, and the question appeared : I need to animate one tween while other tweens are animating. Sorry the code is too big, so will cut it: TimelineMain.to(the.Second_frame_bg_1, .75, {scale: 1.3, autoAlpha: 1, ease: Sine.EaseOutIn}, 'second_frame_step_1'); TimelineMain.to(the.Second_frame_bg_1, 4, {scale: 1.2, x: '-40px', ease: Sine.EaseOutIn}, 'move_right'); //I want this tween to be animated while next one tweens are animating TimelineMain.staggerFrom([Destination_city_1, Destination_price_1], 0.7, {scale: .3, opacity: 0, ease: Sine.EaseOutIn}, .15, 'second_frame_step_1'); TimelineMain.from(Destination_cta, 1, {y: '50%', opacity: 0, ease: Back.easeOut.config(1.7)}); TimelineMain.from('.destination_info', 1, {opacity: 0});
  5. Hi, I have placed a Youtube video in my banner which shows after a few animations. It is working fine. The issue is I have given the exit id which is over the whole banner, a z-index of (for example) 40; Because of this z-index, I am unable to click on the progress bar of the youtube video to skip sections of the video. If I take the Z-index off the exit, it works, but then when I go back when I click on the banner again, on the video, it just plays the video, doesn't take me to my exit url. I need the z-index on the exit for that is the exit for the ad. Is there a way around this?
  6. Hi, I have tried searching around for this issue but seems like no one ever encounter this. There is a visual glitch when I'm tweening z property of a jpeg loaded with ImageLoader. If I remove the z from the argument, the image will display fine. The glitch is like broken image (if you google 'visual glitch image', most of it display almost same as what I have now). What is more confusing is that the glitch only appear on Windows but not on Mac OS. If if test the movie in a Windows computer, it will display just fine, only when it is published as air application the glitch will show. I use Adobe Air for Desktop v23. Does anyone have clue about this?
  7. Hi, I have animations working on a loop of 2 and then on last loop the last animation should stay on. But this is not happening Basically, the last .from shows the duration and then fades, but I haven't added a .to for it to fade, so then it should stay, no? Can anyone help? Code: function initAnim() { console.log("INIT ANIM"); if (loop < 2) { tl.pause(0, true); } tl.play(); tl.set(truck, {rotation: 51, x: 118, y: 83}) .from(truck, 2, {x:-150, y:250}) .from(line1, 1.5, {autoAlpha:0}, "-=0.5") .to(line1, 0.5, {autoAlpha:0}) .from(line2, 2.15, {autoAlpha:0}) .to(line2, 0.85, {autoAlpha:0},"leave") .to(truck, 0.75, {autoAlpha: 0},"leave") .from([line3, line4, cta], 4, {autoAlpha:0, ease:Power4.easeOut}, "last") .call(loopCheck, ["param1"], this) } function loopCheck() { if (loop >= 2) { console.log("END"); tl.pause(); tl.invalidate(); } else { // tl.to([line3, cta, line4], .4, { autoAlpha: 0, onComplete: initAnim }) initAnim(); } loop++; }
  8. Hi, I have been trying to figure out why all my text is showing for like 1 second and then disappears and the animations start? I am using: tl.set(truck, {rotation: 51, x: 67, y: 110}) .from(truck, 1, {x:-150, y:250}) .from(line1, 0.5, {opacity:0}) .from(line2, 2.15, {opacity:0}) I do realise if this may sound like a really simple question. I have even put each copy text in individual divs and given them opacity 0, but still that doesn't work. I have set and image to slide into the banner (truck), then the copy should appear. But that is not the case. We have all the copy showing overlapping each other, then the truck sliding, then copy hides and starts the animation. Any suggestions?? Thank you
  9. lynette

    pause onclick

    Hi, Is there a way to add an pause onclick? Here is my code: var $container = $("#container"), $content = $("#content"), $bg = ("#bg"), $panel1 = ("#panel1"), $panel2 = ("#panel2"), $panel3 = ("#panel3"), $line1 = ("#line-1"), $line2 = ("#line-2"), $line3 = ("#line-3"), $line4 = ("#line-4"), $btn = ("#btn"), $exit = ("#exit"), tl; var tl = new TimelineMax({repeat:2}) tl.from($line1, 1, {opacity:0},"+=2.25") .to($line1, 0.5, {opacity:0}) .from($line2, 2, {opacity:0}) .to($line2, 0.85, {opacity:0}) .from($line3, 2, {opacity:0}, "go") .from($line4, 2, {opacity:0}, "go") .from($btn, 2, {opacity:0}, "go")
  10. Such as dealing of cards. You are doing a similar animation but each element ends up in a slightly different position. I know I can animate them one by one and delay each one slightly like in the example code below but is there a shorter and more effective/elegant way of doing this? Thanks in advance! .to('.element1', 1, { x: "+=30", ease: Power3.easeInOut }, "frame1+=1") .to('.element2', 1, { x: "+=60", ease: Power3.easeInOut }, "frame1+=1.15") .to('.element3', 1, { x: "+=90", ease: Power3.easeInOut }, "frame1+=1.25")
  11. Is it possible to target a specific tween in a timeline and not have it go in reverse when the timeline's progress is going from 1 to 0? function createTimeline(progress, ...elems) { let tl = new TimelineMax({ paused: true }); tl.add('beginning') .fromTo(elems[0], 1, { x: '-100%' }, { x: '0%', ease: Power0.easeNone }) .fromTo(elems[1], 1, { y: '100%' }, { y: '0%', ease: Power0.easeNone }, 'beginning') .add('middle') .fromTo(elems[0], 1, { x: '0%' }, { x: '100%', ease: Power0.easeNone, immediateRender: false }) .fromTo(elems[1], 1, { y: '0%' }, { y: '-100%', ease: Power0.easeNone, immediateRender: false }, 'middle') .add('end') .progress(progress); return tl; } I am using a dragging/swiping callback to control the progress of my timelines, but I'd like to, regardless of the direction of the progress, have the tweens associated with elems[1] to always go from y:'100%' -> y:'0%' -> y:'-100%'. Right now, if the progress is going from 1 to 0, the tweens associated with elems[1] go from y:'-100%' -> y:'0%' -> y:'100%', which makes sense, but it's not what I'm looking for. I can make a CodePen if that would help. Thank you! EDIT Heres a CodePen: http://codepen.io/TrevorRice/pen/YGbyvv/?editors=1010
  12. Hello, It's my first time posting here, so apology if it's not done correctly. I have a problem. I have a game where I interpolate, via TweenLite, the position of a sprite. I interpolate the position of its box2D body to be precise. Even though the tweening in itself works fine, once I kill the tween, it puts back my object at its initial position and I can't figure out why. I am sure it's something stupid, like a param to pass, but can't find it in the doc. Maybe there are issues when tweening with box2D ? Thanks for your help. Code: var fromX = ((BALL_SIZE * BALL_SCALE) / SCALE) var toX = ((STAGE_WIDTH - (BALL_SIZE * BALL_SCALE)) / SCALE) g_tween = TweenLite.fromTo(g_ball.sprite.body.GetPosition(), 3.0, {x:fromX}, {x:toX, ease:Linear.easeNone, onComplete:onTweenComplete, onReverseComplete:onReverseComplete}); function onTweenComplete() { g_tween.reverse() } function onReverseComplete() { g_tween.play() } // *********** // Callback when user click on the screen // The game release the ball if it hasn't been released yet // *********** function onMouseDown(event) { //var newBall = new Ball() //g_sprites.push(newBall) var x = g_ball.sprite.body.GetPosition().x console.log("x: " + x) g_tween.kill() g_ball.sprite.body.GetPosition().x = x console.log("g_ball.sprite.body.GetPosition().x: " + g_ball.sprite.body.GetPosition().x) g_world.SetGravity(new box2d.b2Vec2(0, 30)) }
  13. Hi I would like to tween a <div> with a 25px border so that it shrinks in from the right. I know when animating I should really use the scaleX property, but this shrinks the vertical borders of the div. The obvious work around in terms of keeping the border thickness uniform is to use the width property, but I can't set a transformOrigin on the width property, so I've used a hack and basically increased the right: px; value to counter this. Here is the codepen to illustrate this: http://codepen.io/pauljohnknight/pen/qagBWY Is there a more efficient solution to this i.e. how to reduce a div in size on its x-axis so it reduces in from the righthand side, without affecting the border thickness? My main concern with doing it this way is the janking / flickering in the animation when integrated into the site it will be on. P.S the pen is linked to a scrollMagic scene, so you will need to scroll to see the effect. Thanks in advance for any help / ideas Paul
  14. Hi all I'm encountering some jittery animation on chrome while animating the scale of a div using TweenMax (as well as other tween engines). In the codepen, the div with the image is encapsulated inside other divs in order to reproduce the conditions of the project I'm working on. I also put a css animation counterpart that doesn't have that jittery effect. I'm wondering why it is only happening with js tweening engines... I'm only seeing it on chrome (win & mac), it works nice on ff and safari (haven't tried edge yet). Except on ff mac, I get the jittery effect when i'm hovering the div. Do you also have that problem ? Is there a workaround ? I tried the "z" attribute and also put a translate3d on the parent. Thanks. Thomas.
  15. I am wondering if Greensock is able to tween an API from a different library? I am using Framer.js with my mobile work but using the GSAP animation library. In Framer you can tween the x value (relative), or the screenFrame x value (absolute value). I have attached an image for the API. https://framerjs.com/docs/#layer.layer (under screenFrame) The screenFrame API: element.screenFrame = { x: 400 }; Instead of tweening the x value which is relative, I am trying to tween the screen frame absolute value. TweenMax.to(element, 1, {x: 0}); TweenMax.to(element, 1, {screenFrame:{x: 0}}); <-- It is not working? It is because my JS/GSAP syntax isn't correct?
  16. Hi, I'm having an issue using TimelineMax with a loop repeat. The animation works fine but sometimes there's some sort of "flashing" in the animation. It looks like the div inside is repositioned for a millisecond in the wrong place. I cannot understand why this happens and why it happens randomly. I linked a Codepen working example. Any ideas? Thanks!
  17. Saw this website http://www.invstr.com that uses Greensock. I was wondering how the background ticks(grey rectangles) were in a animated loop that when they past the viewport they automatically started at the top again... could that be achieved somehow with modifiers plugin like the carousel wrap example? Thanks
  18. Hi there, What I want to do is have a tween that moves 250px right, has a Power3.easeIn and a Back.easeOut. I can animate the Power3.easeIn fine but how to do get the Back.easeOut. at the end of this movement?? Power3.easeIn line of code: TweenMax.to( $( '.mybox' ), 2, { right: 250, ease:Power3.easeIn}, 2); Im sure its not too hard but I cant seem to work it out. Thanks in advance.
  19. Let's say we have a tween animation already added to a TimelineMax instance. The Timeline is looping (infinite repeat) but while watching it loop I want the user to have the option to check out some other ease options. Is there a way to dynamically add/replace the ease values to an existing, running tween? Or would I need to completely replace what's there?
  20. Hi, Having a standard bootstrap progress bar — is it possible to actually tween it's value. i see over complicated things online, but not a simple progress bar without alternations. Hence the question. <div class="progress"> <div class="progress-bar active" role="progressbar" aria-valuenow="0" aria-valuemin="90" aria-valuemax="100" style="width: 90%"> <span class="sr-only">90% </span> </div> </div> So how would I simply animate it's value? Any tip is greatly appreciated. My apologies if this is already covered, however I couldn't find the answer for this simple example. Thank you for your help.
  21. valiz22

    Rotating Words

    Hello, I am trying to reproduce the banner section from this website: https://www.triprebel.com/. In the codepen file (http://codepen.io/valiz22/pen/rerwxL) I have what I succeeded so far. Could anybody help me? Thank you!
  22. I have some tex that needs to disappear from right to left (it is getting wiped away by a windscreen wiper) Currently I have it so it fades out but I need it to disappear differently. Here is my current code this.timeline.from(".section1", speed, {opacity: 0}, "-=" + (speed / 2)); this.timeline.to(".section1", speed, {opacity: 0, delay: 2}); How would i do this?
  23. Hi, We created a small game, where we tween a very long image (18000px) on the canvas. It has good performance on Chrome with a strong pc. But the tween is vey laggy on standard laptop or Firefox / IE. And I think this is relevant snippet: function init() { canvas = document.getElementById("bg").getContext("2d"); img = new Image(); img.xpos = 0; img.ypos = 0; img.src = "img/bg.jpg"; img.onload = function() { animate(); } $('#trigger').click(function() { TweenMax.to(img, 60, {xpos:-17807, ypos:0, force3D:true, ease:Linear.easeNone}); TweenMax.to($('#egg_container'), 60, {x:-17807, force3D:true, ease:Linear.easeNone}); TweenLite.ticker.addEventListener("tick", animate); }); } function animate() { canvas.drawImage(img, img.xpos, img.ypos); } init() We do something wrong? How can be the tween animation smooth on everywhere. We have BusinessGreen plan, please help! Best regards, Ferenc Krix
  24. I've been meaning to learn GreenSock for some time and have been trying to justify the cost of onsite trainer to management for some time since we are getting asked to do more and more banner work. But as a complete newbie to TweenLite, I am wondering if it would be a good solution to a problem we have right now. I am drawing an arc on a canvas and am trying to tween just the endAngle var. Since this isn't an attribute of the canvas itself, but a var within it, I'm not sure if TweenLite is what I am looking for. I've linked to a very quickly thrown together example. Any help would be much appreciated.
  25. How do I kill tweens past a certain point in time? So, I have a timeline with a bunch of tweens all starting at random times. I want to remove tweens of certain elements that either start past a certain point in time, say, 5 seconds, or tween beyond that point in time. I know about killTweensOf(), but now how do I killTweensPastTime()? I searched google and these forums but couldn't find anything. Thanks, John
×