Error #1009 Help!

Dear all,

I hope you can help me with what is probably something very simple but seems to touch most of the people! However, I spent all day researching it and try all sorts of codes to solve the error!

I am trying to build a new website using Flash CS5 and I'm very new to any script business (as3).  After finishing the main content of the site, I created an external preloader, so it can load the main SWF file. However, when I debug or test the scene I get this error:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
   at Index_fla::MainTimeline/frame1()[Index_fla.MainTimeline::frame1:11]

After many hours, I find the publication settings, publication of debugging that actually tells me what mount / the origin of the problem! If I go to my main file (called Index.Fla) and look at picture 1, line 11, it says:

var buttonsArray:Array = [works_btn,about_btn,contact_btn];

... that sounds right, seem to consider when the preloader is finished the file flash main (work/comments/contact) navigation buttons does not quite right. They still work take back you to the right pages (or frames) but the mouse, mouse click, functions do not work.

Now, I'm not really sure how to deal with this, because all the buttons (which are video clips) are located on the frame one and carry the name of the instance to the right and MORE when I debug the Index.Fla file, everything works normally.

Should I assume that there is something wrong with my preloader file?

Below is the script for the preloader and frame a fo the index file. I hope you can help me! Thank you!

PRELOADER:

var l:Loader = new Loader();

l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
l.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
l.load(new URLRequest("Index.swf"));

function loop(e:ProgressEvent):void
{
   var perc:Number = e.bytesLoaded / e.bytesTotal;
   percent.text = Math.ceil(perc*100).toString() + "% Complete";
}

function done(e:Event):void
{
   removeChildAt(0);
   removeChild(preloader)
   percent = null;
   addChild(l);

   l.contentLoaderInfo.removeEventListener( ProgressEvent.PROGRESS, loop);
   l.contentLoaderInfo.removeEventListener(Event.COMPLETE, done);

}

INDEX (MAIN - FRAME ONE FILE)


stop();

works_btn.addEventListener(MouseEvent.CLICK, navigationClicked);
about_btn.addEventListener(MouseEvent.CLICK, navigationClicked);
contact_btn.addEventListener(MouseEvent.CLICK, navigationClicked);

stage.frameRate = 30;
var buttonsArray:Array = [works_btn,about_btn,contact_btn];

   function setButtons():void
   { for (var i:int=0; i<buttonsArray.length; i++)
      {   buttonsArray[i].id = i;  
         buttonsArray[i].buttonMode = true;  
         buttonsArray[i].mouseChildren = false;  
         buttonsArray[i].mouseEnabled = true;  
         buttonsArray[i].addEventListener(MouseEvent.ROLL_OVER,playOver);  
         buttonsArray[i].addEventListener(MouseEvent.ROLL_OUT,playOut);  
         buttonsArray[i].addEventListener(MouseEvent.CLICK,doClick);  
      }
}

function playOver(event:MouseEvent):void
   {   event.currentTarget.gotoAndPlay("over");
   }
function playOut(event:MouseEvent):void
   {   event.currentTarget.gotoAndPlay("out");
   }

function doClick(event:MouseEvent):void{
  
   var currentBtn:int = event.currentTarget.id;  

   setSelectedBtn(currentBtn);
}

function setSelectedBtn(id:int):void{  
   for (var i:int=0; i< buttonsArray.length; i++) {  
      if (id == i) {  
         buttonsArray[i].gotoAndStop("down");  
         buttonsArray[i].buttonMode = false;  
         buttonsArray[i].mouseEnabled = false; 
         buttonsArray[i].removeEventListener(MouseEvent.ROLL_OVER,playOver);  
         buttonsArray[i].removeEventListener(MouseEvent.ROLL_OUT,playOut); 
         buttonsArray[i].removeEventListener(MouseEvent.CLICK,doClick);
         } else {  
            if(buttonsArray[i].currentLabel =="down"){
               buttonsArray[i].gotoAndPlay("out");  
               }  
               buttonsArray[i].buttonMode = true;  
               buttonsArray[i].mouseEnabled = true;  
               buttonsArray[i].addEventListener(MouseEvent.ROLL_OVER,playOver);  
               buttonsArray[i].addEventListener(MouseEvent.ROLL_OUT,playOut);  
               buttonsArray[i].addEventListener(MouseEvent.CLICK,doClick);
               }  
         }
      }
setButtons();

function navigationClicked(Event:MouseEvent):void
{
   var frmLabel:String = '';

    switch (Event.target)
   {
      case works_btn :
            frmLabel = "Portfolio_frm";
            break;
        case about_btn :
            frmLabel = "About_frm";
            break;
        case contact_btn :
            frmLabel = "Contact_frm";
            break;
   }
     
   if (currentFrame != frmGoto)
   {
     
      var frmPortfolio:Number = this.getFrame("Portfolio_frm");
           
      gotoAndPlay(frmGoto);
   }
}


