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

Tags: Adobe Animate

Similar Questions

  • 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.

  • 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

  • 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.

    }

  • #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.

  • Help please - ArgumentError: Error #2108

    Hi, I am new to flash cs3 and for my class project, we need to do a flash product. I did a clip that has an inside button and I have coded button to open another scene, but I get ArgumentError: Error #2108: scene Contactsvid not found each time that I test it. The actionscript code that I use is this:

    Stop();

    btn_contacts.addEventListener (MouseEvent.MOUSE_DOWN, mouseDownHandlerbtn_contacts);

    function mouseDownHandlerbtn_contacts(event:MouseEvent):void {}

    MovieClip (root)} Stop (1, "Contactsvid");

    I entered the name of the scene exactly how its name, but it still does not work.

    Please help me

    That seems correct, but I think I see now a problem which might be the cause, but I get different results when I test it with your code...

    MovieClip (root)} Stop (1, "Contactsvid");

    In the middle of this line is a hug where a period should be.  This brace belong at the end of the function

  • Reader video on demand ArgumentError: Error #2126

    I have an ERROR message is

    
    ArgumentError: Error #2126: NetConnection object must be connected.
         at flash.net::NetStream/ctor()
         at flash.net::NetStream()
         at videoplayer1_fla::MainTimeline/initVideoPlayer()
         at videoplayer1_fla::MainTimeline/frame1()

    The code below is xml playlist included. But I want to play videos via "Server rtmp.


    My video player at the request Code

    # VARIABLES

    connection object to the network for the net flow

    var ncConnection:NetConnection;

    net stream object

    var nsStream:NetStream;

    object contains all the meta-data

    var objInfo:Object;

    shared object containing the parameters of the drive (currently only the volume)

    var shoVideoPlayerSettings:SharedObject = SharedObject.getLocal ("playerSettings");

    URL to the flv file

    var strSource:String = root.loaderInfo.parameters.playlist is nothing? "playlist.xml": root.loaderInfo.parameters.playlist;

    timer to update player (progress, volume...)

    var tmrDisplay:Timer;

    load the xml file

    var urlLoader:URLLoader;

    is the owner of the request for the charger

    var urlRequest:URLRequest;

    playlist xml

    var xmlPlaylist:XML;

    # FUNCTIONS

    implements the player

    function initVideoPlayer (): void {}

    Hide video controls on initialization

    mcVideoControls.visible = false;

    hide buttons

    mcVideoControls.btnUnmute.visible = false;

    mcVideoControls.btnPause.visible = false;

    mcVideoControls.btnFullscreenOff.visible = false;

    Set the width of filling of progress/preload on 1

    mcVideoControls.mcProgressFill.mcFillRed.width = 1;

    mcVideoControls.mcProgressFill.mcFillGrey.width = 1;

    Label SETTING date and time

    mcVideoControls.lblTimeDuration.htmlText = "< font color ="#ffffff"> 00:00 < / police > / 00:00 ';

    Add the global event listener when the mouse is released

    stage.addEventListener (MouseEvent.MOUSE_UP, mouseReleased);

    Add fullscreen earphone

    stage.addEventListener (FullScreenEvent.FULL_SCREEN, onFullscreen);

    Add event listeners to the buttons

    mcVideoControls.btnPause.addEventListener (MouseEvent.CLICK, pauseClicked);

    mcVideoControls.btnPlay.addEventListener (MouseEvent.CLICK, playClicked);

    mcVideoControls.btnStop.addEventListener (MouseEvent.CLICK, stopClicked);

    mcVideoControls.btnMute.addEventListener (MouseEvent.CLICK, muteClicked);

    mcVideoControls.btnUnmute.addEventListener (MouseEvent.CLICK, unmuteClicked);

    mcVideoControls.btnFullscreenOn.addEventListener (MouseEvent.CLICK, fullscreenOnClicked);

    mcVideoControls.btnFullscreenOff.addEventListener (MouseEvent.CLICK, fullscreenOffClicked);

    mcVideoControls.btnVolumeBar.addEventListener (MouseEvent.MOUSE_DOWN, volumeScrubberClicked);

    mcVideoControls.mcVolumeScrubber.btnVolumeScrubber.addEventListener (MouseEvent.MOUSE_DOWN, volumeScrubberClicked);

    mcVideoControls.btnProgressBar.addEventListener (MouseEvent.MOUSE_DOWN, progressScrubberClicked);

    mcVideoControls.mcProgressScrubber.btnProgressScrubber.addEventListener (MouseEvent.MOUSE_, progressScrubberClicked);

    mcVideoControls.mcVideoDescription.btnDescription.addEventListener (MouseEvent.MOUSE_OVER, startDescriptionScroll);

    mcVideoControls.mcVideoDescription.btnDescription.addEventListener (MouseEvent.MOUSE_OUT, stopDescriptionScroll);

    timer to update visual across the player to create and add

    event listener

    tmrDisplay = new Timer (DISPLAY_TIMER_UPDATE_DELAY);

    tmrDisplay.addEventListener (TimerEvent.TIMER, updateDisplay);

    create a new NET connection, add the event listener and connect

    set to null because we do not have a media server

    ncConnection = new NetConnection();

    ncConnection.addEventListener (NetStatusEvent.NET_STATUS, netStatusHandler);

    ncConnection.connect ("rtmp://somehost.com/myfolder");

    create a new netstream with connection to the network, add events

    listener, positioned customer like this to manage the metadata and

    set the time of the buffer to the value of the constant

    nsStream = new NetStream (ncConnection);

    nsStream.addEventListener (NetStatusEvent.NET_STATUS, netStatusHandler);

    nsStream.client = this;

    nsStream.bufferTime = BUFFER_TIME;

    attach the net flow of video object on the stage

    vidDisplay.attachNetStream (nsStream);

    Set the value of the constant smoothing

    vidDisplay.smoothing = SMOOTHING;

    Set the default volume and get the volume of the shared object if available

    var tmpVolume:Number = DEFAULT_VOLUME;

    If (shoVideoPlayerSettings.data.playerVolume! = undefined) {}

    tmpVolume = shoVideoPlayerSettings.data.playerVolume;

    intLastVolume = tmpVolume;

    }

    update the volume bar and volume control

    mcVideoControls.mcVolumeScrubber.x = (53 * tmpVolume) + 318;

    mcVideoControls.mcVolumeFill.mcFillRed.width = mcVideoControls.mcVolumeScrubber.x - 371 + 53;

    setVolume (tmpVolume);

    create new request for the loading of the xml playlist, add an event listener

    and load

    urlRequest = new URLRequest (strSource);

    urlLoader = new URLLoader();

    urlLoader.addEventListener (Event.COMPLETE, playlistLoaded);

    urlLoader.load (urlRequest);

    }

    function playClicked(e:MouseEvent):void {}

    check, if the FLV has already begun

    to download. If so, resume playback, else

    load the file

    {if(!bolLoaded)}

    nsStream.play (strSource);

    bolLoaded = true;

    }

    else {}

    nsStream.resume ();

    }

    vidDisplay.visible = true;

    Toggle the visibility of the play/pause

    mcVideoControls.btnPause.visible = true;

    mcVideoControls.btnPlay.visible = false;

    }

    nsStream.seek (Math.round (mcVideoControls.mcProgressScrubber.x * objInfo.duration/472))

    on the other

    mcVideoControls.mcProgressScrubber.x = nsStream.time * 472 / objInfo.duration;

    Label SETTING date and time

    mcVideoControls.lblTimeDuration.htmlText = '< font color = "#ffffff" >' + formatTime (nsStream.time) + ' < / police > / "+ formatTime (objInfo.duration);»

    update the width of the progress bar. the grey one displays

    the loading progress

    mcVideoControls.mcProgressFill.mcFillRed.width = mcVideoControls.mcProgressScrubber.x + 5;

    mcVideoControls.mcProgressFill.mcFillGrey.width = nsStream.bytesLoaded * 478 / nsStream.bytesTotal;

    function onMetaData(info:Object):void {}

    stores the metadata in an object

    objInfo = info;

    Now we can start the timer because

    We have all the necessary data

    if(!tmrDisplay.Running)

    tmrDisplay.start ();

    }

    function netStatusHandler(event:NetStatusEvent):void {}

    handles net status events

    Switch (event.info.code) {}

    trace a messeage when the stream is not found

    case "NetStream.Play.StreamNotFound":

    trace ("stream not found:" + strSource);

    break;

    When the video reaches its end, we check if there is

    more video from left or stop the player

    case "NetStream.Play.Stop":

    If (intActiveVid + 1 < xmlPlaylist...) VID.length ())

    playNext();

    on the other

    stopVideoPlayer();

    break;

    }

    }

    function stopVideoPlayer (): void {}

    netstream break, time position the value zero

    nsStream.pause ();

    nsStream.seek (0);

    to clear the display,

    set to false for clear visibility

    function has a bug

    vidDisplay.visible = false;

    Toggle the visibility of the play/pause button

    mcVideoControls.btnPause.visible = false;

    mcVideoControls.btnPlay.visible = true;

    }

    function setVolume(intVolume:Number_=_0):void {}

    create the object soundtransform with the volume of

    the parameter

    var sndTransform = new SoundTransform (intVolume);

    Assign the object to the NetStream audio processing

    nsStream.soundTransform = sndTransform;

    mask/poster button mute and reactivate according to the

    volume

    If (intVolume > 0) {}

    mcVideoControls.btnMute.visible = true;

    mcVideoControls.btnUnmute.visible = false;

    } else {}

    mcVideoControls.btnMute.visible = false;

    mcVideoControls.btnUnmute.visible = true;

    }

    store the volume in the flash cookie

    shoVideoPlayerSettings.data.playerVolume = intVolume;

    shoVideoPlayerSettings.flush ();

    }

    function formatTime(t:int):String {}

    Returns the minutes and seconds with leading zeros

    for example: 70 returns at 01:10

    var s:int = Math.round (t);

    var m:int = 0;

    If (s > 0) {}

    While {(s > 59)

    m ++ ; s = 60;

    }

    Returns a String ((m < 10? "0" : "") + m + ":" + (s < 10 ? " 0" : "") + s);

    } else {}

    return "00:00";

    }

    }

    function playlistLoaded(e:Event):void {}

    create new xml code with the charger loaded data

    xmlPlaylist = new XML (urlLoader.data);

    Set the source of the first video, but do not play

    playVid (0, false)

    View orders

    mcVideoControls.visible = true;

    }

    function playVid(intVid:int_=_0,_bolPlay_=_true):void {}

    {if (bolPlay)}

    off timer

    tmrDisplay.stop ();

    read the requested video

    nsStream.play ("myvideo.flv");

    switch button visibility

    mcVideoControls.btnPause.visible = true;

    mcVideoControls.btnPlay.visible = false;

    } else {}

    strSource = xmlPlaylist... vid[intVid].@SRC;

    }

    video display

    / * vidDisplay.visible = true;

    reset the position of the label description and assign the new description

    mcVideoControls.mcVideoDescription.lblDescription.x = 0;

    mcVideoControls.mcVideoDescription.lblDescription.htmlText = (intVid + 1) + "." < font color = "#ffffff" >' + String (xmlPlaylist.. vid[intVid].@desc) + ' < / police > ' ;*/

    update active video number

    intActiveVid = intVid;

    }

    // ###############################

    I ended up video Andrei,

    problem with file extension, if I remove ".flv" when video plays.)


    Thank you for your help.

  • ArgumentError: Error #2085: aliasName parameter must be non-empty string.

    HI -.

    I started having this error today for an application I am developing using FlashBuilder 4. Here is the stack trace full (the real appname replaced bold text):

    ArgumentError: Error #2085: aliasName parameter must be non-empty string.
    Global / flash.net::registerClassAlias()
    to _FlexInit$ /init ({appName}_)
    to mx.managers::SystemManager / http://www.Adobe.com/2006/Flex/MX/internal:kickOff ([E:\dev\4.0.0\frameworks\projects\fra mework\src\mx\managers\SystemManager.as:2620])
    to mx.managers::SystemManager / http://www.Adobe.com/2006/Flex/MX/internal:preloader_completeHandler ([E:\dev\4.0.0\frame works\projects\framework\src\mx\managers\SystemManager.as:2539])
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.preloaders::Preloader/timerHandler() [E:\dev\4.0.0\frameworks\projects\framework\src\mx \preloaders\Preloader.as:515]
    at flash.utils::Timer/_timerDispatch()
    at flash.utils::Timer/tick()

    Looks like the the machine virtual flash tries to load and initialize my application, but fails. I can't understand why this is happening?  It worked last week.

    Few things that could change:

    (a) our company is updating the runtime flash to patch vulnerabilities that could have caused something? (I tried in FF, IE and Chrome... same err.)

    (b) my code updates... but I swear to you the necessary changes were made later in the screens... and this error occurs when the application is started.

    Enjoy all help/insight...thanks in advance.

    [s k]

    [RemoteClass(alias="com.abc.def.WorksGridRow")]

    If you use something like above in your application, then the path / of value is changed or the value of the alias is missing.

  • Gallery of images - ArgumentError: Error #2025

    Hi guys,.

    I'm new to flash cs3 and action script 3.0. I did 3 galleries of images, all work fine by themselves, however I recently tried to link them to a central flash file and I get the error:

    ArgumentError: Error #2025: the supplied DisplayObject must be a child of the caller.
    at flash.display::DisplayObjectContainer/removeChild()
    at home_fla::MainTimeline/gotoHome()

    I enclose the code for the central/home flash below file.

    Basically, all I'm trying to achieve is to add the client_images.swf like a child when the customer images button is clicked and then listen to a click on the button home client_images and remove the child. This works if I click on the home button immediately. If I click on the home button with in 3 seconds, I get the error.

    I had a good look for a solution to this problem and did not have much luck. Any help would be greatly appreciated. I can send the .fla if you need more information.

    See you soon,.
    Paul.

    you are repeatedly executing the code in Image1 House and who is initially two instances of clientsLoader (among others) to exist. When you try to delete the most recently created one, it is not added to the display list, so it cannot be deleted.

    to remedy this, put a stop() in frame 1 of the home.fla.

  • Jam - HP Officejet 8500 pro error - please help, deployed without return option

    Jam - HP Officejet 8500 pro error - please help, not deployed to M.E. no return w/lovely HP option

    I have a month old HP Officejet 8500 Pro, which suddenly give a paperjam error message.  There is no paper jam.  I spoke with HP Technical Support making long resets even blow the bowels to air without result.  It must be a simple mistake.  I saw it reported on other boards, but it seems that everyone is simply trading on their printers.  Not an option, like HP, in their infinite wisdom will not replace a defective unit overseas.

    I thought that there is a paper feed guide that hung above the paper tray.  It's hangin' is low... but maybe I was mistaken. If I tilt the printer back it will feed and eject a page, but not print.

    If someone at HP would be so likely to enlighten me I would willingly do what is necessary to take part, or whatever...

    Help... Help... Help...  Thank you...

    Here is a link that will help you.
    http://goo.GL/vxhuH

    It may be a sensor that went bad in the printer that generated the message.

  • 80072efe I have Vista Home Premium and I can't download updates it keeps giving me this error code help!

    80072efe I have Vista Home Premium and I can't download updates it keeps giving me this error code help!

    ERROR_INTERNET_CONNECTION_ABORTED 80072EFE

    Service Pack 2 is installed? If it has been...
    How long this update problem occurred?
    What is the suite of security/antivirus installed and is a 3rd party firewall used?
    The current AV subscription and it detects malicious software the last time that the system has been analyzed?

    You may encounter temporary connection related errors when you use Windows Update or Microsoft Update to install updates

    You can reset the Windows Update components by running the Fixit on this page. But, if there is malware present, she will continue to reset the connection to the update servers:How to reset the Windows Update components
    Suggest you download and save the Fixit. Then configure the system before the clean boot by running:
    How to troubleshoot a problem by performing a clean boot in Windows Vista/Windows 7

    Once the Fixit has been downloaded and the system is started in the pure State, check that the native Vista firewall is now on if a 3rd party firewall has been used previously. Now run the Fixit and choose the default mode. Restart once it's done and see if the system can be connected to the update servers. If he can't, then rerun the Fixit and choose aggressive mode. Turn it back on when he finished the race and updates.

    MowGreen Services update - consumer safety

  • KB976569 will not install in Windows xp, error OX66A HELP

    KB976569 will not install in Windows xp, error OX66A HELP

    Rick

    Hello

    Follow the instructions in the link:

    Codes error '0x8007066A' or '66' was to occur when you install updates of .NET Framework

    http://support.Microsoft.com/kb/2507641/en-us

    I hope this helps.

  • HP mini 110 computer: Hp mini 110 locked CNU9453NLK error. Help, please. Thank you!

    Computer HP mini 110 locked CNU9453NLK error. Help, please. Thank you!

    @Joyelle2

    Enter e9lovqf9ks

    Use this code to go into the BIOS.

    Disable all passwords that are enabled.

    If demand for CURRENT password using this code.

    Request NEW password just press ENTER.

    If asked to hit just to CHECK password to enter.

    Save and exit.

    REO

  • Stop error 0x0000007e help wanted

    Stop error 0x0000007e help wanted
    Hi ive got this stop error message and don't know how to fix it.

    Ive got a laptop packard bell easynote L4 series. Windows xp service pack 3 on it.

    Windows loads up then restarts to the login page. Ive pressed F8 and disabled auto reboot system fail and get a blue screen with this error message.

    STOP: 0X0000007E (0XC0000005, 0X838B6922, 0XF790B7A8, 0XF90B4A4)

    I can't record in normal mode or windows and nothing happens when you select last good load option restore in F8.

    I can't pretend I do not know how to enter back on win XP chkdisk.

    can someone help please!

    Hi JasonDavies,
     
    Try the methods that are listed in the article given below to resolve this issue:
  • Error in 'help' in cmd.exe

    Hello!

    I have found an error in 'help' in cmd.exe. If I can speak with an expert on this subject? If possible, I would like to talk about one-to-ones.

    FO

    There is no 'one to one' person to talk to.

    Microsoft is developing win 7 with the exception of security and bug fixes is no longer so I doubt that they would focus on an error in the help.

Maybe you are looking for

  • What is the default setting for the homepage of the new tab in firefox?

    My browser has been hijacked, I need to reset and I don't know which is the default setting. I would use the new firefox tab layout.

  • Lack of HARD disk space

    Hello! I have a model of Mac Mini end of 2012. My HARD drive supports 500GB and did it when I got it. Around last year, I tried to use Bootcamp to have 250 GB Windows partition and my Macintosh HD partition of 250 GB. The problem is that it has not w

  • Connect laptop to tv?

    Hi, I want to connect my laptop to my tv, I was 1st says to use a s video cable but it did not work, so I tried the vga cable but all I get on the TV is a black and white office background. I only use it as a second monitor showing what is on the top

  • Cannot change drive letter external (Windows Vista)

    I connected an external hard drive to my laptop (3.5 "), but it can not display in Windows Explorer.I have Windows Vista installed on my laptop The external hard drive is recognized in disk management, appears in good health, but has no drive letter

  • How to remove unwanted characters in ODI Flatfiles

    Hi Experts,Can someone please explain, how to remove unwanted characters from flat files before moving on to the target? Your help will be greatly appreciated. Thanks in advance.Kind regardsREDA