Jump to content
GreenSock

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

Torben

Members
  • Posts

    26
  • Joined

  • Last visited

Torben's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Very nice Rodrigo - works beautifully Thank you to you too Jonathan.
  2. As you can se in the Codepen the centered text is shaking when the width of the parent element is animated. Any ideas on how to fix that?
  3. I know what you mean. I can't animate the actual change between the images - that's impossible. But that is not what I needed. The change between all the source images should happen over fx. 1 second so that it shows each image within that timeframe and ends on the last one. But I figured it out in the meantime - this is my code boiled down. <div class="storyNumber" no="0"><img src=""></div> function updateNumber() { var no = $storyNumber.attr('no'); var $img = $storyNumber.find('img'); $img.attr('src', 'http://localhost/images/number_' + numberArray[no] + '.png'); } var numberArray = [0, 127, 89, 80, 8, 200, 20, 87, 3]; var $storyNumber = $('.storyNumber'); TweenMax.to($storyNumber, 1.2, { ease:Power4.easeInOut, attr:{no:10}, roundProps:'attr', onUpdate: updateNumber, onComplete: function() { $storyNumber.attr('no', 0); } });
  4. ...and if so how? What I need to do is over time (and with an ease if possible) change the src of an img tag between 10 different images that I have in an array (either the path to them or the images created by js). I see there's a new attr plugin - is that what I need?
  5. Ahh great - thanks Jack
  6. I'm just starting using this library for real so I'm asking a lot of questions these days - thank you for answering. Look at this Codepen and try to play it till the end. Then try and hit the "progress 0.5" button which sets the progress on the timelime to 0.5 and then read out the progress by hitting "get progress". It reads out 0.66666. Why is that? If you hit "progress 0.5" again and read out the progress it now says 0.5 as I would expect. http://codepen.io/anon/pen/texlC
  7. Torben

    Timeline help

    So it was the pauses - thank you Carl. Guess I could also add a small number to the pauses?...like this: tween.addPause("+=0.00001");
  8. Torben

    Timeline help

    I have a timeline which I need to be able to reverse and redo when the browser is resized because some of the tween values are set to window height. The issue I have is after a resize where I do a seek. The next time I goNext() the animation doesn't play. Is it the pauses? What am I doing wrong or is there are smarter way? var tween, currentNo; function createTween() { tween = new TimelineMax({paused:true}); tween.addLabel('0'); tween.add( TweenMax.fromTo($images, 1, {y:0}, { y:(-1 * $(window).height() })); tween.addPause(); tween.addLabel('1'); tween.add( TweenMax.to($images.find('.image-blurred'), 1, { opacity:1 })); tween.addPause(); tween.addLabel('2'); tween.add( TweenMax.to($images, 1, { y:(-2 * $(window).height() })); tween.addLabel('3'); tween.seek((currentNo.toString())); } function onResize() { createTween(); } function goNext() { if (currentNo === 3) return; tween.play(); currentNo++; } function goPrev() { if (currentNo === 0) return; tween.reverse(); currentNo--; }
  9. There seems to be an agreement to this being a browser bug. If anyone else finds this a need a fix there is a work around here: http://stackoverflow.com/questions/24787618/hover-not-working-on-animated-div
  10. Look at this: http://codepen.io/anon/pen/tvKjq Why doesn't the box go back to 0? And while we'er at it - why does the box insist on going to 550px here: http://codepen.io/anon/pen/kygIj
  11. Thank you Chrysto - don't know what happened to my Codepen. And yes that is what I meant
  12. The red box in this example has a hover effect on the css. http://codepen.io/anon/pen/aHepz The thing is this only works if the mouse is moving on the red box; not when thw box itself moves under the mousepointer (leave the mouse in the path of the box). This is probably not a Tweenlite issue but a js question. How do I fix that?
  13. I'm trying to use the TransformAroundPoint on a Starling Sprite but it fails. I'm not sure what exactly TransformAroundPoint does internally, but I guess it uses some properties that are not there on a Starling Sprite ? The error is: TransformAroundPointPlugin/onInitTween()[D:\_Flash\_AS3\src\com\greensock\plugins\TransformAroundPointPlugin.as:71]
×