I am trying to load an image in Flex (AS3) which already exists:
<mx:Image id="Img"/>
With this code:
Img.load('http://www.path.com/image.jpg');
The path is verified to work, but I always get this error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
I used the code from the documentation and still receive this error!
With your answer of the image being on a hidden child of a viewstack, that changes the nature of your problem from other peoples point of view. You can actually access items on the children of that viewstack without making them visible by changing the creationPolicy of the viewstack to “all”.