Hi Guys.
i have a code that gives me error “#1009: Cannot access a property or method of a null object reference.”
I have a feeling i get this error because when i want to create a new variable the old variable hasent loaded yet, but i do not know how to check this.
My code look like this.
import treedbox;
var treed:treedbox = new treedbox();
addChild(treed);
Is there a way to put a preeloader on import treedbox and after its completed add the rest?
Why i think this is the case is because if i put the treedbox.as as a class under the document property and remove the code from the timeline it works fine.
treedbox is a 3d view that adds a cube if this make anything different.
Best regards
Dimicus