function getFrame(frameName:String):Number
{
    var frame:Number = 1;

       for (var i = 0; i < currentLabels.length; i++)
    {
        if (currentLabels[i].name == frameName)
        {
            frame = currentLabels[i].frame;
            break;
        }
    }

    return frame;
}

Ahh! I'm sorry. I did it again (error code of purpose), and I think that the problem was:

stage.frameRate = 30;

I took it out and the notification of the error #1009 is gone! Don't know how or why he's done right! It is perhaps unnecessary coding?

Thanks for your help if Kglad. Very appreciated

Tags: Adobe Animate

Similar Questions

  • Help please! I using Muse (the free trial version) very well since last week, but the last few times I tried to use it, it comes back with ' TypeError: Error #1009 pouvez anyonve tried to use it, it comes back with ' error can all

    Help please! I using Muse (the free trial version) very well since last week, but the last few times I tried to use it, it comes back with ' TypeError: Error #1009 pouvez anyonve tried to use it, it comes back with ' error can someone help me figure out what the problem... I have a few days I really help neee what the problem is... I have a deadline in a few days so I really need! Thank you

    Screen Shot 2015-05-11 at 20.32.34.png

    Restart your Mac. The OSX Drag Manager got in a bad state. The only way to reset it is to restart your computer.

  • Help, please! TypeError: Error #1009: cannot access a property or method of a null object reference.  Help, please!

    Can anyone help! Here's the code from to escape the game of the room that I am creating.  Basically the user will be drag and drop items to reveal the user will collect hidden items.  I got the elements of drag-and - drop but I have a problem with the service that I write to recognize what are the elements and how much has been collected.  I just get the error

    TypeError: Error #1009: cannot access a property or method of a null object reference.

    at TheMathsRooms_fla::MainTimeline/ObjectFound()

    When I click on one of the elements, the user must be able to collect.  I checked the chronology and pint, the script is used all THE elements are on the scene.  Any ideas?

    function objectFound

    function ObjectFound(event:MouseEvent):void {}

    var room1_inventoryName:String = "room1_inventory" + event.target.name;

    var room1_inventoryItem:DisplayObject = getChildByName (room1_inventoryName);

    Event.Target.alpha is room1_inventoryItem.alpha = 100;.

    founditems ++;

    Event.Target.alpha = 0

    }

    Here I put the items in stock to be invisible until they are

    room1_inventoryone_mc.Alpha = 0

    room1_inventorytwo_mc.Alpha = 0

    room1_inventorythree_mc.Alpha = 0

    room1_inventoryfour_mc.Alpha = 0

    room1_inventoryfive_mc.Alpha = 0

    room1_inventorysix_mc.Alpha = 0

    A variable is created to count the number of items the player has found.  At the beginning of the game, it is set to 0

    var founditems:Number = 0;

    Here, I'm telling Flash to keep track of what the user has found by listening to what were clicked on and then by running the objectFound function.

    room1_hiddenone_mc.addEventListener (MouseEvent.MOUSE_DOWN, ObjectFound);

    room1_hiddentwo_mc.addEventListener (MouseEvent.MOUSE_DOWN, ObjectFound);

    room1_hiddenthree_mc.addEventListener (MouseEvent.MOUSE_DOWN, ObjectFound);

    room1_hiddenfour_mc.addEventListener (MouseEvent.MOUSE_DOWN, ObjectFound);

    room1_hiddenfive_mc.addEventListener (MouseEvent.MOUSE_DOWN, ObjectFound);

    room1_hiddensix_mc.addEventListener (MouseEvent.MOUSE_DOWN, ObjectFound);

    Here's the function to allow the items to drag and drop

    function StartDragging (e:MouseEvent) {}

    e.currentTarget.startDrag ();

    }

    function StopDragging (e:MouseEvent) {}

    e.currentTarget.stopDrag ();

    }

    This shows that items can now be dragged and lowered some will reveal hidden items

    Bluechair.buttonMode = true;

    Bluechair.addEventListener (MouseEvent.MOUSE_DOWN, StartDragging);

    Bluechair.addEventListener (MouseEvent.MOUSE_UP, StopDragging);

    Pencilcase.buttonMode = true;

    Pencilcase.addEventListener (MouseEvent.MOUSE_DOWN, StartDragging);

    Pencilcase.addEventListener (MouseEvent.MOUSE_UP, StopDragging);

    Painting.buttonMode = true;

    Painting.addEventListener (MouseEvent.MOUSE_DOWN, StartDragging);

    Painting.addEventListener (MouseEvent.MOUSE_UP, StopDragging);

    Rubbish.buttonMode = true;

    Rubbish.addEventListener (MouseEvent.MOUSE_DOWN, StartDragging);

    Rubbish.addEventListener (MouseEvent.MOUSE_UP, StopDragging);

    Painting2.buttonMode = true;

    Painting2.addEventListener (MouseEvent.MOUSE_DOWN, StartDragging);

    Painting2.addEventListener (MouseEvent.MOUSE_UP, StopDragging);

    Trunk.buttonMode = true;

    Trunk.addEventListener (MouseEvent.MOUSE_DOWN, StartDragging);

    Trunk.addEventListener (MouseEvent.MOUSE_UP, StopDragging);

    Pillow.buttonMode = true;

    Pillow.addEventListener (MouseEvent.MOUSE_DOWN, StartDragging);

    Pillow.addEventListener (MouseEvent.MOUSE_UP, StopDragging);

    Click file > publishing settings > swf and check the box "enable debugging".  test.

    the number of problematic line will be in the error message that allows you to quickly identify the problematic reference which is probably room1_inventoryItem.  use the function trace to confirm:

    function ObjectFound(event:MouseEvent):void {}

    var room1_inventoryName:String = "room1_inventory" + event.target.name;

    trace (room1_inventoryName);

  • Need help with Error #1009

    Hello, I am working on a Flash game where you navigate in different rooms. Each room is located in a frame on the main timeline. I get an error message #1009 when I navigate to certain parts, but each image almost the same code, so I don't know why some executives encounter this problem while others are very well. When the error message that I am always directed to the 'room' I clicked on, but all the buttons in this room disappear and you are then stuck there and having to restart the project. I looked through other forums where people had this error message similar but I could not find a solution that could help me, so I apologize for the display of such a common problem! Here is a screenshot of the error message I get, which says:

    TypeError: Error #1009: cannot access a property or method of a null object reference.

    at project1_fla::MainTimeline/frame4() [project1_fla. MainTimeline::frame4:43]

    at flash.display::MovieClip/gotoAndStop()

    at project1_fla::MainTimeline/enterElevator3() [project1_fla. MainTimeline::frame12:25]

    errormessage.png

    Here are links to the screenshots of the debugging session where it points to the lines of code that contains the error and also screenshots of my code in these pictures:

    Frame error 4 part 1

    Frame error 4 part 2

    Frame error 12 part 1

    Frame error 12 part 2

    Code for chassis 4 part 1

    Code for chassis 4 part 2

    Code 4 room 3

    Code for chassis 4 part 4

    Code for frame 12 part 1

    Code for frame 12 part 2

    Frame 4 is labeled as 'elevator' and armature 12 is "medEntrance". I know that the problem is to jump from an image to the image, but I honestly have no idea what would be the error. I double checked all my code and it must be correct, and what makes it even more confusing, is that some rooms work perfectly while others have this problem and they all use the exact code, but with different names of MC! :/ Something I noticed is that the rooms which are most often linked to (for example that the lift can bind to three different "floors" or frames) are those who encounter this problem. But I chose this pair in particular because it contains the least amount of code I do not understand why have several frames, a link to a picture in particular would be a problem, but it's my first time using Flash and AS3 so I don't know any with its limits.

    Sorry for the overload of code and messy information! I thought it's better to provide too much information than too little and thanks for your help, it is much appreciated!

    rather than distributing your rooms in different key frames,

    Move them to separate the layers

    and use only the first image of each layer

    then do what amy suggested and is wirtie a document class that will have all your key code in

    or put all your code on the first frame of the first layer (separate layers where you have your rooms on)

    So, it becomes available for all your parts.

    To hide rooms you don't currently need put all the parts inside a table:

    var rooms: Array = [room1 room2... room100];

    then write a function

    function showRoom(_index:int):void {}

    for (var i: int = 0; i<>

    {if(i==_index)}

    rooms [i] .visible = true;

    }

    else {}

    rooms [i] .visible = false;

    }

    }

    }

    for example, when you move to the next room call sth. as

    showRoom (4);

    This will hide all parts in addition to the 5th

  • Flash help-trying to make movement buttons images (getting error 1009)

    Help! I am trying to create a portfolio site, and I want my photo strip to flow and then become buttons. I did the buttons, but once the tape stops I get this message.

    TypeError: Error #1009: cannot access a property or method of a null object reference.
    at portfolio_fla::MainTimeline/frame62()
    at flash.display::Sprite/constructChildren()
    at flash.display::Sprite()
    at flash.display::MovieClip()
    at flash.display::Sprite/constructChildren()
    at flash.display::Sprite()
    at flash.display::MovieClip()
    at flash.display::Sprite/constructChildren()
    at flash.display::Sprite()
    at flash.display::MovieClip()
    at flash.display::Sprite/constructChildren()
    at flash.display::Sprite()
    at flash.display::MovieClip()
    at flash.display::Sprite/constructChildren()
    at flash.display::Sprite()
    at flash.display::MovieClip()

    This is the code I have in the Panel actions

    Stop();

    LISTEN TO THE CLICK OF THE BUTTONS

    pics_mc.card_btn.addEventListener (MouseEvent.CLICK, cardClick);

    function cardClick(e:MouseEvent):void {}
    trace ("cardClick");

    }

    pics_mc.wine_btn.addEventListener (MouseEvent.CLICK, wineClick);

    function wineClick(e:MouseEvent):void {}
    trace ("wineClick");
    }

    pics_mc.edge_btn.addEventListener (MouseEvent.CLICK, edgeClick);

    function edgeClick(e:MouseEvent):void {}
    trace ("edgeClick");

    }

    pics_mc.group_btn.addEventListener (MouseEvent.CLICK, groupeCliquez here);

    function groupClick(e:MouseEvent):void {}
    trace ("groupClick");

    }

    pics_mc.romeo_btn.addEventListener (MouseEvent.CLICK, romeoClick);

    function romeoClick(e:MouseEvent):void {}
    trace ("romeoClick");

    }

    I am new to flash
    Thank you!

    1009 error indicates that one of the objects targeted by your code are out of reach.  This may mean that the object...
     
    n ' is not in the display list
    n ' is not have an instance name (or the name of the instance is misspelled)
    n ' is not in the frame where this code tries to talk to her
    -is animated in place, but is not assigned the name of the instances of each keyframe for her
    -is one of the two or more consecutive keyframes of the same objects without a name assigned in the image previous (s).
     
    If you go to your section to publish the Flash settings and select permit debugging option, your error message should have a suite of line number the number of the frame that will help you to isolate the object that is involved.

    Since you say that you move things in, I suspect the 4th listed element could relate to your problem, but it could be one of them.

  • Error 1009 in Action Script 3. Help!

    When I try to play my movie, I get

    "TypeError: Error #1009: cannot access a property or method of a null object reference.at RhettMovie_fla::MainTimeline/showsmokescene().

    The error appears when I click on each of the four buttons, which are supposed to start each playing a different symbol. Help!

    Here are my ActionScript:

    import flash.events.MouseEvent;

    show invisible characters

    birthdayscene.visible = false;

    dancescene. Visible = false;

    trippyscene.visible = false;

    smokescene. Visible = false;

    say both scenes to stop the animation

    birthdayscene. Stop();

    dancescene. Stop();

    trippyscene. Stop();

    smokescene. Stop();

    implement our buttons

    Btn1.addEventListener (MouseEvent.CLICK, showsmokescene);

    btn2.addEventListener (MouseEvent.CLICK, showdancescene);

    btn3.addEventListener (MouseEvent.CLICK, showtrippyscene);

    btn4.addEventListener (MouseEvent.CLICK, showbirthdayscene);

    orders to make things visible and invisible

    function showsmokescene(event:MouseEvent)

                {

    smokescene.visible = true;           

    smokescene.play ();

    dancescene.visible = false;

    dancescene.stop ();           

    trippyscene.visible = false;

    trippyscene.stop ();           

    birthdayscene.visible = false;

    birthdayscene.stop ();           

                }

    function showdancescene(event:MouseEvent)

                {

    dancescene.visible = true;

    dancescene.gotoAndPlay (1);

                           

    smokescene.visible = false;

    smokescene.stop ();

    trippyscene.visible = false;

    trippyscene.stop ();           

    birthdayscene.visible = false;

    birthdayscene.stop ();           

                }

    function showtrippyscene(event:MouseEvent)

                {

    trippyscene.visible = true;

    trippyscene.gotoAndPlay (1);

                           

    smokescene.visible = false;

    smokescene.stop ();

    dancescene.visible = false;

    dancescene.stop ();           

    birthdayscene.visible = false;

    birthdayscene.stop ();           

                }

    function showbirthdayscene(event:MouseEvent)

                {

    birthdayscene.visible = true;

    birthdayscene.gotoAndPlay (1);

                           

    smokescene.visible = false;

    smokescene.stop ();

    dancescene.visible = false;

    dancescene.stop ();           

    trippyscene.visible = false;

    trippyscene.stop ();           

                }

    Click file/publication settings and check "permit debugging".  Repeat the test.  Click on one of your buttons.  the number of problematic line will be in the error message.  This line contains a reference to an object that does not exist when your code runs.

  • Error 1009 and I do not know what to do exactly, please help me

    Hello

    I wish you could help me

    I am a beginner in actionscript 3.0, and I have a main SWF, with a menu and buttons, when I click on each button, a new swf must be loaded and the menu is resized and goes to the upper-left corner of the page, and if I click on the menu, he should be back...

    the problem is that when I click on the first button, everything works fine, but when I click on another button, I get this error:

    TypeError: Error #1009: cannot access a property or method of an object reference zero.
    at s_fla::MainTimeline/s_fla::__setProp___id0__Scene1_texte_2()
    at s_fla::MainTimeline/s_fla::frame2()

    I realized that the problem is the file that will be displayed before it was loaded.

    I also found that I have to use the event. ADDED_TO_STAGE, but I don't know where to put it?

    could you help me please?

    Here is my code:

    function size(e:MouseEvent):void {}
    menu_mc.gotoAndPlay (2);

    menu_mc.buttonMode = true;
    menui_mc.addEventListener (MouseEvent.CLICK, showmenu);

    menu_mc.button01_btn. RemoveEventListener (MouseEvent.CLICK, size);

    menu_mc.button02_btn. RemoveEventListener (MouseEvent.CLICK, size);

    menu_mc.button03_btn. RemoveEventListener (MouseEvent.CLICK, size);

    addChild (cliploader);

    }

    function size(e:MouseEvent):void {}
    menu_anatomie_mc.gotoAndPlay (13).

    menu_mc. RemoveEventListener (MouseEvent.CLICK, showmenu);
    menu_mc.button01_btn.addEventListener (MouseEvent.CLICK, size);

    menu_mc.button02_btn.addEventListener (MouseEvent.CLICK, size);

    menu_mc.button03_btn.addEventListener (MouseEvent.CLICK, size);

    removeChild (cliploader);


    }

    menu_mc.button01_btn.addEventListener (MouseEvent.CLICK, loadpage);

    menu_mc.button02_btn.addEventListener (MouseEvent.CLICK, loadpage);

    menu_mc.button03_btn.addEventListener (MouseEvent.CLICK, loadpage);


    menu_mc.button01_btn.page = "file01.swf";

    menu_mc.button02_btn.page = "file02.swf";

    menu_mc.button03_btn.page = "file03.swf";


    function loadpage(e:MouseEvent):void {}

    cliploader.myldr.source = e.currentTarget.page;


    }

    Please tell me what to do exactly

    PS: cliploader is an IU charger which is present on the scene

    in my swf files, I FLVPlayback instance that loads an flv file, and I think that it is the source of the problem, because I tried the same thing with a simple swf file that may load quickly, and I do not have this error

    Thanks in advance

    You can be more certain where the error comes from the if you go into your publication settings and select the option to enable debugging.  When the error message appears the next time it should include the line number for the problemed code.

    For the code, show you that you should have more problems due to using the same name of function for different functions.  You can't do that.

  • TypeError: Error #1009? New to the use of AS3, please help!

    Hi, I'm doing a site in flash, and so far everything went perfectly well so far.
    I've done a few buttons using MovieClips and then animate it with some actionscript 3. from what I can tell there is nothing wrong with the code itself, the problem is with the clips or symbols or something...? what I need help!


    Here is the code for one of the buttons (I use the same code for each button only change the name of the instance):

    function btn1Over(event:MouseEvent):void {}

    btn1.gotoAndPlay ("Over");

    }

    function btn1Down(event:MouseEvent):void {}

    btn1.gotoAndPlay ("Down");

    }

    function btn1Out(event:MouseEvent):void {}

    btn1.gotoAndPlay ("Out");

    }

    Btn1.addEventListener (MouseEvent.ROLL_OVER, btn1Over);

    Btn1.addEventListener (MouseEvent.ROLL_OUT, btn1Out);

    Btn1.addEventListener (MouseEvent.CLICK, btn1Down);

    And here is the error message:

    TypeError: Error #1009: Cannot access a property or method of a null object reference.

    to openingscene_fla::MainTimeline/frame107()

    at flash.display::Sprite/constructChildren()

    at flash.display::Sprite()

    at flash.display::MovieClip()

    to openingscene_fla::home5_38()

    at flash.display::Sprite/constructChildren()

    at flash.display::Sprite()

    at flash.display::MovieClip()

    to openingscene_fla::cartoon2_33()

    at flash.display::Sprite/constructChildren()

    at flash.display::Sprite()

    at flash.display::MovieClip()

    to openingscene_fla::about1_28()

    at flash.display::Sprite/constructChildren()

    at flash.display::Sprite()

    at flash.display::MovieClip()

    to openingscene_fla::contact3_23()

    at flash.display::Sprite/constructChildren()

    at flash.display::Sprite()

    at flash.display::MovieClip()

    at openingscene_fla::donate4_18()

    donate4, about1, housecalls.5, contact3, cartoon2 is the buttons I use the YOU for. But what is the problem with him, I do not understand what meens sprite / cunstructChildren () for example?

    Please help me!

    If you show you get the error message, then it would be possible to help you find the problem.  If you do not, you already said enough you should be able to fix the problem yourself, but it is difficult to say if you understand what you are being told.

  • Error #1009 in my platform game! Help, please!

    My game of base platform that I have a "hero" who can walk and jump on the 'ground '. There is also a door to the next scene, which is the next level. The first scene works very well, but "TypeError: Error #1006: value is not a function." to Charles3_fla::MainTimeline/frame1()"appears once in the output. This works however, and I'm not worried about it. The second, I'm going through the door but, scene 2 opens, and then starts flashing as "TypeError: Error #1009: cannot access a property or method of a null object reference." to Charles3_fla::MainTimeline/onenter()"appears a LOT in the output. I don't know how to solve this problem and I would like to help. P.S. I use Adobe CS5 with actionscript 3

    Here is the code for stage 1:

    hero.gotoAndStop ('still');

    var key: KeyObject = new KeyObject (internship);

    var vy:Number = 0;

    var gravity: number = 2;

    var jumped: Boolean = false;

    stage.addEventListener (Event.ENTER_FRAME, onenter) (true);

    function onenter(e:Event):void {}

    Vy += gravity;

    If (! ground.hitTestPoint (hero.x, hero.y, true)) {}
    Hero.y + vy;
    }
    If(ground.hitTestPoint(hero.x+(hero.width/2), hero.y-(hero.height/2), true)) {}
    Hero.x-= 13;
    }
    If(ground.hitTestPoint(hero.x-(hero.width/2), hero.y-(hero.height/2), true)) {}
    Hero.x += 13;
    }

    If (vy > 10) {}
    Vy = 10;
    }
    for (var i: int = 0; i < 10; i ++) {}
    If (ground.hitTestPoint (hero.x, hero.y, true)) {}
    Hero.y-;
    Vy = 6;
    jumped = true;
    }
    }
    {if (Door.hitTestObject (Hero))}
    gotoAndPlay (1, "scene 2");
    }
    if(Hero.y>300) {}

    Vy = 6;
    jumped = true;

    }

    If (Key.isDown (Key.up) & & jumped) {}

    Vy = - 13;
    jumping = false;

    }

    Hero.y += vy;

    {if (Key.isDown (Key.Right))}
    Hero.x += 10;
    hero.scaleX = 1;
    hero.gotoAndStop ('walking');
    } else {if (Key.isDown (Key.LEFT))
    Hero.x-= 10;
    hero.scaleX =-1;
    hero.gotoAndStop ('walking');
    } else {}
    hero.gotoAndStop ('still');

    }

    }

    And for scene 2...

    hero.gotoAndStop ('still');

    var Key1:KeyObject = KeyObject (internship);

    var vy1:Number = 0;

    var gravity1:Number = 2;

    var jumped1:Boolean = false;

    stage.addEventListener (Event.ENTER_FRAME, onenter1) (true);

    function onenter1(e:Event):void {}

    VY1 += gravity;

    If (! ground.hitTestPoint (hero.x, hero.y, true)) {}
    Hero.y + vy;
    }
    If(ground.hitTestPoint(hero.x+(hero.width/2), hero.y-(hero.height/2), true)) {}
    Hero.x-= 13;
    }
    If(ground.hitTestPoint(hero.x-(hero.width/2), hero.y-(hero.height/2), true)) {}
    Hero.x += 13;
    }

    If (vy1 > 10) {}
    VY1 = 10;
    }
    for (var i: int = 0; i < 10; i ++) {}
    If (ground.hitTestPoint (hero.x, hero.y, true)) {}
    Hero.y-;
    VY1 = 6;
    jumped1 = true;
    }
    }
    {if (Door.hitTestObject (Hero))}
    gotoAndPlay (1, "scene 2");
    }
    if(Hero.y>300) {}

    VY1 = 6;
    jumped1 = true;

    }

    If (Key.isDown (Key.up) & & jumped1) {}

    VY1 = - 13;
    jumped1 = false;

    }

    Hero.y += vy;

    {if (Key.isDown (Key.Right))}
    Hero.x += 10;
    hero.scaleX = 1;
    hero.gotoAndStop ('walking');
    } else {if (Key.isDown (Key.LEFT))
    Hero.x-= 10;
    hero.scaleX =-1;
    hero.gotoAndStop ('walking');
    } else {}
    hero.gotoAndStop ('still');

    }

    }

    Please answer as soon as possible and thank you for your time

    swiatekalex555

    the idea was to stop your main timeline to move forward because it was a problem that you mentioned in a previous message.

    Anyway, this thread has answered a long time ago and is now unrelated to error # 1009.  Please mark this thread as answered and start a new thread.

  • Adobe Muse CC error 1009. Need help!

    Whenever I try to move an object in Muse I get this error. I've been placing images and working with anchors, try to space out a page. What can I do to fix this?

    Adobe Muse CC has encountered an error and will now close. Please report the last actions bit that you have taken to this error to the Adobe Muse CC team.

    [NDMI/nativeDragEventHandler] TypeError: InterneErreur: Error #1009: cannot access a property or method of a null object reference.

    OSX Drag Manager is in poor condition. Only one sure way to reset is to restart your computer.

  • TypeError: Error #1009 - need help

    Hello

    I'm working on a school project, which means that I am still fairly new to AS3.

    I receive the error 1009 which seems to point to the section of the problematic "theory." I checked my instance names & label many times everything seems fine. What else can it be?

    ----------

    TypeError: Error #1009: cannot access a property or method of a null object reference.
    at Untitled_fla::MainTimeline/frame70()

    ----------

    Buttons fade during the 5 images... so they are onstage but invisible from frame 65 and 70 frame, they are in the same spot and completely visible and supposed to be functional.

    I have the actionscript code on a layer separately on the frame of 70, that's what I -.

    ----------

    Stop();

    theory_btn.addEventListener (MouseEvent.Click, playtheory);

    function playtheory(event:MouseEvent):void {}
    gotoAndPlay ("theory");
    }

    history_btn.addEventListener (MouseEvent.Click, playhistory);

    function playhistory(event:MouseEvent):void {}
    gotoAndPlay ("history");
    }

    future_btn.addEventListener (MouseEvent.Click, playfuture);

    function playfuture(event:MouseEvent):void {}
    gotoAndPlay ("future");
    }

    credits_btn.addEventListener (MouseEvent.Click, playcredits);

    function playcredits(event:MouseEvent):void {}
    gotoAndPlay ("credits");
    }

    ----------

    I checked all my mulitple times - all label names and instances are correct and in their own place... Unless it's a mistake obvious mindblowingly and I'm simply not catch.

    I want to download my .fla, but it's too big of a file. I'll happily send it if someone is willing to take a look.

    I could be wrong, but to the original problem, I'm guessing that what follows from what I listed was the problem...

    -is animated in place, but is not assigned the name of the instances of each keyframe for her

    You said 70 frame is where alpha = 1, which has me thinking of you the animated view, but doesn't have their name in the first image (s).  That the absence of a name will get inherited to the other end of the Tween.

    For your new problem, if your home page is on frame of 75, and your code for the home button is on frame 76, you have to stop at frame 76 for the code must be assigned, otherwise, go to another frame it will leave without that code is assigned to the home button.

    What you can do, is have the button home and its code in the frame of 75, but make it invisible it and turn it in your function else for the other buttons, visible.

    I tried to show the code, but the editor is playing games and deletion of stuff about me that I add.

  • TypeError: Error #1009 generation stars on stage please help!

    Hey,.

    var arrayLAL:Array = new Array();

    arrayLAL.push (star);

    for (var a: uint = 0; has < 5; a ++) {}

    var Star: Star = new Star();

    star.x = 150

    star.y = stage.stageHeight * Math.Random ();

    addChild (star);

    trace (arrayLAL.length)

    stage.addEventListener (MouseEvent.MOUSE_MOVE, lalBlocksMove);

    }

    function lalBlocksMove(evt:MouseEvent)

    {

    addEventListener (Event.ENTER_FRAME, lalBlocksCollision);

    }

    function lalBlocksCollision(event:Event)

    {

    for (var a: uint = 0; has < arrayLAL.length; a ++)

    {

    if (arrayLAL [a] .hitTestPoint (mouseX, mouseY, true))

    {

    this.removeChild (star);

    }

    }

    }

    This is the code that im using and this is the error I get:

    TypeError: Error #1009: cannot access a property or method of a null object reference.

    to Star_fla::MainTimeline/lalBlocksCollision()

    Im trying to auto generate a number of stars on the stage and then put each in a table and then delete a text hit... previously I created sumthing very similar except that I had to manually push each of the objects in the table, while hoping that it may work as well, coz I have a lot of objects in the last verious: S

    also im not rly sure if this is possible, but I want to 'auto' align you stars so they are not above the knees but rather arragne around the screen evenly as in the lines and coloms... is this possible? or am I to hopeful?

    thx for advice, assistance or suggestions... all is much appreciated

    Pavel

    Pass the grid (rectangle) to the function.  I gave an example of the use of the entire scene for the grid.

  • TypeError: Error #1009 with hit test, please help

    -The actions and events-

    stage.addEventListener (MouseEvent.MOUSE_MOVE, charMove);

    function charMove(evt:MouseEvent)

    {

    addEventListener (Event.ENTER_FRAME, checkcharCollision);

    }

    function checkcharCollision(event:Event)

    {

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

    {

    if (char [i] .hitTestObject (cur))

    {

    char.splice (i, 1);

    lalLChannel = lalL.play ();

    lalL_transform.volume = 1;

    lalLChannel.soundTransform = lalL_transform;

    lalBtn.gotoAndStop ("ful");

    lalLChannel.addEventListener (Event.SOUND_COMPLETE, lalLComplete);

    }

    }

    }

    and it gives me this error as soon as I move the mouse:
    TypeError: Error #1009: cannot access a property or method of a null object reference.
    to INDEX_fla::MainTimeline/checkcharCollision()
    NY ideas?
    THX pavel

    for (var i: uint = 0; i<----  >

  • Help error 1009. Access to a property.

    Hello

    I get the error 1009 th. I know what it is, and I know where is the problem. I try to access a property of another framework, which means that the flash cannot find the dynamic text (VF1), I am trying to access to, as it is located on the chassis of the 3rd (I'm putting a value on it as soon as the 2nd). But this isn't the problem.

    I wanted to know if there is a way to access this property by specifying its location, something like:

    Scene1.frame3. VF1.text =' ';

    Any way to do can be really useful.

    Thank you

    jsmrcaga

    Nope.  Either the code goes where grows the object or the object will where the code exists.

  • TypeError: Error #1009... PLEASE HELP ME

    I'm new to using AS3, FLASH CS4...

    my output is:

    TypeError: Error #1009: cannot access a property or method of a null object reference.
    at dbarkadz_fla::MainTimeline/frame1()

    the code is who has a problem:


    function button6_clicked(event:MouseEvent):void {}
    gotoAndPlay ("page6")
    }

    Button6.addEventListener (MouseEvent.CLICK, button6_clicked);

    How can I solve this?

    my entire code is:

    Stop();

    function button1_clicked(e:MouseEvent):void {}
    gotoAndStop ("page1");
    }

    function button2_clicked(e:MouseEvent):void {}
    gotoAndStop ("page2");
    }

    function button3_clicked(e:MouseEvent):void {}
    gotoAndStop ("page3");
    }

    function button4_clicked(e:MouseEvent):void {}
    gotoAndStop ("page4");
    }

    function button5_clicked(e:MouseEvent):void {}
    gotoAndStop ("5");
    }

    function button6_clicked(event:MouseEvent):void {}
    gotoAndPlay ("7")
    }

    Button1.addEventListener (MouseEvent.CLICK, button1_clicked);
    Button2.addEventListener (MouseEvent.CLICK, button2_clicked);
    Button3.addEventListener (MouseEvent.CLICK, button3_clicked);
    Button4.addEventListener (MouseEvent.CLICK, button4_clicked);
    Button5.addEventListener (MouseEvent.CLICK, button5_clicked);
    Button6.addEventListener (MouseEvent.CLICK, button6_clicked);


    function playMusic(e:MouseEvent):void {}
    var myMusic:Sound = new Sound();
    var soundFile:URLRequest = new URLRequest ("music1.mp3");
    myMusic.load (soundFile);
    myMusic.play ();
    }

    Opps I did not see this >

    ... key 6 is frame 2-6...

    the code resides in the image 1...

    You're code is on frame 1 and trying to access button6 who only begins to exist within the Framework 2. It is not possible. Put on your frame 1 button or put your code to add the listener to button6 on frame 2.

