• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Javascript question for Flash - Can I get my Flash to check if the page that loads the movie is the right one?

simms

Diamond Member
Sorry, verbose question to a simple solution. I have a *.swf that I made, and it's just a midi/mp3 file. Can I use a Jscript/Actionscript to make it so that it will check the URL of the document that's accessing it, before loading/playing? That way people can't hotlink my swf file and use it.

Any way around it, suggestions?
-Simon 🙂
 
yup, but it can't help much if i don't know what i'm looking for. in theory, i'm looking for something like:

<script>
alert(document.referrer);
if (document.referrer.indexOf('mysite.com')<0) {window.location.href="http://www.yahoo.com/index.html"}
</script>

So... is it telling me the document referrer, and then comparing it to the page that it should be loaded on? If not, then it loads Yahoo in the window? I have no idea 🙁

Simon
 
Back
Top