How do I "include" with as3.0?

I’ve just jumped from as2 to as3 and it’s quite depressing to see I have lots to do to fix everything to work.

I have an as file containing loads of functions and commands and I used to link it to the flash file with #include in a frame. That obviously don’t work anymore.
I tried to search and read about this and find myself puzzled with the class and package.
So to replace the include, do I just write the frame:
import myPackage.myCode;

and wrap my code inside:
*package myPackage{
public class myCode {

code here...


Or how will I do the same thing I used to in as2?

I tested the example of the help file.
In te as file i wrote:

package samples
public class SampleCode
public var sampleGreeting:String;
public function sampleFunction()
trace(sampleGreeting + " from sampleFunction()");

and in the main timeline I tried both:

import samples.;
import samples.SampleCode;*

Both gave error:
1172: Definition samples could not be found.
1172: Definition samples:SampleCode could not be found.

And I had one component button in the maintimeline (left from previous test) and when testing movie it flickered showing all the buttons states below each other??? :hangover: