#error 1063

Hi guys

I have 3 classes in the library (external classes) and class 1 document called hand

and iam getting these errors all the time I do not know why

ArgumentError: Error #1063: incompatibility of County of Argument on tree1 / onAdded (). expected 0, got 1.

at flash.display::DisplayObjectContainer/addChild()

in Main()

ArgumentError: Error #1063: incompatibility of County of Argument on tree1 / onAdded (). expected 0, got 1.

at flash.display::DisplayObjectContainer/addChild()

in Main()

ArgumentError: Error #1063: incompatibility of County of Argument on tree1 / onAdded (). expected 0, got 1.

at flash.display::DisplayObjectContainer/addChild()

in Main()

ArgumentError: Error #1063: incompatibility of County of Argument on tree1 / onAdded (). expected 0, got 1.

at flash.display::DisplayObjectContainer/addChild()

in Main()

ArgumentError: Error #1063: incompatibility of County of Argument on tree1 / onAdded (). expected 0, got 1.

at flash.display::DisplayObjectContainer/addChild()

in Main()

ArgumentError: Error #1063: incompatibility of County of Argument on tree1 / onAdded (). expected 0, got 1.

at flash.display::DisplayObjectContainer/addChild()

in Main()

Here's the code for (the external classes) in the lib

Class MAINMAP1

package

{

import flash.system.System;

import flash.system.fscommand;

import flash.display.MovieClip;

import flash.media.Sound;

import flash.media.SoundChannel;

import flash.events.KeyboardEvent;

import flash.ui.Keyboard;

import flash.events.Event;

import flash.events.MouseEvent;

import flash.display.Stage;

SerializableAttribute public class MAINMAP1 extends MovieClip {}

var vx:int = 0

var vy:int = 0

public void MAINMAP1() {}

addEventListener (Event.ADDED_TO_STAGE, onAdded)

}

public function onAdded (event: Event): void {}

}

}

}

class tree1

package {}

import flash.system.System;

import flash.system.fscommand;

import flash.display.MovieClip;

import flash.media.Sound;

import flash.media.SoundChannel;

import flash.events.KeyboardEvent;

import flash.ui.Keyboard;

import flash.events.Event;

import flash.events.MouseEvent;

import flash.display.Stage;

public class tree1 extends MovieClip {}

public void tree1 () {}

addEventListener (Event.ADDED_TO_STAGE, onAdded)

}

public void onAdded () {}

addEventListener (Event.ENTER_FRAME, onEnterFrame);

}

public void onEnterFrame(event:Event) {}

{

}

}

}

}

HERO class

package {}

import flash.system.System;

import flash.system.fscommand;

import flash.display.MovieClip;

import flash.media.Sound;

import flash.media.SoundChannel;

import flash.events.KeyboardEvent;

import flash.ui.Keyboard;

import flash.events.Event;

import flash.events.MouseEvent;

import flash.display.Stage;

SerializableAttribute public class extends MovieClip {HERO

private var vx:int = 0;

private var vy:int = 0;

public void HERO () {}

addEventListener (Event.ADDED_TO_STAGE, onAdded)

}

public function onAdded (event: Event): void {}

gotoAndStop (3)

addEventListener (Event.ENTER_FRAME, onEnterFrame);

stage.addEventListener (KeyboardEvent.KEY_DOWN, onKeyDown);

stage.addEventListener (KeyboardEvent.KEY_UP, onKeyUp);

}

public void onEnterFrame(event:Event) {}

x += vx

y += vy

}

public void onKeyDown(event:KeyboardEvent) {}

If (event.keyCode == Keyboard.LEFT) {}

gotoAndStop (2)

VX = - 5

}

If (event.keyCode == Keyboard.RIGHT) {}

gotoAndStop (1)

VX = 5

}

If (event.keyCode == Keyboard.DOWN) {}

Vy = + 5

gotoAndStop (6)

}

If (event.keyCode == Keyboard.UP) {}

Vy = - 5

}

}

public void onKeyUp(event:KeyboardEvent) {}

If (event.keyCode == Keyboard.LEFT: event.keyCode == Keyboard.RIGHT) {}

VX = 0;

}

If (event.keyCode == Keyboard.UP: event.keyCode == Keyboard.DOWN) {}

Vy = 0;

}

}

}

}

THE DOCUMENT CLASS (Main)

package {}

import flash.system.System;

import flash.system.fscommand;

import flash.display.MovieClip;

import flash.media.Sound;

import flash.media.SoundChannel;

import flash.events.KeyboardEvent;

import flash.ui.Keyboard;

import flash.events.Event;

import flash.events.MouseEvent;

import flash.display.Stage;

SerializableAttribute public class Main extends MovieClip {}

var mainmap1:MAINMAP1 = new MAINMAP1;

public void Main() {}

addChild (mainmap1);

}

}

}

fact

the program works, but there are errors in the output I couldn.t get it

Help me please

Thank you

Please stop Crossposting.

Tags: Adobe Animate

