PDA

View Full Version : Sub Menu Button Help


660
06-22-2009, 04:07 AM
Hello,

I am having trouble with a sub menu that I built for a website. The buttons in the sub menu work fine when they are not inside a mask or they are on the first frame of the movieclip. The problem is they nedd to be hidden under a mask or not on the first frame of the sub menu movieclip. I do not know how to go around doing this. Does anyone know what I can do?

Also the code works fine until I put the buttons in a mask or they are not on the first frame, but when they are under the mask or second frame I get this:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at GonzalesPhotography_fla::MainTimeline/frame1()

I am pulling my hair out. Can anyone help me out?

miahmiah
06-22-2009, 10:13 AM
There really isnt enough details to help you specifically,

But in general, what you would want to do is plan a little more how your code is going to support your graphics.

If you have converted your menus from drawings in the flash api to movieclip symbols or similar, check in your library for them, then right click and check linkage. This panel will let you export for use in first frame, and name them as well associate them with classes to be used in your code.

Have you searched with google for examples of flash based menus already?

660
06-22-2009, 04:31 PM
The whole menu is built and contained in a movie clip and placed into the main movie which is a website. All the code works for the navigation menu and sub menu and the buttons when clicked swap out different .swfs on the main movie. The problem is that when I mask the sub menu buttons in the navigation movie clip the sub menu buttons stop working. I need them to be masked so they only show when they are needed. For some reason the mask is not letting the buttons work properly. If I try to not use a mask and put the buttons on different frames of the navigation movie clip and remove the buttons from the first frame so they are not seen until they are needed the buttons stop working again. I hope that I am making sense.

660
06-22-2009, 06:04 PM
I fixed it. I put the mask shape inside a movieclip and now it is working. Before I was just leaving it a shape and then I had it in a graphics symbol. Both did not work well for the buttons beneath it. The movieclip is working just fine though. Thanks.