AS3 code not working if i add a scene before the as3 code scene

Hi,

I have an Actionscript coded flash file which run perfectly without any error.

I am not getting why it shows an error after i do insert a scene before or a frame before the current frames;

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at myFile_fla::MainTimeline/frame2()
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()
at myFile_fla::images_mc_1()

I am moving all frames along with actionscript to next frame as i want add preloader to it.

can anyone specify the reason?

Thank you.