I have created buttons in flash, and when a user selects my services button, there is a submenu that appears and within that sub menu there are two other buttons.

I have named (instance name)one of my buttons in that submenu "design_btn" and have included code to accommodate for all buttons, however when I test the movie I get an error for my submenu "design_btn" with the description of:

Once the mouse is over my 'services' button, I have inserted two buttons inside it(symbol editor).

That works, two buttons show, however the changes I made inside those buttons don't appear to be working. The changes I made inside the symbol editor of the two buttons was for the color to change to blue (instead of red), (Over, Down, Hit).

Ok here goes: The button 'design_btn' is within my services button, when a user goes over the 'services' button with the mouse, the submenu buttons appear. The buttons are not visible unless the user touches the mouse over the services button.

What you said earlier doesn't gel with what you just described. You said the buttons are within your services button, which puts them on another timeline. So if the code is in the main timeline, and the button is inside some other object, then you have to target it thru that object, as in...

services.design_btn.addEventListener... etc.

If your services button happens to actually be a SimpleButton symbol, and it is not a MovieClip symbol, then you will not be able to place anything inside of it and be able to target whatever that is, nor will you be able to interact with it... the Services button would be the only thing you interact with. Button symbols have a very limited set of properties.

If your services button is a MovieClip symbol, then the code I just showed should work, but you still could have issues with the services button interfering with interacting with the buttons inside it. You will be better of making the submenu a separate object.

Thanks for your response. Yes my services button is a movie clip. I have 2 keyframes in the symbol editor for up and over. In the over keyframe, I have two other movie clip buttons appearing. I tried to see if I could enter code within the services symbol editor, but this is not possible. When I run the movie, it works up to the point where I place my mouse over the services button, the sub menu buttons (also movie clips)then appear as intended, but when I try to link those buttons to my webpage, I get that error.

How would I make the submenu a seperate object, when I would like for the submenu to appear once the mouse is over the services symbol?

Instead of placing the other buttons inside the services button, add them to the same timeline as the services button and control their visible properties with your over/out event listeners.

You could leave them inside the services button in frame 1 instead of frame 2, controlling their visiblity.

If you wanted to retain the frame 2 presence of them for your rollover, you could have them starting in frame one but have code in frame 1 to make the invisible and then make them visible in frame 2.

If you leave them inside the services button, you will need to use the event.target property to determine which button you are interacting with when you click it. You only need the services button;s CLICK event listener and handler for that... inside the handler you check to see which button was clicked and take the action needed.

You have to be careful to avoid falling into the trap of blindly copying code. What you name the argument in your function declaration needs to stay consistent. If you name it "event" your code needs to use that...

function servicesClick(event:MouseEvent):void

{

if(event.target.name == "webdesign_btn"){

That "event" is just a variable name, you can use whatever you choose (dog, doghnut, cheese), but most folks use some variation of the word "event", such as "evt" or "e".

Thank you again for your help Ned that seems to get rid of those errors, but now onto another issue

When I click the submenu buttons nothing happens, when I click the main timeline buttons they work, also when I place the mouse over the submenu buttons they won't change to blue like I would like them to.

For each button in the submenu I changed the background color to blue in the over, down, hit segments. When I run the movie they don't change color when I place the mouse over them.

THat is because they are being blocked by the rollover code of the services button. As long as you want to have them inside you'll suffer that fate.

What you can try though, is to have code in your services CLICK/MOUSE_OVER/MOUSE_OUT functions that do the things you want still using the event.target to determine which button you want to target.

Give it try yourself first. I don't like doing people's coding for them (unless I'm getting paid). Youi can learn more by trying yourself. Just see how the click function tests to see what button is being interacted with and use that same code structure to tell the buttons to change colors and whatnot.

Do not use ROLLOVER/ROLLOUT event lsisteners if you want to get the event.target working for you. They will point at the services button. MOUSE_OVER and MOUSE_OUT are what you'll need to get the event.target you need.

To target an object it needs to be an object you can assign an instance name to, and you assign it an instance name and use that name.

You are treating the code like it is the button, one inside the other. Never nest functions within other functions.

If you read thru all the responses I have given you so far, they cover the errors that you are continuing to make. All the information you need to do what you want is contained in what's been discussed already.

If it is any consolation, you are experiencing the same learning pain that every one of us has gone thru... lost sleep, lost hair, lost mind... it's all part of it.

In one of your last postings you were trying to assign a listner to the button inside the services button. I already said that won't work because the services button having listeners will block any interaction with the objects inside.

So you need to make use of what the services listener's event.target can tell you as to which object you are interacting with so that you can take the action you need to take.

If you want to have a MOUSE_OVER listener for the inner button, you need to make use of the one that the services button already has, because that one is blocking any ability to have one work for you for any button inside.

Sorry I'm still not getting it, my eyes are kind of hurting today as I've spent a lot of time looking at different coding on AS3, and still quite confused.

Should I just read a book on AS3 from page to page, I'm actually contemplating it. lol pppfffftttt

EDIT 16:00 ok I've done an event listener/handler for both CLICK and MOUSE_OUT for service_btn, with the same code below it, but still nothing happens when I click one of the submenu buttons. Luckily getting no errors, but as well nothing at all happens. lol

If I was being taken to the url at least that would have been a step forward and then I could just concerntrate on changing the colo rshape within each submenu movieclip.

I don't think reading any books is going to help you. I don't mean to offend you, but if you have a hard time understanding what I've explained a few times now, I doubt you'll get anywhere with a book.

If you didn't try what I said you should try, you should. Go back to the file I gave you and work with that. It is properly set up and coded. In fact, if you add the following code to it, you can see the rollover and rollout functionality at work as well.

Ned, finally I am one step ahead as opposed to the big round circles I was going around before, I am directed to the site I want to be directed to.

Now I need to make the buttons invisble, how would I go about doing that?

"Instead of placing the other buttons inside the services button, add them to the same timeline as the services button and control their visible properties with your over/out event listeners.

You could leave them inside the services button in frame 1 instead of frame 2, controlling their visiblity. Decided to use this method you suggested.

If you wanted to retain the frame 2 presence of them for your rollover, you could have them starting in frame one but have code in frame 1 to make the invisible and then make them visible in frame 2.

If you leave them inside the services button, you will need to use the event.target property to determine which button you are interacting with when you click it. You only need the services button;s CLICK event listener and handler for that... inside the handler you check to see which button was clicked and take the action needed."