# \[AS2, MX\] :Button script for menu:

**URL:** https://forum.kirupa.com/t/as2-mx-button-script-for-menu/80230
**Category:** flash
**Created:** [February 20, 2005, 6:42pm UTC](https://forum.kirupa.com/t/as2-mx-button-script-for-menu/80230 "2005-02-20T18:42:18Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![abraxas](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@abraxas](https://forum.kirupa.com/u/abraxas)
#### Post date: [February 20, 2005, 6:42pm UTC](https://forum.kirupa.com/t/as2-mx-button-script-for-menu/80230/1 "2005-02-20T18:42:18Z")

</div>

Hello, i need some help with this AS on my button.  
[AS]  
on(release){  
//MONEY//  
if (buildings\_on = true or crew\_on = true or family\_on = true){  
buildings\_on = false;  
crew\_on = false;  
family\_on = false;  
money\_on = true;  
buildings.\_y = buildings\_standard;  
crew.\_y = crew\_standard;  
family.\_y = family\_standard;  
buildings.\_y = buildings.\_y - 200;  
crew.\_y = crew.\_y - 200;  
family.\_y = family.\_y - 200;  
} else {  
money\_on = true;  
buildings.\_y = buildings.\_y - 200;  
crew.\_y = crew.\_y - 200;  
family.\_y = family.\_y - 200;  
}  
}  
[/AS]

I get this error, and i wonder whats the problem?

**Error** Symbol=meny, layer=Layer 2, frame=1:Line 3: Left side of assignment operator must be variable or property.  
if (money\_on = true or crew\_on = true or family\_on = true){

and i wonder how i correct the error. I have in the first frame this;  
[AS]  
var buildings\_standard = 53.7;  
var crew\_standard = 75.7;  
var family\_standard = 97.7;  
var money\_on = false;  
var buildings\_on = false;  
var crew\_on = false;  
var family\_on = false;  
[/AS]

Please help me! 🙂
