Transition with a as menu

Hello !
I’m trying to apply my lessons from the transition tutorial to a menu i found in this forum (i don’t remember who made this stuff but it’s great !!).
The problem is that i don’t know how to manage the as code for the button to the button of this menu.
Mayber someone can just a look and tell me if it’s possible ??

Excuse my bad english !:azn:

i think it might be helpful if you posted the code…

[edit]
uhm sorry i didn’t see the attachment…
just ignore the comment :expressionless:

here’s the code (from the tutorial), i don’t know where to put it :

home.onRelease = function() {
if (_root.section != “profile.swf”) {
_root.section = “profile.swf”;
_root.transition.gotoAndPlay(“closing”);
}
};
sepstigo.onRelease = function() {
if (_root.section != “gallery.swf”) {
_root.section = “gallery.swf”;
_root.transition.gotoAndPlay(“closing”);
}
};
productions.onRelease = function() {
if (_root.section != “photos.swf”) {
_root.section = “photos.swf”;
_root.transition.gotoAndPlay(“closing”);
}
};

etc …

my button home has a gotoAndPlay to frame 2 where there is a tween until 6, it’s the same for the other except “liens” which is not active.
A the end of each tween i put :
if (_root.section != “profile.swf”) {
_root.section = “profile.swf”;
_root.transition.gotoAndPlay(“closing”);
}
};

eeh … it works partially (bad) … I think i’m losing myself :puzzle:

Attachment : http://www.artefakt.be/testtransition.zip

just make a new layer, where you copy your code in. I think you also want people to click on the photo’s, then you can change the code a little bit:

[AS]home.onRelease = photo1.onRelease = function() {
if (_root.section != “profile.swf”) {
_root.section = “profile.swf”;
_root.transition.gotoAndPlay(“closing”);
}
};[/AS]

this is for the first button, and you have to give photo1 the instance name “photo1”(without quotes)

scotty:thumb:

thanks scotty ! it works fine but in fact i want my buttons to go to a specified frame, e.g. : home->frame 2 (tween->6) : on frame 6 i put the code:
if (_root.section != “photos.swf”) {
_root.section = “photos.swf”;
_root.transition.gotoAndPlay(“closing”);
stop();
};

The photo are just “illustration” related (i’ll change it) with the content that will appear in the container mc.

ehm, for the firstbutton:
[AS]home.onRelease = function() {
if (_root.section != “profile.swf”) {
_root.section = “profile.swf”;
_root.gotoAndPlay(2);
}[/AS]
this in the action layer and:
[AS]stop();
_root.transition.gotoAndPlay(“closing”);[/AS]
in frame 6.
hope i understood you right this time

scotty(-:

Yes ! It’s that !

Thanks for your time scotty !:thumb:

no problem;)

hmm… while the main idea is working, there are still some bugs :

  • When i click the home button for a second time it doesn’t reload the file that it has to.
  • When i rollover the home button, it is no more enlightened.
    I guess it may be something with a stop that i have to put somewhere, i tried at different places but still bugging …
    sorry …

the file

  • you had alot of keyframes in frame 5 for no reason (i think), they also stopped some action.

*you’re first button said:
gotoAndPlay(5)
should be 2

*frame 6, actions: you had the stop in the “if” handlers

i changed it, now it seems to work fine, if not let me know

scotty

btw, keep you’re actions in one layer, its a lot easier and clearer if things don’t work

:puzzle: sorry scotty i posted a bad .fla, here’s the good one bugging ! i cleaned my frames and check everything to see how it bug click the button two or three time.
Normally home opens gallery.swf
sepstigo opens photos.swf
and productions opens profile.swf
But when you several times the buttons doesn’t open the good swf
file

Hope i will not disturb you too long !!

hum! sorry scotty, i made a stupid mistake with the actions of my buttons ! now it’s working

i made a stupid mistake

LOL, i do that all the time(-: