Select to view content in your preferred language

custom classes

660
3
09-21-2010 02:49 PM
DavidElies
Deactivated User
Could anyone help me figure out how to use a custom class in my application?  I'm sorry if this sounds like a silly question, but I've created the class, and added an import and namespace declaration into my application.  FlexBuilder even provides auto-complete and other features for my class, but I get an error message if I try to build.  I get the message:

1046: Type was not found or was not a compile-time constant

Thanks!
Tags (2)
0 Kudos
3 Replies
Drew
by
Frequent Contributor
It sounds like you have done everything correct. A sample would be better to ensure your syntax is right...
Here is a sample if my class was called "PropertySearch"

var search:PropertySearch = new PropertySearch();
var address:String = search.GetAddress(pid);


Drew
0 Kudos
DasaPaddock
Esri Regular Contributor
0 Kudos
DavidElies
Deactivated User
Thank you both very much.  The example put me on the right track.  It was a really silly thing.  I put the .as file in the wrong folder (it didn't match the package).  Thanks again!
0 Kudos