A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: Send button code error

  1. #1
    Senior Member
    Join Date
    Oct 2005
    Posts
    157

    Arrow Send button code error

    I have a contact us page and I put this code for it. I also have a submit button which when clicked should submit the text fields.
    I get an error saying:
    1084: Syntax error: expecting rightparen before eq.

    I do not understand how to fix this problem

    Here is my code:

    Code:
    submit.addEventListener(MouseEvent.CLICK, submit);
    
    function submit(event:MouseEvent) {
    if (message eq "" or email eq "") {
    stop ();
    } else {
    loadVariablesNum ("form.php", 0, "POST");
    gotoAndPlay("thanks");
    }
    }
    Thanks in advance,
    SK

  2. #2
    Senior Member fantasio's Avatar
    Join Date
    May 2000
    Location
    at the progress bar
    Posts
    409
    Code:
    function submit(event:MouseEvent)
    {
    	if (message == "" || email == "")
    	{
    		stop();
    	}
    	else
    	{
    		loadVariablesNum("form.php", 0, "POST");
    		gotoAndPlay("thanks");
    	}
    }

  3. #3
    Senior Member
    Join Date
    Oct 2005
    Posts
    157
    Sorry, I still seem to have the same problem. Please take a look at my file and let me know

    https://rapidshare.com/files/3868056...b_website4.rar

    Thanks,
    S K

  4. #4
    Senior Member fantasio's Avatar
    Join Date
    May 2000
    Location
    at the progress bar
    Posts
    409
    well, like i said use:
    Code:
    if (message == "" || email == "")
    then the 1084: Syntax error: expecting rightparen before eq. goes away.
    however a lot of other errors are also in the file.

  5. #5
    Senior Member
    Join Date
    Oct 2005
    Posts
    157
    yes I did notice that, so how can I get rid of those errors?
    Imagination is the creator of reality...

  6. #6
    Senior Member
    Join Date
    Oct 2005
    Posts
    157

    New code, but seems to have AS2

    Okay I googled and researched a lot. This is my code now (i changed message to mes as well as the instance. I made various other changes also):

    Code:
    submit.onRelease = function() {
    	if(mes.text == ""||email.text == "")
    	{
    		stop();
    	}
    	else
    	{
    		loadVariablesNum("form.php", 0, "POST");
    		gotoAndPlay("thanks");
    	}
    }
    Now I only have one problem.
    Error: 1180: Call to a possibly undefined method loadVariablesNum.

    After researching, it turns out this is for AS2. I need to change this to be AS3. Lots of people seem to have said to use a URLLoader, but I don't really know how to use it.

    Can I get some help with this?

    Thanks in advance,
    S K

  7. #7

  8. #8
    Senior Member
    Join Date
    Oct 2005
    Posts
    157
    I looked at the livedocks, but couldn't really implement it in my code.
    Is it possible you can edit my code to best help me?

    Thanks,
    S K

  9. #9
    Junior Member
    Join Date
    May 2011
    Location
    Alamo
    Posts
    1
    I'm a new member, so I'm just looking around.

  10. #10
    Senior Member
    Join Date
    Oct 2005
    Posts
    157
    anyone have a modified code?, it would really help me

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center