Maybe you are looking for

  • Smartphones blackBerry curve 9320: lost 'access point option.

    Hello! First sorry for my bad English... I am from france, a there is no support for blackberry here. Yesterday, I configured my 9320 curve to use as a wifi access point. He made the word perfectly until this morning. As stated in the user manual, it

  • How can I temporarily disable the HP Support Assistant?

    I have a laptop HP g6z with Win7 Pro (64-bit).  I often use the command line, but when I press F1 to retype the characters from the previous command, the HP Support Assistant appears. I don't want to remove the Support Assistant, simply disable it te

  • Help with ProRes

    Greetings,I work on the Windows side and usually export to mp4 or mpg. I need to export format ProRes 422 HQ for a distribution requirement. Now my company has Macs so I imported my usual mpg file on a Mac so I could encode a file ProRes 422 HQ. Afte

  • Slow logons - Windows 8.1

    HelloI am experiencing very slow connections. I use persona and immidio flex management. The user has only a very low profile, event viewer I see which is dealt with in 10 seconds, but the connection takes 40 seconds.Any ideas?

  • Configuration raid/scsi HP Proliant ML370

    I bought a used hp proliant ml370 g3 tour with x 3 scsi drives installed. I can't find the scsi/raid anywhere in the startup configuration - for example, press F7 to the raid configuration All readers have already disappeared, and there is no raid co