Preloader Tutorial Question

Hey Guys,

Based on this tutorial:

http://www.kirupa.com/developer/flashcs3/preloader_as3_pg1.htm

I’m trying to incorporate this into an older Flash piece, where the preloader works by starting on frame 1, then advancing to frame 2 once preloaded and complete. Given the above tutorial, what’s the best way to do this?

Simply adding a “gotoAndPlay(2)” in the imageLoaded function once all is said and done is throwing an error:

"
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at loadimage_preloader_fla::MainTimeline/imageLoading()
"

Any suggestions would be appreciated.

Thanks.