Access of undefined property.

I use Adobe Flash to create an interactive map of China. I try to add a link to each autonomous province, then when you click on they redirect you to a Web site. I transformed a button in each province and assigned this script for each other >

Beijing.addEventListener (MouseEvent.CLICK, clickHandler);

function clickHandler(event:MouseEvent):void

{

navigateToURL (new URLRequest ("http://en.wikipedia.org/wiki/Beijing"));

}

I repeated the script for all provinces. After I did it I got an error message for each province indicating a double function. So I decided to change the script in the following way >

Beijing.addEventListener (MouseEvent.CLICK, clickHandler1);

function clickHandler1(event:MouseEvent):void

{

navigateToURL (new URLRequest ("http://en.wikipedia.org/wiki/Beijing"));

}

I assigned a different number on each trial here to avoid this error in dual function, but then I got a new error message. The error message is repeated for each province. >

1120: access of undefined property Beijing.

Can someone help me solve this problem? Thanks for your help. Takk fyrir.

The screenshot does not show the name of the instance.  It shows only the instance and label you assigned to the layer of the timeline.  The name of the instance should be assigned in the properties panel.

In case you are not familiar with how to assign names for instance... they are not the names you assign to the object or aree layers they names that you assign in the library.

To assign an instance name, select the object/button on the stage and then enter the instance name in the properties panel, where it says "".  This is the name that the code search.

Tags: Adobe Animate

Similar Questions

  • 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});
    }

  • I have an access of undefined property _root. and access to property may be undefined

    I have 2 errors with my script (below) it is assumed to be Actionscript 3.0.

    I'm getting a

    1120: access of undefined property _root.

    and has...

    1119: access of property may be undefined onRelease through a reference with static type flash.display:SimpleButton.

    Here is my code...

    var frameNum:Number

    function photoChange() {}

    _root.photos.gotoAndStop ("img" + frameNum);

    }

    {btn1.onRelease = Function ()}

    frameNum = 1

    photoChange();

    }

    {btn2.onRelease = Function ()}

    frameNum = 2

    photoChange();

    }

    {btn3.onRelease = Function ()}

    frameNum = 3

    photoChange();

    }

    {btn4.onRelease = Function ()}

    frameNum = 4

    photoChange();

    }

    {btn5.onRelease = Function ()}

    frameNum = 5

    photoChange();

    }

    {btn6.onRelease = Function ()}

    frameNum = 6

    photoChange();

    }

    {btn7.onRelease = Function ()}

    frameNum = 7

    photoChange();

    }

    {btn8.onRelease = Function ()}

    frameNum = 8

    photoChange();

    }

    {btn9.onRelease = Function ()}

    frameNum = 9

    photoChange();

    }

    {btn10.onRelease = Function ()}

    frameNum = 10

    photoChange();

    }

    {btn11.onRelease = Function ()}

    frameNum = 11

    photoChange();

    }

    {btn12.onRelease = Function ()}

    frameNum = 12

    photoChange();

    }

    Could someone help me please!

    _root and onRelease are not AS3, AS2 code to which they belong.  Basically, all of the code that you show treat like AS2, but will have made a mistake if you have your publication set for AS3 settings.  To implement it in AS3 code, you must follow the changes indicated below for all of the code...

    var frameNum:Number;

    function photoChange(evt:MouseEvent) {}

    frameNum = Number (String (evt.currentTarget.name) .substr (3))
    photos.gotoAndStop ("img" + String (frameNum));

    }

    Btn1.addEventListener (MouseEvent.CLICK, photoChange);

    .

    etc.

    .
    btn12.addEventListener (MouseEvent.CLICK, photoChange);

    Assuming you are using the button symbols, the function by using string manipulations to get the chassis number of the button name.  If you use MovieClips as buttons you can assign each number as a property and get this quite the contrary.  Buttons do not support the dynamic properties as do MovieClips.

    The reference to _root in AS3 is simply 'root' but which has usually need a qualifier, as in MovieClip (root).  In many cases using a root reference is not necessary.  If your code is on the main timeline, then there is no need to use references from the root because it is essentially where you are already.  If this code is inside another object on the timeline, then using... MovieClip (root). photos.gotoAndStop... etc would be a solution.

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

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

  • 3D in as3, "access of undefined property z"?

    Hello

    Recently, I read a few tutorials on 3D in AS3.  So far, I read all you need to do to convert a 2D to 3D video clip is to set the property in the MoviClip class z. The problem is: when I try to launch my 3D project, I get the error: 'access of undefined property z' and I don't know why.

    Any response would help a lot. Thanks in advance!

    Class code TheeDClip (supposed to be extended in the symbol definition classes):

    SerializableAttribute public class ThreeDClip extends MovieClip

    {

    public void ThreeDClip (_stage:Stage, _followup:Function, _x:Number. = 000378, _y:Number. = 000378, _z:Number = 000378.)

    {

    Super();

    addEventListener (Event.ADDED_TO_STAGE, function(evt:Event)

    {

    _followup();

    });

    _stage. AddChild (this);

    If (_x! = 000378.)

    x = _x;

    on the other

    x = _stage.stageWidth / 4;

    If (FLF! = 000378.)

    y = FLF;

    on the other

    y = _stage.stageWidth / 4;

    If (_z! = 000378.)

    z = _z;

    on the other

    z = 100;

    }

    }

    Click file > publishing settings > swf and check the box "enable debugging".  retest to confirm this class file is used after checking your settings to confirm that you are the publication for fp 10 + publication.

  • 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

  • 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 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]);
    
    

Maybe you are looking for

  • Installed update app

    I have a problem for a long time now. One of my friends gave me a cool app, it has purchased, through USB key. Of course, I need his Apple ID, to install updates. I didn't ask him his ID and password, so I decided to uninstall the application. The pr

  • Satellite C850D-115 - problem with USB 3.0 port

    Maybe you are my last chance to solve this problem. I bought a C850D-115 PSC9UE-00N00MGR without BONES. I've installed two times Windows 7 top on two different partitions.I downloaded and installed all the drivers needed from the Toshiba site and upd

  • Reset bios password HP mimi 1000

    Hello please help to reset password Bios for HP mini 1000 HP Mini 1000S/N: CNU9244JD3P/N: NM123UA #ABAModell / Service Tag: 1151NR I HAVE A FATAL ERROR... SYSTEM ORDER CNU9244JD3 error code I didn't have no code found in this forum I need the passwor

  • HP probook 6470b: how to recover widows on

    O made a secure erase and now I can't figure out how to recover windows on I don't have a disc

  • Xperia Z3 Compact D5803 change new display shows only black

    Hello