" /> Shaykh Al-Flash Amir Memon on the Flash Platform: August 2007 Archives

« June 2007 | Main | September 2007 »

August 09, 2007

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.

August 01, 2007

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