# Transition with a as menu

**URL:** <https://forum.kirupa.com/t/transition-with-a-as-menu/34273>\
**Category:** Uncategorized\
**Created:** [October 30, 2003, 5:07pm UTC](https://forum.kirupa.com/t/transition-with-a-as-menu/34273 "2003-10-30T17:07:31Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ubik](https://avatars.discourse-cdn.com/v4/letter/u/b38774/32.png) [@Ubik](https://forum.kirupa.com/u/Ubik)\
**Post date:** [October 30, 2003, 5:07pm UTC](https://forum.kirupa.com/t/transition-with-a-as-menu/34273/1 "2003-10-30T17:07:31Z")

</div>

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:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 30, 2003, 7:07pm UTC](https://forum.kirupa.com/t/transition-with-a-as-menu/34273/2 "2003-10-30T19:07:28Z")

</div>

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

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 31, 2003, 11:12am UTC](https://forum.kirupa.com/t/transition-with-a-as-menu/34273/3 "2003-10-31T11:12:34Z")

</div>

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](http://www.artefakt.be/testtransition.zip)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 31, 2003, 11:28am UTC](https://forum.kirupa.com/t/transition-with-a-as-menu/34273/4 "2003-10-31T11:28:00Z")

</div>

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:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 31, 2003, 11:47am UTC](https://forum.kirupa.com/t/transition-with-a-as-menu/34273/5 "2003-10-31T11:47:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 31, 2003, 12:35pm UTC](https://forum.kirupa.com/t/transition-with-a-as-menu/34273/6 "2003-10-31T12:35:33Z")

</div>

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(-:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 31, 2003, 5:21pm UTC](https://forum.kirupa.com/t/transition-with-a-as-menu/34273/7 "2003-10-31T17:21:35Z")

</div>

Yes ! It’s that !

Thanks for your time scotty !:thumb:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 31, 2003, 5:29pm UTC](https://forum.kirupa.com/t/transition-with-a-as-menu/34273/8 "2003-10-31T17:29:42Z")

</div>

no problem;)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 31, 2003, 5:43pm UTC](https://forum.kirupa.com/t/transition-with-a-as-menu/34273/9 "2003-10-31T17:43:55Z")

</div>

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](http://www.artefakt.be/testtransition.zip)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 31, 2003, 6:58pm UTC](https://forum.kirupa.com/t/transition-with-a-as-menu/34273/10 "2003-10-31T18:58:33Z")

</div>

- 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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 31, 2003, 7:20pm UTC](https://forum.kirupa.com/t/transition-with-a-as-menu/34273/11 "2003-10-31T19:20:57Z")

</div>

: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](http://www.artefakt.be/testtransition.zip)

Hope i will not disturb you too long !!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 31, 2003, 7:34pm UTC](https://forum.kirupa.com/t/transition-with-a-as-menu/34273/12 "2003-10-31T19:34:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 31, 2003, 8:29pm UTC](https://forum.kirupa.com/t/transition-with-a-as-menu/34273/13 "2003-10-31T20:29:25Z")

</div>

> i made a stupid mistake

LOL, i do that all the time(-:
