Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Re: FLASH: Can you display SWF or image
From: YouNet
Date: Sun, 15 Oct 2000 22:25:51 +0100

Use javascript to detect, then replace the sections of HTML accordingly
using the "document.write" function. Set a variable, we'll call "flash"
when detecting the player. If it detected set the variable to 1, if not, set
it to 0. This example is for one dynamic element only, but, can be scaled
easily with more "content" variables. Then do this:

<CODE>

function givecontent() {
var flash=0;
// set flash to zero just in case.
// detect your user agents(flash plugin), you probaly already know how to do
this so I won't type it. remember to set the variable flash in these
detections.

var content=" ";
if (flash==1) {
content="write your html for the flash section here(in html, being
sure to replace all "s with 's ";
}
if(flash==0) {
content="write your static html for non-flash users here";
}
}

</CODE>

in your body tag use the "OnLoad" event to call your "givecontent" function
like this: <body blahblahblah OnLoad=givecontent()>

Then in your document call your function like this:(where you would like the
content replaced)

<script language=Javascript>
<!--
document.write=content;
-->
</script>

That should do it. If there are any problems with it just yell, I started
in javascript about 2 weeks ago, but, I figured I would give a possible
solution.
Let me know if it turns out O.K. Thanks.
HTH,
Mike Waldrup




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NudeGuru.com is proud to sponsor the Flasher list
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IT'S THE ART OF MONEY, HONEY!
Tips and Advice from some of the most popular Flash
artists + industry power-brokers on how to hold onto
your rights, negotiate contracts and get full value
for your work.http://www.nudeguru.com from Franke James
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  Re: FLASH: Can you display SWF or image, YouNet

Replies
  Re: FLASH: Re: graphic card and flash 5, Silent Noise
  FLASH: Can you display SWF or image, stephan seifert

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]