Jump to content
Search Community

Using filenames with numbers in tweens

remakker test
Moderator Tag

Recommended Posts

I had an empty div with a timeline that animates the background image between 2 images. The images are named 0.jpg and 1.jpg. When I run the html I see that GSAP tries to find images between 0.jpg and 1.jpg like this:

GEThttp://127.0.0.1:5500/slideshowa/0.2358.bmp
GEThttp://127.0.0.1:5500/slideshowa/0.2417.bmp
GEThttp://127.0.0.1:5500/slideshowa/0.2528.bmp
GEThttp://127.0.0.1:5500/slideshowa/0.2476.bmp
GEThttp://127.0.0.1:5500/slideshowa/0.259.bmp
GEThttp://127.0.0.1:5500/slideshowa/0.2645.bmp
GEThttp://127.0.0.1:5500/slideshowa/0.2703.bmp
GEThttp://127.0.0.1:5500/slideshowa/0.2758.bmp

Is this a know bug or is there a way around this? Whenever I change to files with letters, the issue isn't there.

Link to comment
Share on other sites

Without knowing what you're doing, I feel compelled to say it's not a bug of any kind. Post your relevant code to CodePen and we can give you a better answer. My guess, since what you're looking at in terms of filenames are ascending values, is you're tying the image call to the tween's progress, which goes from 0 to 1.

  • Like 3
Link to comment
Share on other sites

It's doing what GSAP does ... tweening a numerical value (which it found in the filename) over a duration. While that's not your intention, it is actually what GSAP does. So, my question is, what effect are you trying to achieve over those 5 seconds? Are you looking to fade one image into another? 

  • Like 3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...