/    Sign up×
Community /Pin to ProfileBookmark

Javascript Image Rotation? Is it the way to go?

I have a banner on my homesite that I created with flash. However, someone mentioned that I should try image rotation with fade transitions via javascript. I am not familiar with .js.

Are there any good free image rotation codes out there that are simple for java newbies to understand? I am not knowledgeable about the benefits of javascript for slideshows vs. flash etc.

Thanks.

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@dtm32236Nov 12.2007 — [url=http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm]this[/url] should be pretty simple to implement.... and it seems to work pretty well cross-browser/OS.
Copy linkTweet thisAlerts:
@ne_plus_ultraauthorNov 12.2007 — [url=http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm]this[/url] should be pretty simple to implement.... and it seems to work pretty well cross-browser/OS.[/QUOTE]

Thanks. I have tried this -- and this could be a very silly question...

but how do you "Configure the array "fadeimages[]" to reference the images you want to be displayed."

the location of my images is: public/images_js/
Copy linkTweet thisAlerts:
@dtm32236Nov 12.2007 — fadeimages[0]=["public/images_js/image1.jpg", "", ""]

fadeimages[1]=["public/images_js/image2.jpg", "", ""]

etc...
Copy linkTweet thisAlerts:
@ne_plus_ultraauthorNov 13.2007 — fadeimages[0]=["public/images_js/image1.jpg", "", ""]

fadeimages[1]=["public/images_js/image2.jpg", "", ""]

etc...[/QUOTE]


I have attempted to set the image rotator code up and it doesn't seem to pull the images... Any suggestions?

<script type="text/javascript">

var fadeimages=new Array()

//SET IMAGE PATHS. Extend or contract array as needed

fadeimages[0]=["public/images_js/promo_1.gif"] //plain image syntax

fadeimages[1]=["public/images_js/promo_2.gif"]

fadeimages[2]=["public/images_js/promo_5.gif"]

var fadebgcolor="black"

////NO need to edit beyond here/////////////




---------------------------------HTML ----------------------------------

<body>

<script type="text/javascript">

//new fadeshow(IMAGES_ARRAY_NAME, slideshow_width, slideshow_height, borderwidth, delay, pause (0=no, 1=yes), optionalRandomOrder)

new fadeshow(fadeimages, 563, 333, 0, 3000, 1, "R")

new fadeshow(fadeimages2, 140, 225, 0, 3000, 0)

</script>

</body>
Copy linkTweet thisAlerts:
@dtm32236Nov 13.2007 — first:

fadeimages[2]=["public/images_js/promo_5.gif"]

needs the other quotes, so if you don't want it to be a link, do:

fadeimages[2]=["public/images_js/promo_5.gif", "#", ""]

and if you only have one set of images doing this, you don't need the second fadeshow:

new fadeshow(fadeimages2, 140, 225, 0, 3000, 0)

get rid of that.
×

Success!

Help @ne_plus_ultra spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...