Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,208,203 members, 8,001,887 topics. Date: Wednesday, 13 November 2024 at 06:06 PM |
Nairaland Forum / Science/Technology / Webmasters / Flash Advert Rotator Script Needed. (968 Views)
Original Nairaland.com Script Needed Urgently! / Sms Script Needed / Advert Rotator Problem / Help! ! ! (2) (3) (4)
Flash Advert Rotator Script Needed. by OmniPotens(m): 11:18pm On Mar 09, 2008 |
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. Pls can someone help with out with this script? |
Re: Flash Advert Rotator Script Needed. by webemerald(m): 2:04pm On Mar 10, 2008 |
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 |
Re: Flash Advert Rotator Script Needed. by aphoe(m): 2:07pm On Mar 12, 2008 |
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? |
Re: Flash Advert Rotator Script Needed. by OmniPotens(m): 3:47pm On Mar 16, 2008 |
@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. Pls, if you've got a good link, can you help me out with it. |
Re: Flash Advert Rotator Script Needed. by webguru(m): 8:26pm On Mar 16, 2008 |
use javascript replace filename wt flash name period! |
Re: Flash Advert Rotator Script Needed. by tundewoods(m): 1:59am On Mar 17, 2008 |
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);?> |
Re: Flash Advert Rotator Script Needed. by nduaj(m): 10:25am On Mar 17, 2008 |
@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. |
Re: Flash Advert Rotator Script Needed. by tundewoods(m): 10:49am On Mar 17, 2008 |
@ 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. |
Re: Flash Advert Rotator Script Needed. by josyisback(m): 11:22am On Mar 17, 2008 |
incase you still have problem go to www.scriptsearch.com and search for ads rotator.that would do you good. |
Re: Flash Advert Rotator Script Needed. by OmniPotens(m): 12:21pm On Mar 17, 2008 |
@ 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. |
Re: Flash Advert Rotator Script Needed. by aphoe(m): 12:51pm On Mar 17, 2008 |
i will try and work on a code i will test and send it tomorrow |
(1) (Reply)
Website Design Collaboration / Any Availaible Info On This Web Host? / Please Urgent Help Here Php
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 76 |