Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Directory Submission Service   ClickBooth Network   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 11-16-2004, 11:45 AM   #1 (permalink)
Inactive
 
Join Date: 08-22-04
Posts: 30
iTrader: 0 / 0%
Latest Blog:
None

nedzad is liked by many
Question swf banner rotator

Hi,

I am looking for free banner rotator of .swf files. Does anyone know where I can find any??
nedzad is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 11-16-2004, 12:45 PM   #2 (permalink)
v7n Mentor
 
imaginemn's Avatar
 
Join Date: 02-18-04
Location: Minneapolis, Minnesota
Posts: 1,940
iTrader: 0 / 0%
imaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to all
Send a message via MSN to imaginemn Send a message via Yahoo to imaginemn Send a message via Skype™ to imaginemn
You could try something like this. You may want to tweak it to fit your needs but this will prove concept. Make sure the array DOES NOT WRAP.

Code:
<script language="Javascript"> <!-- var currentdate = 0 var core = 0 function StringArray (n) { this.length = n; for (var i =1; i <= n; i++) { this[i] = ' ' } } image = new StringArray(4) image[0] = '<OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab #version=5,0,0,0 id=Banner><PARAM NAME=movie VALUE=flashAD.swf><PARAM NAME=quality VALUE=high><PARAM NAME=menu VALUE=false><EMBED src=flashAD.swf quality=high TYPE=application/x-shockwave-flash PLUGINSPAGE=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash></EMBED></OBJECT>' image[1] = 'Text only ad' image[2] = '<a href="ad.htm">Text AD</a>' image[3] = '<img src="ad.jpg">' var ran = 60/image.length function radAD() { currentdate = new Date() core = currentdate.getSeconds() core = Math.floor(core/ran) return(image[core]) } document.write(radAD()) //--> </script>
imaginemn
__________________
Need a project done? - Set Your Own Price!
Imagine Creative Services
- Design : Marketing : Multimedia : More
imaginemn is offline  
Add Post to del.icio.us
Reply With Quote
Old 11-16-2004, 01:59 PM   #3 (permalink)
Inactive
 
Join Date: 08-22-04
Posts: 30
iTrader: 0 / 0%
Latest Blog:
None

nedzad is liked by many
hey, thanks, I will try it almost imidiately :-)
nedzad is offline  
Add Post to del.icio.us
Reply With Quote
Old 11-16-2004, 02:13 PM   #4 (permalink)
Inactive
 
Join Date: 08-22-04
Posts: 30
iTrader: 0 / 0%
Latest Blog:
None

nedzad is liked by many
hm, it is difficult for me. have you additional advice for this?
nedzad is offline  
Add Post to del.icio.us
Reply With Quote
Old 11-16-2004, 02:23 PM   #5 (permalink)
v7n Mentor
 
imaginemn's Avatar
 
Join Date: 02-18-04
Location: Minneapolis, Minnesota
Posts: 1,940
iTrader: 0 / 0%
imaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to all
Send a message via MSN to imaginemn Send a message via Yahoo to imaginemn Send a message via Skype™ to imaginemn
Quote:
Originally Posted by nedzad
hm, it is difficult for me. have you additional advice for this?
The only thing you need to change are the following.

Step 1 update the following line.

StringArray(4)

Change the number to the number of files you are rotating.

Step 2 add your own ads

image[0] = '<OBJECT. . .' (make sure you add your own flash file in the object tags)
image[1] = '<OBJECT. . .'
image[2] = '<OBJECT. . .'

Remember JavaScript starts with 0. So the StringArray value would be then final number + 1. In this example it would be (3).

Once this is complete add this to the section of the site you want to display it in.

imaginemn
__________________
Need a project done? - Set Your Own Price!
Imagine Creative Services
- Design : Marketing : Multimedia : More
imaginemn is offline  
Add Post to del.icio.us
Reply With Quote
Old 11-16-2004, 04:33 PM   #6 (permalink)
v7n Mentor
 
