# Interactive nav AS question

**URL:** <https://forum.kirupa.com/t/interactive-nav-as-question/45289>\
**Category:** Uncategorized\
**Created:** [March 12, 2004, 7:30pm UTC](https://forum.kirupa.com/t/interactive-nav-as-question/45289 "2004-03-12T19:30:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rollala](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@rollala](https://forum.kirupa.com/u/rollala)\
**Post date:** [March 12, 2004, 7:30pm UTC](https://forum.kirupa.com/t/interactive-nav-as-question/45289/1 "2004-03-12T19:30:57Z")

</div>

Hi, if anyone knows where I’ve gone wrong here please help me out… It’s a navigation effect that follows and resizes a mc on rollovers/outs. I’ve gotten this to work before, but when i change the button width to suit the site it starts skrewing up.

The buttons are named but1, but2… here’s the AS in the main timeline:  
[AS]

for (i=1; i\<5; i++) {  
this[“but”+i].onRollOver = function() {  
tarw = this.\_width;  
tarx = this.\_x;  
follow(tarx, tarw);  
};  
}  
function follow(x, w) {  
slide.onEnterFrame = function() {  
this.\_x += (x-this.\_x)/2;  
this.\_width += (w-this.\_width)/2;  
if (this.\_x\>x-1 && this.\_x\<x+1 && this.\_width\>w-1 && this.\_width\<w+1) {  
delete this.onEnterFrame;  
}  
};  
}

[/AS]

here’s a link to the fla and swf:

[http://www.loftymedia.com/beta/insidex.fla](http://www.loftymedia.com/beta/insidex.fla)  
[http://www.loftymedia.com/beta/insidex.swf](http://www.loftymedia.com/beta/insidex.swf)

If there’s anything else I’ve left out that might help, then please let me know! Thanks

- R :tie:

---

<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:** [March 12, 2004, 8:28pm UTC](https://forum.kirupa.com/t/interactive-nav-as-question/45289/2 "2004-03-12T20:28:35Z")

</div>

**Failed to open document**  
MX2004???

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:** [March 12, 2004, 10:16pm UTC](https://forum.kirupa.com/t/interactive-nav-as-question/45289/3 "2004-03-12T22:16:00Z")

</div>

sorry scotty, it was in 2004 format, but i just re-saved and uploaded in MX. I’m publishing to flash 6, and using as 1.0

-Rolla

---

<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:** [March 12, 2004, 10:32pm UTC](https://forum.kirupa.com/t/interactive-nav-as-question/45289/4 "2004-03-12T22:32:46Z")

</div>

The registrationpoint was not in the middle, it was a bit tricky with the pixelfont, but it’s working now:)

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:** [March 12, 2004, 11:50pm UTC](https://forum.kirupa.com/t/interactive-nav-as-question/45289/5 "2004-03-12T23:50:53Z")

</div>

Awesome scotty, a quick fix indeed!

3 cheers,  
-r

---

<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:** [March 13, 2004, 8:22am UTC](https://forum.kirupa.com/t/interactive-nav-as-question/45289/6 "2004-03-13T08:22:59Z")

</div>

You’re welcome:)
