PDA

View Full Version : gotoandplay specific frame in mc issue


nim23
10-09-2008, 08:23 PM
Hi there,

I have found another post in the search very similar, but because I am a beginner at this stuff I couldn't quite get to grips with it.


I have a website up at http://www.nim23.co.uk

If you play it everything technically works fine, but, the back button doesn't go to where I want it to.

The first movieclip that it played it the intro logo, contact info, portfolio, contact and mini logo. These are all in the first mc.

Once portfolio is clicked on, and then any subsequent button, these are all new mc's on different frames which are jumped to using the gotoandplay command in actionscript.


The 'Back' button I want to skip back to a specific frame within the first mc mentioned above.

I have this first mc frame mentioned above called 'mainmenu'. Within this mc I have named frame 210 'goback' because this is the specific frame I would like the 'Back' button to go back to. Going to this specific frame skips the fade-in and fade-out of the large logo, and is intended to start at where the menu options fades in.

My actionscript gotoandplay code used for buttons is as follows:

on (release) {
_root.gotoAndPlay("frame_name");
}

For the back button I currently have:

on (release) {
_root.gotoAndPlay("mainmenu","goback");
}

I also tried this with no avail:

on (release) {
_root.gotoAndPlay("mainmenu",210);
}


This code seems to work to a certain extent, because I am able to go back to the beginning of the 'mainmenu' mc, but I want to skip all if of the large logo thing when going back.

Can anyone enlighten me?

Thanks in advance,
Nick

atomic
10-10-2008, 12:17 AM
How about...

on (release) {
_root.mainmenu.gotoAndPlay(210);
}

nim23
10-15-2008, 06:06 PM
Hi... Thanks for your reply...


I have tried your suggestion, but it doesn't seem to work...

I also tried replacing (210) with ("goback") which is what I called that section of the mc...


When I typed in the code, the section .mainmenu. was black where as the rest was blue, is this saying that it isn't recognising it??

I did however check the syntax which was fine...


Any other suggestions??

Nick

atomic
10-15-2008, 06:13 PM
Attach your .fla to this forum...

nim23
10-15-2008, 06:21 PM
Cool…


Its at http://www.nim23.co.uk/index.fla


Library is a bit messy, but ignore that ;-)

nim23
10-15-2008, 06:23 PM
Also,

Can I just say this forum seems to be a lot more helpful that Flashkit, if im allowed to say...


Ive never got a reply off there before...!

atomic
10-15-2008, 06:54 PM
Well, first your mainmenu mc on stage doesn't have that instance name, so you need to set it up so that it does have that instance name, mainmenu.

It also needs to be present on stage, on the frame you're targeting it, and on frame 9, it isn't present anymore...

So you should extend it, most likely up to frame 39, so that it's always present on stage, and that you can thus target it...

Your back button then works fine!

nim23
10-15-2008, 07:36 PM
Hi there, thanks for the reply...

The only problem I can see with this at the moment, is that if I extend the mainmenu frame to 39 then where I have portfolio and content etc it will show throughout, and so will have the new text overlapping it once a menu is opened...

atomic
10-15-2008, 07:59 PM
Just set it's visibility to off when that happents, and set it back to on, when there<s no content...