# Declaring a Variable

**URL:** https://forum.kirupa.com/t/declaring-a-variable/156412
**Category:** flash
**Created:** [July 25, 2005, 6:20pm UTC](https://forum.kirupa.com/t/declaring-a-variable/156412 "2005-07-25T18:20:38Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![phish007](https://avatars.discourse-cdn.com/v4/letter/p/aeb1de/32.png) [@phish007](https://forum.kirupa.com/u/phish007)
#### Post date: [July 25, 2005, 6:20pm UTC](https://forum.kirupa.com/t/declaring-a-variable/156412/1 "2005-07-25T18:20:38Z")

</div>

Ok this might be lengthy…but easy for most im sure…Ok I have MC…and whenever u click a button on the menu bar I want this MC to activate on both sides of the button. Ok so for now I have 2 buttons…one is TEAM and the other is PRODUCT. So if u click team button the MC’s activate…Now if u click PRODUCT I want the MC’s from the team button to unload and the ones on the sides PRODUCT to now load… Ok so I achieved this using “in” and “out” with the main MC (i just duplicated it many times giving each a diff instance name for each button). Ok so heres my script for TEAm button…this works however I was told I need to declare the variable pressed or not\_pressed on the main timeline…Does anyone know how I do this? Any explanation would be great…Cause I just dont get it:) Thanks!!!
