Click to See Complete Forum and Search --> : Null Property Error when trying to connect to MovieClip from Class


william232
06-27-2010, 09:56 PM
Hi all,

Ive been working on a project at the momment and ive been having an issue with accessing a MovieClip that has been created in another file called fileA and i want to access it from fileB the only Problem is that FileB Doesnt know it exists in FileA and it returns back this error


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


Code below is in fileA

public var ChangeControlMc:MovieClip = new control();//This one is defined in FileA

My Code for FileB is as Follows


public var ChangeControlM:AntarcticaGame // this is Defined in fileB
trace("test level 1");
trace("called after super save()" + ChangeControlM);
trace("the movieClip" + ChangeControlM.ChangeControlMc);
trace("cehcking next part" + ChangeControlM.ChangeControlMc.cleft);
trace("checking the text of cleft" + ChangeControlM.ChangeControlMc.cleft.text);


Why does the code in FileB Give me a Null Property Error?

Can Anyone Help me? Thanks,William