PDA

View Full Version : error when loading 6 children but not 5.



oluc
October 21st, 2009, 11:30 PM
Thanks for looking at my post!

Do you know of why it would be that I can only load 5 assets from the library and not 6?

I have a main class in which I load a StageElements class. the StageElements class has the 6 objects. when I take out one of the objects it loads fine. but I put it back and it tells me:



TypeError: Error #1009: Cannot access a property or method of a null object reference.
at asFiles.projectOne: :StageElements/loadBackground()
at asFiles.projectOne: :StageElements()
at asFiles.projectOne: :ProjectOne/loadStageElements()
at asFiles.projectOne: :ProjectOne()


when addChild for 5 different objects they load fine onto the stage when I publish. but then I add a 6th object and it tells me that error. this has been driving me bonkers all day! :(

any help much much appreciated!!!

PS: each of the children work because they all work independently.

Shaedo
October 22nd, 2009, 03:14 AM
please post the code that is causing this problem.

oluc
October 22nd, 2009, 01:03 PM
NVM

Pls see my other post the StageClass will work on its own but not if initiated through another the main class.

http://www.kirupa.com/forum/showthread.php?p=2510755#post2510755