ActionScript Error 1136: Incorrect number of arguments. Expected 1.

1136: Incorrect number of arguments.  Expected 1.

ActionScript 3 Error #1136 Description:
This is a generic yet simple ActionScript Error.  It just means that you need one and only one argument in the method you are calling.  This error will pop up in many cases but I will only provide one code example. It should help you get through this fairly easily.

Flex / Flash Error 1136 Fix:
Add the applicable argument/parameter into the parenthesis.

Bad Code:

newempty1.removeChild();

Good Code:

newempty1.removeChild(pic1);

This should help you resolve Flex / Flash Error #1136

Thanks and as always Happy Flashing

Curtis J. Morley

6 thoughts on “ActionScript Error 1136: Incorrect number of arguments. Expected 1.

  1. Hi;

    I have this statement in an *.as file:

    import Slideshow;

    I have this later:

    Slideshow();

    Slideshow(), for test, has the following code:

    package
    {
    import flash.display.MovieClip;

    public class Slideshow extends MovieClip {

    public function Slideshow() {
    }
    }
    }

    I get the following error:

    E:\DeJongh\DeJonghMain.as, Line 84 1136: Incorrect number of arguments. Expected 1.

    What argument, pray tell, could it possibly be expecting??

    TIA.

    beno

  2. Is there any code for call this kind of functionality?

    function display(n:String) {
    if (n==null) {
    trace(“Welcoe Guest”);
    } else {
    trace(“welcome: “+n);
    }
    }

    display();//It’s showing error
    //display(“Mike”); It’s working fine

    Thanks,
    Flash Duniya

  3. Pingback: curtismorley.com » ActionScript Error 1047: Parameter initializer unknown or is not a compile-time constant.

  4. I’m sitting here struggling with this error coming from a Timer declaration, working on a project for an ActionScript class, and I think you should try taking the arguments out of that declaration. Look into the gameTimer.delay, .repeatCount, & .start() commands. You might find them helpful 🙂

  5. Speaking of Error #1136… I don’t understand why it pops up on the very first line of my script:

    var gameTimer: Timer = new Timer (3000, 26);

    telling me it’s expecting 0 arguments!

    I get no problems with a test file that eliminates everything but by timer code… declarations, function, etc. It works fine, does exactly what I want, no error messages. But when copied and pasted back into the main script, there’s that error message on the variable declaration!

    P.S. There are no other Timer objects declared in the script.

Comments are closed.