JavaScript and Flash

Discussion in 'HTML' started by GG goodwin, Jul 22, 2008.

  1. GG goodwin

    GG goodwin Guest

    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.
    GG goodwin, Jul 22, 2008
    #1
    1. Advertising

  2. GG goodwin

    cwdjrxyz Guest

    On Jul 22, 2:28 pm, "GG goodwin" <> wrote:
    > 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.
    cwdjrxyz, Jul 23, 2008
    #2
    1. Advertising

  3. On Jul 22, 3:28 pm, "GG goodwin" <> wrote:
    > 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.
    Travis Newbury, Jul 23, 2008
    #3
  4. GG goodwin

    cwdjrxyz Guest

    On Jul 23, 12:37 am, cwdjrxyz <> wrote:
    > On Jul 22, 2:28 pm, "GG goodwin" <> wrote:
    >
    > > 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.


    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.
    cwdjrxyz, Jul 23, 2008
    #4
  5. GG goodwin

    GG goodwin Guest


    > 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.
    GG goodwin, Jul 24, 2008
    #5
  6. On Jul 24, 1:29 am, "GG goodwin" <> wrote:
    > > 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?


    yes, google "As3 externalinterface tutorial"
    Travis Newbury, Jul 24, 2008
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paul Hernandez
    Replies:
    1
    Views:
    491
    Tom F.
    Dec 3, 2003
  2. Charles A. Lackman

    Aspx and Javascript and Flash

    Charles A. Lackman, May 19, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    467
    =?Utf-8?B?c3Jpbmk=?=
    May 20, 2004
  3. Bernie
    Replies:
    0
    Views:
    527
    Bernie
    Sep 5, 2004
  4. Jim Higson
    Replies:
    1
    Views:
    492
    Jim Higson
    Sep 21, 2004
  5. Replies:
    8
    Views:
    23,455
    SABOND21
    Feb 9, 2012
Loading...

Share This Page