Posts in Category "General"

AMP: Adobe’s Desktop FLV player

If you google “FLV Player” you get several different FLV players that the community has made. A friend of mine recently asked me if there are any that I have had a good experience with, and I was surprised that he was even asking me this given that there is the Adobe Media Player (AMP).

But yeah, I just wanted to point out to people out there that AMP (Adobe Media Player) can play FLVs!!!

I’ve tried it on only Windows so far, but I’d think it can play FLVs on all three major platforms (win/mac/lnx) since there is an AMP available on each.

1. Install Adobe Media Player from here: http://get.adobe.com/amp/ (click at the bottom of that flash box)

2. On Windows, right-click an FLV file, hover over “Open With..” then select Adobe Media Player.

3. And bada bing, you’ve got your FLV playing.

I can’t remember, but there was a specific reason (having to do with CS4 compatibility or something) that they didn’t register .FLV’s default player to be AMP, but I’d imagine you can do that manually if you don’t want to do the right-click->open with… thing.

Developers: If you don’t like the idea that you have to install AMP (which serves many purposes other than just playing FLVs), you can probably make your own lean FLV player using AIR. If you do, it’d be super cool if you open sourced it, and shared bins. Just a thought.

Adding an Intermediate Cert to FMS

Ever try adding an Intermediate CA Cert to FMS ( Flash Media Server )?

well i did, and it was a real pain to figure this out, but in reality is pretty easy. Here’s how (starting from the beginning):

1. you generate a private key, lets call it privkey.pem … you’ll probably do this with OpenSSL like i did

2. from that with OpenSSL you generate a request, CSR or whatever

3. submit that to “the authorities” whoever that may be in your case, if intranet, maybe your “IS” or “IT” dept… if public, then maybe somebody like godaddy.com

4. they give you “the cert”

5. now you’re like, “yipeee!!! i got a cert, but what do i do with it? how do i install it?”

6. go here: (your FMS installation directory)\conf\_defaultRoot_\Adaptor.xml

7. Scroll down or Ctrl+F “SSL” and you should see a SSLCertificateFile tag, this is where you specify the full path of the cert file like this:

8. You also need to point to the .pem file, for that, specify the SSLCertificateKeyFile like this:

Simple as that, now restart FMS and you should be set.

BUT WAIT!! what about the intermediate cert… all you do is open up your .cer file in a text editor, and paste the intermediate cert below the actual cert. If u dont know where to get the intermediate cert, ask the admins that issued you the cert in the first place.

hope that helps.

How to use Flashvars with AS3

remember flashvars from AS2? its still there in AS3 but you access it differently.

in the HTML ActiveContent Javascript code add the flashvars parameter:


AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
'width', '490',
'height', '490',
'src', 'ColorGen',
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'ColorGen',
'bgcolor', '#ffffff',
'name', 'ColorGen',
'menu', 'true',
'allowFullScreen', 'false',
'allowScriptAccess','sameDomain',
'movie', 'ColorGen',
'salign', '',
'flashvars', 'boxColor=0x0000FF'
); //end AC code

(see the second last line)

And you should throw the same flashvars parameter in the object tag in the noscript for those who have JS disabled like this:

… now when you want to access it, instead of doing a _level0.boxColor like in AS2, you simply do a:

loaderInfo.parameters.boxColor

and bada-bing.

And of course you could add more flashvars name-value pairs separated by &’s… kinda like URL parameters

why a whole blog post on this? cuz i didn’t see it in AS3 LR on livedocs, and i could imagine wasting a lot of time on this if i didn’t work at adobe and didn’t have access to our massive testing library.

thought i’d share.

And by the way, here’s some more information from livedocs:

http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00001005.html#166514

http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00001585.html#171273

And here’s an URL if you want to use flashvars with Flex:
http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00001004.html

Flash Player QE Socket Server

I took the java “AquaServer” that was originally written by somebody in the flash community (can’t remember who, i know it was a flash superstar, a couple names come to mind but i’m not sure). Well anyway, it’s almost completely rewritten.

So, what benefit is it to you? The Flash Player’s security model can often be very complicated because of its unique place and function in a user’s computing experience. Providing this socket server will serve as a fully functional example of how to interact with the Flash Player’s Socket class ( flash.net.Socket ) with respect to using low-level bytes, its security model ( socket policy files, etc ). In fact this is the server side software that the flash player team (my team) uses at Adobe to test the functionality in the first place.

Since we have no reason to crunch any data on the server-side, we simply accept data from the client, and echo it back. In the real world, i could imagine that there would be some server-side crunching going on, so in my code look for where i’m doing the echo’ing (in an “else” clause in the AquaClientThread’s run() method) and start from there.

Oh, and also, for the record: This does not count as official Adobe software, its just something i made that we use internally that I thought others can benefit from, don’t be surprised if you find significant bugs. Also, for all we know, the Socket security model (or something) could change which would cause this server to break — so if you use it, be prepared to have to make changes to it if necessary.

I’ve copy/pasted our internal documentation below:

Continue reading…