I am looking for specific information and Actionscript code samples
for a particular script which can be added to a macromedia flash
document to lock, or sometimes called "marry", it for use only on a
local hard drive or a specific, supplied domain name. I located a
page providing this information several months ago, but am now unable
to find it. |
Request for Question Clarification by
hammer-ga
on
31 Mar 2006 13:02 PST
Cach0804,
Is this what you want?
http://www.wildform.com/support/tutorials/SecuringFlixVideos/#2
- Hammer
|
Clarification of Question by
cacho804-ga
on
31 Mar 2006 13:11 PST
This looks like the code to disable a flash document if it is not at a
certian URL, but I'm looking for code which allows it to play as long
as it is hosted on a specific domain name, not necessarily at a
specific URL. This came very close, but was not the page I was
looking for.
Regards,
Cacho804
|
Clarification of Question by
cacho804-ga
on
31 Mar 2006 13:15 PST
I also seem to recall that the page I was speaking of contained code
and and introduction / tutorial on allowing the Flash document to be
playable from a local drive. This is not vital to answering my
question, but it may help in locating the page in question.
|
Request for Question Clarification by
hammer-ga
on
31 Mar 2006 13:24 PST
Cach804,
Will the code I pointed you at not work as you request if you simply
change this line...
siteURL = "http://www.wildform.com/tutorials/SecuringFlixVideos/secure/secure.swf";
...to this?:
siteURL = "http://www.wildform.com";
- Hammer
|
Clarification of Question by
cacho804-ga
on
31 Mar 2006 13:55 PST
I don't think so, as in this code sample, the SiteURL variable is the
actual path to the swf flash file.
|
Request for Question Clarification by
hammer-ga
on
31 Mar 2006 14:04 PST
Cach804,
Yes, but only becuase the example wants to compare the entire URL. This line:
if (_url.substr(0,siteURL.length) == siteURL)
...compares the value in SiteURL to the actual URL of the swf. It only
compares to the length of the value in siteURl so, if the swf is at
http://www.wildform.com/tutorials/SecuringFlixVideos/secure/secure.swf
and siteURL is:
http://www.wildform.com
...then the comparison will parse off the beginning of the swf
location to the length of the value in siteURL which results in
http://www.wildform.com
...which returns a match.
However, if the swf has been moved to:
http://www.goofus.com/secure.swf
... then the parse result will be:
http://www.goofus.com/s
...which does not match.
- Hammer
|
Clarification of Question by
cacho804-ga
on
31 Mar 2006 14:59 PST
Excellent!!!
This works with no problem. Thanks!
|