# Could some one elaborate on this tutorial for me

**URL:** https://forum.kirupa.com/t/could-some-one-elaborate-on-this-tutorial-for-me/62339
**Category:** flash
**Created:** [August 27, 2004, 12:46am UTC](https://forum.kirupa.com/t/could-some-one-elaborate-on-this-tutorial-for-me/62339 "2004-08-27T00:46:04Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![Cloakendagger](https://avatars.discourse-cdn.com/v4/letter/c/2bfe46/32.png) [@Cloakendagger](https://forum.kirupa.com/u/Cloakendagger)
#### Post date: [August 27, 2004, 12:46am UTC](https://forum.kirupa.com/t/could-some-one-elaborate-on-this-tutorial-for-me/62339/1 "2004-08-27T00:46:04Z")

</div>

[http://www.kirupa.com/developer/mx2004/ani\_smartclipnav2.htm](http://www.kirupa.com/developer/mx2004/ani_smartclipnav2.htm)  
OK, at the end of this tutorial it talks about adding links to the buttons created. I did what it said to do but the two buttons keep canceling themselves out if I place them on top of eachother. Could some one please shed some light on how to place them.  
thanks  
CLoak

---

<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: [August 27, 2004, 1:04am UTC](https://forum.kirupa.com/t/could-some-one-elaborate-on-this-tutorial-for-me/62339/2 "2004-08-27T01:04:04Z")

</div>

[http://www.kirupa.com/developer/mx2…artclipnav2.htm](http://www.kirupa.com/developer/mx2004/ani_smartclipnav2.htm)  
OK, at the end of this tutorial it talks about adding links to the buttons created. I did what it said to do but the two buttons keep canceling themselves out if I place them on top of eachother. Could some one please shed some light on how to place them.  
thanks  
CLoak

---

<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: [August 27, 2004, 1:37am UTC](https://forum.kirupa.com/t/could-some-one-elaborate-on-this-tutorial-for-me/62339/3 "2004-08-27T01:37:05Z")

</div>

> Now you’re obviously going to want these buttons to lead somewhere … My best advice, and the practice I always use, is to add a new layer above your movie, and insert a new instance of your invisible button per link, and add the Actionscript for each one 🙂

I think I understand your problem… correct me if i’m off base here:

You’re being misled by the whole “new layer above your movie” thing. You can have all of your buttons on one layer… in fact that’s probably the easier and more organized way of doing things.

once you’ve created a smartclip you can drag the instance of it from the library and onto the stage. Make a new layer and call it “buttons” or “nav” or whatever and drop as many instances of your smart clip as you’ll need buttons onto the stage. then use the align panel and pixel nudging to align them all purty like.

then click on the individual button (in this case smartclip instances) and add different actionscript for each one (your “links”). You can direct other movie clips to specific frames, load a .swf, get an URL or whatever…

does that help?

---

<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: [August 27, 2004, 1:39am UTC](https://forum.kirupa.com/t/could-some-one-elaborate-on-this-tutorial-for-me/62339/4 "2004-08-27T01:39:29Z")

</div>

Hey Cloakendagger, let me be the first to warn you about posting mulitple threads with the exact same question, aka cross-posting.

The Mods. do not like it when people do this, just thought I’d let you know. 😉

---

<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: [August 27, 2004, 2:24am UTC](https://forum.kirupa.com/t/could-some-one-elaborate-on-this-tutorial-for-me/62339/5 "2004-08-27T02:24:23Z")

</div>

Sorry about the cross posting, I have people paying me to get this done so when the dead line is 3 days out I kinda panic when I get in to jams. Next time I’ll huddle in the closet and mumble to myself.

OK, So I did what you said and all but I still didnt get the results. So what your saying to do is on the stage creat a layer for all my buttons.(which i already have done.) Then on each instance of the buttons on the stage add an action. Which Im doing. But it just does what the stage instance action script requests. It doesnt even bother to run the actions within the instance. Ya know what I mean. In the instance on the invisible button i have this action

on (rollOver) {  
gotoAndPlay(“Start”);  
}  
on (rollOut) {  
gotoAndPlay(“Stop”);  
}

And then on the stage on the smartclip instance i have this

on (release) {  
if (\_root.currMovie == undefined) {  
\_root.currMovie = “home”;  
container.loadMovie(“home.swf”);  
} else if (\_root.currMovie != “home”) {  
if (container.\_currentframe\>=container.midframe) {  
\_root.currMovie = “home”;  
container.play();  
}  
}  
}

Does this conflict?

---

<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: [August 27, 2004, 2:42am UTC](https://forum.kirupa.com/t/could-some-one-elaborate-on-this-tutorial-for-me/62339/6 "2004-08-27T02:42:22Z")

</div>

yeah, that is incorrect…

you can’t have on release, rollover, etc. actions on a movie clip… only on the button…

that invisible button inside your movie clip is where you want to define any  
actions based on mouse events.

---

<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: [August 27, 2004, 3:03am UTC](https://forum.kirupa.com/t/could-some-one-elaborate-on-this-tutorial-for-me/62339/7 "2004-08-27T03:03:47Z")

</div>

So would I place this on the button inside my instance.  
Could you check my code and see if its ok because its not running right. Im not getting any errors but its not activating the release command.

on (rollOver) {  
gotoAndPlay(“Start”);  
}  
on (rollOut) {  
gotoAndPlay(“Stop”);  
}  
on (release) {  
if (\_root.currMovie == undefined) {  
\_root.currMovie = “home”;  
container.loadMovie(“home.swf”);  
} else if (\_root.currMovie != “home”) {  
if (container.\_currentframe\>=container.midframe) {  
\_root.currMovie = “home”;  
container.play();  
}  
}  
}

---

<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: [August 27, 2004, 3:25am UTC](https://forum.kirupa.com/t/could-some-one-elaborate-on-this-tutorial-for-me/62339/8 "2004-08-27T03:25:53Z")

</div>

yes, you place the button code on the button inside your movie clip (smartclip).  
\*

```auto
on (rollOver) { 
gotoAndPlay("Start"); 
} 

```

that is fine

```auto
on (rollOut) { 
gotoAndPlay("Stop"); 
} 

```

that is good

```auto
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "home";
container.loadMovie("home.swf");
} else if (_root.currMovie != "home") {
if (container._currentframe>=container.midframe) {
_root.currMovie = "home";
container.play();
}
}
}

```

i see some potential problems with your on release code.  
first of all when checking to see if a variable is equal to something the “==” should not have a space in the middle. Maybe it just appears that way in my browser… check that out. Also I’m not sure that undefined is a built in variable attribute in flash. Meaning your movie is looking for a variable that doesn’t exist. If you are defining \_root.currMovie=“undefined”;  
at some point, then you need to have quotation marks (denoting a string) in this line of code just as you do when you are initially declaring it.

also, the current movie is either home or it’s not. I would use something like this:

```auto
on (release) {
if (_root.currMovie != "home") {
_root.currMovie = "home";
container.loadMovie("home.swf");
} else if (_root.currMovie == "home") {stop;}
}
}

```

this code should load home.swf unless you already have it loaded.  
what are you trying to accomplish with the movie clip “container?” I assume it’s a movie clip because you try to reference it’s frames…?

---

<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: [August 27, 2004, 3:45am UTC](https://forum.kirupa.com/t/could-some-one-elaborate-on-this-tutorial-for-me/62339/9 "2004-08-27T03:45:47Z")

</div>

the code I’m using is from this tutorial  
[http://www.kirupa.com/developer/mx2004/transitions2.htm](http://www.kirupa.com/developer/mx2004/transitions2.htm)

I have transitions between button clicks.

So thats where the midframe junk and what not comes from.

This is my original templet but i didnt like how the buttons didnt flow smoothly. So i changed them into smartclips. You can see how my transitions are between buttons clicks if you click on projects and home. its far from done, but you will get the idea.  
[http://trinitymicrodesign.com/BCSI.swf](http://trinitymicrodesign.com/BCSI.swf)

---

<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: [August 27, 2004, 4:02am UTC](https://forum.kirupa.com/t/could-some-one-elaborate-on-this-tutorial-for-me/62339/10 "2004-08-27T04:02:09Z")

</div>

OK, this might make it easyer on you to understand. I want to merger these two tutorials into one.  
[http://www.kirupa.com/developer/mx2004/ani\_smartclipnav2.htm](http://www.kirupa.com/developer/mx2004/ani_smartclipnav2.htm)  
[http://www.kirupa.com/developer/mx2004/transitions2.htm](http://www.kirupa.com/developer/mx2004/transitions2.htm)

---

<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: [August 27, 2004, 4:16am UTC](https://forum.kirupa.com/t/could-some-one-elaborate-on-this-tutorial-for-me/62339/11 "2004-08-27T04:16:17Z")

</div>

have you defined midframe ?

---

<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: [August 27, 2004, 4:32am UTC](https://forum.kirupa.com/t/could-some-one-elaborate-on-this-tutorial-for-me/62339/12 "2004-08-27T04:32:55Z")

</div>

Im not sure what you mean. Midframe is the point on the home.swf at which the code stops and waits to be initiated…  
I think or thats what the tutorial says… I think.

---

<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: [August 27, 2004, 4:46am UTC](https://forum.kirupa.com/t/could-some-one-elaborate-on-this-tutorial-for-me/62339/13 "2004-08-27T04:46:46Z")

</div>

Midframe is the point/frame between transitions.

Intro - Midframe - Outro

---

<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: [August 27, 2004, 5:10am UTC](https://forum.kirupa.com/t/could-some-one-elaborate-on-this-tutorial-for-me/62339/14 "2004-08-27T05:10:47Z")

</div>

> [@wizard](#):
>
> Hey Cloakendagger, let me be the first to warn you about posting mulitple threads with the exact same question, aka cross-posting.
> 
> The Mods. do not like it when people do this, just thought I’d let you know. 😉

:chinaman:

---

<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: [August 27, 2004, 5:25am UTC](https://forum.kirupa.com/t/could-some-one-elaborate-on-this-tutorial-for-me/62339/15 "2004-08-27T05:25:08Z")

</div>

I heard ya the first time thanks  
🙂  
My mistake.

---

<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: [August 27, 2004, 2:47pm UTC](https://forum.kirupa.com/t/could-some-one-elaborate-on-this-tutorial-for-me/62339/16 "2004-08-27T14:47:45Z")

</div>

> [@Cloakendagger](#):
>
> I heard ya the first time thanks  
> 🙂  
> My mistake.

Probably did, but I just like to be annoying (j/k) 🙂

---

<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: [August 27, 2004, 7:21pm UTC](https://forum.kirupa.com/t/could-some-one-elaborate-on-this-tutorial-for-me/62339/17 "2004-08-27T19:21:05Z")

</div>

I think Im going to give up on this one. I just cant seem to merge the two tutorials. I know a little about action script but not enough to solve this problem. Thanks for all your help you guys.  
Cloak