Similar Questions

  • Argument error 1063 on multiple machines

    Machine Info

    OS: Windows 7 Professional x 64 Edition Service Pack 1

    The Adobe Flash version: 20.0.0.235

    Problem

    Several users get the following error message when you access websites (occurs on several Web sites). When it appears, it will reappear several times immediately after selecting reject all. I already checked the IE options selected the following: Disable script debugging (IE), disable script debugging (other) and display an every script error notification is not enabled.

    These machines are on a domain.

    Sandefur adobe error.PNG

    Thank you

    It looks like a bug in the script ad-insertion of an advertising network.

    http://code.tutsplus.com/tutorials/quick-tip-how-to-debug-an-AS3-error-1063--active-9541

  • ArgumentError: Error #1063

    Well, it seems that I have this error in my game I'm creating (this is my first).

    The total error is:

    ArgumentError: Error #1063: Argument count mismatch on Bumper(). Expected 2, got 0.
    

    Of this show up when I enter the 3 frame (frame 1 is beginning, frame 2 was level select, frame 3 is a game).

    My entire code for image 3 is:

    import flash.events.MouseEvent;
    
    
    stop();
    var leftPressed:Boolean = false;
    var rightPressed:Boolean = false;
    var upPressed:Boolean = false;
    var downPressed:Boolean = false;
    
    
    var leftBumping:Boolean = false;
    var rightBumping:Boolean = false;
    var upBumping:Boolean = false;
    var downBumping:Boolean = false;
    
    
    var leftBumpPoint:Point = new Point(-30, -55);
    var rightBumpPoint:Point = new Point(30, -55);
    var upBumpPoint:Point = new Point(0, -120);
    var downBumpPoint:Point = new Point(0, 0);
    
    
    var scrollX:Number = 0;
    var scrollY:Number = 500;
    
    
    var xSpeed:Number = 0;
    var ySpeed:Number = 0;
    
    
    var speedConstant:Number = 4;
    var frictionConstant:Number = 0.9;
    var gravityConstant:Number = 1.8;
    var jumpConstant:Number = -35;
    var maxSpeedConstant:Number = 18;
    
    
    var doubleJumpReady:Boolean = false;
    var upReleasedInAir:Boolean = false;
    
    
    var keyCollected:Boolean = false;
    var doorOpen:Boolean = false;
    
    
    var currentLevel:int = 1;
    var pScore:int = 0;
    var lives:int = 10;
    var animationState:String = "idle";
    
    
    var bulletList:Array = new Array();
    var enemyList:Array = new Array();
    var bumperList:Array = new Array();
    
    
    stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
    stage.addEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
    stage.addEventListener(Event.ENTER_FRAME, loop);
    
    
    addEnemiesToLevel();
    lifeTxt.text=String(lives);
    scoreTxt.text=String(pScore);
    function addEnemiesToLevel():void
    {
              if(currentLevel == 1){
              //Enemy 1
              addEnemy(620, -115);
        addBumper(500, -115);
        addBumper(740, -115);
              //Enemy 2
              addEnemy(900, -490);
              addBumper(600, -490);
              addBumper(980, -490);
              //Enemy 3
              addEnemy(2005, -115);
              addBumper(1905, -115);
              addBumper(2105, -115);
              //Enemy 4
              addEnemy(1225, -875);
              addBumper(1125, -875);
              addBumper(1325, -875);
              }
              if(currentLevel == 2){
              addEnemy(620, -115);
        addBumper(500, -115);
        addBumper(740, -115);
              }
    }
    
    
    function loop(e:Event):void{
              if(back.collisions.hitTestPoint(player.x + leftBumpPoint.x, player.y + leftBumpPoint.y, true)){
    
                        leftBumping = true;
              } else {
                        leftBumping = false;
              }
    
              if(back.collisions.hitTestPoint(player.x + rightBumpPoint.x, player.y + rightBumpPoint.y, true)){
    
                        rightBumping = true;
              } else {
                        rightBumping = false;
              }
    
              if(back.collisions.hitTestPoint(player.x + upBumpPoint.x, player.y + upBumpPoint.y, true)){
    
                        upBumping = true;
              } else {
                        upBumping = false;
              }
    
              if(back.collisions.hitTestPoint(player.x + downBumpPoint.x, player.y + downBumpPoint.y, true)){
    
                        downBumping = true;
              } else {
                        downBumping = false;
              } 
    
    
    
              if(leftPressed){
                        xSpeed -= speedConstant;
                        player.scaleX = -1;
    
    
              } else if(rightPressed){
                        xSpeed += speedConstant;
                        player.scaleX = 1;
              }
    
              if(leftBumping){
                        if(xSpeed < 0){
                                  xSpeed *= -0.5;
                        }
              }
    
              if(rightBumping){
                        if(xSpeed > 0){
                                  xSpeed *= -0.5;
                        }
              }
    
              if(upBumping){
                        if(ySpeed < 0){
                                  ySpeed *= -0.5;
                        }
              }
    
              if(downBumping){
                        if(ySpeed > 0){ 
                                  ySpeed = 0;
                        }
                        if(upPressed){ 
                                  ySpeed = jumpConstant;
                        }
    
                        //DOUBLE JUMP
                        if(upReleasedInAir == true){
                                  upReleasedInAir = false;
                        }
                        if(doubleJumpReady == false){
                                  doubleJumpReady = true;
                        }
              } else { 
    
                        ySpeed += gravityConstant; 
    
                        //DOUBLE JUMP
                        if(upPressed == false && upReleasedInAir == false){
                                  upReleasedInAir = true;
                        }
                        if(doubleJumpReady && upReleasedInAir){
                                  if(upPressed){
                                            doubleJumpReady = false;
                                            ySpeed = jumpConstant;
                                  }
                        }
    
              }
    
              if(keyCollected == false){
                        if(player.hitTestObject(back.other.doorKey)){
                                  back.other.doorKey.visible = false;
                                  keyCollected = true;
                                  trace("key collected");
                        }
              }
    
              if(doorOpen == false){
                        if(keyCollected == true){
                                  if(player.hitTestObject(back.other.lockedDoor)){
                                            back.other.lockedDoor.gotoAndStop(2);
                                            doorOpen = true;
                                            trace("door open");
                                  }
                        }
              }
    
    
              if(xSpeed > maxSpeedConstant){
                        xSpeed = maxSpeedConstant;
              } else if(xSpeed < (maxSpeedConstant * -1)){
                        xSpeed = (maxSpeedConstant * -1);
              }
    
              xSpeed *= frictionConstant;
              ySpeed *= frictionConstant;
    
              if(Math.abs(xSpeed) < 0.5){
                        xSpeed = 0;
              }
    
              scrollX -= xSpeed;
              scrollY -= ySpeed;
    
    
              back.x = scrollX;
              back.y = scrollY;
    
              sky.x = scrollX * 0.2;
              sky.y = scrollY * 0.2;
    
              if( ( leftPressed || rightPressed || xSpeed > speedConstant || xSpeed < speedConstant *-1 ) && downBumping){
                        animationState = "running";
              } else if(downBumping){
                        animationState = "idle";
              } else {
                        animationState = "jumping";
              }
    
              if(player.currentLabel != animationState){
                        player.gotoAndStop(animationState);
              }
    
    
              if (enemyList.length > 0)
              {
                        for (var i:int = 0; i < enemyList.length; i++)
                        {
                                  if (bulletList.length > 0)
                                  {
                                            for (var j:int = 0; j < bulletList.length; j++)
                                            {
                                                      if ( enemyList[i].hitTestObject(bulletList[j]) )
                                                      {
                                                                trace("Bullet Hit Enemy");
                                                                pScore += 10.1;
                                                                scoreTxt.text=String(pScore);
                                                                enemyList[i].removeSelf();
                                                                bulletList[j].removeSelf();
                                                      }
                                            }
                                  }
                        }
              }
    
    
    
              if (enemyList.length > 0){
                  for (var k:int = 0; k < enemyList.length; k++){
                      if (bumperList.length > 0){
                          for (var h:int = 0; h < bumperList.length; h++){
                              if ( enemyList[k].hitTestObject(bumperList[h]) ){
                                  enemyList[k].changeDirection();
                            }
                        }
                    }
                }
            }
    
    
    
              if (enemyList.length > 0){
                  for (var m:int = 0; m < enemyList.length; m++){
                      if ( enemyList[m].hitTestObject(player) ){
                                            trace("Player Hit Enemy"); 
                                            scrollX = 0;
                                            scrollY = 500;
                                            lives -= 1;
                                            lifeTxt.text=String(lives);
                                  }
                        }
              }
              if (lives == 0){
                        gotoAndStop(3);
              }
    
    }
    
    
    function nextLevel():void{
              currentLevel++;
              trace("Next Level: " + currentLevel);
                 gotoNextLevel();
                           addEnemiesToLevel();
                 if(currentLevel == 4){
                           gotoAndStop(4);
                 }
    }
    
    
    function gotoNextLevel():void{
              back.other.gotoAndStop(currentLevel);
              back.visuals.gotoAndStop(currentLevel);
              back.collisions.gotoAndStop(currentLevel);
              scrollX = 0;
              scrollY = 500;
    
              keyCollected = false;
              back.other.doorKey.visible = true;
              doorOpen = false;
              back.other.lockedDoor.gotoAndStop(1);
    }
    
    
    function keyDownHandler(e:KeyboardEvent):void{
              if(e.keyCode == Keyboard.LEFT){
                        leftPressed = true;
    
              } else if(e.keyCode == Keyboard.RIGHT){
                        rightPressed = true;
    
              } else if(e.keyCode == Keyboard.UP){
                        upPressed = true;
    
              } else if(e.keyCode == Keyboard.DOWN){
                        downPressed = true;
                        if(doorOpen && player.hitTestObject(back.other.lockedDoor)){
    
                                  nextLevel();
                        }
              }
    }
    
    
    function keyUpHandler(e:KeyboardEvent):void{
              if(e.keyCode == Keyboard.LEFT){
                        leftPressed = false;
    
              } else if(e.keyCode == Keyboard.RIGHT){
                        rightPressed = false;
    
              } else if(e.keyCode == Keyboard.UP){
                        upPressed = false;
    
              } else if(e.keyCode == Keyboard.DOWN){
                        downPressed = false;
              }
    
              if(e.keyCode == Keyboard.SPACE){
                        fireBullet();
              }
    }
    
    
    function fireBullet():void
    {
              var playerDirection:String;
              if(player.scaleX < 0){
                        playerDirection = "left";
              } else if(player.scaleX > 0){
                        playerDirection = "right";
              }
              var bullet:Bullet = new Bullet(player.x - scrollX, player.y - scrollY, playerDirection, xSpeed);
              back.addChild(bullet);
    
              bullet.addEventListener(Event.REMOVED, bulletRemoved);
              bulletList.push(bullet);
    
    }
    
    
    function bulletRemoved(e:Event):void
    {
              e.currentTarget.removeEventListener(Event.REMOVED, bulletRemoved);
              bulletList.splice(bulletList.indexOf(e.currentTarget), 1);
    }
    
    
    function addEnemy(xLocation:int, yLocation:int):void
    {
              var enemy:Enemy = new Enemy(xLocation, yLocation);
              back.addChild(enemy);
              enemy.addEventListener(Event.REMOVED, enemyRemoved);
              enemyList.push(enemy);
    }
    
    
    function addBumper(xLocation:int, yLocation:int):void
    {
              var bumper:Bumper = new Bumper(xLocation, yLocation);
              back.addChild(bumper);
              bumper.visible = false;
              bumperList.push(bumper);
    }
    
    
    function enemyRemoved(e:Event):void
    {
              e.currentTarget.removeEventListener(Event.REMOVED, enemyRemoved);
              enemyList.splice(enemyList.indexOf(e.currentTarget), 1); //this removes 1 object from the enemyList, at the index of whatever object caused this function to activate
    }
    

    And the bumper class is:

    package  {
              import flash.display.MovieClip;
              import flash.events.Event;
    
              public class Bumper extends MovieClip{
                        public function Bumper(xLocation:int, yLocation:int) {
                                  // constructor code
                                  x = xLocation;
                                  y = yLocation;
    
                                  addEventListener(Event.ENTER_FRAME, bumper);
                        }
    
    
                        public function bumper(e:Event):void{
                                  //code here
                        }
              }
    
    }
    

    Please help me, I don't really understand the error. I tried to read the documentation about it, but I just confused.

    you have a movieclip with class = bumper on frame 5.  That's the problem.

  • Help me please error #1063

    Hi guys

    I have 3 classes in the library (external classes) and class 1 document called hand

    and iam getting these errors all the time I do not know why

    ArgumentError: Error #1063: incompatibility of County of Argument on tree1 / onAdded (). expected 0, got 1.

    at flash.display::DisplayObjectContainer/addChild()

    in Main()

    ArgumentError: Error #1063: incompatibility of County of Argument on tree1 / onAdded (). expected 0, got 1.

    at flash.display::DisplayObjectContainer/addChild()

    in Main()

    ArgumentError: Error #1063: incompatibility of County of Argument on tree1 / onAdded (). expected 0, got 1.

    at flash.display::DisplayObjectContainer/addChild()

    in Main()

    ArgumentError: Error #1063: incompatibility of County of Argument on tree1 / onAdded (). expected 0, got 1.

    at flash.display::DisplayObjectContainer/addChild()

    in Main()

    ArgumentError: Error #1063: incompatibility of County of Argument on tree1 / onAdded (). expected 0, got 1.

    at flash.display::DisplayObjectContainer/addChild()

    in Main()

    ArgumentError: Error #1063: incompatibility of County of Argument on tree1 / onAdded (). expected 0, got 1.

    at flash.display::DisplayObjectContainer/addChild()

    in Main()

    Here's the code for (the external classes) in the lib

    Class MAINMAP1

    package

    {

    import flash.system.System;

    import flash.system.fscommand;

    import flash.display.MovieClip;

    import flash.media.Sound;

    import flash.media.SoundChannel;

    import flash.events.KeyboardEvent;

    import flash.ui.Keyboard;

    import flash.events.Event;

    import flash.events.MouseEvent;

    import flash.display.Stage;

    SerializableAttribute public class MAINMAP1 extends MovieClip {}

    var vx:int = 0

    var vy:int = 0

    public void MAINMAP1() {}

    addEventListener (Event.ADDED_TO_STAGE, onAdded)

    }

    public function onAdded (event: Event): void {}

    }

    }

    }

    class tree1

    package {}

    import flash.system.System;

    import flash.system.fscommand;

    import flash.display.MovieClip;

    import flash.media.Sound;

    import flash.media.SoundChannel;

    import flash.events.KeyboardEvent;

    import flash.ui.Keyboard;

    import flash.events.Event;

    import flash.events.MouseEvent;

    import flash.display.Stage;

    public class tree1 extends MovieClip {}

    public void tree1 () {}

    addEventListener (Event.ADDED_TO_STAGE, onAdded)

    }

    public void onAdded () {}

    addEventListener (Event.ENTER_FRAME, onEnterFrame);

    }

    public void onEnterFrame(event:Event) {}

    {

    }

    }

    }

    }

    HERO class

    package {}

    import flash.system.System;

    import flash.system.fscommand;

    import flash.display.MovieClip;

    import flash.media.Sound;

    import flash.media.SoundChannel;

    import flash.events.KeyboardEvent;

    import flash.ui.Keyboard;

    import flash.events.Event;

    import flash.events.MouseEvent;

    import flash.display.Stage;

    SerializableAttribute public class extends MovieClip {HERO

    private var vx:int = 0;

    private var vy:int = 0;

    public void HERO () {}

    addEventListener (Event.ADDED_TO_STAGE, onAdded)

    }

    public function onAdded (event: Event): void {}

    gotoAndStop (3)

    addEventListener (Event.ENTER_FRAME, onEnterFrame);

    stage.addEventListener (KeyboardEvent.KEY_DOWN, onKeyDown);

    stage.addEventListener (KeyboardEvent.KEY_UP, onKeyUp);

    }

    public void onEnterFrame(event:Event) {}

    x += vx

    y += vy

    }

    public void onKeyDown(event:KeyboardEvent) {}

    If (event.keyCode == Keyboard.LEFT) {}

    gotoAndStop (2)

    VX = - 5

    }

    If (event.keyCode == Keyboard.RIGHT) {}

    gotoAndStop (1)

    VX = 5

    }

    If (event.keyCode == Keyboard.DOWN) {}

    Vy = + 5

    gotoAndStop (6)

    }

    If (event.keyCode == Keyboard.UP) {}

    Vy = - 5

    }

    }

    public void onKeyUp(event:KeyboardEvent) {}

    If (event.keyCode == Keyboard.LEFT: event.keyCode == Keyboard.RIGHT) {}

    VX = 0;

    }

    If (event.keyCode == Keyboard.UP: event.keyCode == Keyboard.DOWN) {}

    Vy = 0;

    }

    }

    }

    }

    THE DOCUMENT CLASS (Main)

    package {}

    import flash.system.System;

    import flash.system.fscommand;

    import flash.display.MovieClip;

    import flash.media.Sound;

    import flash.media.SoundChannel;

    import flash.events.KeyboardEvent;

    import flash.ui.Keyboard;

    import flash.events.Event;

    import flash.events.MouseEvent;

    import flash.display.Stage;

    SerializableAttribute public class Main extends MovieClip {}

    var mainmap1:MAINMAP1 = new MAINMAP1;

    public void Main() {}

    addChild (mainmap1);

    }

    }

    }

    fact

    the program works, but there are errors in the output I couldn.t get it

    Help me please

    Thank you

    onAdded() is called by a listener who passes an event.  use:

    function onAdded(e:Event):void {}

    etc.

    }

  • About ArgumentError: Error #1063: Argument count mismatch

    Hello

    I am newbie in Flex environment.
    This is my first post in Flex, please excuse if my question is stupid.

    I'm trying to create a button dynamically and to add EventListener.

    public void handleClick(event:MouseEvent):void

    {

    var myBtn2:Button = new Button()

    myBtn2.label = "Dynamic";

    myBtn2.addEventListener (MouseEvent.MOUSE_OVER, handleClick1);

    this.addChild (myBtn2);

    }

    public void handleClick1(event:MouseEvent):void

    {                                       

    Alert.Show ("this is for dynamic button");                                                                                                             

    }

    I have seen who, if I do not pass the event on the handleClick1() function I get ArgumentError: Error #1063: Argument count mismatch and if I switch, everything works fine.

    Please tell me, why is it mantadatory to spend it?

    More accurate to say that if you set a handler in MXML, as in it is optional pass an object of event with clickFunc (event), then if you don't spend it, your signature of the clickFunc() method does not have this argument.

    But if you add a listener of events with addEventListener, then the listener must always tae the event as an argument object method signature.

    If this post answers your question or assistance, please mark it as such.

    Greg Lafrance - Flex 2 and 3 certified ACE

    www.ChikaraDev.com

    Flex / development, training, AIR and Support Services

  • ArgumentError: Error #1063:Help

    I am using the onMouseWheel method

    First I wanted to check if my event listener and handler works

    stage.addEventListener (MouseEvent.MOUSE_WHEEL, onMouseWheel);

    private void onMouseWheel (): void {}

    trace ("onMouseWheel() method");

    }

    I get this error when I try

    ArgumentError: Error #1063: incompatibility of County of Argument on onMouseWheel(). expected 0, got 1.

    Help, please

    It must STILL pass the event in the event handler:

    private void onMouseWheel(e:MouseEvent):void

  • QNX in Flex - error #1063 buttons: incompatibility of County of Argument on views::TxtView / saveAs (). expected 0, got 1.

    I created a backup button and add an eventlistener to execute the saveAs() when the button is clicked, but I'm

    #1063 error: Argument count mismatch on views::TxtView / saveAs (). expected 0, got 1.

    I have not provided any arguments.

    In my init()
    ...

    var saveAsFileBtn:IconButton = new IconButton();
    saveAsFileBtn.setIcon("..) ("/ icons/saveas.png");
    saveAsFileBtn.width = 100;
    saveAsFileBtn.x = saveFileBtn.width + 71;
    saveAsFileBtn.sizeMode = SizeMode.BOTH;
    saveAsFileBtn.sizeUnit = SizeUnit.PIXELS
    saveAsFileBtn.addEventListener (MouseEvent.CLICK, save under);

    ...

    then

    private void saveAs (): void
    {
    trace ("Save as");
    var fileChooser:File;
    If (currentFile)
    {
    element 'FileChooser' = currentFile;
    }
    on the other
    {
    element 'FileChooser' = File.documentsDirectory.resolvePath ('untitled.html')
    }
    fileChooser.browseForSave ("Save as");
    fileChooser.addEventListener (Event.SELECT, saveAsFileSelected);
    }

    The debugger stops when the user clicks on the Save as button. When I use regular ignition buttons I have no problem.

    All event handlers will get at least the object of the event, so you should have to set it as

    function saveAs(e:Event):void
    

    even if you intend to ignore the object.

  • #1063 error: Argument count mismatch on "filename".

    Hi all. I get an error that I can't solve. Although he does not seem to influence the behavior of my file, I don't know if it will be in the future.

    ArgumentError: Error #1063: Argument count mismatch on "filename": MainTimeline / "thisfunction" (). " expected 0, got 1.

    at flash.events::EventDispatcher/dispatchEventFunction()

    at flash.events::EventDispatcher/dispatchEvent()

    to the fl.transitions::Tween time() function / set

    to fl.transitions::Tween/nextFrame()

    to fl.transitions::Tween/onEnterFrame()



    I already looked at the error message and it is true, there is no argument loaded within the "()" in my job, but I don't know what to put because it is a function that applies to several buttons and is invited into another function. A similar function returns this error. When I put "e: Event" within the "()" it returns "error 1136: Incorrect number of arguments."  1 expected.

    Often, this kind of thing can happen if you call a function to an event, as well as listener directly.

    When an event listener triggers a function, it passes an object, type listener (MouseEvent, event, VideoEvent, etc.) to the function.

    You say that the keys trigger, which leads me to believe that you should look for a MouseEvent.

    So:

    function thisfunction(e:MouseEvent) {}

    In addition, if you call it directly, you need to do 1 of 2 things.

    1. you can send a MouseEvent to her (Yes, thisfunction (new MouseEvent (MouseEvent.CLICK));)

    2. you can set a default value for the argument, which allows to pass 0 (thus, thisfunction (e:MouseEvent = null) {} function)

    If none of these suggestions work, please send the code so a glance further can be done.

  • Error adding child on interval...

    Hey,.

    Im trying to add an extra movieclip to the stage with this code, I want an added extra movieclip every 10 seconds...

    addEventListener (Event.ENTER_FRAME, fl_EnterFrameHandler);

    function fl_EnterFrameHandler(event:Event):void
    {
    addChild (movieclip);

    }

    This error pops up:
    setInterval(fl_EnterFrameHandler,10000);
    ArgumentError: Error #1063: incompatibility of County of Argument on Untitled_fla::MainTimeline / fl_EnterFrameHandler (). 1 EXPECTED, got 0.

    Please help me someone

    There are a few little things, you do not want with the code that you show.

    (1) you don't want the ENTER_FRAME event listener.  Which calls the function fl_EnterFrameHandler at the rate of your file.

    (2) using the addChild(), this is not how you add new objects, it is only how to add objects to the display list.  You need create new instances of the object, as in...

    var newObj:MC = new MC(); where MC is any class name you assign to the MovieClip

    and then you can use addChild (newObj) to add the object to the display list.

    The way you have it now, it simply continues his maneuver the same object at the top of the screen.

    (3) the error you are getting is because your function expects an argument to pass to, which provides the ENTER_FRAME listener, but the setInterval does not work. If you get rid of the ENTER_FRAME listener, then you just need to change the line of the function definition to be...

    function fl_EnterFrameHandler (): void

    Just for future consideration, if there is an instance where you call a function that a listener calls also, but you don't have any event argument to pass to the function, then you can host this scenario by the removal of the argument in the function definition line...

    function fl_EnterFrameHandler(event:Event__=null_):void

  • The n argument error

    Hello

    I did a pretty simple program, but I get this error message:

    ArgumentError: Error #1063: incompatibility of County of Argument on breathalyser1_fla::MainTimeline / checkDrink (). expected 0, got 1.

    I know its something simple to fix, but for the life of me I can't find where I need to make the correction.

    Here is my code:

    Stop();


    var drink: String = "null";


    beerselect_mc.Alpha = 0;

    wineselect_mc.Alpha = 0;

    alcopopselect_mc.Alpha = 0;

    spiritselect_mc.Alpha = 0;


    answer_btn.Alpha = 0;


    Buttons


    beer_btn.addEventListener (MouseEvent.CLICK, beerSelected);

    wine_btn.addEventListener (MouseEvent.CLICK, wineSelected);

    alcopop_btn.addEventListener (MouseEvent.CLICK, alcopopSelected);

    spirit_btn.addEventListener (MouseEvent.CLICK, spiritSelected);


    Functions


    function beerSelected (e:MouseEvent): void {}

    drink = "beer";

    beerselect_mc.alpha = 1;

    wineselect_mc.alpha = 0;

    alcopopselect_mc.alpha = 0;

    spiritselect_mc.alpha = 0;

    answer_btn.alpha = 1;

    }


    function wineSelected (e:MouseEvent): void {}

    drink = 'wine';

    beerselect_mc.alpha = 0;

    wineselect_mc.alpha = 1;

    alcopopselect_mc.alpha = 0;

    spiritselect_mc.alpha = 0;

    answer_btn.alpha = 1;

    }


    function alcopopSelected (e:MouseEvent): void {}

    drink = 'alcopops';

    beerselect_mc.alpha = 0;

    wineselect_mc.alpha = 0;

    alcopopselect_mc.alpha = 1;

    spiritselect_mc.alpha = 0;

    answer_btn.alpha = 1;

    }


    function spiritSelected (e:MouseEvent): void {}

    drink = 'spirit';

    beerselect_mc.alpha = 0;

    wineselect_mc.alpha = 0;

    alcopopselect_mc.alpha = 0;

    spiritselect_mc.alpha = 1;

    answer_btn.alpha = 1;

    }


    Answer button


    answer_btn.addEventListener (MouseEvent.CLICK, checkDrink);



    Answer button function


    function checkDrink() {}

    If ((drink == 'beer')) { }

    gotoAndPlay("beeranswer");

    { } ElseIf ((drink == "wine")) { }

    gotoAndPlay("wineanswer");

    { } ElseIf ((drink == "alcopops")) { }

    gotoAndPlay("alcopopanswer");

    { } ElseIf ((drink == 'spirit')) { }

    gotoAndPlay("spiritanswer");

    }

    }

    I am being dense and missing something really obvious?

    checkDrink() is an event handler. As such, it must have an argument passed into it - MouseEvent.

    Thus, it is supposed to be:

    function checkDrink (e:MouseEvent): void {}

    the rest of the code.

    }

    In addition, it is preferable to use switch... case here

  • Error with function of mouse event

    Hello

    I inserted two keyframes in the timeline panel, and then I've included scripts on each keyframe. The script in the first keyframe is the following:

    Stop();
    var mc:MovieClip = new MovieClip();
    mc.graphics.beginFill (0xFF0000);
    mc.graphics.drawRect (0,0,300,20);
    mc.graphics.endFill ();
    addChild (mc);

    mc.addEventListener (MouseEvent.CLICK, clicked)
    function clicked() {}
    gotoAndPlay (2);
    }

    The script in the second keyframe is the following:

    var mc1:MovieClip = new MovieClip();
    MC1. Graphics.beginFill (0xFF00FF);
    MC1. Graphics.drawRect (0,0,300,20);
    MC1. Graphics.endFill ();
    addChild (mc1);

    The error that was reported when compiling is defined as follows:

    When I click on the movieclip "mc", created in the first image, an error like "ArgumentError: Error #1063: incompatibility of County of Argument on gallery_fla::MainTimeline / clicked ()." Expected 0, 1. "watch. In fact, I need to go to the second image by clicking the movieclip on the first keyframe.

    Kind regards

    Sreelash

    Following use:

    Stop();
    var mc:MovieClip = new MovieClip();
    mc.graphics.beginFill (0xFF0000);
    mc.graphics.drawRect (0,0,300,20);
    mc.graphics.endFill ();
    addChild (mc);

    mc.addEventListener (MouseEvent.CLICK, clicked)

    function clicked(evnt:MouseEvent)

    {

    gotoAndPlay (2);
    }

    When we use a function as an event listener must intercept the event as an argument. That's why you get this error.

  • navigateToURL throw up error

    Hello world
    I get an error that says "ArgumentError: Error #1063: incompatibility of County of Argument on bingo_game9_AS3_fla::MainTimeline / get_link ()." Expected 0, 1. "when trying to access a web page of Flash.
    The clip on the stage is called 'link_mc '.
    btn_over, btn_out etc. works very well. It changes just the size of the mc when the mouse is over the use of functions elsewhere.
    See code attached. Any ideas?
    Rick

    Because you are using an event listener to call the function, the event sends an argument to the function, but your code is not welcome to receive the product.

    Use: function get_link(e:MouseEvent) {}

  • Access function table

    I'm doing a 2d game, I'm still pretty new in flash, but here's my solution for the collision detection.

    stage.addEventListener (KeyboardEvent.KEY_DOWN, keypress);
    var zone11:Array = new Array(20);
    
    
    zone11[0]  = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
    zone11[1]  = [1,0,1,1,1,1,1,0,0,0,0,0,0,1,2,1,1,1,1,1];
    zone11[2]  = [1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,2,1,1,1,1];
    zone11[3]  = [1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1];
    zone11[4]  = [1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1];
    zone11[5]  = [1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1];
    zone11[6]  = [1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1];
    zone11[7]  = [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1];
    zone11[8]  = [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1];
    zone11[9]  = [2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1];
    zone11[10] = [2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1];
    zone11[11] = [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1];
    zone11[12] = [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1];
    zone11[13] = [1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1];
    zone11[14] = [1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1];
    zone11[15] = [1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1];
    zone11[16] = [1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1];
    zone11[17] = [1,1,1,1,1,0,0,0,0,0,0,0,0,0,2,2,1,1,1,1];
    zone11[18] = [1,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,1];
    zone11[19] = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
    
    trace (zone11[1][1]);
    
    function keypress(){
      trace (zone11[1][1]);
    }
    

    However, I get "error #1063: incompatibility of County of Argument on spilltest_fla::MainTimeline / keypress ()." expected 0, got 1. "on the trail of the second, but the first track is very good. Why?

    Set the argument of the function:

    function keypress(e:KeyboardEvent):void {}

    trace (zone11 [1] [1]);

    }

  • horizontal, drag only

    Hey guys, do not know why it does not work. so I want to only drag horizontal. so I set mc and want to move on 240 x coordinates. When I run this code, I get an error:

    ArgumentError: Error #1063: incompatibility of County of Argument on flash. display::Sprite / startDrag (). 0 waited, got 5.

    at slidechart_fla::MainTimeline/grabMe()

    var I: Object;

    function grabMe(e:MouseEvent):void {}

    = me e.currentTarget;

    me.removeEventListener (MouseEvent.MOUSE_DOWN, grabMe);

    me.startDrag(false,this.x,this.y,240,this.y);

    e.target.parent.addChild (e.target)

    stage.addEventListener (MouseEvent.MOUSE_MOVE, Drachma);

    stage.addEventListener (MouseEvent.MOUSE_UP, dropMe);

    }

    function dropMe(e:MouseEvent):void {}

    stage.removeEventListener (MouseEvent.MOUSE_UP, dropMe);

    stage.removeEventListener (MouseEvent.MOUSE_MOVE, Drachma);

    me.stopDrag ();

    me .filters = undefined;

    me.addEventListener (MouseEvent.MOUSE_DOWN, grabMe);

    }

    function dragMe(e:MouseEvent):void {}

    e.updateAfterEvent ();

    }

    you use the startDrag() as2.  as3 startDrag() accepts 2 parameters;  a Boolean value, and a rectangle.

  • noobie with a problem in his 1st project

    Hi, just a noob in actionscript, to leave, I looked at some video tutorials basic and searched for websites on topics I'm interest in as3.

    So I chose something that I thought was easy for my first project

    basically I I read www.justin.tv/meta/username.xml for each user xml file, I want to know the date of account creation

    on this XML part is something like < created_on > 1228199388 < / created_on > with the timestamp

    then I look at http://www.gotoandlearn.com/play.php?id=64 I have had success read this value for a SINGLE user and the conversion to the format mm/dd/yy when I define the user as a variable

    so I tried to add an input text where I can type any username, read this xml file, make the same conversion and show once again the date in a dynamic text box

    Screenshot_4.jpg

    so everything I have is really 1 button to clear the user name, the date, and others to display the date for the new user is entered in the first text box

    Adds the event listener for the buttons, don't think that's what I did wrong

    When I test it works very well for the user by default, but I have the problem as soon I click one of the buttons (clear data or to update to the new user)

    ArgumentError: Error #1063: incompatibility of County of Argument on joined_fla::MainTimeline / borrarTodo (). expected 0, got 1.

    for the clear button

    and

    ReferenceError: Error #1069: property not found on fl.controls.Button data and there is no default value.

    at joined_fla::MainTimeline/xmlCargar()

    for the show one

    messages in the output tab

    It's the project file

    I know not for people with more than a few days of experience is something really stupid, but I thought that and I can't find the solution

    Hope someone here coan to give me a solution or a clue about what I'm doing wrong

    var leeXml:URLLoader = new URLLoader();

    leeXml.addEventListener (Event.COMPLETE, xmlCargar);

    var datosXml:XML;

    nombreUsuario_txt.text = "justin".

    function xmlCargar(e:Event):void

    {

    datosXml = new XML (e.target.data)

    var creacionTimestamp:Date = new Date(datosXml.created_on * 1000);

    DIA var = creacionTimestamp.getDate ();

    If (dia < 10)

    {

    DIA = '0' + String (dia)

    }

    my var = creacionTimestamp.getMonth () + 1;

    If (my < 10)

    {

    My = '0' + (my) String

    }

    anio var = creacionTimestamp.getFullYear ();

    var fechaCreacion:String = (my + ' / ' + day + ' / ' + anio);

    resultado_txt. Text = fechaCreacion;

    }

    leeXml.load (new URLRequest ("http://www.justin.tv/meta/" + nombreUsuario_txt.text + ".xml"));

    borrar_btn.addEventListener (MouseEvent.CLICK, borrarTodo);

    function borrarTodo (): void

    {

    nombreUsuario_txt.text = "";

    resultado_txt. Text = "";

    }

    buscar_btn.addEventListener (MouseEvent.CLICK, xmlCargar);

    Carlos.


    your button should be called a function that loads your xml file, not the complete listener function of the load:

    buscar_btn.addEventListener (MouseEvent.Click, startBuscarF);

    function startBuscarF(e:Event):void {}

    leeXml.load (new URLRequest ("http://www.justin.tv/meta/" + nombreUsuario_txt.text + ".xml"));

    }

