How to use paint bucket tool to fill/color concretely space in picture

I am beginner in flash and I started to learn flash c4 (with video lessons in my language but from flash 8! but it is not problem now about drawing than only about code in actionscript).
I have now problem in using of Paint Bucket Tool in flash cs4.
I made a ship, I made a whole document/white page for drawing in rectangle tool (frame for picture), and I made to lines which will be like a hill. it is for background, behind the ship. but when I want to color this background, to be green for example, my Pain Bucket Tool don’t want to color ONLY place behind the ship and under mentioned “hill lines”, than Paint Tool color whole document. therefore I can’t make a hill because I get everything colored in green.
I tried all option about closing of gaps. nothing helped.
how can I color only wanted places in picture and not whole picture? “hill” is not strait line so I don’t know how to select hill space.
of course, after it I will have to repeat process to color space above “hill lines”, it will be blue like sky.
and just to say that “2 hill lines” are from left to right side of document, there is no hole, it is closed line.