Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
ADOBE FLASH: HomeFlash ForumFlash TutorialsFlash Video TutorialsWeb Streaming ForumAdobe FlashPodcast

error 1009 cannot access a property or method of a null object reference."

Cow Forums : Adobe Flash

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>
error 1009 cannot access a property or method of a null object reference."
by Muthukumaran Gomathinayagam on Sep 24, 2009 at 12:49:12 pm

sir,
I get a as3 error, when i load a package into another fla file .Hope you will be able to help me"error 1009 cannot access a property or method of a null object reference."
here is my package and flash file
Package:"helloworld.as"
package
{
import flash.display.Sprite;
import flash.display.Stage;
import flash.display.Loader;
import flash.events.MouseEvent;
import flash.events.TimerEvent;
import flash.events.KeyboardEvent;
import flash.utils.Timer;
import flash.text.*;
import flash.events.*;
import flash.display.MovieClip;
import flash.net.*;


public class helloworld extends MovieClip
{
var mary:mary_up=new mary_up();

public function helloworld()
{

stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
stage.addEventListener(KeyboardEvent.KEY_UP, keyUpHandler);

mary.x=615;
mary.y=256;
mary.width=130;
mary.height=280;
mary.stop();

}
function keyDownHandler (e:KeyboardEvent):void {

switch(e.keyCode)
{
case 37:

mary.gotoAndStop(28);

break;
case 38:

mary.gotoAndStop(21);
break;
case 39:

mary.gotoAndStop(14);

break;

case 40:

mary.gotoAndStop(7);

break;
default:
mary.gotoAndStop(1);
trace('de'+mary.width);
break;

}
}
function keyUpHandler (e:KeyboardEvent):void {

mary.gotoAndStop(1);
}

}

}

My Fla file:

var loader:Loader=new Loader();
loader.x=250;
loader.y=60;

loader.load(new URLRequest("helloworld.swf"));
addChild(loader);

Thanks

Respond to this post   •   Return to posts index

Re: error 1009 cannot access a property or method of a null object reference."
by mary vaughan on Sep 27, 2009 at 2:48:21 am

can you please help me with errer1009.i cant play certain games .i ve tried everythibg to get rid of the errer

Respond to this post   •   Return to posts index

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>


FORUMSTUTORIALSMAGAZINETRAININGVIDEOS - REELSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

© CreativeCOW.net All rights are reserved.

[Top]