Extensions Test Backdrop Get

object[] class.testBackdropGet ( [number layer] )

Returns a list of all objects that are a member of the object class and currently overlapping a backdrop obstacle.

If a layer is specified, the test is limited to that layer.  By default, layer is equal to mmf.ANY_LAYER.

Parameters

layer Optional.  1-based layer index, or constants mmf.ANY_LAYER, mmf.SAME_LAYER, or mmf.DIFF_LAYER 

Return Values

object[] A list of objects matching the test.

Example

-- Assume we have "Laser" objects on the frame
local laserClass = mmf.newObjectClass("Laser")
 
-- If a laser touches the backdrop, the laser is destroyed
local matches = laserClass.testBackdropGet()
for k,laser in pairs(matches) do
  laser:destroy()
end


See also:
     Test Backdrop

Copyright 2010 Justin Aquadro