Drop menu

Hello!

Well, I am very new to actionscripting and appreciate alot if some one
would like to help.

I am trying to make a drop down menu, and trying to make
it as clean as possible with actionscript.

Anyways, I am trying to solve it with “if” action.

this is how it is now:

on (rollOver){
tellTarget (this.drop1.drop2)
//Here I have the problem, I would like to add if in movieclip a specific frame
is loaded then it would activate “play” or “gotoandplay” command.
play();
}
on (rollOut){
tellTarget (this.drop1.drop2)
//same issue here
play();
}

I was looking at the ifframeloaded action but seems like it ain’t
going to work under telltarget and also it looks for total frames loaded?

Anyways, thnx in advance for any help.

Hmm…

Well, your idea is a TEENY bit vague, but here’s what I’d suggest:

First, don’t EVER – from here on out – use tellTarget, it’s been deprecated since Flash 5 and there are much better ways of doing things.

Second, here’s a simple event handler that might help:

on (rollOver) {
      if (this.currentFrame() == "20") {
            gotoAndPlay(21);
      } else {
            gotoAndPlay(1);
      }
}

Since I don’t know exactly what you’re going for it’s hard to code for it, but I think that should help a bit.

If you’d like to post an FLA or more detailed code/description(s) my help might be more, er, helpful…yea.

Thnx for your reply!

I tried that code but didn’t get it to work but it looked very promising.
Most likely it’s me doing something wrong with the code.

Anyways, took away the tellTarget actions from the buttons codes.

What I am trying to achieve is that when the drop menu “drops” down
it stays there even though I am rolling out of the button that tells it to drop
and undrop when rollingover or rollingout. Thats why I need an action to
check in what frame the drop mc animation is so it either will play or just stop.

The idea is that from one button the drop menu appears, there will also
be submenus in that which are now represented by numbers 1 to 9.
So from one button appears another and from that several others but only
one at the time depending on which sub menu one is rollingover, and then
it all will reverse it’s animation going back to the initial state if one rollsout
from anywhere from the menu objects/movieclips/buttons.

Aaah well, heh u better look for urself :slight_smile:

I have attached the fla file here for u to look at.

Here’s a working version of your FLA.

The changes shouldn’t be too difficult to understand. I added a status variable to help avoid rapid-fire open/close of the menu by mouse even trapping.