...

View Full Version : Rotating Images (like at a bus stop)



dhtmlhelp
07-31-2002, 05:53 PM
Hi,

do you know of any script that allows for the horizontal or vertical rotation of images in a 'virtual' circle.

DHTMLHELP

requestcode
07-31-2002, 06:06 PM
Something like this from JavaScriptkit's Free Script Section:
http://www.wsabstract.com/script/script2/jsslide.shtml

ACJavascript
07-31-2002, 07:02 PM
I think this slideshow stands out from the rest of em:D:D:D

http://www.wsabstract.com/script/script2/cubeslideshow.shtml

Happy Scripting :D:D

ACJavascript
07-31-2002, 07:28 PM
To change the direction just put what is boldfaced below.
About making the images clickable, ?? :D:D hehe, unless you just want it to be one link, in that case just sround the img tag with a link.

----------

<img src="photo1.jpg" name="cube" border=0 style="filter:progid:DXImageTransform.Microsoft.Stretch(stretchStyle='PULL')">

--------

They had it set to push, you can also set it to pull.



Hope this helps :D:D:D

dhtmlhelp
08-01-2002, 12:49 AM
Hi ACJ,

is there any way of making each image clickable with its own hyperlink, rather than one link for all images?

DHTMLHELP

Roy Sinclair
08-01-2002, 03:37 AM
is there any way of making each image clickable with its own hyperlink, rather than one link for all images?

Yes,



var specifyimage=new Array() //Your images
specifyimage[0]="photo1.jpg"
specifyimage[1]="photo2.jpg"
specifyimage[2]="photo3.jpg"

var linkformimage=new Array()//Links to match your images
linkforimage[0]="a.htm"
linkforimage[1]="b.htm"
linkforimage[2]="c.htm"

var clickdest = linkforimage[0]

...

function movecube(){
if (window.createPopup)
cube.filters[0].apply()
document.images.cube.src=cubeimage[count].src;
clickdest = linkforimage[count]
if (window.createPopup)
cube.filters[0].play()
count++;
if (count==cubeimage.length)
count=0;
setTimeout("movecube()",delay)
}


...

<img src="photo1.jpg" name="cube" border=0 style="filter: progid: DXImageTransform.Microsoft.Stretch(stretchStyle='PUSH')" onclick="location.href=clickdest;return true;">

glenngv
08-01-2002, 08:53 AM
cool script!

setting to PULL will make the sliding effect coming from the center outward, not the opposite of PUSH which slides/rotates to the right? What is the value for sliding to the left?
Can I change the Stretch property programmatically? Because I have previous/next buttons on my slideshow and I want it to slide to the right when next is clicked and to the left when previous is clicked.

thnx!


Originally posted by ACJavascript
To change the direction just put what is boldfaced below.
About making the images clickable, ?? :D:D hehe, unless you just want it to be one link, in that case just sround the img tag with a link.

----------

<img src="photo1.jpg" name="cube" border=0 style="filter:progid:DXImageTransform.Microsoft.Stretch(stretchStyle='PULL')">

--------

They had it set to push, you can also set it to pull.



Hope this helps :D:D:D

JohnKrutsch
08-01-2002, 03:24 PM
Here is Microsoft's sample page for this routine:

http://msdn.microsoft.com/workshop/samples/author/filter/Stretch.htm

ACJavascript
08-02-2002, 03:44 PM
hehe, to be honest glenn,
I looked at the script and it sayed push, I thought, Well if left to right is push, then pull should be right to left, its not really but it seemed to do the trick, so i really don't know the coding to make it do that, mabye the link above this reply that John put will shed some light on it:D:D:D:D

ACJavascript
08-04-2002, 06:37 PM
Hey dhtmlhelp, okay, i get the same error but i fixed it so that theres no more error, to be honest i don't remeber how i did it heheheh


so try this see if you still get the error

---------

<script language="JavaScript1.1">
//Picture Cube slideshow - By Tony Foster III
//Modifications by JK
//Visit JavaScript Kit (http://javascriptkit.com) for script
var specifyimage=new Array() //Your images
specifyimage[0]="img/vcontent.gif"
specifyimage[1]="img/vcontent2.gif"
specifyimage[2]="img/vcontent3.gif"

var linkforimage=new Array()//Links to match your images
linkforimage[0]="a.htm"
linkforimage[1]="b.htm"
linkforimage[2]="c.htm"

var clickdest = linkforimage[0]

var delay=3000 //3 seconds

//Counter for array
var count =1;

var cubeimage=new Array()
for (i=0;i<specifyimage.length;i++){
cubeimage[i]=new Image()
cubeimage[i].src=specifyimage[i]
}

function movecube(){
if (window.createPopup)
cube.filters[0].apply()
document.images.cube.src=cubeimage[count].src;
clickdest = linkforimage[count]
if (window.createPopup)
cube.filters[0].play()
count++;
if (count==cubeimage.length)
count=0;
setTimeout("movecube()",delay)
}

window.onload=new Function("setTimeout('movecube()',delay)")
</script>

<div id="Layer1" style="position:absolute; left:21px; top:350px; width:128px; height:100px; z-index:1">
<a onfocus="this.blur();" href="sg/os/os.html" onMouseOver="window.status='***** Hello *****'; return true;" onClick="window.status='***** Hello *****'; return true;" onMouseOut="window.status=''; return true;">
<img src="img/vcontent.gif" name="cube" border=0 style="filter:progid:DXImageTransform.Microsoft.Stretch(stretchStyle='PUSH')" width=128 height=100 onclick="location.href=clickdest;return true;" alt="">
</a>
</div>


-------------------


HappyScripting

ACJavascript
08-05-2002, 03:44 PM
hehe, I got your pm, but i couldn't find the script on your page:D
If you could specify the page it would be nice :D:D:D:D

I await reply:thumbsup:

ACJavascript
08-05-2002, 07:09 PM
two things:D,

1) The page didn't have it on it, from what i saw

2) I can't right click so i can't see the problem. Can you turn off the no right click for that page.



:D:D:D

ACJavascript
08-06-2002, 02:44 PM
Okay i think the problem might be this, you have window.onload for the slideshow, but you also have an onLoad within the body tag, I think there canceling eachother out, or the onLoad is just overriding the slideshow. So make them either both window.onloads or make the both onLoads within the body tag.


*fingers crossed* hope this works heheh :D:D:D:D:

appa
04-14-2005, 04:22 PM
Sorry for bringing this up again.

I wanted to use this beautiful script, but I have one question:
is it possible to add a target to the hyperlinks? I want the script in another frame then I want the links to go to. Is that possible and can anybody help me with that?

Thanks a bunch!

glenngv
04-15-2005, 03:28 AM
Use another slideshow script. This (http://www.peterbailey.net/dhtml/ss_with_links.htm) is a better script as you can use multiple slideshows in a page unlike the other scripts posted here.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum