Domain locking
lock your SWF file
/**
* Copyright komapeb ( http://wonderfl.net/user/komapeb )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/wpKA
*/
package
{
import flash.display.*;
import flash.net.*;
import flash.text.*;
public class FlashTest extends Sprite
{
private var _message:TextField;
private var _currentDomain:String = new LocalConnection().domain;
private var _trustedDomains:Vector.<String>;
public function FlashTest()
{
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
_trustedDomains = new <String>[];
//add your domains to this list
//_trustedDomains.push('swf.wonderfl.net');
if (_trustedDomains.indexOf(_currentDomain.toLowerCase()) == -1) {
_message = new TextField();
_message.autoSize = TextFieldAutoSize.LEFT;
_message.defaultTextFormat = new TextFormat('_sans', 16, null, true);
_message.text = 'You\'re not authorized to run this content!';
_message.x = (stage.stageWidth - _message.width) / 2 | 0;
_message.y = (stage.stageHeight - _message.height) / 2 | 0;
addChild(_message);
return;
}
}
}
}