Wow, this post seems very similar to the one I posted the other day. However you seem to have gotten a much better response.
Since a few days has passed since my post I spent a good 2 days trying to figure something out. Im also the man with every hat for my business and feel very similar to you.
I dont mind sharing what took me an insane amount of hours and a huge headache. I scoured the web and tried every as3 actionscript I could find. I finally ended up with this:
/*
fast&dirty domain lock in as3
by dx0ne http://dx0ne.laislacorporation.com
based on http://www.flashrights.com/domaincontrol.htm
*/
gotoAndStop(1);
import flash.events.*;
import flash.display.LoaderInfo;
function enterFrameHandler(event:Event):void {
var url:String=stage.loaderInfo.url; //this is the magic _url successor
var urlStart:Number = url.indexOf("://")+3;
var urlEnd:Number = url.indexOf("/", urlStart);
var domain:String = url.substring(urlStart, urlEnd);
var LastDot:Number = domain.lastIndexOf(".")-1;
var domEnd:Number = domain.lastIndexOf(".", LastDot)+1;
domain = domain.substring(domEnd, domain.length);
if (domain != "nothing" && domain != "domain1.com" && domain != "domain2.com") {
gotoAndStop(34);
}
}
addEventListener(Event.ENTER_FRAME, enterFrameHandler);
Change the domain1.com and so on to your domain, and add as many domains as you want.
Now I will explain how I got it to work with the JW player. Basically download the .fla source code from the JW Player 4.4 HERE.
Open the FLA and make a new layer and paste the above code on frame one. Make another layer and put a keyframe on frame 34 and put whatever you want there, a link to your site maybe or a bad message.
I also added this to my .htaccess which is a little different than yours, Im not sure which is better.
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://domain1.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://domain2.com/.*$ [NC]
RewriteRule [^hotlinked].(swf)$ http://domain1.com/flashfile.swf [R,NC]
Same goes with the flash code, I saw someone else pasted some code but Im not sure which is better.
The question I have is, can I improve on anything to help this problem? Is the other flash code better? Having something supported by wowza would be the best option, please help us out Charlie!