Jump to content
Search Community

robarnow

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by robarnow

  1. Sorry about that, here is a CodePen of the issue: http://codepen.io/robarnow/pen/ZYOGQE Let me know if you can assist, thanks!
  2. Hey all, so I had this animation close to working, but I'm running into a couple bugs. First off, you'll see the doors on the cages in the latest Firefox flip vertically on scaleX, whereas they do not flip vertically in Safari. They should only transform horizontally. You can see the live page here: http://incitementdesign.com/home2/ Thoughts? Also, I"m having trouble with IE adding lots of extra spacing on the sides of the SVG sprites, breaking those animations, so if anyone has any thoughts about that as well, let me know. Thanks, Rob
  3. Thanks so much, that fixes it. I read the docs on smoothChildTiming though, and I understand what it does with "reverse()" where it flips the child in place, but with smoothChildTiming set to false and attempting to reposition the child's playhead by using play() or seek() does anything happen at all, or does it simply ignore the command? Also, I'm assuming that with smoothChildTiming set to true, that the repositioning of the child does not affect the timing of any other elements on the timeline? So therefore the callback function, in this case called "loop", is not included in the total duration of the child animation, and the amount of time added by the repositioning of the playhead on the child needs to be calculated manually by the programmer in order to be accounted for in the main timeline?
  4. Basically, I have a loop here in this codepen that cycles through a spritesheet in order to animate it. That spritesheet is the flying bird you see. Once the spritesheet runs through fully once, I was attempting to use "seek" in order to loop it so that only the flapping wings loop, rather than the entire animation. The function "loop" is called upon at the end of this animation to do this. This worked properly before this timeline "bird_sprite" was nested inside of the timeline called "animation". Once it was nested, while the loop function is still called, it doesn't actually affect the "bird_sprite" animation in any noticeable way, so you'll see that the wings simply stop, mid-flight. I'm guessing this is some sort of scope issue, but I really don't know Any help would be appreciated, and try to talk in laymans terms -- I'm a designer with some coding chops so I'm not as well-versed as most on here. Thanks in advance. (I'm using array variables here, because the live site actually has multiple bird animations running simultaneously) function bird_sprite() { // this is just the white bird, so this is nested in the next timeline "animation" bird_takeoff_sprite[bird_number] = new TimelineMax({ repeat: 0, onComplete:loop }); for (var i = 0; i < spritecount; i++) { bird_takeoff_sprite[bird_number].set(image[bird_number], { left: "-" + (i*spritesize) + "%" }, i*duration); } <!--this loops the flapping wings but not the whole animation--> function loop() { bird_takeoff_sprite[bird_number].seek(.8); console.log('loop'); // this proves the loop function runs } return bird_takeoff_sprite[bird_number]; } // this is the full animation animation[bird_number] = new TimelineMax({ repeat: 0, paused: true }); bird_container = $(this); animation[bird_number] .add( bird_sprite()) // nesting the sprite animation of the bird .to(bird_container, 3, { left: "-300%", width: "+=180%", height: "+=200%", bottom: "+=10%", ease:Sine.easeIn}, .8); }); }; }(jQuery));
×
×
  • Create New...