One of my favorite things in a programming language is the ability to create my own datatype with ENUM. Flash doesn't contain ENUM's but you can definitely spoof it
Code:
class ThumbMode {
// Blank Constructor, we are just using this as Enum
private function ThumbMode() {}
public static var HORIZONTAL_NAV:Number = 0;
public static var VERTICAL_NAV:Number = 1;
public static var SUB_NAV:Number = 2;
public static var DROPDOWN:Number = 3;
} in your application attach your thumbnail from the library and pass it the ThumbMode
Code:
_root.attachMovie("LibraryLinkageName","NewInstanceName",this.getNextHighestDepth(), {_x:100,_y:100,_mode:HORIZONTAL_NAV}); Now in your class you can compare against the enum vs. having to know state integers.
Code:
private var _mode:ThumbMode;
if(_mode == ThumbMode.SUB_NAV) { do this or do that } The real beauty is if you use Flex Builder or FlashDevelop - intellisense picks up your possible Enum types and you can select your mode from a drop-down list
