Jump to content

G. Scott

  • Posts

  • Joined

  • Last visited


5 Newbie

About G. Scott

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

3,100 profile views
  1. Sheesh! I thought you guys forgot about me! Guess I forgot to follow the topic... my bad:-) I was up against it so I worked through an alternate solution. But will look at the example you provided and see if it shines any light. THANKS!
  2. Having a hard time using the ThrowProps Plugin, specifically accessing the overshootTolerance, minDuration and maxDuration. (Also having a hard time accessing the ThrowProps help page on your site... Spinner keeps spinning but text doesn't expand. Anyway, after hours with this and reading other forum questions, the only way I can seem to access any of these settings is to reference the ThrowPropsPlugin like this before I call my ThrowPropsPlugin.to function: ThrowPropsPlugin[0].overshootTolerance = .2; ThrowPropsPlugin.to($div, {throwProps:{x:{end:900, velocity:"auto"}}, onComplete:function(){ alert("Completed!"); }}); Is this the best way? Its the only way I can seem to make it work. But secondly, when I DO set the overshootTolerance, the onComplete function never fires! Works perfectly as long as I don't set the overshootTolerance, however I need to control the end position and how much it is overshooting the bounds. Also tried snapping, however the way the div snaps back to the original position if you don't flick it hard enough is undesirable. I know you guys like Codepen, but I'm in a bit of a time crunch right now. Hoping I can get a little guidance. THANKS!
  3. Thanks for the reply! Yes, thats what I suspected. I'll continue checking since I think thats really the correct way to go... even though it doesn't break anything if I don't. As always, GSAP rocks! THANKS!
  4. Hi! In the example below, I'm wondering if its ok if you try to tween myElement if the selector found no elements to match? var myElement = $(div).find('.foundit'); Typically I check to be sure the element exists with something like... if(myElement.length > 0){... before I would tween it. But in a project I am currently working on, I realized that I forgot to do this, yet no errors are being thrown when the element is empty. So maybe I have been adding the conditional statement unnecessarily? Thanks for your thoughts!
  5. OK, thinking there may be a better way to do this. Have an image moving across the screen left to right and being controlled with cursor position relative to containing div. The further right, the faster the image moves left. The further left, the faster the image moves right. All of this as an endless loop. While working on the left to right movement/speed etc, I discovered that plugging in negative values to the timeScale of the tween resulted in it moving in the opposite direction! EXCELLENT! Saved me some math:-) Anyway, the only caveat is that it will not loop past the beginning point. So if we allow the movement to loop left to right 5 times and then reverse direction, it will only loop back the other way 5 times and then stop at the original starting point. Basically can't move right to left until we've moved left to right (makes sense but bummed me out). So for the halibut, I set the seek to a huge number (28800 = 8 hours) when I initialize the tween and POW! I was in business. Unless someone were to mouse over the right side for 8 hours, it will never stop... this is exactly what I was going for. But I was just wondering if there was any drawback to this or a better way. As it is, I've accomplished everything with just a few lines of code. Any advice? THANKS!
  6. OK, I figured it out. The cursor needs to be an absolute URL for some reason. This works: cursor:"url(http://path/to/images/cursor.png), default"
  7. Is there any way to use a url value for the cursor property? Trying to use a custom image for the cursor and this doesn't work: cursor: "url(images/image.png) auto" I am able to achieve in the HTML by adding as a style to the div. But Draggable overwrites the style. Maybe there's a way to stop that from happening? THANKS!
  8. Yes, Thanks! I think the onThrowUpdate is what I'm looking for. However I can't seem to get the results I want with throwResistance. It should basically feel like once it starts moving, it won't stop. Using a high minDuration seems to be achieving that for me. Are there drawbacks?
  9. Struggling a little with Draggable + throwProps. First time using this and am trying to build a div containing a long single row of objects (images, etc) that is draggable left to right, continues moving endlessly on release, and loops. So far, setting a VERY high minDuration does the trick as far as movement and overall feel. However I need a way to poll the offset position of the objects inside of the container so I can reposition as needed to achieve the endless loop. I feel like some kind of listener where I can retrieve the X position of the objects would work best... at least thats the way I typically do it when using simple click events to trigger the movement. Are there any listeners in place that I can tap into? Or maybe there is a better way to do all of this? Feels like I'm very close
  10. I have a situation where a slideshow is dissolving between images. I am using TimelineMax and allowing the slideshow to loop endlessly. I need to give the user the ability to pause and restart the slideshow... easy enough using pause(). However I would like to make sure that if an image has already started tweening (dissolving into the next image), that the tween doesn't pause part way through... resulting in two semi-transparent images on top of each other. Is there a way to pause the timeline but allow any existing tweens to complete first?
  11. In a situation right now where I would like to tween a class and found this post. Am wondering, any way to remove the class once its been added? I'm thinking I will probably just need to define a second class that removes the properties in that were defined in the class that was added. But figured it was a question worth asking...
  12. G. Scott

    Scale + Chrome

    Carl, THANK YOU SO MUCH! Silky smooth now... even more so than when I was animating the bg images. The only problem I had was that the images jumped momentarily over top of another layer (png with transparency). Setting the z to a negative value (z:-0.01) solved that problem. You are the bomb! Guy
  13. G. Scott

    Scale + Chrome

    I'm wondering if there is any solution to the jerky performance in Chrome when using scale. Getting stuck between a rock and a hard place here. If I use scale to zoom images in and out (ie if creating a Ken Burns effect), it looks beautiful in every browser except Chrome for some reason. VERY jerky. But if I simply animate width and height, it looks perfect in Chrome, but terrible in Safari. Scale is my first choice because its less code and allows for transformOrigin, etc... super slick! However I have been avoiding it solely because of the way it performs in Chrome. My solution thus far has been to animate the width and height of background images instead... which oddly enough, works smoothly in all browsers. And THESE are the times I miss Flash...