# Animated Smartclip Navigation Tutorial

**URL:** https://forum.kirupa.com/t/animated-smartclip-navigation-tutorial/119729
**Category:** Uncategorized
**Created:** [August 17, 2004, 6:15pm UTC](https://forum.kirupa.com/t/animated-smartclip-navigation-tutorial/119729 "2004-08-17T18:15:34Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![mjULTRA](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@mjULTRA](https://forum.kirupa.com/u/mjULTRA)
#### Post date: [August 17, 2004, 6:15pm UTC](https://forum.kirupa.com/t/animated-smartclip-navigation-tutorial/119729/1 "2004-08-17T18:15:34Z")

</div>

There is a tutorial on [Kirupa.com](http://Kirupa.com) called Animated Smartclip Navigation. It can be found here: [http://www.kirupa.com/developer/mx2004/ani\_smartclipnav.htm](http://www.kirupa.com/developer/mx2004/ani_smartclipnav.htm)

The premise is creating one button instance, and then defining it as a component, in order to use it multiple times. The author of the tutorial says that when using these buttons for a menu, simply place invisible buttons over the top, so each button can have a unique command. The trouble is, when i do this, the animations no longer play. Have i missed something??

:-/

---

<div class="post-metadata">

### Author: ![Prophet](https://avatars.discourse-cdn.com/v4/letter/p/838e76/32.png) [@Prophet](https://forum.kirupa.com/u/Prophet)
#### Post date: [August 17, 2004, 6:46pm UTC](https://forum.kirupa.com/t/animated-smartclip-navigation-tutorial/119729/2 "2004-08-17T18:46:17Z")

</div>

i recently found that and was experimenting with it and mine play fine…  
u wanna post an fla or sumit?

Prophet.

PS note im NOT using mx2004 😉

---

<div class="post-metadata">

### Author: ![mjULTRA](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@mjULTRA](https://forum.kirupa.com/u/mjULTRA)
#### Post date: [August 17, 2004, 6:50pm UTC](https://forum.kirupa.com/t/animated-smartclip-navigation-tutorial/119729/3 "2004-08-17T18:50:31Z")

</div>

Here is a Flash which is nearly identical to the tutorials source files. The only difference is that there is three invisible buttons on the level above the smartclips…

\<—uses Flash MX, too

:toad:

---

<div class="post-metadata">

### Author: ![Prophet](https://avatars.discourse-cdn.com/v4/letter/p/838e76/32.png) [@Prophet](https://forum.kirupa.com/u/Prophet)
#### Post date: [August 17, 2004, 10:03pm UTC](https://forum.kirupa.com/t/animated-smartclip-navigation-tutorial/119729/4 "2004-08-17T22:03:42Z")

</div>

it makes sense wen u think about it:  
you have a button that does the rollover anims actually in the component and you have more buttons over the top of those.  
hence the top layer of buttons is obstructing the buttons controlling the rollover anims… a solution i thought of wen fiddling with this same tut is to have the buttons that control the rollover anims an extra action:

```auto
on(press){
	_root[func]()
}

```

and in the component definition window add in a variable named _func_ and add in a function on the \_root timeline of what you want to do (ie. with a name _testing_) and put in your properties inspector for your smartclip the value _testing_ under your new entry… i hope you followed that…

it does work - i use it!! lol  
ive no idea what the author REALLY meant… because surely he cant have said that in honesty??? 😉

Prophet.

---

<div class="post-metadata">

### Author: ![mjULTRA](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@mjULTRA](https://forum.kirupa.com/u/mjULTRA)
#### Post date: [August 17, 2004, 10:10pm UTC](https://forum.kirupa.com/t/animated-smartclip-navigation-tutorial/119729/5 "2004-08-17T22:10:16Z")

</div>

Im not too familiar with AS and functions… Ill see what i can come up with, but some step by step instructions or even a FLA would help me out…

---

<div class="post-metadata">

### Author: ![Prophet](https://avatars.discourse-cdn.com/v4/letter/p/838e76/32.png) [@Prophet](https://forum.kirupa.com/u/Prophet)
#### Post date: [August 18, 2004, 7:44pm UTC](https://forum.kirupa.com/t/animated-smartclip-navigation-tutorial/119729/6 "2004-08-18T19:44:32Z")

</div>

apologies about the drama on the third button 😊 lol

i just went into the component (or smartclip)  
took the button layer and unlocked it, selected the invisible button and applied this code:

```auto
on (press) {
     _root[Fpress]()
 }

```

and added in a new variable to the component in component definition which states the name of the function to call when you press the button and labelled this variable _Fpress_…

i then declared a function for each button on the \_root timeline and hey presto 😉

Prophet.

---

<div class="post-metadata">

### Author: ![mjULTRA](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@mjULTRA](https://forum.kirupa.com/u/mjULTRA)
#### Post date: [August 18, 2004, 7:47pm UTC](https://forum.kirupa.com/t/animated-smartclip-navigation-tutorial/119729/7 "2004-08-18T19:47:49Z")

</div>

sweet… thanks a lot… this will come in handy when making navigation in the future…

again, thanks a lot!!

---

<div class="post-metadata">

### Author: ![Prophet](https://avatars.discourse-cdn.com/v4/letter/p/838e76/32.png) [@Prophet](https://forum.kirupa.com/u/Prophet)
#### Post date: [August 18, 2004, 8:43pm UTC](https://forum.kirupa.com/t/animated-smartclip-navigation-tutorial/119729/8 "2004-08-18T20:43:35Z")

</div>

not a problem 🙂

Prophet.

---

<div class="post-metadata">

### Author: ![felipegm](https://avatars.discourse-cdn.com/v4/letter/f/e9bcb4/32.png) [@felipegm](https://forum.kirupa.com/u/felipegm)
#### Post date: [August 18, 2004, 9:21pm UTC](https://forum.kirupa.com/t/animated-smartclip-navigation-tutorial/119729/9 "2004-08-18T21:21:56Z")

</div>

I was looking for that answer too! Thanks  
But I have another question regarding smart clips.  
Is it possible to make the button to stay in the OVER state when clicked and to go back to the initial state when another buttons is pressed?

---

<div class="post-metadata">

### Author: ![Prophet](https://avatars.discourse-cdn.com/v4/letter/p/838e76/32.png) [@Prophet](https://forum.kirupa.com/u/Prophet)
#### Post date: [August 18, 2004, 9:35pm UTC](https://forum.kirupa.com/t/animated-smartclip-navigation-tutorial/119729/10 "2004-08-18T21:35:40Z")

</div>

yes.  
have the press function set a variable = 1. then in your smartclip code on the onRollOut operation, wrap an IF statement around the rollOut code to check if this variable != 1 before it does it. then on your other button that you want to initiate its rollOut anim, set the variable to 0 and then just use simple animation/path code suchas _mySmartClip.gotoAndPlay(“frameLabelRepresentingTheRollOutAnim”)_

Prophet.

EDIT:- majeye, i just saw your footer… FANTASTIC!!! lol

---

<div class="post-metadata">

### Author: ![sky\_vault](https://avatars.discourse-cdn.com/v4/letter/s/e79b87/32.png) [@sky\_vault](https://forum.kirupa.com/u/sky_vault)
#### Post date: [August 19, 2004, 7:58am UTC](https://forum.kirupa.com/t/animated-smartclip-navigation-tutorial/119729/11 "2004-08-19T07:58:50Z")

</div>

prophet  
thanks i had also been trying to get this to work … and now im having trouble getting this last part of getting the selected button to stay in a specific state …  
not the best with the a.c. so could you help out a little more with the actual code to get this to work?  
thanks in advance  
sky\_vault

---

<div class="post-metadata">

### Author: ![Prophet](https://avatars.discourse-cdn.com/v4/letter/p/838e76/32.png) [@Prophet](https://forum.kirupa.com/u/Prophet)
#### Post date: [August 19, 2004, 10:36pm UTC](https://forum.kirupa.com/t/animated-smartclip-navigation-tutorial/119729/12 "2004-08-19T22:36:27Z")

</div>

ne more requests? 😉

Prophet.

PS i wrapped an if around the rollOver action as well and made the variable a global variable making use of the _.\_name_ property for a smaller code

---

<div class="post-metadata">

### Author: ![FlashPlaya](https://avatars.discourse-cdn.com/v4/letter/f/e274bd/32.png) [@FlashPlaya](https://forum.kirupa.com/u/FlashPlaya)
#### Post date: [August 19, 2004, 10:48pm UTC](https://forum.kirupa.com/t/animated-smartclip-navigation-tutorial/119729/13 "2004-08-19T22:48:30Z")

</div>

Great nav Prophet!! thanks!!!

---

<div class="post-metadata">

### Author: ![Prophet](https://avatars.discourse-cdn.com/v4/letter/p/838e76/32.png) [@Prophet](https://forum.kirupa.com/u/Prophet)
#### Post date: [August 19, 2004, 11:01pm UTC](https://forum.kirupa.com/t/animated-smartclip-navigation-tutorial/119729/14 "2004-08-19T23:01:01Z")

</div>

lol i didnt make it, i just tweaked it 😉

but no probs! 🙂

Prophet.

---

<div class="post-metadata">

### Author: ![FlashPlaya](https://avatars.discourse-cdn.com/v4/letter/f/e274bd/32.png) [@FlashPlaya](https://forum.kirupa.com/u/FlashPlaya)
#### Post date: [August 19, 2004, 11:08pm UTC](https://forum.kirupa.com/t/animated-smartclip-navigation-tutorial/119729/15 "2004-08-19T23:08:24Z")

</div>

Yeah I know;) But love the tweaks!

---

<div class="post-metadata">

### Author: ![sky\_vault](https://avatars.discourse-cdn.com/v4/letter/s/e79b87/32.png) [@sky\_vault](https://forum.kirupa.com/u/sky_vault)
#### Post date: [August 20, 2004, 12:12am UTC](https://forum.kirupa.com/t/animated-smartclip-navigation-tutorial/119729/16 "2004-08-20T00:12:59Z")

</div>

ThankYou!!! Go Prophet!!!

---

<div class="post-metadata">

### Author: ![sky\_vault](https://avatars.discourse-cdn.com/v4/letter/s/e79b87/32.png) [@sky\_vault](https://forum.kirupa.com/u/sky_vault)
#### Post date: [August 20, 2004, 1:04am UTC](https://forum.kirupa.com/t/animated-smartclip-navigation-tutorial/119729/17 "2004-08-20T01:04:15Z")

</div>

Did find one more issue with these crazy little smartclips that are supposed to help making a nav an easy task:sure: in the down state if press on the button again it will play through the closing “Stop” animation while staying the selected button … But thanks to prophets GREAT tweaks I was able to add a tweak of my own that seems to solve this problem … just added a global var to the press function inside the clip and now when pressed it is disabled until another instance is pressed!!! Thanks again prophet for you showed me something that three different books could not!!!

---

<div class="post-metadata">

### Author: ![ViNc3](https://avatars.discourse-cdn.com/v4/letter/v/b487fb/32.png) [@ViNc3](https://forum.kirupa.com/u/ViNc3)
#### Post date: [August 21, 2004, 7:19am UTC](https://forum.kirupa.com/t/animated-smartclip-navigation-tutorial/119729/18 "2004-08-21T07:19:37Z")

</div>

Don’t know if anyone has done this on their posted flash (cuz i haven’t looked at any) But here’s a way:

Add the code on the invis button **inside** the smartclip (the same one used for the rollOver and Outs) :

```php
 
on (release) {
	getURL (site, "_blank");
}

```

and on the component definition thing you can put the variable as _site_ and then enter eg: “[http://www.kirupa.com](http://www.kirupa.com)” **with quotes!**

If you get what i mean 🙂

---

<div class="post-metadata">

### Author: ![Prophet](https://avatars.discourse-cdn.com/v4/letter/p/838e76/32.png) [@Prophet](https://forum.kirupa.com/u/Prophet)
#### Post date: [August 21, 2004, 12:56pm UTC](https://forum.kirupa.com/t/animated-smartclip-navigation-tutorial/119729/19 "2004-08-21T12:56:52Z")

</div>

or… u could use my method i posted earlier and do a thousand differnt things 😉  
wat i did was to call a function defined on the \_root level, the name of which is entered by the user on the property inspector so they can then write

```auto
function Mini(){
getURL ("http://www.kirupa.com", "_blank")
trace("this site rocks")
}

```

, write the word _Mini_ in the component definition and hey presto u got the same thing but with **much** more variability possible 😉

> Thanks again prophet for you showed me something that three different books could not!!!  
> 😃 really?? COOL!!  
> cheers, just happy 2 help 🙂

Prophet.

PS

> ThankYou!!! Go Prophet!!!  
> go me! 🙂 lol [apology=“Prophet”]sorry im in a funny mood :S lol[/apology]

---

<div class="post-metadata">

### Author: ![felipegm](https://avatars.discourse-cdn.com/v4/letter/f/e9bcb4/32.png) [@felipegm](https://forum.kirupa.com/u/felipegm)
#### Post date: [August 21, 2004, 5:52pm UTC](https://forum.kirupa.com/t/animated-smartclip-navigation-tutorial/119729/20 "2004-08-21T17:52:29Z")

</div>

The navigation is working fine now! thanks to everybody.

I was trying to make the buttons label to tint when on rollover to change color gradually. Is it possible?  
Thanks
