# AS2 help for a newbeeee please!

**URL:** https://forum.kirupa.com/t/as2-help-for-a-newbeeee-please/294243
**Category:** flash
**Created:** [August 11, 2009, 11:29am UTC](https://forum.kirupa.com/t/as2-help-for-a-newbeeee-please/294243 "2009-08-11T11:29:44Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![cinimod3](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@cinimod3](https://forum.kirupa.com/u/cinimod3)
#### Post date: [August 11, 2009, 11:29am UTC](https://forum.kirupa.com/t/as2-help-for-a-newbeeee-please/294243/1 "2009-08-11T11:29:44Z")

</div>

Hi. My first post! :hugegrin: I have been an admirer of this forum for many many month now and i am very grateful for the hours of head scratching i’ve avoided thanks to it and all the good people offering their advice. I hope to pass on my wisdom as i accrue it! Anyway…

I’ve got a button on the main timeline that i only want to be visible on from frame 2 onwards. I know i could just place it on a new keyframe on frame 2 but then i can’t get the AS on frame 1 to control it and i don’t want to duplicate all my code. (Its static text, converted to a btn mc). Has anyone got any ideas why the following isn’t working?

Thanks!

\_root.onEnterFrame = function () {  
if (\_root.\_currentframe == 1){  
homeTxtBtn.\_alpha=0;  
} else {  
homeTxtBtn.\_alpha=100;  
}

}
