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;
}
}
}
Posted by: polyGeek in Controls, Video Tutorials, examples |
1 Comment »
January 31st, 2008 . by polyGeek
Sometimes you don’t know which video you want to play inside of videoMaru. Take the video player below for example. I don’t want to create a different video player for each tutorial I do, because I plan on doing lots of them.
The solution is to use FlashVars to pass a variable into videoMaru and tell it which video to play. Now I have one video player and each instance plays a specific video that I can change via the HTML containing page.
To make things easy you don’t have to write any code to make videoMaru play the video you indicate with FlashVars. It does that automatically.
I’ll also cover how you can pass variables into videoMaru via FlashVars to dynamically change things like the volume on startup through the API.
Here is some information about using the <object>/<embed> tags or SWFobject for FlashVars.
If you have a Wordpress blog and use the Kimili plugin to embed your SWFs then you can use code like this to pass FlashVars.
[kml_flashembed
movie="/pgtv/_videoPlayerTemplate.swf"
height="480" width="640"
fvars="flvAddress=/pgtv/videos/68_flashVars.flv" /]
The code above is what was used to play the video tutorial on this page.
Posted by: polyGeek in API, Video Tutorials, flashVars |
1 Comment »