Sorry if the title is unclear - not sure how to phrase it. Feel free to edit it.
I have a web service written in C# and it uses an enum. When I am consuming this webservice with Flash, I had Flex generate the proxy classes - which also generates said enum in Actionscript. My problem is that I don't know how to use this generated Actionscript.
C# enum:
public enum ImageType
{
None = 0,
Png = 1,
Jpg = 2,
Gif = 3
}
Actionscript generated proxy class (cant change this):
public class ImageType
{
public function ImageType() {}
[Inspectable(category="Generated values", eumeration="None,Png,Jpg,Gif", type="String")]
public var _ImageType:String;public function toString():String
{
return _ImageType.toString();
}
}
Actionscript usage example (ie. this is how it should work in my brain):
var imgType:ImageType = ImageType.Png; //this does not actually work though
NOTE: Code is example only, but the structure is the same.
How would I go about using this ImageType enum in Actionscript?