I’m having some trouble with a drop-down menu I made. I found a cool script on this board that worked perfectly for me, but the problem is that the implementation needs to be in midst of HTML - so that it works seamlessly.
What I’m doing is using this to replace a clunky DHTML style menu, and it works great, except for one thing…
When I use this in a TRANSPARENT WINDOWLESS environment, the menu won’t collapse back
It works fine if I use Opaque or Windowed, but Transparent just kills me. Unfortunately, this needs to be transparent, because it’s going to be implemented like this:
I found the script for this menu here on the Kirupa Forum, and it works well, except for this one particular quirk. I’ve uploaded the file, and it’s attached. As well, I’ve copied the script for it below:
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.play();
if (this._currentframe == 10) {
stop();
}
} else if (this._currentframe>=10) {
play();
}
}
When using the transparent window mode, the background of your movie is removed. If you notice, when you right click in the empty area, the typical right click context menu pops up, instead of the default flash. This says that there is no flash movie there.
Given that you are using hitTest… and a transparent background, when you scroll off the side of the visible area onto the transparent area (not considered part of the movie as stated before) flash can’t register your hitTest as false, so it keeps it as true.
There is no way around this. Transparent Flash only works on IE for Windows anyway. It doesnt work at all on Macs, and only on IE with Windows… not a very functional feature if you ask me.
No, to have clickable buttons in the menu, you need to use hitTest.
What you can do is maybe put a movie clip BEHIND your menu of a big rectangle, but alpha it down to 0, so when the user rolls off the hit area it registers on the 0 alpha movie clip.
No, to have clickable buttons in the menu, you need to use hitTest.
Yeah, I discovered that the hardway
I’ll try the other method, with the clip behind, and if it doesn’t work, I’ll talk to the client about which they’d rather have: DHTML, Flash with a little close button at the bottom ( an arrow pointing up), or just a link.
Yeah, the clip behind it is the only other solution I can think of, you just have to make sure there is a big enough area around the movie that it has time to detect when your mouse is off the menu before it is off the movie.
Creating engaging and entertaining content for designers and developers since 1998.