check browser plag in

S

steve

Hi

Can I do something like this:
For example I have a flash banner on my page
If I make a gif animation something similar to the flash one
can I put some script to check the browser plug in and if the browser
have plug in flash to display the flash
and if the browser do not have flash to display the gif image.
How do I achieve that if it is possible

Thanks
 
T

Toby A Inkster

steve said:
can I put some script to check the browser plug in and if the browser
have plug in flash to display the flash
and if the browser do not have flash to display the gif image.
How do I achieve that if it is possible

<object type="application/x-shockwave-flash" data="flash.swf" height="100" width="150">

<img type="image/gif" src="mypicture.gif" height="80" width="20"
alt="Alternative text">

</object>

This will display the flash file, but if this is not possible will display
the image file and if that isn't possible, display some alternative text.
 
S

steve

steve said:
<object type="application/x-shockwave-flash" data="flash.swf" height="100" width="150">

<img type="image/gif" src="mypicture.gif" height="80" width="20"
alt="Alternative text">

</object>

This will display the flash file, but if this is not possible will display
the image file and if that isn't possible, display some alternative
text.

It work fine if the browser do not have flash plug in.
But if the browser have flash plug in it displaying both the flash
movie and the gif animation.
How can I make it to display only flash in that case?

Thanks
 
T

Toby A Inkster

steve said:
It work fine if the browser do not have flash plug in.
But if the browser have flash plug in it displaying both the flash
movie and the gif animation.

That is what the HTML above should do!

Are you saying that it displays both the Flash and the image in your
browser? If so, that is a browser bug. Which browser are you using? I'd
like to see this!
 
L

Leif K-Brooks

steve said:
But if the browser have flash plug in it displaying both the flash
movie and the gif animation.
How can I make it to display only flash in that case?

Get Microsoft to fix your browser.
 
S

steve

steve said:
That is what the HTML above should do!

Are you saying that it displays both the Flash and the image in your
browser? If so, that is a browser bug. Which browser are you using? I'd
like to see this!

Yes
It is Internet Explorer 6 (with SP1)
 
S

steve

Are you saying that it displays both the Flash and the image in
your
Could you post a URL?

I have not upload it at
but if you want me to I will

this code work only if the machine do not have flash install
and than it display the image
but if the machine have flash
than the page just can not open

<object type="application/x-shockwave-flash" data="testflash.swf"
height="100" width="150">
<img type="image/gif" src="testgif.gif" height="80" width="20"
alt="Alternative text">
</object>
---------------------------------------


this code work fine with machine with flash and machine with out flash
but I'm not sure it is the right way

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
width="430" height="28">
<param name="movie" value="testflash.swf">
<img type="image/gif" src="testgif.gif" height="80" width="80"
alt="Alternative text">
</object>
-------------------------------------
 
T

Toby A Inkster

steve said:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
width="430" height="28">
<param name="movie" value="testflash.swf">
<img type="image/gif" src="testgif.gif" height="80" width="80"
alt="Alternative text">
</object>

It probably wouldn't display the Flash file in Netscape (except 7.1), nor
in any version of Opera, nor any Mac browser(?) even if the Flash plugin
was installed.
 
S

steve

steve said:
It probably wouldn't display the Flash file in Netscape (except 7.1), nor
in any version of Opera, nor any Mac browser(?) even if the Flash plugin
was installed.

So which one is the correct way to do it?
 
S

Steve Pugh

steve said:
So which one is the correct way to do it?

I can't believe no one's pointed you at this article yet:

http://www.alistapart.com/articles/flashsatay/

Read it carefully all the way through.

My own tests concur with the authors of that article. The best way to
include a Flash movie for modern browsers is:

<object type="application/x-shockwave-flash" data="testflash.swf"
height="100" width="150">
<param name="movie" value="testflash.swf">
<img type="image/gif" src="testgif.gif" height="80" width="80"
alt="Alternative text">
</object>

This works in IE, Mozilla, Opera, etc. Only old browsers like Netscape
4 won't be able to see the Flash movie.

Steve
 
S

steve

I can't believe no one's pointed you at this article yet:
http://www.alistapart.com/articles/flashsatay/

Read it carefully all the way through.

My own tests concur with the authors of that article. The best way to
include a Flash movie for modern browsers is:

<object type="application/x-shockwave-flash" data="testflash.swf"
height="100" width="150">
<param name="movie" value="testflash.swf">
<img type="image/gif" src="testgif.gif" height="80" width="80"
alt="Alternative text">
</object>

This works in IE, Mozilla, Opera, etc. Only old browsers like Netscape
4 won't be able to see the Flash movie.

That it is.

Thanks
 

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,756
Messages
2,569,540
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top