Extensions Display Traits

Display Traits correspond to the Order and Visibility action menus, and Collisions and Visibility expression menus exposed by many objects, including the Active Objects.  These additionally expose Active Object's Scale / Angle action menu.  The MMFI is able to determine at runtime without additional help whether an object supports these traits, and will expose the corresponding fields and methods if it does.

Display Fields

These fields can be read from or written to directly

number angle Object's rotational angle, may be integer or float depending on runtime
boolean edgeAA Whether or not an object's edges are antialiased with the frame
number inkCoef Coeficient used for some ink effects, e.g. semitransparency
number inkEffect Object's current ink effect
boolean rotationAA Whether or not antialiasing is enabled for rotation
boolean scaleAA Whether or not antialiasing is enabled for scaling
number scaleX Object's scaling factor on the X axis
number scaleY

Object's scaling factor on the Y axis

boolean transparent Whether or not an object's background is transparent
boolean visible

Whether or not an object is visible in the frame

Display Fields (Read-Only)

These fields can be accessed, but not updated.

number zorder Object's Z ordering index

Display Methods

These methods may be called by objects with display traits.  They are protected, so they cannot be overwritten.  The colon operator, which is used by most Lua object tables, is optional here.  Click on each function for more information.

boolean isAbove()
boolean isBelow()
void moveAbove()
void moveBelow()
void moveToBack()
void moveToFront()
void swapOrder()
boolean testBackdrop()
boolean testClass()
boolean testObject()
boolean testPoint()
boolean testRect()


See also:
     Object API, Common Traits, Movement Traits, Animation Traits, Value Traits

Copyright 2010 Justin Aquadro