Button actions problem

Hello, I am having a bit of trouble here, I have this action on my buttons:

on (press) {
_root.nPage = “company”;
AnimationMC.play();
}
on (press) {
gotoAndPlay(3);
}

I am trying to have a button change frames on the main timeline (gotoAndPlay X) and also load a MC on the same click.
However I suck at actionscripting and I can’t figure this out. I think what is happening is because the on(press) is separate it is causing my pages to load at different times when I click real fast when AnimationMC is playing. However if I wait for the animation to load first it works %99 of the time.

Anyway this is causing conflicts, I hope this makes sense is there a way to combine the 2 to say

on press play this movie and also goto frame 3 ???

or a better idea??

Thanx for you help…

see ya

Try this:[AS]on (press) {
gotoAndPlay(3);
_root.nPage = “company”;
_root.AnimationMC.play();
}
[/AS]

Hey electrongeek, sorry about taking so long to reply to your reply…:slight_smile: But thanx alot for your help, What you told me does work, and your way is much cleaner too…:wink: but however there is still the same problem.

I set up this site I am building kinda stupid…I think. The only reason I need the frames to change on the main timeline is to change the downstate appearance of the buttons.

flash buttons only have up, over , down but no hold down until next button is pressed frame. which would be nice.

-On my main timeline I have my navigation of 6 buttons.

  • I then have a stop action on each keyframe and on each of these frames I have changes made to each individual button within the complete nav bar ( to appear as pressed and in waiting for next selection mode.)

Basically to achieve the effect that when you press “about” it holds down until the next button is pressed. Which then appears to be holding down. I was trying to do this by having it jump to the appropriate keyframes on the main timeline.

I am sure some simple actionscripting would do the trick much easier…

Sorry for just rambling, just something I am trying to figure out and I think it is a little to late in the game to make any major changes.

See ya…

You’re in luck, I have a sample file of something similar to what you want, it will give you an idea as to how to set up that effect. =)

Electrongeek, is there anything you can’t answer…thanx so much I will look through it…:slight_smile: