# TV Switch on and off.. help please thanks :)

**URL:** <https://forum.kirupa.com/t/tv-switch-on-and-off-help-please-thanks/244463>\
**Category:** flash\
**Created:** [November 18, 2007, 4:33pm UTC](https://forum.kirupa.com/t/tv-switch-on-and-off-help-please-thanks/244463 "2007-11-18T16:33:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Woodpeckersam](https://avatars.discourse-cdn.com/v4/letter/w/73ab20/32.png) [@Woodpeckersam](https://forum.kirupa.com/u/Woodpeckersam)\
**Post date:** [November 18, 2007, 4:33pm UTC](https://forum.kirupa.com/t/tv-switch-on-and-off-help-please-thanks/244463/1 "2007-11-18T16:33:30Z")

</div>

Hi all, new here… and a little new to actionscript 2. (im using it at college… 3 months already)

I have a movieclip of a remote, and within that movieclip there are buttons that will control a tv in the main scene. If i can get this to work, then i can pretty much get the rest of it to work myself… but i cannot seem to work this out.

redled - this is the class/var woteva it’s called. It starts at 1.  
When i press the power button inside the button inside the movieclip, i want the tv light to switch on in the main scene, and add +1 to the redled. When i press it again, i want it to turn off the tv light in the main scene and subtract - 1…

it doesnt work, i try trace(redled) but all that keeps appearing is 1, not a number 2. Please ![](http://www.flashmove.com/forum/images/smilies/help.gif)

```auto

[LEFT]redled = 1;
pwr_btn.onRelease = function ()
{ 
 if(redled == 1) {_root.TV_mc.gotoAndStop(1);redled = 2;}
 else
 if(redled == 2) {_root.TV_mc.gotoAndStop(2);redled = 1;}
 trace(redled)
}
 
[/LEFT]

```
