Emm..... I don't exactly know what do you want,
but try this if that's what you want:

make an array to put your IMG files,
make another array to put your SWF files.

make a random 0, 1 to choose if you want to output
as IMG or SWF

if IMG, random a file from the IMG array,
if SWF, random a file from the SWF array,

if ($type = "img" ) { print "<img src=$imgfile width=......>" }
elsif ($type="swf") { print "<embed src=$swffile width=....>" }
## you may set width=100\% and height=100\%
else { print "Hi!" }

Hope this help,
Smiley Connie =)


----- Original Message -----
From: "Troy May" <[EMAIL PROTECTED]>
To: "Beginners CGI List" <[EMAIL PROTECTED]>
Sent: Tuesday, July 02, 2002 5:41 AM
Subject: Random images on a bulletin board


> Hello,
>
> I'm trying to make a random signature for use on bulletin boards.  Images
> are fine, they are set sizes.  But I'm trying to make it display Flash
files
> also.  These Flash files default to full-screen when there are no size
> limits set.  I can't figure out how to adjust this script to display
images
> AND Flash files.  Here's part of the script:
>
> ---------------
> $basedir = "http://www.mysite.com/sigs/";
>  @files =
>
("Night1.jpg","Night3.jpg","Nightshade5.jpg","Kimme2s.jpg","Amazsig.gif","Ni
> ghtshade1.jpg");
>
> srand(time ^ $$);
> $plup = rand(@files);
> print "Location: $basedir$files[$plup]\n\n";
> ---------------
>
> This works with just these images.  But these .swf files have to be
limited
> to 100x100 through HTML.
>
> Any ideas, or is this impossible?
>
> Troy
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to