PDA

View Full Version : Is it possible to have pictures on a page shuffle?


Pego999
07-29-2010, 04:04 AM
I would like to have 1 picture space on a page but a series of say 6 pictures to sequence through automatically on there own. Is there a way to do this?

edbr
07-29-2010, 04:17 AM
javascript, mbanner might suit your needs easily

Pego999
07-29-2010, 04:35 AM
javascript, mbanner might suit your needs easily

Thanks very much. This looks very good. Can you tell me how I would use this in DW? I am a newbee. TIA.

edbr
07-29-2010, 04:41 AM
hold on ill have to download it and check

edbr
07-29-2010, 04:45 AM
it comes with instructions see below. you need to upload the javascript and css files then change the javascript to file names you want there is an html page with usage examples also
STEP 1:
Copy files mBanner.js, mBanner.css

STEP 2:
Create a folder with name "banners" (Zip file already contains some sample images and swf files)
(For the current example
place 3 images and 3 swf files in "banners" folder
and rename them as
1.jpg, 2.jpg,3.jpg,
1.swf, 2.swf,3.swf)

STEP 1:
Include STYLE SHEET file for Banner

<link rel="StyleSheet" href="mBanner.css" type="text/css" />

STEP 2:
Include JAVASCRIPT file for Banner

<script type="text/javascript" src="mBanner.js"></script>

STEP 3:
Copy and modify the code for banner


<script language="javascript">
// SPECIFY THE NAME OF BANNER HERE
// REMEMBER THAT NAME OF VARIABLE AND ARGUMENT PASSED SHOULD BE SAME
// HERE IT IS 'banner1'
banner1 = new Banner('banner1');

// IF YOU WANT THE BANNER TO CHANGE ON PAGE REFRESH
// THEN SET THE FOLLOWING VALUE TO true (DEFAULT VALUE IS false)
banner1.changeOnRefresh = false;

// ADD THE BANNER HERE
// FIRST ARGUMENT : "FLASH" OR "IMAGE"
// SECONG ARGUMENT: PATH OF THE FILE
// THIRD ARGUMENT : DURATION IN SECONDS
// FOURTH ARGUMENT : HEIGHT
// FIFTH ARGUMENT : WIDTH
// SIXTH ARGUMENT: HYPERLINK
// SEVENTH ARGUMENT: TARGET
banner1.add("FLASH", "banners/1.swf", 15, 60, 468,"http://www.mysticalm.com", "_blank");
banner1.add("FLASH", "banners/2.swf", 7, 60, 468,"http://www.mysticalm.com/EarnOnline", "_blank");
banner1.add("IMAGE", "banners/1.jpg", 9, 53, 198,"http://www.mysticalm.com/content/dev-corner", "_blank");
banner1.add("FLASH", "banners/3.swf", 7, 60, 468,"http://www.mysticalm.com/content/international-shopping-brands", "_blank");
banner1.add("IMAGE", "banners/2.jpg", 9, 53, 198,"http://www.alexa.com/siteinfo/http://www.mysticalm.com", "_blank");
banner1.add("IMAGE", "banners/3.jpg", 9, 53, 198,"http://www.google.com", "_blank");

// START THE BANNER
document.write(banner1);
banner1.start();
</script>

edbr
07-29-2010, 04:47 AM
if you want to time the image change ,open the javascript, find this line and edit
[code] setTimeout(thisBannerObj+".start()", this.aNodes[this.currentBanner].bannerDuration * 1000);[/code
]