imaginemn's Avatar
 
Join Date: 02-18-04
Location: Minneapolis, Minnesota
Posts: 1,940
iTrader: 0 / 0%
imaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to all
Send a message via MSN to imaginemn Send a message via Yahoo to imaginemn Send a message via Skype™ to imaginemn
I created a working sample here.

http://www.imaginemn.com/flash_ads.htm

imaginemn
__________________
Need a project done? - Set Your Own Price!
Imagine Creative Services
- Design : Marketing : Multimedia : More
imaginemn is offline  
Add Post to del.icio.us
Reply With Quote
Old 11-17-2004, 08:37 AM   #7 (permalink)
Inactive
 
Join Date: 08-22-04
Posts: 30
iTrader: 0 / 0%
Latest Blog:
None

nedzad is liked by many
hey it looks great. I just came from my job and after launch I will immidiately try this, if is needed whole night :-)

Thanks again

_____________________
www.proauto.ba
www.maoles.com
www.ferk.ba
www.kuca-mostar.50megs.com
www.moj-studio.com
nedzad is offline  
Add Post to del.icio.us
Reply With Quote
Old 11-17-2004, 11:01 AM   #8 (permalink)
Inactive
 
Join Date: 08-22-04
Posts: 30
iTrader: 0 / 0%
Latest Blog:
None

nedzad is liked by many
I put this:

<script language="Javascript">
<!--
var currentdate = 0
var core = 0

function StringArray (n) {
this.length = n;
for (var i =1; i <= n; i++) {
this[i] = ' '

}
}

image = new StringArray(2)
image[0] = '<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="120" height="600"><param name="movie" value="../../baneri/11.swf"><param name="quality" value="high"><embed src="../../baneri/11.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="120" height="600">></EMBED></OBJECT>'
image[1] = '<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="120" height="600"><param name="movie" value="../../baneri/12.swf"><param name="quality" value="high"><embed src="../../baneri/12.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="120" height="600">></EMBED></OBJECT>'

var rand = 100/image.length

function radAD() {
currentdate = new Date()
core = currentdate.getSeconds()
core = Math.floor(core/rand)
return(image[core])
}

document.write(radAD())

//-->
</script>


in file on:

http://www.proauto.ba

but I can not see banner change? Can you imagine why??

Thanks

Last edited by nedzad : 11-17-2004 at 11:10 AM.
nedzad is offline  
Add Post to del.icio.us
Reply With Quote
Old 11-17-2004, 11:11 AM   #9 (permalink)
v7n Mentor
 
imaginemn's Avatar
 
Join Date: 02-18-04
Location: Minneapolis, Minnesota
Posts: 1,940
iTrader: 0 / 0%
imaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to all
Send a message via MSN to imaginemn Send a message via Yahoo to imaginemn Send a message via Skype™ to imaginemn
The code is for rotating an image everytime a person goes to the page. If you want it to rotate while the user is reading the page, additional code is required. On my online example I use the following code to refresh the page.

<script type="text/javascript">setTimeout('location.href = location.href',15000);</script>

There are a few ways to handle the rotation. This was the quickest way to do it.

imaginemn
__________________
Need a project done? - Set Your Own Price!
Imagine Creative Services
- Design : Marketing : Multimedia : More
imaginemn is offline  
Add Post to del.icio.us
Reply With Quote
Old 11-17-2004, 12:09 PM   #10 (permalink)
Inactive
 
Join Date: 08-22-04
Posts: 30
iTrader: 0 / 0%
Latest Blog:
None

nedzad is liked by many
this is about refresh complete page, but what if I wanna refresh only curent banner and replace it with another?
nedzad is offline  
Add Post to del.icio.us
Reply With Quote
Old 11-17-2004, 01:09 PM   #11 (permalink)
Inactive
 
Rivux's Avatar
 
Join Date: 10-13-03
Location: Ontario, Canada
Posts: 783
iTrader: 0 / 0%
Latest Blog:
None

