Jump to content
Search Community

Torben

Premium
  • Posts

    31
  • Joined

  • Last visited

Everything posted by Torben

  1. No I didn’t because it didn’t work 🙂 But of course I get your point and making it a private repo and a private package is fine which would also solve the problem so thank you.
  2. Thanks, but that's not the issue here. I have published an NPM package where I'm using bonus plugins. When I try to install that package with "npm install my-package" I get the errors mentioned in the first post.
  3. I just bought the Premium Club level because I want to publish an NPM package that uses the Draggable and Inertia plugins. I believe I'm allowed to do that right? I'm confused about how to add it to my project. If I add it with the npm install gsap@npm:@gsap/shockingly And add the .npmrc file with the token. After I publish it and try to install in a new project with "npm install my-package" I get an error saying "@gsap/shockingly@^3.12.5' is not in the npm registry." I guess that is because the .npmrc file is not published, which is a bad idea to do because that has my token in it. If I try to use the downloaded files I would have to publish the file to the repo and sine that is a public repo it would be available to eveyone to download, including the bonus stuff. How do I do this?
  4. Aha, for anyone finding this. Updating the transform on resize with gsap instead of native resolves it. gsap.set(nav, {x: getInPoint()});
  5. I have element which is draggable. On resize I change the transform and I change the draggable.vars with new snap points and call draggable.update() I thought that would update the snap values. But what happens is that it jumps when I start dragging after a resize. So here's a Codepen. Try and click toggle to open it. Then you can drag it back out. But if you resize the window after you've opened it, and then try an drag the element jumps to the old position. What am I doing wrong? https://codepen.io/tfl/pen/BabddVY?editors=1111
  6. Very nice Rodrigo - works beautifully Thank you to you too Jonathan.
  7. 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?
  8. 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); } });
  9. ...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?
  10. Ahh great - thanks Jack
  11. 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
  12. 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");
  13. 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--; }
  14. 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
  15. 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
  16. Thank you Chrysto - don't know what happened to my Codepen. And yes that is what I meant
  17. 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?
  18. 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]
  19. I honestly don't know why it didn't work but I somehow fixed it now - thanks anyway Jack
  20. I don't understand why nothing gets traced in my onChildComplete function. What am I doing wrong? urls = ["http://www.server.com/1.jpg", "http://www.server.com/2.jpg"]; var queue:LoaderMax = LoaderMax.parse(urls, {name:"mainQueue", onChildComplete:completeHandler}); queue.load(); function completeHandler(e:LoaderEvent) : void { var content:ContentDisplay = e.target.content; trace(content); }
  21. Fantastic support!.....thank you Carl for your perseverance and actually finding a solution. Good to know it wasn't me being stupid. And thank you Jack for fixing it so quickly. You're the best....and no explanation needed
  22. Thanks Carl, sorry for the late reply but forgot to subscribe to the thread.
  23. I have a Timeline with some steps. In the end I want it to go back to the first label and then continue through the other steps. But when I gotoAndStop("START") and then try to restart the timeline the next animation is wrong, Kinda hard to explain, but I have attached a zip that I think shows the "error" well.
×
×
  • Create New...