Firefox extensions Flash Tools of the trade

Flash tools of the trade: debug

I try not to regurgitate info from other blogs…
But I have to talk about a entry from Alessandro: because it makes me “extremely” happy.

The creator of SE|PY: Alessandro Crugnola has created his first firefox extension. Good for him, but what it´s to me?

FlashTracerWell… it’s one of the first tools that makes it possible to trace / debug in Firefox.
While running any .SWF Flash file in your browser you can see all the output generated by the “trace” flash functions in this sidebar component. This is very useful especially working with server side technology.
You can debug without anyone knowing this, even with on a live site: only people that have this extension installed will know this.

You just need to install the debug version of the flashplayer and the Firefox extension and you’re ready to go!

It made me painfully aware that we Flash-developers leave a lot of “traces” behind in the .SWF’s.
But this can be fixed: just check ‘Omit trace actions’ in the publish settings.

FlashTracerFlashTracer – While running any .swf Flash file in your browser you can see all the output generated by the “trace” flash functions in this sidebar component.
You *NEED* the flash player debug version to run this extension correctly: flashplayer_9_plugin_debug

Update #1: A colleague found a “funny” trace at youtube: it has something to do with the play button not wanting to appear….



At Fabrique [the company I work for] I’m working on a project called FabLabs.
Fab[rique]Lab[oratorie]s is create to build stuff which is technically chalanging, could have commercial use but (for now) are no paying clients for.

My project is a webcam navigation using the Flash plugin. When this project is finish we will be able to navigate without a mouse or keyboard using only a webcam and the Flash plugin.
We are also looking at Red 5 so we can also use the webcam for recording video. It’s a very exciting project which I started in my spare time and I’m very glad that I get the opportunity to finish this project for Fabrique.

It’s still very much “work in progress” but I’ve made a FLV file where u can see me…. and the methode of activation.

I started with a proof of concept, and I think its from protozoo but to be honest I’m not 100 percent sure.

Flash video player

How can I make FLV with freeware / opensource software

I have written about the creation of FLV (Flash Video) with freeware/open-source software before. But I’ve made the mistake to talk about to many different aspects of the FLV: the encoder, the offline flv-player and the web flv-player.

This will be corrected in this post, so after reading this you will know:

  1. Which programs you can use to encode FLV but don’t have to pay for.
  2. Which program I would use.
  3. And why I would use this program

I know of these freeware/open-source projects you can use to encode FLV:

  1. Riva FLV Encoder
  2. Digitalgroover FLV Encoder
  3. Super
  4. Mediacoder

I’ve been testing them on a couple points.

And the winner is: Riva FLV Encoder!
But it was a close race with number 2: Digitalgroover FLV Encoder
Both of these programs are very easy to use: they can do only one thing: create FLV, which makes them very powerful and useful.
Riva FLV Encoder wins because it can save presets (settings), has some documentation and runs immediately on my home computer. Digitalgroover FLV Encoder could win with the next round (version) if: it runs on my home computer (it works fine on my computer at work…) and save/load presets (settings) in XML.

The other programs can be used to encode more than one at a time (batch) but both don’t write FLV1.1 (no MetaData) so you will need to update this with Buraks FLVMDI (FLV MetaData Injector) which also has the capability to batch.
The combination of complex interface, possibility to encode more than only FLV and no MetaData, makes Super and Mediacoder more programs for professionals.

Flash video player

Why do I need MetaData?

So the first question that I have to answer is:
What is MetaData?
MetaData is information stored in the video file itself (FLV-file) and is not immediately visible.
Typical information stored in the video is the video’s duration, creation date, data rates, but this depends of the encoder.

Second question would be:
Why do I need MetaData?
Well you don’t need MetaData for anything. The FLV-players need it. The MetaData is usually used to create the position of the playhead. Which makes it easier for the viewer of the video to determine how long the video will be, or skip to a specific place in the video. But can also be used to search through video with a specific creationdate, framerate, filesize, width or height. So with MetaData you will make it easier to view your video!

Some other questions:
Do I need to worry about MetaData?
No, if you use a encoder which creates FLV 1.1, it will also create MetaData.

How do I know if my video has MetaData?
If you play your video and the playhead doesn’t move, your movie probably doesn’t have any MetaData.

How can I make/repair MetaData?
To put MetaData into a FLV file you can use Buraks FLVMDI (FLV MetaData Injector)
FLVMDI is free to use, but you can’t distribute it. It looks very intimidating; [it’s a command line application] but there’s also a GUI which makes our lives much easier.
And the Digitalgroover flvplayer has a repair button to fix your FLV. It will not show the seekbar if there isn’t any MetaData.

Will repairing MetaData change the quality of the video
No, it will change in filesize (about 2kB on a file which was 2.014kB) but won’t change any video or audio quality.
Yes, it will change the viewing quality because you can see the playhead-position and the ability to search/skip parts.


RTFM: onHTTPStatus

