How to use classes

I have a class “name1.name2.name3.classname” defined in #initclip #endinitclip which is exported as __Packages.name1.name2.name3.classname with ‘Export for ActionScript’ and 'Export in First frame’option. The class contains functions to transdorm images coming from external source.But when I try to do something like this in the main timeline first framescript

var imgObj = new name1.name2.name3.classname();

the Obj doesnot get created. I have the class in the movieclips first frame. Do I need to create a classname.as file in the path mentioned in the class and remove it from the first frame of the clip.

where name1/name2/name3 are path folders