Does anyone know if it is possible to digitally watermark a flash movie? We have movies that are authorized to be viewed by specific people, and we need a way to make sure that only those people view those flash movies.
Also, is there any way to put a "timer" on a flash movie so that it only works on a certain day or a certain week?
Are there any other ways to trace your flash movies across the Internet so that you know who is viewing them?
If you want to make sure only specific people view your Flash movie, you should put it on a secure site and require a login.
Yes, you could put a timer on Flash. The built in Date object would work, but it relies on the user's system time to work, so they could foil it by changing the date on their system. If that's not secure enough, look to work with a server side language that passes the server's time into Flash.
As far as knowing who is viewing them, Flash can read some limited system information, such as operating system, plugin version, etc. If you need more detailed records you should use something on the server side.
As for keeping track who views the swf (even if copied somewhere else) you might take a look at http://www.mochibot.com/ i stumbled over it in some OSS flas, might be interesting in your case as well.
As for hiding content:
Code:
var endViewMe:Date = new Date(2006, 0, 11); // 11th of jan (tomorrow)
var now:Date = new Date();
// if you don't trust the users date, get it from your server.
if(now > endViewMe){
// remove all content
_level0.unloadMovie();
}
And yes, all content viewed by a user is data on his comp.. Sometimes harder to save, sometimes not.. pro-flashers (no not the english football fans) will get into allmost any flash you made..
It depends on the level of security/obscurity you want..
My letters on the F1 key have faded, how are yours today?
Thanks for the articles. I will be reading them today
One other question, how hard would it be to make something like this? You make a flash movie and when it opens up it asks you for a password. Before the movie can be viewed the correct password needs to be entered. When a password is entered the flash movie checks it against a master copy which resides on a servers text file. If the two passwords match, the movie plays. If the passwords don't match, the movie doesn't play. How hard would it be to do something like this?
You could create a txt file in notepad using your password...oh boy...
Put this onto your first frame...
stop()
loadtextContent = new LoadVars();
// Load the text file into my movie
loadtextContent.load("password.txt");
// Start a new function to load the text file
loadtextContent.onLoad = function(success) {
if (success) {
// loads the file into mytextbox
_root.passWord = this.password
}
if (!success) {
trace("File could not be loaded");
}
};
Now open up notepad and put in the following:
password=cats
save it as
password.txt
Now, go into flash. Create a Input TextField. get it the variable
_root.pass
Now, create a go button.
Give it the following script:
on (press) {
if (_root.pass == _root.passWord) {
_root.gotoAndStop(2);
} else {
_root.pass = "Incorrect password!";
}
}
Now, create a keyframe on frame 2, this is where your movie will be. Put something like "correct password" on it or something , or the start of your movie. Put a stop() on that frame.
Thats it, not the most secure way, because people might be able to get the txt file by guessing the URL, but meh.
Oh ye, the txt file has to be in the same folder as where the swf is
Loading a textfile into flash is a rather insecure method for password checking. It would be a better idea to send the password as a variable to a PHP or other backend script that checks the password in a textfile and only returns true or false to flash.
It would be a better idea to send the password as a variable to a PHP or other backend script that checks the password in a textfile and only returns true or false to flash.
We don't know PHP but if I understand this correctly then you are saying that the flash movie would send the password that they enter to a PHP file on the server. The PHP file would then look at the text file, and if it was the correct password then it would return a 'true' to the flash movie and it would ply. If the password was incorrect then it would return a 'false' and the movie would not play. Is this correct?
How would the flash movie know to look for an external true/false from the PHP file?