To properly save a class, it is important to duplicate the package hierachy in folders on your computer. Using an example from Flash intrinsic classes, class Point in package flash.geom

package flash.geom {
public class Point

requires this folder structure:

|- flash (folder)
|- geom (folder)
|- Point.as (file)

where geom is a folder inside flash, and flash is inside a folder designated for shared classes or inside the folder associated with the current project. The name of the package file is the name of the class plus ".as".

If you want to save to a folder associated with the current project, before creating the package file, use File > Save As to establish the project folder. Also, the folder structure needs to be created before saving the package file or else an error message will say that the folder can't be found.

Root paths for shared classes are defined in File > Action Script Classes > Root Paths for Classes.