Rivux is a jewel in the roughRivux is a jewel in the roughRivux is a jewel in the roughRivux is a jewel in the roughRivux is a jewel in the roughRivux is a jewel in the roughRivux is a jewel in the roughRivux is a jewel in the rough
Send a message via ICQ to Rivux
You could place the banner in an iframe and just refresh that iframe.
Rivux is offline  
Add Post to del.icio.us
Reply With Quote
Old 11-17-2004, 01:29 PM   #12 (permalink)
v7n Mentor
 
imaginemn's Avatar
 
Join Date: 02-18-04
Location: Minneapolis, Minnesota
Posts: 1,940
iTrader: 0 / 0%
imaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to all
Send a message via MSN to imaginemn Send a message via Yahoo to imaginemn Send a message via Skype™ to imaginemn
The previous JavaScript was designed to print out a random banner ad each time your page is viewed.

Why not try this instead. Create a blank.swf file with the following actionscript and load that on your page. Then create all your flash banner images and name them banner1.swf, banner2.swf, etc. In this example you will always have to have 10 banners in the banners directory. You can also pass a variable to the actionscript so you don't have to hardcode the # of banners.

Please note that the following code is not complete. The code needs a way to restart and reload a new file. It can be done through actionscript. I'm sure there are better ways to do this but right now I'm running late for a meeting.

ActionScript Code:

randomNumber = random(10);
bannerToLoad = "/banners/banner" + randomNumber + ".swf";
loadMovieNum(bannerToLoad , 0);

IFrame option should work as well as Rivux mentioned.

imaginemn
__________________
Need a project done? - Set Your Own Price!
Imagine Creative Services
- Design : Marketing : Multimedia : More
imaginemn is offline  
Add Post to del.icio.us
Reply With Quote
Old 11-19-2004, 05:29 AM   #13 (permalink)
Contributing Member
 
Jason's Avatar
 
Join Date: 05-17-04
Location: London, United Kingdom
Posts: 1,198
iTrader: 0 / 0%
Latest Blog:
None

Jason is just really niceJason is just really niceJason is just really niceJason is just really niceJason is just really niceJason is just really niceJason is just really niceJason is just really niceJason is just really niceJason is just really niceJason is just really nice
Send a message via MSN to Jason
Nedzad - does 50megs.com host server side includes and banner free?
Jason is offline  
Add Post to del.icio.us
Reply With Quote
Old 11-21-2004, 01:25 PM   #14 (permalink)
Inactive
 
Join Date: 08-22-04
Posts: 30
iTrader: 0 / 0%
Latest Blog:
None

nedzad is liked by many
I came to bosnia again :-)

I do not know does it includes banner free?
nedzad is offline  
Add Post to del.icio.us
Reply With Quote
Old 11-21-2004, 01:27 PM   #15 (permalink)
Inactive
 
Join Date: 08-22-04
Posts: 30
iTrader: 0 / 0%
Latest Blog:
None

nedzad is liked by many
Hey Imagine, this is great idea and you make me fieel stuipd, really!!
nedzad is offline  
Add Post to del.icio.us
Reply With Quote
Old 05-31-2006, 04:16 AM   #16 (permalink)
Inactive
 
Join Date: 05-31-06
Posts: 1
iTrader: 0 / 0%
Latest Blog:
None

tidope is liked by many
Quote:
Originally Posted by imaginemn
The code is for rotating an image everytime a person goes to the page.
This is what i really need.... but unfrtunately i have tried the above code and it is not showing the swf banner at all on my page...

www.thevoicebw.com

I really need help how to rotate the swf banner..

TX
tidope is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help for random banner rotator script googlesuccess Coding Forum 2 11-17-2006 12:22 PM
PHP Rotator SN3 Coding Forum 15 02-24-2005 05:35 PM
Banner Rotator Pimpen 2010 Coding Forum 9 05-26-2004 12:21 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 03:27 PM.
© Copyright 2008 V7 Inc

Click Here