Protection

How do you keep people from caching a .swf into their temporary internet folder? Sites which do this, from the ones that I noticed, are www.2advanced.com and www.orisinal.com .

i think you can do this with JavaScript or PHP, or Flash… the basic method, i believe, is just to stick a load of random variables onto the end…like this:

[AS]getURL("www.mysite.com/preventcache.html?"+(math.floor(math.random()*9986))[/AS]

can also add nocache into you headers…
and check this out:
http://www.helpqlodhelp.com/blog/archives/000033.html#more

Keep in mind this method does make your viewers have to wait the full loading time everytime they view your site (since it won’t be cached the browser has to download a new one each time), so if you are going to do this I recommend using it on a file that isn’t not a large file size.

Also keep in mind that this will be a strain on your site’s bandwidth as well. I hope you have unlimited bandwidth on your hosting plan. :wink:

so if i have a 200kb site, and someone views my site 2 times in one day, it wont take up 400Kb?

well do the math, if the site isn’t being cached then that means the viewer would have to download 200kb each time they view it.

So if they view it twice then yes that’s 400kb.

i guess if you have bandwith to burn then i would protect the file. but isnt there a way that you can disable the “view source” option?

What’s the point of disabling it? If the file is cached, it is downloaded into the temp folder.

There is no 100% way to protect the files, if there’s a will, there’s a way…

You can disable Right Click/View Source, but you can’t disable View/Source on a browsers menu (File/Edit/View, etc)

And as EG said, if you cache it, it is saved, if you don’t, they keep reloading the file which uses up bandwidth, and they can always get the direct URL to your file no matter what.

It’s not worth the extra trouble. Not even 2A is protected, they just want to make it harder because they know a ton of people want their stuff.

*Originally posted by lostinbeta *
** Not even 2A is protected, they just want to make it harder because they know a ton of people want their stuff. **

I checked my temporary internet folder and I couldn’t find working SWF files from 2advanced or Orisinal. So that means they make people reload the files each time they visit their site?

Apparently so…

Sites like 2A have unlimited bandwidth so they don’t care how many times their sites are being downloaded.

“working?” explain.
it is possible to use loadMovie in an all flash site to bring in swf’s which only operate if they are within the main swf (using if’s), but they will still cache

*Originally posted by clownstaples *
**“working?” explain. **

The cached files work in a web browser, but don’t work in a regular SWF player.

Supree, they do work, it’s just that they only work if all the swf’s are together, individually they might do nothing at all because one controls the other.

i got it working. the main swf (v3) just had to have its external files in the same folder with it, with the right names
(home.swf, audio.swf, and some jpgs)

edit: just saw previous post…

You can easily disable that by checking if the _url property of the file has http:// in it (which means it’s on the internet, so presumably on your site, lol) and if not, just fscommand exit or goto a frame with no content/ warning message.
There’s a tool here: http://www.genable.com/aso/ supposed to hide your code even from ASV (ActionScriptViewer, for the non-hackers amongst us… lol again).
It’s all a question of how much trouble you want to take upon you to hide your precious code…

edit*
and “they can always get the direct URL to your file no matter what” is not tru, you can always generate the url with php, so they won’t know where the actual file is, and one more trick:
flash will load a file even if the extension is not swf, so you can put anything there, like txt, gro, edl, whatever really, flash doesn’t care, it’ll load it…and even no extension at all, so it gets harder to find the actual swfs in the cache…
end edit

edit edit, lol
i’m sticking this for a lil’ while, just in case this is of interest to some others… just a lil’ while tho’… "
end edit edit

You can also try this.

http://www.flashkit.com/tutorials/Actionscripting/Basic/Easy_to_-Tiran_Da-674/index.php

Nice link Meridian.

Domo arigato Mr Lostinbeta-bato