|
OmniPotens
|
Can anyone help me out with a flash ad rotator script. I'm stock at this point. I urgently need this to be able to upload and show my client a demo of his website. He wishes to have about 10 advert of his products and that of his partner companies displayed in flash and not in animated gif. please can someone help with out with this script?
|
|
|
|
|
|
webemerald (m)
|
i believe if u google for a rotator script u will surely get one or else you can try out my dreamweaver extension, it can rotate images and swf files. let me know if u need it. webemerald@gmail.com
|
|
|
|
|
|
aphoe (m)
|
are all the products going to be in just one flash file/animation or a different product will be displayed each time the page is opened or refreshed?
|
|
|
|
|
|
OmniPotens
|
@aphoe Different products will be displayed whenever the pages are refreshed. Now, the adverts are 20 now and yet the flash script is not yet ready. please, if you've got a good link, can you help me out with it.
|
|
|
|
|
|
webguru
|
use javascript
replace filename wt flash name
period!
|
|
|
|
|
|
tundewoods (m)
|
Here is a quite easy to use random flash script that i guess you should be able to implement. Step 1 Copy the code into a text file and save as randomflash.php or give any name of your choice.
Step 2 Create a folder and place your flash files inside the folder. eg flash/random
Note that all the flash animations inside this folder will be random selected upon every refresh or reload of the page.
Step 3 Use the following serverside include code to call the randomflash.php // <?php require_once('randomflash.php'); ?>
<?php //***************EDIT FROM HERE********************* //Any directory name should end by the trailing "/" $your_dirname="random/flash/";//replace the "path to your flash directory /" by the name // of the directory where you image files are placed, note that the trailing "/" is mandatory
//You can change this if you want but it is not mendatory $your_alt_tag="ALT TAGS GO HERE ";// You may place image alt tags incase i put images in the directory
//
function displayaaphprandomimage($dirname, $alt){ $dirhandle = opendir($dirname); while (false !== ($file = readdir($dirhandle))) { if ($file != "." && $file != ", " && !@is_dir($file) ) { $filelist[] = $file; } } closedir($dirhandle); if(sizeof($filelist) ==0) { echo "No file was found in the directory!"; exit; } srand((double)microtime()*1000000); $picnum = @mt_rand(0, sizeof($filelist) - 1); $imageName=$dirname.$filelist[$picnum]; $imageSize = getimagesize($imageName); if($imageSize[2]==4 || eregi(".swf$", $imageName) ) { $result="\n<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" ".$imageSize[3].">"; $result .="\n<param name=\"movie\" value=\"".$imageName ."\">"; $result .="\n<param name=\"quality\" value=\"high\">"; $result .="\n<embed src=\"".$imageName ."\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" ".$imageSize[3]. "></embed></object>"; } else $result="\n<img src=\"".$imageName ."\" ". $imageSize[3] ."alt=\"". $alt. "\">"; return $result; } ?> <?php echo displayaaphprandomimage($your_dirname, $your_alt_tag);?>
|
|
|
|
|
|
nduaj (m)
|
@tundewoods
nice work!! but i have a question:
are u saying that the "clsid" and all other variables in the flash code can remain de same? so all u need to change is the "src" of the flash file?
If yes, then it means u can actually hook yur code to a Mysql/php script.
|
|
|
|
|
|
tundewoods (m)
|
@ Nduaj All the defined variables names are expected to remain the same including the clsid parameter that defines your flash movie in case the random file selected is a flash animation.
Bear in mind that the script will pick both flash movies and image files that are in a specific defined directory on your web server.
The script is a random file picker and may not necessary need to be plugged into a mysql database.
|
|
|
|
|
|
josyisback (m)
|
incase you still have problem go to www.scriptsearch.com and search for ads rotator.that would do you good.
|
|
|
|
|
|
OmniPotens
|
@ Posters
Thanks for all your contributions. One Love to you all!
@tundewoods Presently I'm working on your script. Thanks so much for your contribution. It's nice having you on this thread.
|
|
|
|
|
|
aphoe (m)
|
i will try and work on a code i will test and send it tomorrow
|
|
|
|
|
|