# Protecting your SWFs

**URL:** <https://forum.kirupa.com/t/protecting-your-swfs/251787>\
**Category:** Uncategorized\
**Created:** [February 12, 2008, 6:52pm UTC](https://forum.kirupa.com/t/protecting-your-swfs/251787 "2008-02-12T18:52:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![apearce](https://avatars.discourse-cdn.com/v4/letter/a/59ef9b/32.png) [@apearce](https://forum.kirupa.com/u/apearce)\
**Post date:** [February 12, 2008, 6:52pm UTC](https://forum.kirupa.com/t/protecting-your-swfs/251787/1 "2008-02-12T18:52:48Z")

</div>

Hello all, this is my first real post on Kirupa. I have known about it and used it for a long time, but I never posted, now I am going to start, so here a little code that I needed. I have seen this posted on the forums loads, but never answered. (It probably was, but i missed it, so for anyone else who missed it, here is the code I have come up with.

Stage.showMenu = false; // Stops people skipping protection.

var domain:String = “[http://www.kirupa.com](http://www.kirupa.com)” // Enter domain name here (no ending ‘/’).  
if(\_root.\_url.indexOf(domain) == -1 ){  
getURL(domain, “\_parent”); // If not correct, go to the website.  
gotoAndStop(2); // If not correct, go to ‘frame 2’.  
} else {  
gotoAndPlay(3); // If correct, play the rest of the Flash at ‘frame 3’.  
}

PS: I don’t know how to add code into V-Bulletin, so if anyone can give me a hand that would be great.
