...

View Full Version : New image/flash movie everytime you go to page?



Richtoon
08-03-2005, 03:58 PM
Hi .

New to this forum. Not quite sure where this question would fall into, category-wise.

I'd like to create a web page that has a flash movie in it.

But the catch is this: Everytime you'd go to this web page, I'd like it to be coded in such a way that it would play at random one of a certain amount of flash movies.

So is this done in FlashMX? JavaScript? I have DreamweaverMX if that can help....

If anyone can point me in the right direction, I'd greatly appreciate it.

Richtoon

mark87
08-03-2005, 04:03 PM
A server side option would probably be best as javascript can be disabled.

PHP, if your host supports it, would easily be able to do such a thing.

Have a look at this random image script -

http://www.totallyphp.co.uk/scripts/random_image.htm

You could easily modify it so instead of an image, it does the flash file like so -

Instead of -

echo "<img src=\"$image_folder/$image_name\" alt=\"$image_name\" />";

You could have -

echo "<embed src=\"$image_folder/$image_name\" />";

(I can't remember exactly how to embed a flash file (should you use Object instead of Embed?), but you get the idea I hope! :) )

Richtoon
08-03-2005, 04:08 PM
Hey mark87,

I'm gonna contact my host right after this.

This might do the trick! if its supported.

I am a little new to this so I'll have to baby step my way through it all but hopefully this is the first step.


I'll post it here as soon as I know that the host can handle PHP. Got a phone call to make.
Thanks,
Richtoon

Richtoon
08-03-2005, 04:35 PM
I called and they seem to think that anything will work... But they did not know what PHP was....gulp. Will just have to write up something quick and see if it works.


Richtoon

mark87
08-03-2005, 04:59 PM
Do a quick php test, but if you are paying for hosting, you will most probably be able to use it.

Save the following a .php file, upload and view it. If you see a lot of info, then PHP works! :thumbsup:

<?php
phpinfo();
?>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum