Posts Tagged TweenMax

Show Your Pride: Just Moo

I’m happy to announce that we just lanched today a campaign for the Dairy Farmers of Canada. My part in this was to do develop the microsite, but their was an entire team working on the facebook application, the banners, the widget. We worked really hard on this and I think this is going to be a sucessfull campaign. I went on again using PureMVC even if this was more a website than an application and I can say that I really don’t regret it. Even if we kept adding features, the project grew correctly and I could go back in the code in a month and I would still be a happy developper and understand where everything is. Here is a list of the features / libraries used in the project:

  • PureMVC
  • SWFObject from Google hosted libraries API
  • TubeLoc (I had a few problems using it at first, but I could do it way faster now)
  • The microsite resizes to fit smaller resolutions
  • TweenMax (I am going to use the colorMatrixFilters everywhere now)

One of the goal of the campaign is to get the most people clicking on a button on June 3rd to make a world record. You can click on the button from facebook, banners, the microsite and a widget like this one:

Congrats to the entire team at Twist Image who worked on this. So check it out: The Great Canadian Moo.

And I forgot on June 3rd, go back to the microsite and go beserk on the moo button!

, , , , , , ,


Shaving some kb when using TweenLite (or TweenMax)


I was working on some banners lately and with banners, every kilobytes counts. So I downloaded the new version of  TweenLite for AS2 (because I can’t do shit without TweenLite) and noticed so weird behavior (not so weird once you understand about the file size. I mostly has to do with the new plugin architecture, which I wasn’t acustumed to.

When you unpack the downloaded file from TweenLite, there is in there, a very usefull Plugin Explorer to help you understand how plugins work and to generate the code you need to activate only the plugins you want which looks something like:

import gs.plugins.*;
TweenPlugin.activate([ColorMatrixFilterPlugin, BlurFilterPlugin]);

With that code you would activate the ColorMatrixFilter plugin and the BlurFilter Plugin. I tought at first that that would be the only plugins activated and so the Plugin Explorer was telling me that if you activate only these plugin TweenLite should only add 5.5kb to my file.But that wasn’t what I was seeing it was more around 8kb (I know that isn’t much different but when you do banners, you fight for every kb).

Here is the solution

It turns out that when call the TweenPlugin.activate method, even if you say to activate only 2 plugins, it doesn’t deactivate the plugins that are activated by default. In order to do so, you have to go in the file and comments the lines where these are activated like this:

//this starts on line 257 of the file VERSION: 10.09
public function TweenLite($target:Object, $duration:Number, $vars:Object) {
if (TweenLite.timerClip._visible != false || !_tlInitted) {
// RemoveTintPlugin,
//   FramePlugin,
//   AutoAlphaPlugin,
//    VisiblePlugin,
//     VolumePlugin,
//   EndArrayPlugin
//So by commenting these previous lines, these plugins won't be activated thus saving you some kb

You have to get your hands dirty, but in the end you gain a lot of flexibility plus you have only what you need activated.

More stuff on TweenLite

Well I’m always playing with TweenLite, so the other day I was using the ColorMatrixFilterPlugin on some really big MovieClips (9000px large). Well it turns out that Flash isn’t able to do bitmap manipulations (Matrices or Filters) on MovieClip bigger than 2800px.  So my Tweens on them would just not work (not TweenLite’s fault). What you have to do is segment your big MovieClip in chunks of 2800px and do a Tween on each of them at the same time.

Lastly, on the TweenLite website today you could read that Jack Doyle (TweenLite creator) and Grant Skinner (creator of gTween) will be working together on the next version of TweenLite/TweenMax. This can only mean great things for the future of this Tweening library! I look forward to the next version.

, , , , , ,