I'm not sure if I have or haven't blogged this once before, but a second time can't hurt anyway. I've just spent another half hour trying to get a simple SMIL file to work in conjunction with the FLVPlayback component. Normally this should be quite easy: you establish the rtmp address of the video you want to play, assign this as the source property of the FLVPlayback component and you're done. Like so:

view plain print about
1mycomponent.source = "rtmp://myserver.com/vod/video.flv"

To transfer this to a SMIL file (handy if you are looking to support Dynamic Streaming in FMS) you would do this:

view plain print about
1<smil>
2 <head>
3 <meta base="rtmp://myserver.com/vod" />
4 </head>
5 <body>
6 <switch>    
7 <video src="video_300.flv" system-bitrate="300000"/>    
8 <video src="video_600.flv" system-bitrate="600000"/>    
9 <video src="video_900.flv" system-bitrate="900000"/>    
10 <video src="video_1300.flv" system-bitrate="1300000"/>
11 </switch>
12 </body>
13</smil>

Looks plausible doesn't it? Shame then this DOES NOT WORK. Did you spot the error? Yeah, I'm such a noob, it's obvious isn't it?

If you want this work properly then you must OMIT THE FILE EXTENSION.

This works:

view plain print about
1<smil>
2 <head>
3 <meta base="rtmp://myserver.com/vod" />
4 </head>
5 <body>
6 <switch>    
7 <video src="video_300" system-bitrate="300000"/>    
8 <video src="video_600" system-bitrate="600000"/>    
9 <video src="video_900" system-bitrate="900000"/>    
10 <video src="video_1300" system-bitrate="1300000"/>
11 </switch>
12 </body>
13</smil>

How about using a bunch of mp4s? You would think that you could do this:
view plain print about
1<video src="myvid.f4v" system-bitrate="150000"/>

Don't be silly. Of course that won't work, we know we must omit the file extension, right? Wrong. That will fail too. What you need is this:
view plain print about
1<video src="mp4:myvid.f4v" system-bitrate="150000"/>

You must add the file extension AND the mp4 prefix (apparently) if you want to use mp4s with SMIL. The FLVPlayback component is less fussy when it comes to direct references to a video, then it seems to play either rtmp://myserver.com/vod/video.flv or rtmp://myserver.com/vod/video just fine. I haven't tried the intricacies of referencing an mp4 directly. Clear as mustard, isn't it? :)

I can barely imagine how someone new to Flash may figure these things out - guess they could RTFM (yeah I should have I think) which I assume are correct and up to date. I'm sure some Adobe folks can explain why it behaves as it does and the technical reasons for it but that's missing the point - the component should be more intelligent and intuitive to use and it is isn't. I guess Strobe can't come soon enough and it won't repeat those mistakes.

And on this note I close another chapter of Flash frustrations and wish everyone a great weekend.