PDA

View Full Version : i feel silly! attachMovie problem



kdzines
September 5th, 2003, 06:09 PM
hey,

i am working on a menu with sub menus and am using attachMovie for the first time.

i have an mc inside which there are 3 mc buttons:

butt1
butt2
butt3

the linkage name is "subnav" and export in first frame is checked.
i have an empty mc on the main stage called "subholder"

on the main stage i have these actions on a frame:




mainbutt.onPress = function(){
subholder.attachMovie("subnav", "subnav1", 5);
}



ok, so far so good. When i click mainbutt, the subnav movie is attached and everything is perfect.

here is the problem.

now i want to ad code on the main stage to get the sub buttons to do things.

so i wrote this:



subnav1.butt1.onPress = function(){
trace("clicked");
}


just to test my pathing. Well it didn't work!

other pathing i tried:

_root.subnav1.butt1.onPress
_root.subholder.subnav1.butt1.onPress

i'm being an idiot and doing something wrong. Can anyone figure out what?

if i name the instance of the attached movie as "subnav1", then why am i having trouble dealing with it once that mc is attached?

sure its something simple, cheers

kd

ahmed
September 5th, 2003, 06:34 PM
mainbutt.onPress = function(){
subholder.attachMovie("subnav", "subnav1", ++d);
}

kdzines
September 5th, 2003, 06:41 PM
uhm, thanks for replying, but that didn't make it work.

i have put different depths for the different subnavs i'm using so they do not replace each other.

any more help or explanation would be appreciated.

cheers

Voetsjoeba
September 6th, 2003, 02:03 AM
Are you sure you gave instance names and didn't make any typos ?