FlashDevelop and Greensock’s TweenLite

If you’re writing Flash applications in AS3 or using the Flex framework or wanting to write browser or desktop AIR applications, then you just have to get’ya FlashDevelop.

http://www.flashdevelop.org/

Now, I’m sure Adobe’s own programming tools (Flex Builder?) are probably terrific, but I haven’t been in a position to pay for them so I haven’t messed with them.

Code completion is one of the greatest inventions added to programmer editors in the space age.  No longer are we turning to books or, God forbid, our memories to be sure what we’re typing in will compile.  Actually the best thing about the built in documentation system is that it tempts you to actually document your own classes and functions, making it much easier to share with your friends.

But one of the neatest things about FlashDevelop is that it downloads and installs the SDKs from Adobe and configures itself to find them.  That used to be sort of a hassle.

While I haven’t used Adobe’s programming tools, I have used the Adobe Flash builder.  So, what’s the difference between developing a Flash “movie” with Adobe Flash and developing one with FlashDevelop?

Adobe Flash is an animation tool built to satisfy the needs of designers.  You can import graphics, create graphics, and graphically move them around the screen according to a timeline.  Adobe Flash makes it very easy to build animated widgets without knowing a lot of programming.  The code to handle the transitions and movement are built by the Flash tool and any AS3 that you add is really just frosting.

Flash Develop starts you off with an almost empty set of AS3 documents.  You decide whether you want your Flash movie to start when it’s all loaded into the browser or if you want a smaller segment called a “loader” to run while the movie is being downloaded.

A loader is what you see when you’re starting up some Facebook game written in Flash and the frog is jumping around.  You see them all the time on picture galleries — sometimes just displaying a progress bar.

Here’s a simple AS3 program for Flash without a loader:

 public class Main extends Sprite   
{
public function Main():void
{
if (stage) init();
else addEventListener(Event.ADDED_TO_STAGE, init);
}
private function init(e:Event = null):void
{
removeEventListener(Event.ADDED_TO_STAGE, init);
// entry point
** YOUR CODE HERE**
}
}

FlashDevelop does not have the graphic tools that Adobe’s Flash designer does.  If you want a graphic to appear on the screen, then you figure out how to put it there in code.  If you want the graphic to move over time, then you figure out how to move it over time.

But WAIT!  People have already figured out how to move things over time.

One of the most popular and easiest to use tweening libraries is TweenLite, a lightweight, fast tweening engine.

http://www.greensock.com/tweenlite/

I love their Greensock logo:

I always think of my ex-wife when I see some cute logos.
This green sock thing looks like one she would have made for them.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.