# Why is this AS not working?

**URL:** https://forum.kirupa.com/t/why-is-this-as-not-working/185624
**Category:** flash
**Created:** [April 14, 2006, 7:27pm UTC](https://forum.kirupa.com/t/why-is-this-as-not-working/185624 "2006-04-14T19:27:48Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![BoonDock](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/boondock/32/1188_2.png) [@BoonDock](https://forum.kirupa.com/u/BoonDock)
#### Post date: [April 14, 2006, 7:27pm UTC](https://forum.kirupa.com/t/why-is-this-as-not-working/185624/1 "2006-04-14T19:27:48Z")

</div>

I’ve got buttons on the main timeline that when released they execute this code:

```auto
 
on (release) {
_global.otherSectionButton == "people"; 
 
if (_root.currMovie == undefined) {
  _root.currMovie = "other_background";
  loadMovie("other_background.swf", _parent.sub_nav);
 } else if (_root.currMovie != "other_background") {
  if (_parent.sub_nav._currentframe >= _parent.sub_nav.midframe) {
   _root.currMovie = "other_background";
   _parent.sub_nav.play();
  }
 }
}

```

then once the background.swf stops at this certain frame this script runs …

```auto
 
aboutbtn = function()
{
 if (_global.otherSectionButton == "about") loadotherSection.loadMovie("about.swf");
 else this.onEnterFrame = peoplebtn;
}
peoplebtn = function()
{
 if (_global.otherSectionButton == "people") this.loadotherSection.loadMovie("people.swf");
 else this.onEnterFrame = contactbtn;
}
contactbtn = function()
{
 if (_global.otherSectionButton == "contact") this.loadotherSection.loadMovie("contact.swf");
 else this.onEnterFrame = null;
}
this.onEnterFrame = aboutbtn;

```

Any help would be greatly appreciated!

---

<div class="post-metadata">

### Author: ![B\_L\_U\_E](https://avatars.discourse-cdn.com/v4/letter/b/ba8739/32.png) [@B\_L\_U\_E](https://forum.kirupa.com/u/B_L_U_E)
#### Post date: [April 14, 2006, 8:05pm UTC](https://forum.kirupa.com/t/why-is-this-as-not-working/185624/2 "2006-04-14T20:05:14Z")

</div>

change [AS]\_global.otherSectionButton == “people”;[/AS] to [AS]\_global.otherSectionButton = “people”;[/AS]

---

<div class="post-metadata">

### Author: ![BoonDock](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/boondock/32/1188_2.png) [@BoonDock](https://forum.kirupa.com/u/BoonDock)
#### Post date: [April 14, 2006, 8:17pm UTC](https://forum.kirupa.com/t/why-is-this-as-not-working/185624/3 "2006-04-14T20:17:54Z")

</div>

Nope that didn’t work … thanks for trying …

Any other ideas are welcome! Please and thanks! :thumb:

---

<div class="post-metadata">

### Author: ![B\_L\_U\_E](https://avatars.discourse-cdn.com/v4/letter/b/ba8739/32.png) [@B\_L\_U\_E](https://forum.kirupa.com/u/B_L_U_E)
#### Post date: [April 14, 2006, 8:19pm UTC](https://forum.kirupa.com/t/why-is-this-as-not-working/185624/4 "2006-04-14T20:19:14Z")

</div>

Well, it was certainly one of the problems. Mind posting the FLA to get a better understanding?

---

<div class="post-metadata">

### Author: ![BoonDock](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/boondock/32/1188_2.png) [@BoonDock](https://forum.kirupa.com/u/BoonDock)
#### Post date: [April 14, 2006, 8:40pm UTC](https://forum.kirupa.com/t/why-is-this-as-not-working/185624/5 "2006-04-14T20:40:21Z")

</div>

Yeah sure …

Look at frame 123 to see where the AS is …

[http://www.cskern.com/newsite/other\_background.fla](http://www.cskern.com/newsite/other_background.fla)

Thanks.
