I am working on processing images that the user selects. A FileReferenceList is passed to a function in a separate class. The selected image(s) are then placed into Image controls. After setting other parameters, I have this line:
This always works, but of course it is of poor quality since I am scaling the image down to a 200-pixel thumbnail. So, I want to run it through a resizing processor and update the image source. To do that, I use this line:
This results in an Error #1009: Cannot access a property or method of a null object reference. When I check the variables pane in the debugger during the processImage listener function, it shows that the event.currentTarget.content and event.currentTarget.data are both null.
Can anyone explain to me why these properties are still null after CREATION_COMPLETE is fired? Especially since I can see the selected file in the Image control?
Interestingly, if I change the triggering event to UPDATE_COMPLETE, the 1009 error appears a few times then it goes ahead and runs the image processor.... and runs and runs and runs.
edit/update: I put a "removeEventListener" command into the listener function so it only runs once now. At least that part was easy, still trying to understand the original issue.