# Help Requested - Simple If Statement Error Fix

**URL:** https://forum.kirupa.com/t/help-requested-simple-if-statement-error-fix/283694
**Category:** flash
**Created:** [March 10, 2009, 2:28am UTC](https://forum.kirupa.com/t/help-requested-simple-if-statement-error-fix/283694 "2009-03-10T02:28:02Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![mmc215](https://avatars.discourse-cdn.com/v4/letter/m/aeb1de/32.png) [@mmc215](https://forum.kirupa.com/u/mmc215)
#### Post date: [March 10, 2009, 2:28am UTC](https://forum.kirupa.com/t/help-requested-simple-if-statement-error-fix/283694/1 "2009-03-10T02:28:02Z")

</div>

Hi there - I suspect I’m doing something silly here. Keep getting a #1009 error pointing towards the fadeOut function on frame 2. Here’s the scoup, TIA!

**Frame 1: Clickable Logo that sends the playhead to frame 2**

```auto
import flash.display.StageDisplayState;
stage.displayState = StageDisplayState.FULL_SCREEN;

stop();

esLogo.buttonMode = true;
esLogo.addEventListener(MouseEvent.CLICK, onClick);

function onClick(e:MouseEvent):void
    {
        gotoAndPlay(2,"intro");
        trace("onClick");
    }

```

**Frame 2: fade the logo out until you get to the other stuff**

```auto

// esLogo.removeEventListener(MouseEvent.CLICK, onClick);
// var esLogo:MovieClip = new MovieClip;

esLogo.addEventListener(Event.ENTER_FRAME, fadeOut);
function fadeOut(e:Event):void
{
    if (esLogo.alpha <= 1)
    {
        esLogo.alpha -= .1;
    }    
    
    if (esLogo.alpha <= 0)
    {
        esLogo.alpha == 0;
    }
}

```
