access problem 1120 property

Hi I am Luciano in Milan, I have a problem with a class I built to date, this class read file from an external source and exactly a TXT file.
A class I create have a problem when I call a method that are inside, I have lots of problm because view ever of the compiler error.
Previus AS2 version when I created an external class I could use an instance of the class with a new method and I could use a method built into it, now when I create an instance of the class I have a problem to use a class method, because the compiler displays an Error 1120 access properties.
I would like to know if possible to tell where can use a method inside my class for example if I have this class:
and I want to use a method such as ArrayRT() where I can do?
When I create a private distance:
private var LF:LeggiFile;
and that
LF = new LeggiFile();
and that
var VARS: Array = [];
VAR = LF. ArrayRT();
> > > > > > > > poster Error 1120: access property not defined for PMQS. < < < < < < < < < <

I am very pleasant if it is possible to have an explanation
Thanks a lot for Luciano

I thought about it.

Try this:

Tags: Adobe Animate

Similar Questions

  • Error # 1120 access of undefined property ERROR. AS3

    I have a code inside an actionscript file, and I get several errors when you try to debug:

    1120: access of undefined property squares.

    1180: call to a method may be undefined addChild.

    1120: access of undefined property squares.

    1120: access of undefined property squares.

    1120: access of undefined property fl_click.

    1120: access of undefined property myTimer.

    1120: access of undefined property timerListener.

    1120: access of undefined property myTimer.

    Here is my code for my main actionscript file:

    package 
    {
        import flash.events.MouseEvent;
        import flash.display.MovieClip;
        import flash.utils.Timer;
        import flash.events.TimerEvent;
    
        public class Game extends MovieClip
        {
            public var myTimer:Timer = new Timer(50);
            public var square:Square;
            square.addEventListener(MouseEvent.CLICK, fl_click);
            myTimer.addEventListener(TimerEvent.TIMER, timerListener);
            myTimer.start();
    
            private function timerListener(e:TimerEvent):void
            {
                square.edgeCorrect;
            }
    
            private function fl_click(event:MouseEvent):void
            {
                square.moveDownABit();
            }
    
            public function Game();
            {
                square = new Square();
                addChild( square );
            }
    
    
    

    I am a beginner, so please tell me exactly what to do with my code, thanks!

    The big problem is this line:

    public void Game()

    Remove the semicolon and try to compile it again.

  • Access of undefined property _btn (problems with the buttons)

    I get this error message:

    Scene 1, Layer 'actionscript', frame 1, line 11120: access of undefined property tennis1_btn.
    Scene 1, Layer 'actionscript', frame 1, line 71120: access of undefined property tennis2_btn.
    Scene 1, Layer 'actionscript', frame 1, line 131120: access of undefined property tennis3_btn.
    Scene 1, Layer 'actionscript', frame 1, line 191120: access of undefined property tennis4_btn.
    Scene 1, Layer 'actionscript', frame 1, line 251120: access of undefined property tennis5_btn.
    Scene 1, Layer 'actionscript', frame 1, line 311120: access of undefined property tennis6_btn.

    Here is a screenshot of my code

    flashscripterror.jpg

    I'll also paste below:

    tennis1_btn.addEventListener (MouseEvent.CLICK, gotennis1);

    function gotennis1(event:MouseEvent):void {}

    var gotennis1url:URLRequest = new URLRequest ("juniortennis.php");

    navigateToURL (gotennis1url, "_parent");

    }

    tennis2_btn.addEventListener (MouseEvent.CLICK, gotennis2);

    function gotennis2(event:MouseEvent):void {}

    var gotennis2url:URLRequest = new URLRequest ("adulttennis.php");

    navigateToURL (gotennis2url, "_parent");

    }

    tennis3_btn.addEventListener (MouseEvent.CLICK, gotennis3);

    function gotennis3(event:MouseEvent):void {}

    var gotennis3url:URLRequest = new URLRequest ("http://abbottsports.com/membership/memberships.php#tennis" ");

    navigateToURL (gotennis3url, "_parent");

    }

    tennis4_btn.addEventListener (MouseEvent.CLICK, gotennis4);

    function gotennis4(event:MouseEvent):void {}

    var gotennis4url:URLRequest = new URLRequest ("staff.php");

    navigateToURL (gotennis4url, "_parent");

    }

    tennis5_btn.addEventListener (MouseEvent.CLICK, gotennis5);

    function gotennis5(event:MouseEvent):void {}

    var gotennis5url:URLRequest = new URLRequest ('calendar.php');

    navigateToURL (gotennis5url, "_parent");

    }

    tennis6_btn.addEventListener (MouseEvent.CLICK, gotennis6);

    function gotennis6(event:MouseEvent):void {}

    var gotennis6url:URLRequest = new URLRequest ("tenniscourts.php");

    navigateToURL (gotennis6url, "_parent");

    }

    Please help: I have a couple of them types of menus, but it's the only one that gives me problems.  Here is the site that I use on:

    www.abbottsports.com of work

    http://abbottsports.com/football/football.php Working

    http://abbottsports.com/Motocross/Motocross.php working

    I add another on our page of tennis. I just copied the flash files on my tennis records and renamed all tennis instead of football, including buttons, as you can see on the right side of the page in the photo.

    I'm sure it has something to do with me rename the button, because I never changed anything in the code except substitute the word tennis football in each place. and renamed my buttons to tennis instead of football.

    Thanks for any help.

    Instance names your buttons are 'football1_btn '... 'football6_btn '.

    Rename them to "tennis1_btn"... "tennis6_btn" and you're golden.

  • 1120: access of undefined property removeEnemy1.

    Hello

    im making a game in flash cs3 and I have done for a small problem. I get this error 1120: access of undefined property removeEnemy1.

    I know what it means just don't know how to fix it.here is the code

    package com.asgamer.basics1 
    {
              import flash.display.MovieClip;
              import flash.display.Stage;
              import flash.events.Event;
      
              public class Engine extends MovieClip
              {
      
                        private var numStars:int = 80;
                        public static var enemyList:Array = new Array();
                        public static var enemy1List:Array = new Array();
                        private var ourShip:Ship;
      
                        private var scoreHUD:ScoreHUD;
      
                        public function Engine() : void
                        {
                                  ourShip = new Ship(stage);
                                  ourShip.x = stage.stageWidth / 2;
                                  ourShip.y = stage.stageHeight / 2;
                                  ourShip.addEventListener("hit", shipHit, false, 0, true);
                                  stage.addChild(ourShip);
      
      
                                  scoreHUD = new ScoreHUD(stage);
                                  stage.addChild(scoreHUD);
      
                                  for (var i:int = 0; i < numStars; i++)
                                  {
                                            stage.addChildAt(new Star(stage), stage.getChildIndex(ourShip));
                                  }
      
                                  addEventListener(Event.ENTER_FRAME, loop, false, 0, true);
      
                        }
      
                        private function loop(e:Event) : void
                        {
                                  if (Math.floor(Math.random() * 90) == 5)
                                  {
                                            var enemy:Stinger = new Stinger(stage, ourShip);
      
                                            enemy.addEventListener(Event.REMOVED_FROM_STAGE, removeEnemy, false, 0, true);
                                            enemy.addEventListener("killed", enemyKilled, false, 0, true);
                                            enemyList.push(enemy);
                                            stage.addChild(enemy);
      
                                            var enemy1:bomber = new bomber(stage, ourShip);
      
                                            enemy.addEventListener(Event.REMOVED_FROM_STAGE, removeEnemy1, false, 0, true);//here is where i get the error 
                                            enemy.addEventListener("killed", enemy1Killed, false, 0, true);// and here
                                            enemyList.push(enemy1);
                                            stage.addChild(enemy1);
                                  } 
                        }
      
                        private function enemyKilled(e:Event)
                        {
                                  scoreHUD.updateKills(1);
                                  scoreHUD.updateScore(e.currentTarget.points); 
                        }
      
                        private function removeEnemy(e:Event)
                        {
                                  enemyList.splice(enemyList.indexOf(e.currentTarget), 1);
                        }
      
                        private function shipHit(e:Event)
                        {
                                  scoreHUD.updateHits(-1);
                        }
      
      
              }
      
    }
    
    

    What am I, I'm trying to do is to spawn 2 different enemys by using stage.pls

    use:

    package com.asgamer.basics1
    {
              import flash.display.MovieClip;
              import flash.display.Stage;
              import flash.events.Event;
    
              public class Engine extends MovieClip
              {
    
                        private var numStars:int = 80;
                        public static var enemyList:Array = new Array();
                        public static var enemy1List:Array = new Array();
                        private var ourShip:Ship;
    
                        private var scoreHUD:ScoreHUD;
    
                        public function Engine() : void
                        {
                                  ourShip = new Ship(stage);
                                  ourShip.x = stage.stageWidth / 2;
                                  ourShip.y = stage.stageHeight / 2;
                                  ourShip.addEventListener("hit", shipHit, false, 0, true);
                                  stage.addChild(ourShip);
    
                                  scoreHUD = new ScoreHUD(stage);
                                  stage.addChild(scoreHUD);
    
                                  for (var i:int = 0; i < numStars; i++)
                                  {
                                            stage.addChildAt(new Star(stage), stage.getChildIndex(ourShip));
                                  }
    
                                  addEventListener(Event.ENTER_FRAME, loop, false, 0, true);
    
                        }
    
                        private function loop(e:Event) : void
                        {
                                  if (Math.floor(Math.random() * 90) == 5)
                                  {
                                            var enemy:Stinger = new Stinger(stage, ourShip);
    
                                            enemy.addEventListener(Event.REMOVED_FROM_STAGE, removeEnemy, false, 0, true);
                                            enemy.addEventListener("killed", enemyKilled, false, 0, true);
                                            enemyList.push(enemy);
                                            stage.addChild(enemy);
    
                                            var enemy1:bomber = new bomber(stage, ourShip);
    
                                            enemy1.addEventListener(Event.REMOVED_FROM_STAGE, removeEnemy, false, 0, true);//here is where i get the error
                                            enemy1.addEventListener("killed", enemy1Killed, false, 0, true);// and here
                                            enemyList.push(enemy1);
                                            stage.addChild(enemy1);
                                  }
                        }
    
                        private function enemyKilled(e:Event)
                        {
                                  scoreHUD.updateKills(1);
                                  scoreHUD.updateScore(e.currentTarget.points);
                        }
    
                        private function removeEnemy(e:Event)
                        {
                                  enemyList.splice(enemyList.indexOf(e.currentTarget), 1);
                        }
    
                        private function shipHit(e:Event)
                        {
                                  scoreHUD.updateHits(-1);
                        }
    
              }
    
    }
    
    
    

    What am I, I'm trying to do is to spawn 2 different enemys by using stage.pls

  • 1120: access of undefined property imgTag but imgTag is a variable not property

    I'm trying just to RSS feeds with the loading image. but the error came from this line: tb.htmlText = imgTag;

    error: 1120: access of undefined property imgTag.

    import flash.text.TextField;

    var loader: URLLoader = new URLLoader();

    loader.addEventListener (Event.COMPLETE, onLoaded);

    lb.addEventListener (Event.CHANGE, itemChange);

    tb.htmlText = imgTag;


    function itemChange(e:Event):void

    {

    "ta.htmlText =" < a href =------"" ' + lb.selectedItem.link + '-' > ' + lb.selectedItem.label + '< /a >. "

    }

    var xml;

    function onLoaded(e:Event):void

    {

    XML = new XML (e.target.data);

    var it: XMLList = xml.channel.item;

    for (var i: uint = 0; i < il.length (); i ++)

    {

    var desc:String = il.description.text ([i]);

    var startImg:Number = desc.indexOf("<");

    var endImg:Number = desc.indexOf(">");

    var imgTag:String = desc.substr (start, endImg - start + 1);

    trace (imgTag);

    lb.addItem ({data:il.description.text() [i],:il.link.text() [i] link,

    Label:il.title.Text()[i]});

    }

    }

    loader.load (new URLRequest ("http://www.medicinenet.com/rss/general/cancer.xml"));

    imgTag is just a piece of text (a string) not an image, so you get the constraint error when you use addChild() on a string.

    You need load the image that has the same name as the value of imgTag using an instance of the Loader class. I assume that you know the location of the URL of the image to load.

  • Simple 1120: Access of undefined property error

    Anyone want to take a stab at what I am sure is a simple error "1120"?

    1120: access to undefined property circle_inst.

    It is in the final function: "removeChild (circle_inst);"

    If I remove the offending line, everything works fine. The "circle_inst" appears, through its interpolation, but it is not deleted.

    Add box of
    var box_inst: box = new box();
    addChild (box_inst);
    box_inst.x = 200
    box_inst.y = 200

    box fade in
    TweenMax.fromTo (box_inst, 1, {alpha: 0}, {alpha: 1, pattern: 1, repeatDelay: 5, yoyo: true, onComplete: removeBox});

    remove the box and add circle
    function removeBox(): void {}
    removeChild (box_inst);
    var circle_inst: Circle = new circle();
    addChild (circle_inst);
    circle_inst.x = 200;
    circle_inst.y = 200;

    Fade in and out the circle
    TweenMax.fromTo (circle_inst, 1, {alpha: 0}, {alpha: 1, pattern: 1, repeatDelay: 5, yoyo: true, onComplete: removeCircle});
    }

    remove the circle and add stars
    function removeCircle(): void {}
    removeChild (circle_inst);
    var star_inst: Star = new star();
    addChild (star_inst);
    star_inst.x = 200;
    star_inst.y = 200;
    TweenMax.fromTo (star_inst, 1, {alpha: 0}, {alpha: 1, pattern: 1, repeatDelay: 5, yoyo: true});
    }

    Thank you

    The object is not in the scope of the function tries to target because you declare inside another function.  You must report to the outside and then you can instantiate within the service.

    var circle_inst: circle;

    remove the box and add circle
    function removeBox(): void {}
    removeChild (box_inst);
    circle_inst = new circle();
    addChild (circle_inst);
    circle_inst.x = 200;
    circle_inst.y = 200;

    Fade in and out the circle
    TweenMax.fromTo (circle_inst, 1, {alpha: 0}, {alpha: 1, pattern: 1, repeatDelay: 5, yoyo: true, onComplete: removeCircle});
    }

  • 1120: access of undefined property

    Hi, I need a solution to my script for school work.

    This is my code:

    Stop();

    var Keo: Boolean = false;

    var kiri:Boolean = false;

    var jumlah:int = 0;

    var n = 0;

    var t = 3;

    Kalah.Visible = false;

    mulai.addEventListener (MouseEvent.CLICK, mulaimain);

    function mulaimain(event:MouseEvent):void

    {

    Kalah.Visible = false;

    Mulai.Visible = false;

    Home.Visible = false;

    n = 0; score. Text = string(n);

    t = 3; Lives.Text = String (t);

    stage.addEventListener (KeyboardEvent.KEY_DOWN, tekantombol);

    stage.addEventListener (KeyboardEvent.KEY_UP, lepastombol);

    cacto.addEventListener (Event.ENTER_FRAME, jalan);

    taco.addEventListener (Event.ENTER_FRAME, set);

    heart.addEventListener (Event.ENTER_FRAME, jatuhhati);

    function tekantombol (event: KeyboardEvent): void

    {

    switch (event.keyCode)

    {

    -case Keyboard.RIGHT: {kekchose = true; break ;}}

    -case Keyboard.LEFT: {kiri = true; break ;}}

    }

    }

    function lepastombol (event: KeyboardEvent): void

    {

    cacto.gotoAndPlay (1);

    switch (event.keyCode)

    {

    -case Keyboard.RIGHT: {kekchose = false; jumlah = 0; break ;}}

    -case Keyboard.LEFT: {kiri = false; jumlah = 0; break ;}}

    }

    }

    jalan function (event: Event): void

    {

    Cacto.x += jumlah;

    If (kanan) {cacto.gotoAndStop (3); jumlah = 11 ;}}

    If (kiri) {cacto.gotoAndStop (2); jumlah = - 11 ;}}

    If (cacto.x > = 997) {cacto.x = - 10 ;}

    If (cacto.x < =-37) {cacto.x = 977 ;}

    }

    function jatuh(event:Event):void

    {

    Taco.y += 7;

    If (taco.y > = 390)

    {

    t = t-1; Lives.Text = String (t);

    Taco.y =-2;

    Taco.x = Math.Floor (Math.Random () * 800);

    }

    If (Taco.hitTestObject (Cacto))

    {

    n = n + 1; score. Text = string(n);

    Taco.y =-2;

    Taco.x = Math.Floor (Math.Random () * 800);

    }

    if(t==0)

    {

    cacto.removeEventListener (Event.ENTER_FRAME, jalan);

    taco.removeEventListener (Event.ENTER_FRAME, set);

    Kalah.Visible = true;

    Mulai.Visible = true;

    }

    function jatuhhati(event:Event):void

    {

    Heart.y += 12;

    If (heart.y > = 390)

    {

    Heart.y =-30;

    Heart.x = Math.Floor (Math.Random () * 800);

    }

    If (Heart.hitTestObject (Cacto))

    {

    t = t + 1; Lives.Text = String (t);

    Heart.y =-30;

    Heart.x = Math.Floor (Math.Random () * 800);

    }

    }

    }

    }

    Scene 1, Layer 'Actions', frame 1, line 261120: access of undefined property jatuhhati.

    and this output:

    ReferenceError: Error #1065: Variable TCMText is not defined.

    Can someone help me?

    For Error 1120, you seem to have nested in another function jatuhhati function.  The compiler cannot see because of that.  Never recommended to nest the functions called within other functions.  Get what it out on its own so that you can see when the assignment of the listener that uses it gets compiled.

    With regard to the 1065 error will I can't see any of this object named in your code.  This usually makes me conclude that there is a component any you use which has such a textfield.

    One thing you should always do when you start getting errors is to go to your publication of Flash settings and select the option to enable debugging.  This can help in pointing to more specific information in the error messages you get, such as line numbers.

  • 1120: access of undefined property URLLoaderDataFormat

    Hello...

    I have this code created in a class, but I get the error of "1120: access of undefined property URLLoaderDataFormat! Can someone help me please?

    public var loaderLeft:Loader = new Loader();

    public var loaderRight:Loader = new Loader();

    public var imageUrl:URLRequest = new URLRequest();

    public var request: URLRequest;

    public var urlLoader:URLLoader;

    GlobalVars.imageCerta = "left";

    public var imgMc:LoadImages = new LoadImages(2,this);

    public void MainJogo(url:String)

    {

    request = new URLRequest ("http://localhost/php/" + url);

    urlLoader = new URLLoader();

    #ERROR #.

    urlLoader.dataFormat = pouvez;

    #ERROR #.

    urlLoader.addEventListener (Event.COMPLETE, completeHandler);

    Try

    {

    urlLoader.load (request);

    }

    catch (error: error)

    {

    trace ("unable to load URL:" + error);

    }

    }

    What development tool do you use?

    You imported flash.net.URLLoaderDataFormat?

    Thank you

    -Hiroshi

  • 1120: access of undefined property error

    btnCalculateRectangleProperties.addEventListener (MouseEvent.CLICK, displayCalculateRectangleProperties);

    function displayCalculateRectangleProperties(e:MouseEvent):void

    {

    var: number of length;

    var width: Number;

    var: number of the zone;

    var scope: Number;

    Length = 10;

    Width = 25;

    Area = length * width;

    Perimeter = 2 * length + 2 * width;

    lblLength.text = ToString;

    lblWidth.text = Width.toString ();

    lblArea.text = Area.toString ();

    lblPerimeter.text = Perimeter.toString ();

    }

    and I get this error

    1120: access of undefined property lblPerimeter.

    Help? Ty

    TripleCheck your instance name for the textfield lblPerimeter and ensure that there is in the frame where this code runs

  • Flash Action user incorrect 1120: access of undefined property

    I work in flash, creating a document drag / move and when I try to make a link to my target I get the following error 1120: access of undefined property. Can anyone help?

    target is null.   It does not point to what it is.

    What do you want it to be?

  • AS of CS4 Error 1120 - access of undefined property.

    I feel like a real noob and need help!

    I'm new to Flash, but were able to dig my way through scripts for action with a little help from old messages of the forum.

    What I've done so far: developed a small map with buttons for navigation for the Web page, all worked fine with every button link to a separate page.

    What I do: I have new content that needs to be added, so I need another button. everything went fine the new button, name, new layer etc.

    I copied the same code for this button to work (just the name chaning) since the other 7 work buttons in the swf file.

    The error I get is 1120: access of undefined property wind. for the last line of code below:

    A button that does not work:

    import flash.events.MouseEvent;

    function gotoWIND(event:MouseEvent):void {}
    var windURL = new URLRequest ("http://www.hydro.com.au/node/462");
    navigateToURL (windURL, "_self");
    }

    wind.addEventListener (MouseEvent.CLICK, gotoWIND);

    Button (s) that works:

    import flash.events.MouseEvent;

    function gotoKING(event:MouseEvent):void
    {
    var kingURL:URLRequest = new URLRequest ("http://www.hydro.com.au/node/405/");
    navigateToURL (kingURL, "_self");
    }

    king.addEventListener (MouseEvent.CLICK, gotoKING);

    I did some research and found that this means that I have not named the right of the button, but I double and triple checked, redone with a simpler Word (wind) but still no joy. And the only other response, that I could find on this forum was about several images - but as it is a 'static' navigation panel there is only one image for each layer.

    Help, please!

    in the frame that contains your code, use the following syntax, click on wind and copy and paste your text from exit sign.

    import flash.events.MouseEvent;

    trace (Wind);

    function gotoWIND(event:MouseEvent):void {}

    trace("**",Event.currentTarget.Name);
    var windURL = new URLRequest ("http://www.hydro.com.au/node/462");
    navigateToURL (windURL, "_self");
    }

    wind.addEventListener (MouseEvent.CLICK, gotoWIND);

  • Need help with the error msg 1120: access of undefined property

    I'm not a coder, so I need help coding. Any help would be greatly appreciated.

    I'm a Flash banner that was given instructions "clickTAG" of Google. The code, they said to put the button is:

    Parameter ClickTAG for ActionScript 3 code:

    import flash.events.MouseEvent;
    import flash.net.URLRequest;
    // ......


    () someButton_or_displayObject_to_receive_mouseClick.addEventListener
    MouseEvent.CLICK,
    function(Event: MouseEvent): void {}
    flash.net.navigateToURL (new URLRequest (root.loaderInfo.parameters.clickTAG), '_blank');
    }
    );

    Replace someButton_or_displayObject_to_receive_mouseClick with the actual name of the button that will receive the click.

    Note that it is not necessary to specify the destination URL of the ad anywhere in this code; This is supported through the use of "clickTAG". In addition, according to the structure of your Flash Ad, it may be necessary to add "_root." or "_level0." for "clickTAG" above, resulting in a "_root.clickTAG" or "_level0.clickTAG". It is strongly recommended to download the ad on your account and check the ad behaves normally until she'll live, granted for the necessary changes.

    And this is the code that I put in (btnClickTag is the name of my button):

    import flash.events.MouseEvent;

    import flash.net.URLRequest;



    () btnClickTag.addEventListener

    MouseEvent.CLICK,

    function(Event: MouseEvent): void {}

    flash.net.navigateToURL (new URLRequest (root.loaderInfo.parameters.clickTAG), '_blank');

    }

    );

    and this is the error I got:

    Scene1, layer 'actions', image1, 1120: access of undefined property btnClickTag. () btnClickTag.addEventListener

    First of all, make sure that you have assigned this name to the button using the properties panel, and then, don't forget to adjust the code so that it is not spread over several lines... normally it must be on a single line.  Do not nest the function where the listener either, so try the following (not necessary for import declarations)...

    btnClickTag.addEventListener (MouseEvent.CLICK, tagClick);

    function tagClick(event:MouseEvent):void {}

    navigateToURL (new URLRequest (root.loaderInfo.parameters.clickTAG), '_blank');

    }

  • 1120: access of undefined property scene.

    Hello

    I get this error: 1120: access of undefined property scene in my document class. On the two lines where I commented.

    I am looking for a picture of the main timeline. Pass through a function then adds the objects in the scene based on that number is in the table.

    My Document class:

    package  {
         
         import flash.display.MovieClip;
         import flash.display.Stage;
    
         public class Levelcreator extends MovieClip{
         
              public function Levelcreator() {
                   // constructor code
              }
              
              public static function getArray(levelArray:Array):void {
                   for(var i:uint = 0; i < 6; i++){
                        switch (levelArray[i]){
                             case 0:
                                  var grid_mc:Grid = new Grid;
                                  grid_mc.x = (40*i) + 60;
                                  grid_mc.y = 60;
                                  stage.addChild(grid_mc);//error here
                                  break;
                             case 1:
                                  var house_mc:House = new House;
                                  house_mc.x = (40*i) + 60;
                                  house_mc.y = 60;
                                  stage.addChild(house_mc);//error here
                                  break;
                        }
                   }
              }
    
         }
         
    }
    

    then on the maintime I'm moving a table to it with:

    Levelcreator.getArray([0, 1, 0, 0, 1, 0]);
    

    I can't understand what I'm doing wrong here. Help would be very appreciated. Thank you.

    :

    package  {
    
         import flash.display.MovieClip;
         import flash.display.Stage;
    
         public class Levelcreator extends MovieClip{
    
              public function Levelcreator() {
                   // constructor code
              }
    
              public function getArray(levelArray:Array):void {
                   for(var i:uint = 0; i < 6; i++){
                        switch (levelArray[i]){
                             case 0:
                                  var grid_mc:Grid = new Grid;
                                  grid_mc.x = (40*i) + 60;
                                  grid_mc.y = 60;
                                  stage.addChild(grid_mc);//error here
                                  break;
                             case 1:
                                  var house_mc:House = new House;
                                  house_mc.x = (40*i) + 60;
                                  house_mc.y = 60;
                                  stage.addChild(house_mc);//error here
                                  break;
                        }
                   }
              }
    
         }
    
    }
    
    

    then on the maintime

    getArray([0, 1, 0, 0, 1, 0]);
    
    
  • Error "1120: access of undefined property mouseX.»

    Hello!

    I develop a class AS 3, and I get the following error: "1120: access of undefined property mouseX.»

    This is part of the class declaration:

    ------------------------------------------

    package
    {
    import flash.geom.Vector3D;
    import flash.display.MovieClip;

    public class Rotator
    {

    private var xMouseGlobal:Number;

    private var yMouseGlobal:Number;

    .....
    }

    }

    ----------------------------------------------------

    And here is where I get error (method inside the cap of class):

    rotation function
    {
    xMouseGlobal = mouseX;
    yMouseGlobal = mouseY;

    .........

    }

    -------------------

    Any ideas?

    Thank you!

    mouseX is a property of a DisplayObject, so you may have to precede the use of it with a reference to the object.  I don't know if 'this' would be an appropriate target, as in "this.mouseX.

  • Error 1120 in flex Builder access of undefined property

    Hello

    I'm trying to Crest a simple xml reader, but flex builder has detected an Error 1120: access of undefined property

    Can someone help me?

    This is the code

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="1024" minHeight="768">
         <mx:Script>
              <![CDATA[
                   import mx.collections.XMLListCollection;
                   import flash.xml.*;
                     import flash.net.*;
                     import flash.events.Event;
      
      
                   [Bindable]
                   private var company:XML;     
    
                   private var xmlString:URLRequest ;
                   private var xmlLoader:URLLoader ;
                   
              "err.1120"     xmlString = new URLRequest("data/data.xml");
              "err.1120"     xmlLoader= new URLLoader(xmlString);
                   
              "err.1120"     xmlLoader.addEventListener("complete", initXml);
              "err.1120 initXml"     
    
                   private function initXml(event:Event):void{     
                         company = XML(xmlLoader.data);
                   }
                   [Bindable]
                   private var companyData:XMLListCollection = new XMLListCollection(company.department);
                   
                   private function treeLabel(item:Object):String
                   {
                        
                        var node:XML = XML(item);
                        if( node.localName() == "department" )
                             
                             return node.@title;
                        else
                             return node.@name;
                   }
         
              ]]>
         </mx:Script>
         <mx:ApplicationControlBar x="0" y="0" width="1045">
         </mx:ApplicationControlBar>
         <mx:TabBar x="10" y="41" dataProvider="viewstack1">
         </mx:TabBar>
         <mx:ViewStack x="10" y="62" id="viewstack1" width="259" height="738">
              <mx:VBox label="Database" width="100%" height="100%">
              </mx:VBox>
              <mx:VBox label="Categoria" width="100%" height="100%">
                   <mx:Tree id="tree" width="256" height="570" 
                              dataProvider="{companyData}"
                              labelFunction="treeLabel"
                              
                              ></mx:Tree>
              </mx:VBox>
              <mx:HBox label="Search" width="100%" height="100%">
              </mx:HBox>
         </mx:ViewStack>
         <mx:DataGrid x="307" y="62" width="272.04547" height="569.3939">
              <mx:columns>
                   <mx:DataGridColumn resizable="false" sortable="false"/>
                   <mx:DataGridColumn headerText="Column 2" dataField="User"/>
              </mx:columns>
         </mx:DataGrid>
         
    </mx:Application>
    
    private var xmlString:URLRequest = new URLRequest("data/data.xml");                private var xmlLoader:URLLoader = new URLLoader(xmlString); 
             // this string you can write only in a function
              xmlLoader.addEventListener("complete", initXml);
    

    for example add creationComplete = "initApp ()" application "

    and to add

    private function initApp (): void

    {

    xmlLoader.addEventListener("complete", initXml);
    

    }

Maybe you are looking for

  • Apple Dock of lightning - line level output?

    I have a question that maybe with that you audiophiles out there can help.  Descriptions and comments from the dock connector 30 pins for the pre at first touch screen iPod claimed (correctly I think) that the mini stereo 3.5 mm output port of these

  • Photosmart HP 6510 all-in-one.

    Another first time user please excuse typos. I'm on Windows Vista service pack 2. I have not installed anything new recently. A week ago I wenrt to print a page of the computer and the following appeared on the screen of the printer and the like on m

  • Viet Nam tv and Nasa tv do not come

    For some time now, I not was able to get one of these for work. I am on a fixed income and can't afford to cable or dish tv. I uninstalled gadgets and reinstalled. I restored the system back to before that the problem started, and again, it won't wor

  • Is photos deleted - possible to recover?

    I inadvertently deleted my pictures when I was doing a backup. He said that it was too big for the trash while they have been erased. I restored to the previous day, but only the files have been restored. Is it still possible to recover?

  • Transportation Jam HP ENVY 5530

    I have an old 5530 4 months and the last two weeks, I get the error of jam carriage very intermittently.   There is no obstruction and I followed all the videos and other compensation boards.   The printer status page prints fine just like other page