Both are relatively cheap actually. It is mainly audio, bitmaps and video that are the main filesize consumers.
Flash will not crash if you have a lot of code. But you may miss your frame rendering time budget and have to drop frames. You will have to keep track of how long each frame takes to process and try to keep that within the budget.
Signature: I wrote a pair of articles about the timeline