Extensions Move Object Above

void object.moveAbove ( table object2 )

Changes an object's Z ordering so that it is above another object.  If it is already above that object, its Z ordering will not change.

Parameters

object2 The object table of another object to test against

Return Values

None.

Example

-- Assume we have a table of objects indexed by ID
object1 = mmf.objects[1]
object2 = mmf.objects[2]
 
-- Our assertion should never fail
object1.moveAbove(object2)
assert(object1.isAbove(object2))

Copyright 2010 Justin Aquadro