JavaScript and Flash

G

GG goodwin

I would like to use JavaScript to disable Flash on the click of a HTML link.

Is it advisable to use JavaScript to disable a Flash movie? Is it worth me
implementing this when you can get software which will disable Flash?

What is the best way to do this?

At the moment, I have got it so that when you click a HTML link it hides the
Flash movie, using the CSS property

display: none;

Would the Flash movie still be running in the background using this method?
I would like to free up the user's CPU.

Cheers,

GG.
 
C

cwdjrxyz

I would like to use JavaScript to disable Flash on the click of a HTML link.

Is it advisable to use JavaScript to disable a Flash movie? Is it worth me
implementing this when you can get software which will disable Flash?

What is the best way to do this?

At the moment, I have got it so that when you click a HTML link it hides the
Flash movie, using the CSS property

display: none;

Would the Flash movie still be running in the background using this method?
I would like to free up the user's CPU.

For those with Firefox and some other Mozilla browsers it is very easy
to block flash if the browser user wishes. One needs only go to the
tools tab at the top of Firefox, select add-ons, scroll to the bottom
of the window that comes up, and select to see all add-ons. You will
find Flashblock 1.5.6 as an approved Firefox add-on. Some people must
like it, as there have been nearly 3 million downloads.

While blocking flash may be useful on web pages with a lot of flash
ads that jump out at you, it is not at all desired for many pages
concerned with media. Flash movies of the FLV/SWF sort are now likely
the most used format for news site video clips. And a YouTube or
MySpace user would likely curse anyone who turned off their flash.
Like many other things, flash video, especially the newer FLV/SWF, can
either be wonderful or abused such as in nasty ads that expand and
cover much of the page when your cursor comes close to them. The easy
solution for me is to use one browser set up to block a lot of things
you often don't like and use another browser with little blocked.

The user's CPU may not need freeing up. To process 1 GB .vob DVD movie
files, etc, the CPU demands for this make the CPU demands for the
usual web page seem trivial. If modern desktops were designed only for
viewing web page and not for working on media and playing some modern
games, then the CPU ability of them would be great overkill.
 
T

Travis Newbury

I would like to use JavaScript to disable Flash on the click of a HTML link.

Do you own the Flash? If so you can stop CPU usage in the code. Use
the ExternalInterface to speak to interface with the page to stop your
Flash movie. If you don't own it, put it in a div and on click of a
button re-write the div content, say to an image.
 
C

cwdjrxyz

For those with Firefox and some other Mozilla browsers it is very easy
to block flash if the browser user wishes. One needs only go to the
tools tab at the top of Firefox, select add-ons, scroll to the bottom
of the window that comes up, and select to see all add-ons. You will
find Flashblock 1.5.6 as an approved Firefox add-on. Some people must
like it, as there have been nearly 3 million downloads.

While blocking flash may be useful on web pages with a lot of flash
ads that jump out at you, it is not at all desired for many pages
concerned with media. Flash movies of the FLV/SWF sort are now likely
the most used format for news site video clips. And a YouTube or
MySpace user would likely curse anyone who turned off their flash.
Like many other things, flash video, especially the newer FLV/SWF, can
either be wonderful or abused such as in nasty ads that expand and
cover much of the page when your cursor comes close to them. The easy
solution for me is to use one browser set up to block a lot of things
you often don't like and use another browser with little blocked.

The user's CPU may not need freeing up. To process 1 GB .vob DVD movie
files, etc, the CPU demands for this make the CPU demands for the
usual web page seem trivial. If modern desktops were designed only for
viewing web page and not for working on media and playing some modern
games, then the CPU ability of them would be great overkill.

I see one problem with using Javascript to turn flash off or on. Some
people turn script off, and it seems that those who do would be more
likely to want to turn flash off too than those who do not turn script
off. At the w3schools site, they record that about 20% had script off
in 2000 and about 5% do in 2008. These numbers may be a bit higher
than for the general public, because visitors to the w3schools site
likely have more interest in details of computing than most. Some of
the general public do not even know that script can be turned off.
However the trend seems to be that fewer now turn off script than in
the past. Of course those with script turned off would not be able to
use a method based on script to turn flash off.
 
G

GG goodwin

Do you own the Flash?
Yes

If so you can stop CPU usage in the code. Use
the ExternalInterface to speak to interface
with the page to stop your
Flash movie.

Hi, thanks. Do you have an example of using ExternalInterface?

Cheers,

GG.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top