For some time I wanted to create better feedback (error or alert) when you use cross-domain data (XML, TXT, JPG, FLV, etc.).
The more experienced flash programmer know that this you need a crossdomain.xml.

But flash never gives you any feedback if you need the crossdomain.xml of is it’s there or not. So you need Fiddler , Charles or some other http debugger to debug.

In the helpfiles of Flash I found the documentation about onHTTPStatus and more information about HTTP specification and after a quick scan of the information there I decided this is what I needed.

I wrote a class that would give me feedback…….. and all I got back was a 0 (zero) in Firefox and 404 using IE. Thats a strange bug…. so I started to read the helpfiles a little beter and found this:

A value of 0 can be generated in any player, such as if a malformed URL is requested, and is always generated by the Flash Player plug-in when run in the following browsers, which do not pass HTTP status codes to the player: Netscape, Mozilla, Safari, Opera, or Internet Explorer for the Macintosh.

So that killed the experiment immediately: I can’t have code that only work in IE.

Flash Flash video player

Flash Video (FLV) Player 1.3 released

About the project

Read more about it here

flvPlayer mck v1.3


Because y’all not knocking down the door for this player, I’ve given myself some time to clean up the source code. So just as in version 1.1 and version 1.2 no class files available but you can download the SWF, the readme.txt and some html files in a ZIP

Get your stuff here:


Flash Screenweaver

Dir2xml v1.1 released

This is a little tool I build with the help of Screenweaver.
A dir(ectory) 2 XML tool.

Wanna know more about the reason??

Version 1.0 had some bugs, and the output (XML) wasn’t the way it should be.

Dir2xml v1.1

(yes indeed it’s the same picture as version 1.0, there are no big changes to this program)


You can download the EXE, SWF, example dir2xml.xml and FLA in a ZIP

Get your stuff here:


Creative Commons License This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License.
Flash Flash video player

Two buttons interfering with each other’s rollover / rollout

This is a problem which is kinda difficult to describe in short sentence. But this is a problem which I seem to be running into for a couple of weeks now.

Lets descibe the problem and I will illustrate with a banner (or a simple flv-player) example:
The banner (rectangle) is contains a short animation (20 kB) and when you rollover the banner a video (flv) starts to load and play. Onrollout the video will stop playing and hide. But the banner has also smaller pause / play and sound-off buttons on top of the bigger button which start / stop / etc the video.

So the big button starts playing / loading the video onrollover and onrollout stops playing / hides the video. The smaller buttons are stop / pause / play / sound-on / sound-off actions.
Not so difficult, but the tricky part is in the rollout of the big button: as soon as you rollover the smal buttons it means that the video stops playing and hides (rollout of the big button)….

With a little help of Nils we he cracked this nutt:

View the working example hereupdate #1: onMouseMove has to change to this.onMouseMove

this.big_btn.onRollOver = function() {
	this.onMouseMove = function () {
		if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
			// rollover state and action
			this._alpha = 50;
			_root.MyCustomRoll("rollover: big_btn");
		} else {
			// rollout state and action
			this._alpha = 90;
			_root.MyCustomRoll("rollout: big_btn");
			delete this.onMouseMove;
			// trace("no hit");
this.button1_btn.onRollOver = 
this.button2_btn.onRollOver = function () {
	this._alpha = 50;
	_root.MyCustomRollSmall(this._name + " onRollOver");
this.button1_btn.onRollOut = 
this.button2_btn.onRollOut = function () {
	this._alpha = 90;
	_root.MyCustomRollSmall(this._name + " onRollOut");
// debug / trace functions
function MyCustomRoll(txt:String) {
	this.debug_txt.text = txt;
function MyCustomRollSmall(txt:String) {
	this.debug2_txt.text = txt;
Flash video player

hmmmm to early released: FLVPlayer 1.2 has a couple of bugs

It seems that I was to “early” with this update, the Flash Video (FLV) Player 1.2 has some bugs which I have to look at before I start with version 1.3.

Bugs from version 1.2:

  • Again MTASC didn’t accept the code I wrote. But now I have no idea how to fix it (read more about the problem below).
  • The progress bar sometimes exceeds the 100%, I thought I had fixed that …
  • I lied about (x)html, because it’s simply not xhtml (I’m not going to fix that, so now it’s only html)
  • The autohide functionality I create doesn’t work properly (solution to this problem is posted here)

MTASC: Type error Video has no _x
while the livedocs assures me that it is possible.
I can’t find a solution to this problem: MTASC can’t be used to create SWF but Flash 8 doesn’t mind so I will use Flash create SWF. Hmmmm to bad, so there two options now : (1) Nicolas Cannasse made a mistake or (2) I did.
Do you know the answer, let me know.

Flash video player

Flash Video (FLV) Player 1.2 released

About the project

Read more about it here

flvPlayer mck v1.2


Because y’all not knocking down the door for this player, I’ve given myself some time to clean up the source code. So just as in version 1.1 no class files available but you can download the SWF, the readme and some (x)html a ZIP

Get your stuff here: