Cut your application into separate clips.
The main clip does not need to have graphical content, or maybe a background.
This clip contains all the code and only one frame.
Now you can load, or include as many clips you like.
Clips, containing scripts, especialy funktions etc. should not move frames.
If you leave the frame, where the funktion is defined, you are losing the reference.
If you return to this frame, you wil reinitialize all object beeing defined there.
This is usualy not the behaviour, you want to have.