SoL2Squiz
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by SoL2Squiz
-
-
Hi SoL2Squiz,
Basically, your JS is failing because you are trying to load a JS file in CodePen that does not exist.
<script src="js/main.js"></script> // This will fail in CodePen and break your Pen. Remove it and it will work.
Also, there is no need to add the CDN link in CodePen, you can add GSAP's library via CodePen's "Add External JavaScript" under the "Settings". Look for the button that says: "Quick-add".
After that, all that is left is to adjust your Tweening code. Look at the fork I made from your Pen, I also had to adjust some of your numbers that were a bit off.
One last comment: If you are going to animate sprite sheets, you need to make sure the colors in the sprite sheet match exactly from one sprite to another. JPG is a rather bad file format for this as it creates slightly different shades of colors depending on the surrounding color per pixel. Look at the pen, watch how the graph flickers as it animates. You really want to use something like GIF or PNG for this sort of job.
Hi,
Thanks for the info on "Quick-add" option for the CDN. That made a lot of sense. About the jpeg, yes you were right, in my final version, I used PNG format for each frame.
Thank you
-
Hello,
I am trying to do this Sprite Animation but cannot seem to figure out what's wrong with my code.
I've going back and forth on my image file, checking the sizes and all and etc but I cannot seem to find why it's not working as it should be.
Would be glad to get some help around.
Thanks
See the Pen MyEeLa by BUroKHUli (@BUroKHUli) on CodePen
-
Hi,
For adding a new sprite animation use an onComplete callback on the timeilne, only if the timeline doesn't have a repeat:-1, in that case the timeline is set for an endless loop and will never complete, in that case you can use a call() method at a certain position in the timeline.
For the second question, for what can I see, the timeline you're using is not paused or it's timeScale is not set to 0. The code you add simply tweens the timeScale property of the animation, just that.
I'm not completely sure of what you're after here. I forked your codepen and made some changes to it, please check it and adapt it to fit your scenario so we can follow up properly:
See the Pen bpoWzL by rhernando (@rhernando) on CodePen
I wanted to start another animation after the first animation is finished. that's why I tried to remove all the extra codes to see how the basic works
-
I have another question, I removed this code block below
function timeScale(X) {
TweenLite.to([sprite01], 1, {timeScale: X});};and the animation still goes one; i thought the function calls the variable? -
Hi @Diaco @Jonathan,
Thank you responding to my post. I was to realize my mistake now. However, if have one last question about the sequence. How will I add another "sprite animation" in the same page that will load after the first animation is finished?
-
Hi SoL2Squiz
var animate = TweenMax.to('.MySprite2', 1, { repeat: -1, // >> loops the sprite ( -1 = infinity loop ) x: -2250, // >> -( width - width/frame ) ease: SteppedEase.config(15) // >> total frame - 1 });
pls load TweenMax tooso I just did not load the TweenMax? what is wrong with the code itself? I cannot seem to see what's the difference. NOOB mistake!!! LOL
-
Hello Guys,
I am trying to understand how SPRITE ANIMATION works using GSAP and found this example which is exactly what I have in mind.
See the Pen MYdwRP by MAW (@MAW) on CodePen
Now, I tried to simplify the whole code by removing those that I don't need. (My only purpose was to PLAY a simple animation for my project). But for some reason, I screwed things up. I do not know what happened after this.......
Thank you!!
See the Pen WwEmbY by BUroKHUli (@BUroKHUli) on CodePen
-
Hi,
When I was still working with FLASH, it's so easy to HIDE/UNHIDE assets using masking. This way, I can declare a certain dimension of stage wherein only that area will I be able to show the animation.
In GSAP, is there a way to like mask images?
E.G.: my working stage is only set to 500px by 500px, anything outside that dimension will be hidden?
Thanks
-
Setting opacity:0 in the CSS works too.
thanks mate!!
-
-
Thanks a lot!!!!!
-
Hi guys,
This is my first attempt on animation using GSAC (basically, I just repeated what the video had)
I have a question about starting an element opacity from 0 visibility to 1 at the start of animation. I know I can do a "TweenMax.from"
but I wanted to use "TweenMax.to" instead.
Thanks
See the Pen jWeMjO by BUroKHUli (@BUroKHUli) on CodePen
-
thank you so much!!! that was a NOOB MISTAKE but thank you!!!
- 2
-
in my "main.js" file, it says this:
invalid character '\u8220'
the think is, i created the "main.js" file using Dreamweaver 6, is this an issue?
-
Hi,
I'm not sure where it went wrong but I still cannot make the graphic move/tween.
@carl
Here's the zip file of my file.
-
Hi SoL2Squiz,
Welcome to the forums. Glad you posted here.
if you are going to animate the left property of an object you need to make sure that it has a css position.
.logo { position:relative; }
There is a little caption about that in the video but its easy to miss it. We strongly recommend animating x / y instead for performance reasons.
If that css doesn't fix it, please zip your files and post them here. We will take a look.
Happy Tweening!
Thank you for replying to my post. I'll take another look at this and see if it works.
-
Hi guys,
I used to do basic linear (non-programming) animation in flash and bumped into GreenSock 2 days ago. I am seriously thinking of learning this form of animation but I'm having difficulty starting, mainly because I have no background in programming whatsoever.
Situation:
I saw the video and tried to duplicate what was said there but I immediately got hit by an error in my MAIN.JS (which I created from scratch using DREAMWEAVER) is this not right? I cannot move on from there and cannot figure out what's wrong with my file.I attached a screenshot of how I structured my files in one folder and for your reference my "index.htm" code is down below.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>My First GreenSock Animation</title> </head> <body> <div> <img class="logo" src="imgs/bubble-crystalclear.png" /> </div> <!--CDN links for TweenLite, CSSPlugin, and EasePack--> <script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/1.18.0/TweenMax.min.js"></script> <script src="js/main.js"></script> </body> </html>
Thank you!- 1
Sprite Animation - (Not Working Properly)
in GSAP
Posted
Hi,
I'm a supernoob and after looking at your sample, I think I need a more coffee hehehehehe! I'm blown away Thanks