Google Answers Logo
View Question
 
Q: Domain Locking for Macromedia Flash / Actionscript ( Answered 5 out of 5 stars,   0 Comments )
Question  
Subject: Domain Locking for Macromedia Flash / Actionscript
Category: Computers > Software
Asked by: cacho804-ga
List Price: $4.50
Posted: 31 Mar 2006 12:45 PST
Expires: 30 Apr 2006 13:45 PDT
Question ID: 714090
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!
Answer  
Subject: Re: Domain Locking for Macromedia Flash / Actionscript
Answered By: hammer-ga on 31 Mar 2006 15:14 PST
Rated:5 out of 5 stars
 
Cacho804,

The code sample at the following link will do what you need.
http://www.wildform.com/support/tutorials/SecuringFlixVideos/#2

Just change the siteURL variable to your domain name.

Good luck with your Flash project!

- Hammer


Search strategy
---------------
flash actionscript protect secure url
cacho804-ga rated this answer:5 out of 5 stars
The correct answer was provided in a very timely and professional
manner.  Thank you!!

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy