Quick menu fix

Hi, I know this is another “search the forums” question but I’ve had a fairly good look and I can’t find a simple, concise answer.

I’m trynig to create a drop down menu where as the button is clicked the buttons underneath move down. i don’t even need animation for now, I just need a piece of code that teathers the y pos of the other buttons to the bottom of the expanded menu. My menu consits of a button on frame 1 of an MC and the expanded view is on frame 2 with a simple on(release){gotoAndStop(2)} action.

I tried something like;

onFrameEvent(enterFrame)
{this._y = this._y+ menu1._height;
}

On the second menu but it didn’t work.

Can someone point me in the right direction. Cheers :slight_smile:

You can use the AS tags as well: [AS] [/AS] without the asterisks.

I don’t know what you’re trying to do, but that code is wrong:

[AS]
onClipEvent(enterFrame){
this._y +=menu1._height
}

// but a better way to acheive this would be to place the code on
// your main timeline where myClip is the name of the MC you want to change:
myClip.onEnterFrame = function(){
myClip._y+=menu1._height
}[/AS]

Yeah, my mistake that is the correct way to code the loop and it still doesn’t work. It’s really the setting of the location of the second menu that’s beating me.

Cheers though njs.