Archive for the 'Banner Tools' Category

Logging Project hours - experiment

Personal Task Manager
This is a software that we are testing out at work to log our actual productivity. It asks you what project you are currently working on every predetermined interval. We just started using it and it seems pretty detailed and helpful. I’ll document my experience. If you want to try it out download it here:
Software download
IF you don’t have the .net 2.0 framework installed, download and install from here:
.net 2.0 framework download

No comments

Ziddio - Spray banner, Thank God for BitmapData!

January 26th, 2008 | Category: Banner Tools, AS2, BitmapData, Interactive Business

Ziddio Spray Banner

View Banner

I built this banner a while back. I was able to convince the client early on to have this built in Flash 8 because that was the dawning of BitmapData in Flash. Without BitmapData there would have to be layers upon layers of MovieClips with transparent images in them which is never a good thing. I don’t even want to think about how hard this thing would be chugging the processor. Everything had to be under 40K filesize which wasn’t easy with such a graphics heavy banner. Basically all I did was overlap a bunch of images (the individual sprays) for each color as the spraycan moved across. That gave the illusion the can was spraying. When the can stopped spraying I took a snapshot (BitmapData.draw()) of the container MovieClip which housed the spray and removed all of the spray MovieClips from the stage. That kept the Flash player free and clear of having to constantly redraw all of those transparent images. It all came out pretty smooth, I was happy about that.

No comments

Tweening a MovieClip’s timeline using TweenLite

January 24th, 2008 | Category: Banner Tools, AS2

VIEW EXAMPLE
DOWNLOAD SOURCE

If you do alot of banners or work on projects with small filesize constraints, you should be hip to TweenLite written by Jack Doyle. This is a powerful Object Tweening engine that is incredibly small in file size (about 2.5K or so). Other Tweening Engines such as Caurina Tweener are a whopping 10K. That is alot of resources! One thing that TweenLite does not natively have which we at ICG need on a frequent basis is the ability to tween the timeline of a MovieClip. The reason TweenLite doesnt have this feature is because it’s original purpose is to be small in filesize and not bloated by excessive bells and whistles. The following is a workaround without changing Jack’s source files:

*DISCLAIMER: The following modification is using TweenLite VERSION: 5.8, it may not work with future versions of TweenLite.

 

//======================================================

 

import gs.TweenLite;
class gs.TweenLiteEnhanced {
public static function to ($obj:Object, $time:Number, $params:Object):Void {
if ($params._frame) {
$obj._frame = $obj._currentframe;
$params.onUpdateNew = $params.onUpdate;
$obj.onUpdate = function () {
$obj.gotoAndStop (Math.ceil ($obj._frame));
$params.onUpdateNew ();
};
$params.onUpdate = $obj.onUpdate;
}
TweenLite.to ($obj,$time,$params);
}
}

 

//======================================================

USE:
TweenLiteEnhanced.to(mcBox, 5, { _frame:300})
// mcBox is the name of the MovieClip

 

It works by injecting a function into the MovieClip which runs a gotoAndStop to the current value of the custom _frame property. It gets called on every update (the “onUpdate()” method). It only adds about 300 bytes above the class. Try it out, let me know what you think.

4 comments

UserInteraction class - sets off a timer after you leave a designated user area onstage and fires a callback a function. Very useful for banners.

January 13th, 2008 | Category: Banner Tools, AS2

Where I work we do alot of banners. I wrote a class a while back that has come in handy multitudes of times. It contains a handful of public functions and I’ve used it on many major advertising banner campaigns (various HP banners, Snickers – Get Some Nuts, Toyota Sequoia, etc).

VIEW EXAMPLE
DOWNLOAD SOURCE

EXAMPLE SITUATIONS:

  1. Suppose you want to set a timer after a user has rolled out of a banner and then call a function to have an animation play out to the end once the time is up.
  2. Suppose you want a popup window in your website to remain open for 3 seconds after the user has left the hit area, and then close. But if the user rolls over the area before the time is up the user interaction area resets itself.

 

HOW TO USE IT:

//—————————————————————————
import UserInteraction;
var objUserInteraction:UserInteraction = UserInteraction.getInstance();
function endFunc() {
trace(’endFunc called’);
objUserInteraction.reset();
}
objUserInteraction.setup({clip:mcClip, timer:3, show:true, timerCallback:{scope:this, func:”endFunc”}});
//—————————————————————————

  1. Import the class
  2. Create an instance of it
  3. Create a MovieClip of the desired hit state area and name it
  4. Create a function that the class will call at the end of timer
  5. Call the setup function


AVAILABLE PUBLIC FUNCTIONS:

METHOD

getInstance():UserInteraction

Creates a new instance of the class.

————————————–

METHOD

setup($obj:Object):Void

Passes all the necessary variables into class.

PARAMS

$obj : Pass an object of the following params:

clip: MovieClip that will be used as hit area.

timer: Time set in seconds.

timerCallback: Function that is called once the user has been out of the area for designated time.

rollOverCallback (optional): Function that can be called on rollover.

show (optional): When set to true will make the MovieClip visible at 50% alpha. Default is set to false.

————————————–

METHOD

reset():Void

This allows the hit area to be used again after the timer condition has been met.

————————————–

METHOD

stop():Void

This stops all functionality at work in the class and also hides hit area.

SIDE NOTES:

  • You may want to keep the hit area a bit smaller than the actual target area especially with banners. This is suggested because if the user rolls out of the area too quick, Flash may think that the mouse is still over the hit area and the timer will not be started.
  • Always scale the contents of a MovieClip and not the MovieClip as a whole from the outside. You may get undesired results other wise.

     

     

     

     

     

     

     

    No comments