FMX: MouseOut on Transparent Windowless

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 :frowning:

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:

http://www.bleutuna.com/images/xgia/wstest

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();
}
}

Any help would be much appreciated :slight_smile:

Yeh, i finaly saw what you wanted me to see, that community menu, I have had problems like this. Please help someone.

Not 100% sure, but I believe the reason is this…

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.

Beta - for Macs and Netscape, the users are just going to get a link - not an actual dropdown.

I’ve considered DHTML, but then it doesn’t scroll down - it just appears and not look as good :smiley:

Of course, I could always put a “close” button at the bottom - to send it back up.

Can you think of any other way to accomplish this, without the “hitTest” method?

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.

Dunno if it will work, but it’s worth a try :-\

No, to have clickable buttons in the menu, you need to use hitTest.

Yeah, I discovered that the hardway :stuck_out_tongue:

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.

Thanks for the help, Beta!

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.