Jump to content
Search Community

Noob w/o success.

Bobby Ballard test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I'm starting at the beginning with GSAP just to make sure I've got everything configured correctly and I'm understanding what I'm trying to do (highly unlikely.) Any help with getting the red ball with a black border moving would be greatly appreciated. There's a CodePen under my name.

 

Regards,

Bobby Ballard

See the Pen PvoOYv by codeKnock (@codeKnock) on CodePen

Link to comment
Share on other sites

Just some other notes in addition to the things Shaun mentioned:

 

1. You have a typo 

// switch this
funtion runAnimation() 
// to this
function runAnimation()

 

2. It looks like you have two durations in your constructor

var tween = TweenLite.from(myCircle, 5, 0.5, {left:"1200px"});

// I assume you meant to do this
var tween = TweenLite.from(myCircle, 5, {left:"1200px"});

 

3. Left isn't a property of an SVG circle — you'll want to use x like @Shaun Gorneau did in his demo or the cx attribute.

 

var tween = TweenLite.from(myCircle, 5, {x:1200});

 

Happy tweening.

:)

 

  • Like 2
Link to comment
Share on other sites

2 hours ago, PointC said:

Just some other notes in addition to the things Shaun mentioned:

 

1. You have a typo 


// switch this
funtion runAnimation() 
// to this
function runAnimation()

 

2. It looks like you have two durations in your constructor


var tween = TweenLite.from(myCircle, 5, 0.5, {left:"1200px"});

// I assume you meant to do this
var tween = TweenLite.from(myCircle, 5, {left:"1200px"});

 

3. Left isn't a property of an SVG circle — you'll want to use x like @Shaun Gorneau did in his demo or the cx attribute.

 


var tween = TweenLite.from(myCircle, 5, {x:1200});

 

Happy tweening.

:)

 

 

Thanks Craig! I made a few changes and completely forgot to mention them (and why I made them) ... you da man ??

  • Like 2
Link to comment
Share on other sites

Most dedicated code-editors have some form of auto-formatting and / or JavaScript error checking . VSCode has it built in, but there are extensions for Sublime, etc.

 

These auto-formatters should be able to catch typos, invalid or too many parameters, wrong brackets, etc.

Link to comment
Share on other sites

Thank you very much for the tip. I currently use Dreamweaver and I'm very UNHAPPY with it's performance and age. It's part of my Adobe CC Suite.

 

Given the name is VSCode can I surmise that is like the Visual Studio editor I've used for years?

 

I am going to check out VSCode. Thanks again.

Link to comment
Share on other sites

I agree. I don't need MSVS for web stuff. However, I've always loved MS code editors starting with MASM and Visual C and on and on.

 

I installed VSCode and was looking for some GSAP support...debugger, ed. extention, etc.

 

I love GSAP!

 

My best,

Bobby

  • Like 1
Link to comment
Share on other sites

15 hours ago, Bobby Ballard said:

I agree. I don't need MSVS for web stuff. However, I've always loved MS code editors starting with MASM and Visual C and on and on.

 

I installed VSCode and was looking for some GSAP support...debugger, ed. extention, etc.

 

I love GSAP!

 

My best,

Bobby

 

There is a GSAP snippet for VSCode: https://marketplace.visualstudio.com/items?itemName=hridoy.gsap-snippets that will complete a block of code for you. You only need to replace the parameters. Once you gain a mastery of the syntax you likely won't need the snippet.

 

Also have a look at https://ihatetomatoes.net/get-greensock-101/ for an excellent and free GSAP course.

  • Like 1
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...