Maybe you are looking for

  • Satellite A210-15Y - how to install Windows XP?

    I had Windows Vista and I improve it with Windows 7. Now, I really want to install Windows XP.When I put the Windows XP CD in after awhile I get a blue screen whit an error. pls tell how to install Windows XP on my laptop and if I need some drivers d

  • Green vertical lines then white screen on Qosmio F10

    My Toshiba Qosmio F10 primer is more. When it is on, the windows logo appears and the screen green vertical lines before going completely blank. The screen remains blank for about 5 minutes, then the laptop starts to restart. It justs goes on and so

  • problem with Office 2007 x61T Win7 RC

    Some elements (Word, Publisher, PowerPoint) have stopped working.  I tried to repair, uninstall, re - install and nothing works.  I got to work (2 days ago) so other computer scientists could try.  It worked, but now the problem is back.  At that poi

  • Blocking the UI Thread

    Hi all I wrote a utility class to make sure that at some point there is at most a dialog box showed and avoid duplication (this can occur because the application is made of many threads and each one can need alert the user). This is the code: public

  • Cannot detect the Torch 9800 in blackberry eclipse plugin for macos

    Hello! Im trying to put my Hello World on my Torch 9800 application using the blackberry for macos plugin. But it seems that the eclipse can't find my phone even if its plugged in because that options are grayed out (Blackberry-> load (s) on the devi