Programming Help Needed

General ShopSite user discussion

Programming Help Needed

Postby VinceS » Tue Feb 01, 2011 2:16 pm

I use a "banner" generated online from a site called flashVortex. If you go to any page other than my home page - http://www.ahoycaptain.com/shop/brands.html - you will see it display just below the header.

Here is the code that "calls" that particular banner.

<script src="http://h2.flashvortex.com/display.php?id=2_1291422044_4581_364_19723_416_60_9_2_26" type="text/javascript">
</script>

Pretty simple.
I want to display or rotate multiple banners for different promotions. If I create another banner I get another banner ID like this test banner.

<script src="http://h2.flashvortex.com/display.php?id=2_1296592458_633_495_19723_376_73_10_2_44" type="text/javascript">
</script>

Again pretty simple.

Can someone come up with a script or a function that accesses an array of these ID's that would scroll them one after another?
Other ideas are welcome.

Thanks
Vince
VinceS
 
Posts: 134
Joined: Fri Apr 06, 2007 1:26 pm

Re: Programming Help Needed

Postby ShopSite Lauren » Wed Feb 02, 2011 9:52 am

You can use the following script to rotate through flash files. You should note, that you would need to download the flash files (swf) that you want to link to, then upload them to your ShopSite store. You can upload them the same way you upload images to your store.

<script language="javascript">
<!--
files = new Array();
files[0] = "media/2_1291422044_4581_364_19723_416_60_9_2_26.swf";
files[1] = "media/2_1296592458_633_495_19723_376_73_10_2_44.swf";
index = Math.floor(Math.random() * files.length);
movie = files[index];
// now write out the object and embed tags replacing the filename with the variable movie
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width=416 height=60>');
document.write('<param name=movie value="' + movie + '"> <param name=quality value=best> <param name=allowScriptAccess value=always> <param name="menu" value="true">');
document.write('<embed src="' + movie + '" quality=best menu=true width=416 height=60 type=application/x-shockwave-flash pluginspage=http://www.macromedia.com/go/getflashplayer allowScriptAccess=always></embed>');
document.write('</object>');
//-->
</script>
- ShopSite Lauren
Contact me for help with any of your
custom ShopSite template questions.
ShopSite Lauren
 
Posts: 889
Joined: Fri Aug 11, 2006 1:35 pm
Location: Orem, UT

Re: Programming Help Needed

Postby VinceS » Wed Feb 02, 2011 10:19 am

Wow
Thanks Laura, I'll let you know how it works.

Best
Vince
VinceS
 
Posts: 134
Joined: Fri Apr 06, 2007 1:26 pm


Return to User Forum

Who is online

Users browsing this forum: Bing [Bot] and 123 guests

cron