# Flash 8 - struggeling with IF statement

**URL:** <https://forum.kirupa.com/t/flash-8-struggeling-with-if-statement/298814>\
**Category:** flash\
**Created:** [October 25, 2009, 11:29pm UTC](https://forum.kirupa.com/t/flash-8-struggeling-with-if-statement/298814 "2009-10-25T23:29:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimbaker](https://avatars.discourse-cdn.com/v4/letter/j/97f17d/32.png) [@jimbaker](https://forum.kirupa.com/u/jimbaker)\
**Post date:** [October 25, 2009, 11:29pm UTC](https://forum.kirupa.com/t/flash-8-struggeling-with-if-statement/298814/1 "2009-10-25T23:29:08Z")

</div>

I’m blurry eyed from looking and hope someone wiser can tell me what I’m doing wrong here. I’ve tried coding this silly thing twelve ways from sunday and each way gives me a new error. Here is the function I am trying to get working properly.

```auto
function doSendButton()
{
    var acct = _root.iacct.text;
    var sname = _root.isname.text;
    var semail = _root.isemail.text;
    var rname = _root.irname.text;
    var remail = _root.iremail.text;
    var mymessage = _root.imymessage.text;
    var af = _root.iaf.text;
doConnect();
    if (af == "") {
      dynamiclink = 'http://jim.playourvideo.net/amplayer.htm?id=' + movieName + '.flv';
      getURL("http://jim.playourvideo.net/avrecord.php?sname=" + sname + "&semail=" + semail + "&rname=" + rname + "&remail=" + remail + "&mymessage=" + mymessage + "&dynamiclink=" + dynamiclink)};
    else {
      dynamiclink = 'http://jim.playourvideo.net/zamplayer.htm?id=' + movieName + '.flv' + '&af=' + af;
        getURL("http://jim.playourvideo.net/zavrecord.php?sname=" + sname + "&semail=" + semail + "&rname=" + rname + "&remail=" + remail + "&mymessage=" + mymessage + "&dynamiclink=" + dynamiclink + "&af=" + af)};
}

```

At this point I get this error.

```auto
'else' encountered without matching 'if'

```

ANy advice would really help me out

Jim
