We help IT Professionals succeed at work.
Get Started

Flash showing captions over images

sendhelp
sendhelp asked
on
215 Views
Last Modified: 2013-11-11
I am using this http://www.kirupa.com/developer/mx2004/hover_captions.htm to have captions over my images. My proble is in my layers. I have buttons on different layers and then I also have keyframes with blank key frames in between. When the keyframes pick back up to display the same buttons, it will not hover. I have the actions on a layer called actions. What can I do to make the captions work throughout the whole site no matter which layer the image is on? I want b1 on one layer and b2 on another. Is that possible? I am using Flash 8, but have access to CS 3.
b1.onRollOver = function() { 
captionFN(true, "E-Mail!", this); 
this.onRollOut = function() { 
captionFN(false); 
}; 
}; 
b2.onRollOver = function() { 
captionFN(true, "Portable Devices", this); 
this.onRollOut = function() { 
captionFN(false); 
}; 
}; 
b3.onRollOver = function() { 
captionFN(true, "Security", this); 
this.onRollOut = function() { 
captionFN(false); 
}; 
}; 
b4.onRollOver = function() { 
captionFN(true, "Regional Settings", this); 
this.onRollOut = function() { 
captionFN(false); 
}; 
}; 
b5.onRollOver = function() { 
captionFN(true, "Home Networking", this); 
this.onRollOut = function() { 
captionFN(false); 
}; 
}; 
b6.onRollOver = function() { 
captionFN(true, "Add/Remove Programs", this); 
this.onRollOut = function() { 
captionFN(false); 
}; 
}; 
captionFN = function (showCaption, captionText, bName) { 
if (showCaption) { 
_root.createEmptyMovieClip("hoverCaption", this.getNextHighestDepth()); 
cap.desc.text = captionText; 
cap._width = 7*cap.desc.text.length; 
cap._alpha = 75; 
// 
if ((bName._width+bName._x+cap._width)>Stage.width) { 
xo = -2-cap._width; 
yo = -17; 
} else { 
xo = 2; 
yo = -17; 
} 
hoverCaption.onEnterFrame = function() { 
cap._x = _root._xmouse+xo; 
cap._y = _root._ymouse+yo; 
cap._visible = true; 
}; 
} else { 
delete hoverCaption.onEnterFrame; 
cap._visible = false; 
} 
};

Open in new window

Comment
Watch Question
Top Expert 2009
Commented:
This problem has been solved!
Unlock 1 Answer and 8 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE