Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
guardesign

i have question

Recommended Posts

Hi every body

 

i am new in java script but i worked with greensock for flash

but now i read article about greensock classes for js but

really i don't know how could i use class in html .

please tell me with example (html) inside that used from greensock class

i need 1 example in html used with class

thank you

  • Like 1
Link to comment
Share on other sites

Im not sure I understand what you mean when you use the word "class".

 

Do you mean how one goes about importing and using the js scripts?

Link to comment
Share on other sites

Like un4given, I'm a bit confused about what you're asking. If you are wanting to see an example of how the animation classes (like TweenLite and TweenMax) are used in an HTML page, there are several examples in the download zip (in the folder named "examples") and there's a "getting started" article at http://www.greensock.com/get-started-js/.

 

If, however, you're asking about how to create pseudo-classes in JavaScript (like the classes that you're used to creating in ActionScript), that's trickier. There are quite a few articles out there about various approaches (there isn't one "right" way that everyone agrees on). Google is your friend :) Definitely do some reading on what "prototype" is in JS. Here are some potentially helpful resources:

 

http://gotoandlearn.com/play.php?id=159

http://ejohn.org/blog/simple-javascript-inheritance/

http://javascript.about.com/library/bltut35.htm

http://www.webmonkey.com/2010/02/make_oop_classes_in_javascript/

Link to comment
Share on other sites

Thank you for you .

i would like to practice java script with greensock new classes released and really i don't know how can i set up that . i mean for example : in getting started inside the site exist something for learning but it has not show detail and show the html file for example . i hope you understand what i mean

thank you

Link to comment
Share on other sites

Just download the JS package and look in the "examples" directory - there are several HTML files that show you how things can be set up. Probably the best ones to start with are bouncing_ball.html and super_basic_syntax.html

  • Like 1
Link to comment
Share on other sites

There's also a post in another area of the forum about the ActionScript to JavaScript stuff, where there's a starter template for simulating a type of 'class' structure - may or may be applicable, but there are some additional links in that thread that are well worth a read through.

 

http://forums.greens...dpost__p__21263

  • Like 2
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.
×