Ask a Question related to Macromedia Dynamic HTML, Design and Development.
-
Father Time #1
Submenu layers won't behave...
Hello Dreamweaver Gurus,
I'm still having problems with trying to imitate the submenu effect for this
site. (Great effect by the way) I've got my nave bar, with rollover effects.
I got the hidden submenu layer, with all of the submenu items as hyperlinks. I
can get the submenu to appear when you rollover the main button, and I can get
the submenu to disappear when you "mouse out" of the submenu layer. The
problem comes when the links are added to the submenu layer.
When the links are placed on the submenu layer, the "on mouse out" behavior
that was applied to the whole layer; only allows you to rollover one of the
submenu links before it hides the layer again. It's as if Dreamweaver doesn't
recognize the other links as being on the same layer! I'm not sure if the
space inbetween the links makes a difference, but I even made sure that the
spaces are included in the <a></a> tag for the link.
So as a work around, I tried to use the Timeline feature to make a short
timeline animation of the submenu layer, appearing and disappearing over a 5
sec period. When the main button is rolledover, the animation plays and shows
the layer... in 5 seconds the submenu layer will disappear. I would then like
to place a "stop animation behavior" on the links, so that the animation pauses
while the viewer navigates the submenu; and a "resume animation playback
behavior" - "on mouse out"... from the links on the submenu so that the
animation resumes playback when the 'mouse out" action is made.
What happened when I tried this is, the animation worked, but only once.
After that the submenu would appear, but it wouldn't disappear until you
rollover one of the other main navigation buttons. (Which are all equipped with
behaviors that make all other submenus, except that button's, hide when you
rollover it.) I can't for the life of me figure out why it won't play more
than once. I don't see anywhere in the code that deliniates playback, or
resetting the play head to the top of the animation timeline. If you have any
idea what I should do, please help.
Thanks
Father Time Guest
-
creating a horizontal submenu
I just created my 1st Spry horizontal menu. The problem is that the submenu in vertical and I would like to have it horizontal. Can anyone help? ... -
DW dropdown - submenu to the left?
I'm using DW's built-in dropdown menu functions and have a quick question. For subpage menus (where there's the arrow and a second menu comes off... -
create a submenu in flash 8
hi,i do have one assignment for create a submenu in flash 8.can any one guid me how to create a submenu in flash 8? like in front page i do have... -
HELP How display submenu in datagrid
Hi, Can anyone help me in displaying the subMenus in datagrid. As when I select any mainMenu in comboBox should display its subMenu in... -
#25531 [NEW]: Array can't behave.
From: oswald at welho dot com Operating system: Windows 2000 PHP version: 4.3.3 PHP Bug Type: Arrays related Bug... -
Murray *TMM* #2
Re: Submenu layers won't behave...
Post a link to the page, please.
--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
[url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
[url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
[url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
[url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
==================
"Father Time" <webforumsuser@macromedia.com> wrote in message
news:dg99i4$2gf$1@forums.macromedia.com...> Hello Dreamweaver Gurus,
>
> I'm still having problems with trying to imitate the submenu effect for
> this
> site. (Great effect by the way) I've got my nave bar, with rollover
> effects.
> I got the hidden submenu layer, with all of the submenu items as
> hyperlinks. I
> can get the submenu to appear when you rollover the main button, and I can
> get
> the submenu to disappear when you "mouse out" of the submenu layer. The
> problem comes when the links are added to the submenu layer.
>
> When the links are placed on the submenu layer, the "on mouse out"
> behavior
> that was applied to the whole layer; only allows you to rollover one of
> the
> submenu links before it hides the layer again. It's as if Dreamweaver
> doesn't
> recognize the other links as being on the same layer! I'm not sure if the
> space inbetween the links makes a difference, but I even made sure that
> the
> spaces are included in the <a></a> tag for the link.
>
> So as a work around, I tried to use the Timeline feature to make a short
> timeline animation of the submenu layer, appearing and disappearing over a
> 5
> sec period. When the main button is rolledover, the animation plays and
> shows
> the layer... in 5 seconds the submenu layer will disappear. I would then
> like
> to place a "stop animation behavior" on the links, so that the animation
> pauses
> while the viewer navigates the submenu; and a "resume animation playback
> behavior" - "on mouse out"... from the links on the submenu so that the
> animation resumes playback when the 'mouse out" action is made.
>
> What happened when I tried this is, the animation worked, but only once.
> After that the submenu would appear, but it wouldn't disappear until you
> rollover one of the other main navigation buttons. (Which are all equipped
> with
> behaviors that make all other submenus, except that button's, hide when
> you
> rollover it.) I can't for the life of me figure out why it won't play
> more
> than once. I don't see anywhere in the code that deliniates playback, or
> resetting the play head to the top of the animation timeline. If you have
> any
> idea what I should do, please help.
>
> Thanks
>
Murray *TMM* Guest
-
Father Time #3
Re: Submenu layers won't behave...
Hello Murry,
Thanks for the fast reply! You guys rock!... I haven't published the site
yet, but I'm including a copy of the code from the main page with the nav bar.
Please bear in mid that I am completely new to Dreamweaver, and that I already
know that much of the site could be set up in a much easier fashion, but this
site is more of an "experiment in theory" that I'm using to learn the 'INs' and
'OUTs' of Dreamweaver. Getting your hands dirty is the easiest way for me to
learn!
So here it goes... I hope that you can make sense out of the mess I've made,
and that the answer is something obvious! Thanks in advance for any help that
you can give me on this issue.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>HomePage</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
background-image: url(Images/r_usabqBG.gif);
}
-->
</style>
<script language="JavaScript" 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 MM_showHideLayers() { //v6.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) {
v=args[i+2];
if (obj.style) { obj=obj.style;
v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
obj.visibility=v; }
}
function MM_timelinePlay(tmLnName, myID) { //v1.2
//Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Macromedia, Inc. All
rights reserved.
var
i,j,tmLn,props,keyFrm,sprite,numKeyFr,firstKeyFr,p ropNum,theObj,firstTime=false;
if (document.MM_Time == null) MM_initTimelines(); //if *very* 1st time
tmLn = document.MM_Time[tmLnName];
if (myID == null) { myID = ++tmLn.ID; firstTime=true;}//if new call, incr ID
if (myID == tmLn.ID) { //if Im newest
setTimeout('MM_timelinePlay("'+tmLnName+'",'+myID+ ')',tmLn.delay);
fNew = ++tmLn.curFrame;
for (i=0; i<tmLn.length; i++) {
sprite = tmLn[i];
if (sprite.charAt(0) == 's') {
if (sprite.obj) {
numKeyFr = sprite.keyFrames.length; firstKeyFr = sprite.keyFrames[0];
if (fNew >= firstKeyFr && fNew <= sprite.keyFrames[numKeyFr-1])
{//in range
keyFrm=1;
for (j=0; j<sprite.values.length; j++) {
props = sprite.values[j];
if (numKeyFr != props.length) {
if (props.prop2 == null) sprite.obj[props.prop] =
props[fNew-firstKeyFr];
else sprite.obj[props.prop2][props.prop] =
props[fNew-firstKeyFr];
} else {
while (keyFrm<numKeyFr && fNew>=sprite.keyFrames[keyFrm])
keyFrm++;
if (firstTime || fNew==sprite.keyFrames[keyFrm-1]) {
if (props.prop2 == null) sprite.obj[props.prop] =
props[keyFrm-1];
else sprite.obj[props.prop2][props.prop] =
props[keyFrm-1];
} } } } }
} else if (sprite.charAt(0)=='b' && fNew == sprite.frame)
eval(sprite.value);
if (fNew > tmLn.lastFrame) tmLn.ID = 0;
} }
}
function MM_timelineGoto(tmLnName, fNew, numGotos) { //v2.0
//Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Macromedia, Inc. All
rights reserved.
var
i,j,tmLn,props,keyFrm,sprite,numKeyFr,firstKeyFr,l astKeyFr,propNum,theObj;
if (document.MM_Time == null) MM_initTimelines(); //if *very* 1st time
tmLn = document.MM_Time[tmLnName];
if (numGotos != null)
if (tmLn.gotoCount == null) tmLn.gotoCount = 1;
else if (tmLn.gotoCount++ >= numGotos) {tmLn.gotoCount=0; return}
jmpFwd = (fNew > tmLn.curFrame);
for (i = 0; i < tmLn.length; i++) {
sprite = (jmpFwd)? tmLn[i] : tmLn[(tmLn.length-1)-i]; //count bkwds if
jumping back
if (sprite.charAt(0) == "s") {
numKeyFr = sprite.keyFrames.length;
firstKeyFr = sprite.keyFrames[0];
lastKeyFr = sprite.keyFrames[numKeyFr - 1];
if ((jmpFwd && fNew<firstKeyFr) || (!jmpFwd && lastKeyFr<fNew))
continue; //skip if untouchd
for (keyFrm=1; keyFrm<numKeyFr && fNew>=sprite.keyFrames[keyFrm];
keyFrm++);
for (j=0; j<sprite.values.length; j++) {
props = sprite.values[j];
if (numKeyFr == props.length) propNum = keyFrm-1 //keyframes only
else propNum = Math.min(Math.max(0,fNew-firstKeyFr),props.length-1);
//or keep in legal range
if (sprite.obj != null) {
if (props.prop2 == null) sprite.obj[props.prop] = props[propNum];
else sprite.obj[props.prop2][props.prop] = props[propNum];
} }
} else if (sprite.charAt(0)=='b' && fNew == sprite.frame)
eval(sprite.value);
}
tmLn.curFrame = fNew;
if (tmLn.ID == 0) eval('MM_timelinePlay(tmLnName)');
}
function MM_timelineStop(tmLnName) { //v1.2
//Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Macromedia, Inc. All
rights reserved.
if (document.MM_Time == null) MM_initTimelines(); //if *very* 1st time
if (tmLnName == null) //stop all
for (var i=0; i<document.MM_Time.length; i++) document.MM_Time[i].ID =
null;
else document.MM_Time[tmLnName].ID = null; //stop one
}
function MM_initTimelines() { //v4.0
//MM_initTimelines() Copyright 1997 Macromedia, Inc. All rights reserved.
var ns = navigator.appName == "Netscape";
var ns4 = (ns && parseInt(navigator.appVersion) == 4);
var ns5 = (ns && parseInt(navigator.appVersion) > 4);
document.MM_Time = new Array(1);
document.MM_Time[0] = new Array(3);
document.MM_Time["Timeline1"] = document.MM_Time[0];
document.MM_Time[0].MM_Name = "Timeline1";
document.MM_Time[0].fps = 15;
document.MM_Time[0][0] = new String("sprite");
document.MM_Time[0][0].slot = 1;
if (ns4)
document.MM_Time[0][0].obj = document["AboutUsSubMenu"];
else if (ns5)
document.MM_Time[0][0].obj = document.getElementById("AboutUsSubMenu");
else
document.MM_Time[0][0].obj = document.all ?
document.all["AboutUsSubMenu"] : null;
document.MM_Time[0][0].keyFrames = new Array(1, 30);
document.MM_Time[0][0].values = new Array(0);
document.MM_Time[0][1] = new String("behavior");
document.MM_Time[0][1].frame = 1;
document.MM_Time[0][1].value =
"MM_showHideLayers('AboutUsSubMenu','','show') ";
document.MM_Time[0][2] = new String("behavior");
document.MM_Time[0][2].frame = 30;
document.MM_Time[0][2].value =
"MM_showHideLayers('AboutUsSubMenu','','hide');MM_ timelineStop('Timeline1')";
document.MM_Time[0].lastFrame = 30;
for (i=0; i<document.MM_Time.length; i++) {
document.MM_Time[i].ID = null;
document.MM_Time[i].curFrame = 0;
document.MM_Time[i].delay = 1000/document.MM_Time[i].fps;
}
}
//-->
</script>
<link href="r_usabqSTYLES.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {
color: #FF9900;
position: absolute;
left: 120px;
top: 134px;
width: 363px;
height: 31px;
z-index: 16;
font-family: Geneva, Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
visibility: hidden;
}
.style7 {
color: #FF0000;
font-family: Geneva, Arial, Helvetica, sans-serif;
}
.style8 {
color: #000000;
font-family: Geneva, Arial, Helvetica, sans-serif;
font-size: 12px;
}
a:link {
text-decoration: none;
color: #FF9900;
}
a:visited {
text-decoration: none;
color: #00CC00;
}
a:hover {
text-decoration: none;
color: #FF0000;
}
a:active {
text-decoration: none;
}
.style11 {font-size: 12px; font-family: Geneva, Arial, Helvetica, sans-serif;
color: #FF9900; font-weight: bold; }
-->
</style>
</head><body>
<div id="HeaderSpinner" style="position:absolute; left:39px; top:-26px;
width:150px; height:133px; z-index:1; visibility: visible;">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve
rsion=6,0,29,0" width="144" height="140">
<param name="movie" value="Images/GoldBQSpinner.swf">
<param name="quality" value="high">
<param name="wmode" value="transparent">
<embed src="Images/GoldBQSpinner.swf" width="144" height="140"
quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" wmode="transparent"></embed>
</object>
</div>
<div id="HomeBTN" style="position:absolute; left:-18px; top:66px; width:193px;
height:114px; z-index:4; visibility: visible;">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve
rsion=6,0,29,0" width="192" height="107">
<param name="movie" value="Images/Glass%20Pill.swf">
<param name="quality" value="high">
<param name="wmode" value="transparent">
<embed src="Images/Glass%20Pill.swf" width="192" height="107"
quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" wmode="transparent"></embed>
</object>
</div>
<div id="SideLogoFade" style="position:absolute; left:1px; top:142px;
width:104px; height:90px z-ind
Father Time Guest



Reply With Quote

