Extensions Move Object Below

void object.moveBelow ( table object2 )

Changes an object's Z ordering so that it is below another object.  If it is already below 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.moveBelow(object2)
assert(object1.isBelow(object2))

Copyright 2010 Justin Aquadro