473,385 Members | 1,536 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

SWF Files

I have some Flash SWF games on my website with advertising banners on them.
People access a certain game by going to
http://www.mysite.com/flashgame.htm. With IE no problem. But in Firefox they
can type in http://www.mysite.com/flashgame.swf and bypass my banners. The
banners help pay for me hosting these games.

Is there a way with javascript that I can tell when they are going directly
to the swf file instead of going to the htm page? And redirect them to the
htm file? Thanks a lot.

Jun 14 '07 #1
6 1742
Troy D wrote:
I have some Flash SWF games on my website with advertising banners on
them. People access a certain game by going to
http://www.mysite.com/flashgame.htm. With IE no problem. But in Firefox
they can type in http://www.mysite.com/flashgame.swf and bypass my
banners. The banners help pay for me hosting these games.

Is there a way with javascript that I can tell when they are going
directly to the swf file instead of going to the htm page? And redirect
them to the htm file? Thanks a lot.
No.

Just wondering though... what is to stop an Internet Explorer user from
loading your SWF in the address bar?

Anyway... if you have access to the server-side aspect of things, you
could use mod_rewrite to redirect all SWF requests back to their HTML
equivalents.

--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.
Jun 14 '07 #2
-Lost wrote:
Troy D wrote:
>I have some Flash SWF games on my website with advertising banners on
them. People access a certain game by going to
http://www.mysite.com/flashgame.htm. With IE no problem. But in
Firefox they can type in http://www.mysite.com/flashgame.swf and
bypass my banners. The banners help pay for me hosting these games.

Is there a way with javascript that I can tell when they are going
directly to the swf file instead of going to the htm page? And
redirect them to the htm file? Thanks a lot.

No.

Just wondering though... what is to stop an Internet Explorer user from
loading your SWF in the address bar?

Anyway... if you have access to the server-side aspect of things, you
could use mod_rewrite to redirect all SWF requests back to their HTML
equivalents.
Oh yeah, you could also check the URL via Flash. If it contains SWF
redirect to the HTML equivalents.

I know a lot of Flash designers who employ this method as a security
feature to protect their files.

--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.
Jun 14 '07 #3
Just wondering though... what is to stop an Internet Explorer user from
loading your SWF in the address bar?
Trying to view an swf file doesn't work if you go to
http://www.mydomain.com/thisgame.swf. Or it doesn't for me.
Anyway... if you have access to the server-side aspect of things, you
could use mod_rewrite to redirect all SWF requests back to their HTML
equivalents.
I will see about the mod_rewrite. Thanks.

Jun 14 '07 #4
Just wondering though... what is to stop an Internet Explorer user from
loading your SWF in the address bar?
Trying to view an swf file, with IE7, doesn't work if you go to
http://www.mydomain.com/thisgame.swf. Or it doesn't for me.
Anyway... if you have access to the server-side aspect of things, you
could use mod_rewrite to redirect all SWF requests back to their HTML
equivalents.
I will see about the mod_rewrite. Thanks.

Jun 16 '07 #5
Anyway... if you have access to the server-side aspect of things, you
could use mod_rewrite to redirect all SWF requests back to their HTML
equivalents.
Lost, got the mod_rewrite to do exactly what I needed. Thanks a lot.
Jun 18 '07 #6
Troy D wrote:
>Anyway... if you have access to the server-side aspect of things, you
could use mod_rewrite to redirect all SWF requests back to their HTML
equivalents.
Lost, got the mod_rewrite to do exactly what I needed. Thanks a lot.
Glad everything worked out for ya'.

--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.
Jun 18 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mike | last post by:
I am sure that I am making a simple boneheaded mistake and I would appreciate your help in spotting in. I have just installed apache_2.0.53-win32-x86-no_ssl.exe php-5.0.3-Win32.zip...
44
by: Xah Lee | last post by:
here's a large exercise that uses what we built before. suppose you have tens of thousands of files in various directories. Some of these files are identical, but you don't know which ones are...
0
by: Tom Lee | last post by:
Hi, I'm new to .NET 2003 compiler. When I tried to compile my program using DEBUG mode, I got the following errors in the C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7 \include\xdebug...
18
by: JKop | last post by:
Here's what I know so far: You have a C++ project. You have source files in it. When you go to compile it, first thing the preprocessor sticks the header files into each source file. So now...
3
by: pooja | last post by:
Suppose i have created a class c1 with f1()in c1.cpp and included this c1.cpp in file1.cpp file , which is also having main() by giving the statement #include "c1.cpp". the same i can do by...
11
by: ambika | last post by:
Iam just trying to know "c". And I have a small doubt about these header files. The header files just contain the declaration part...Where is the definition for these declarations written??And how...
22
by: Daniel Billingsley | last post by:
Ok, I wanted to ask this separate from nospam's ridiculous thread in hopes it could get some honest attention. VB6 had a some simple and fast mechanisms for retrieving values from basic text...
18
by: UJ | last post by:
Folks, We provide custom content for our customers. Currently we put the files on our server and people have a program we provide that will download the files. These files are usually SWF, HTML or...
0
by: wal | last post by:
How does one attach files to emails using libgmail? The following code http://pramode.net/articles/lfy/fuse/4.txt works fine when said files are simple text files, but it failes as soon as the...
3
by: aRTx | last post by:
I have try a couple of time but does not work for me My files everytime are sortet by NAME. I want to Sort my files by Date-desc. Can anyone help me to do it? The Script <? /* ORIGJINALI
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.