# Detecting frames?

**URL:** <https://forum.kirupa.com/t/detecting-frames/202794>\
**Category:** Uncategorized\
**Created:** [October 4, 2006, 10:51pm UTC](https://forum.kirupa.com/t/detecting-frames/202794 "2006-10-04T22:51:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gabrolll](https://avatars.discourse-cdn.com/v4/letter/g/e9c0ed/32.png) [@gabrolll](https://forum.kirupa.com/u/gabrolll)\
**Post date:** [October 4, 2006, 10:51pm UTC](https://forum.kirupa.com/t/detecting-frames/202794/1 "2006-10-04T22:51:17Z")

</div>

Hey there,

Im like soooo close to doing what I want. I have a movie clip (lightswitch) with a button and 3 frames and a different movie clip (lamp) with 2 frames. Im trying to say:

if (\_root.lamp is on frame 1){  
\_root.lightswitch.gotoAndStop(2){  
} else {  
\_root.lightswitch.gotoAndStop(3){  
}

man, it almost worked, but i cant for the life of me figure out how to say 'if its on this frame, go to some frame in a different clip". Please help? tricky stuff.
