video.Maru
by polyGeek polyGeek logo



 

Creating controls with rollover states

February 23rd, 2008 . by polyGeek

Here is a short - 6 minute - video tutorial to help you create rollovers effects for your video interface controls.

[ Download Example | Download FLV ]

If you want to use the new API call - playBackward() - mentioned in this video you’ll need the latest videoMaru 3.5 beta SWC - see link at top of window.

playBackward( mc ) works be taking the MovieClip that you pass and creating an onEnterFrame function. On each enterFrame event it says: gotoAndStop( this._currentframe - 1 );

Then it checks to see if this._currentframe == 1. If so then it deletes the onEnterFrame function.

It looks like this:

function playBackward( mc:MovieClip ):Void { mc.onEnterFrame = function():Void {

 	this.gotoAndStop( this._currentframe - 1 );
		if( this._currentframe == 1 ) {
 		delete this.onEnterFrame;

 	}

    }

}