PDA

View Full Version : Trouble with Timeline Show-Hide


shawbapmp
10-16-2005, 12:09 PM
Hi DW Experts,

I am a DW newbie and I am having trouble creating a simple slide-show style page using the Timeline feature.

I have a plain page with 4 layers containing 4 pictures which I want to display one after the other in a loop. It actually works, but at some point, either at the beginning of the timeline or at the end, all four pictures flash briefly.

Whenever I try to correct the problem using the little 'eye' icons for the hidden/visible feature, Dreamweaver changes it back to all layers visible when I save the page.

What am I doing wrong?

You can see the page at:
www.brs-management.com/timeline_test.html']http://www.brs-management.com/timeline_tes...eline_test.html ( Hi DW Experts,

I am a DW newbie and I am having trouble creating a simple slide-show style page using the Timeline feature.

I have a plain page with 4 layers containing 4 pictures which I want to display one after the other in a loop. It actually works, but at some point, either at the beginning of the timeline or at the end, all four pictures flash briefly.

Whenever I try to correct the problem using the little 'eye' icons for the hidden/visible feature, Dreamweaver changes it back to all layers visible when I save the page.

What am I doing wrong?

You can see the page at:
[url='http://www.brs-management.com/timeline_test.html)

Your help would be greatly appreciated.

Creative Insanity
10-16-2005, 07:02 PM
Link does not work sorry.

Not Found
The requested URL /timeline_test.html]www.brs-management.com/timeline_test.html was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/1.3.33 Server at www.brs-management.com Port 80

davidj
10-17-2005, 10:05 AM
rather then using the timeline function in DW (a massive function for so little in return) try this thread

rotating image ('http://www.dreamweaverclub.com/forum/index.php?showtopic=1232')

shawbapmp
10-17-2005, 12:25 PM
Hi Creative Insanity,

Sorry about the link. It should read:

http://www.brs-management.com/timeline_test.html ('http://www.brs-management.com/timeline_test.html')

It works for me when I type in the URL.

And DavidJ,

Thanks for the suggestion. I may try to figure out the code you directed me to, but I would really like to understand how to make the DW timeline feature work.

shazzax
10-17-2005, 01:13 PM
Ive had a look at your code.

try having all your layers hidden in the first instance. Have all 4 layers in the timeline from frame one onwards. Then just show layer 1 and hide the others with one behaviour (NOT TWO) each time.

Hope this helps

shazza

davidj
10-17-2005, 01:15 PM
that will just turn layers on and off

you need a bit more to get them scrolling


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
#menuLayer {
position:absolute;
left:34px;
top:33px;
width:402px;
height:33px;
z-index:1;
}
#Layer1 {
position:absolute;
left:5px;
top:6px;
width:247px;
height:19px;
z-index:3;
overflow: visible;
}
#Layer2 {
position:absolute;
left:8px;
top:13px;
width:454px;
height:58px;
z-index:1;
}
#Layer3 {
position:absolute;
left:66px;
top:3px;
width:316px;
height:33px;
z-index:2;
overflow: hidden;
}
-->
</style>
<script type="text/javascript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function P7AniMagic(el, x, y, a, b, c, s) { //v2.5 PVII
var g,elo=el,f="",m=false,d="";x=parseInt(x);y=parseIn t(y);
var t = 'g.p7Magic = setTimeout("P7AniMagic(\''+elo+'\',';
if ((g=MM_findObj(el))!=null) {d=(document.layers)?g:g.style;}else{return;}
if (parseInt(s)>0) {eval(t+x+','+y+','+a+','+b+','+c+',0)",' + s+')');return;}
var xx=(parseInt(d.left))?parseInt(d.left):0;
var yy=(parseInt(d.top))?parseInt(d.top):0;
if(parseInt(c)==1) {x+=xx;y+=yy;m=true;c=0;}
else if (c==2) {m=false;clearTimeout(g.p7Magic);}
else {var i=parseInt(a);
if (eval(g.moved)){clearTimeout(g.p7Magic);}
if (xx<x){xx+=i;m=true;if(xx>x){xx=x;}}
if (xx>x){xx-=i;m=true;if(xx<x){xx=x;}}
if (yy<y){yy+=i;m=true;if(yy>y){yy=y;}}
if (yy>y){yy-=i;m=true;if(yy<y){yy=y;}}}
if (m) {if((navigator.appName=="Netscape") && parseInt(navigator.appVersion)>4){
xx+="px";yy+="px";}
d.left=xx;d.top=yy;g.moved=true;eval(t+x+','+y+',' +a+','+b+','+c+',0)",'+b+')');
}else {g.moved=false;}
}
//-->
</script>
</head>

<body>
<div id="Layer3">
<div id="Layer1" >menu1 | menu2 | menu3 | menu4 | menu5 </div>
</div>
<p><br />
<br />
<img src="images/button-activity.gif" width="73" height="25" onclick="P7AniMagic('Layer1',500,0,10,30,1,0)"/><img src="images/button-activity.gif" width="73" height="25" onclick="P7AniMagic('Layer1',0,0,10,30,0,0)"/></p>
</body>
</html>

shawbapmp
10-17-2005, 02:05 PM
Shazzax & DavidJ,

I'll try out both your suggestions to see what happens.

Your input is much appreciated.

Cheers.

shazzax
10-17-2005, 04:20 PM
is this what you were after?
did u want it to scroll?? i missed that part ;)
shazza

shawbapmp
10-23-2005, 08:39 PM
Hi Shazzax,

Yes, your sample does what I want. I'm still having trouble understanding the use of the timeline interface in Dreamweaver, but I can use your code to get the result I want.

Thanks much.