PDA

View Full Version : Inserting a html script into a behavour??


mcambridge
12-06-2005, 01:37 PM
I was wondering if anyone can help me, I've been using the 'swap image' behavour, and have come accross a nice little script to add a transitional effect to an image.

My basic set up is I have one image (which resembles a button), and have set it so that when the curser rolls over it, it triggers another image to be displayed elsewhere on the page. How would I set the new script to run so that when I rollover the 'button' the transitional effect is applied to the other image to be displayed??!!

I'm fairly new to dreamweaver so any help would be appreciated. Although the page isnt finished yet, heres the URL:

www.new.mc-previews.co.uk/Gallery_one.htm ('http://www.new.mc-previews.co.uk/Gallery_one.htm')

thanks in advance for ur time.

regards

Mark

davidj
12-06-2005, 02:12 PM
link does not work

mcambridge
12-06-2005, 03:08 PM
davidj,

I copied and pasted into my browser and it worked ok for me! if you get a page with some little hex buttons on the left hand side, then ur in the right place, no images load untill the curser is rolled over them and only the first two work.

Sorry if my initial post was ambiguous.

any help would be greatly received!

M

davidj
12-06-2005, 03:10 PM
Nope. this is not working for me

i changed your text to a link and it doesnt work

domedia
12-06-2005, 04:02 PM
http://www.new.mc-previews.co.uk/Gallery_one.htm ('http://www.new.mc-previews.co.uk/Gallery_one.htm')
comes up for me anyways (FF 1.5)

Creative Insanity
12-06-2005, 10:15 PM
works fine for me also.. Hmmm nice titties.. hehe

davidj
12-07-2005, 11:22 AM
my firewall has banned that url

is there naughty content or somethin

works fine for me also.. Hmmm nice titties.. hehe

chriskq
12-07-2005, 11:31 AM
i like the design of your site MC cambridge,

i esp like the transitional image script on your about me page.

any chance you can post that script here- really like to have a play with it, (something that can be done easily in flash, but some clients don't wont flash now do they) Would appreciate that MC.

cheers - and welcom to the forums

mcambridge
12-07-2005, 11:53 AM
chriskq,

heres the script mate, its sourced from www.dynamicdrive.com.

heres the link to the page with instructions:
http://www.dynamicdrive.com/dynamicindex14/image4.htm ('http://www.dynamicdrive.com/dynamicindex14/image4.htm')

put the below in the <head> section:

<script language="JavaScript1.1">
<!--

//*****************************************
// Blending Image Slide Show Script-
// Dynamic Drive (www.dynamicdrive.com)
// For full source code, visit [URL=http://www.dynamicdrive.com/]http://www.dynamicdrive.com/[/URL]
//*****************************************

//specify interval between slide (in mili seconds)
var slidespeed=3000

//specify images
var slideimages=new Array("image1.gif","image2.gif","image3.gif")

//specify corresponding links
var slidelinks=new Array("http://www.dynamicdrive.com","http://javascriptkit.com","http://www.geocities.com")

var newwindow=1 //open links in new window? 1=yes, 0=no

var imageholder=new Array()
var ie=document.all
for (i=0;i<slideimages.length;i++){
imageholder[i]=new Image()
imageholder[i].src=slideimages[i]
}

function gotoshow(){
if (newwindow)
window.open(slidelinks[whichlink])
else
window.location=slidelinks[whichlink]
}

//-->
</script>

now put the next bit in the <body> section:

<a href="javascript:gotoshow()"><img src="image1.gif" name="slide" border=0 style="filter:blendTrans(duration=3)" width=97 height=100></a>

<script language="JavaScript1.1">
<!--

var whichlink=0
var whichimage=0
var blenddelay=(ie)? document.images.slide.filters[0].duration*1000 : 0
function slideit(){
if (!document.images) return
if (ie) document.images.slide.filters[0].apply()
document.images.slide.src=imageholder[whichimage]. src
if (ie) document.images.slide.filters[0].play()
whichlink=whichimage
whichimage=(whichimage<slideimages.length-1)? whichimage+1 : 0
setTimeout("slideit()",slidespeed+blenddelay)
}
slideit()

//-->
</script>

<p align="center"><font face="arial" size="-2">This free script provided by<br>
<a href="http://www.dynamicdrive.com">Dynamic Drive</a></font></p>
hope this is of some help to you mate, I've only been doin this about a month or so, so its still relativly new to me!

Mark.

mcambridge
12-07-2005, 12:43 PM
davidj,

I'm surprised ur firewall has banned it! theres no pornographic content on there at all, I'm an amateur photographer and do abit of web design as a hobby and this is just a preview site for clients to see their site before it goes live on their own domains. The 'www.new.m.........' is a preview for my own site as I'm re-designing it.

sos to cause you troubles mate!

Mark