0
通过从库中通过链接放置多个MovieClip实例,是否有人知道如何将hitTestObject应用于这些实例?如何在动态放置在舞台上的多个实例上使用hitTestObject? (AS3)
我在AS3中创建了一个pacman风格的Flash游戏。如果有人知道一个好的教程可能会有所帮助,请随时告诉我。
通过从库中通过链接放置多个MovieClip实例,是否有人知道如何将hitTestObject应用于这些实例?如何在动态放置在舞台上的多个实例上使用hitTestObject? (AS3)
我在AS3中创建了一个pacman风格的Flash游戏。如果有人知道一个好的教程可能会有所帮助,请随时告诉我。
您可以使用这些功能
hitTestObject(obj:DisplayObject):Boolean
Evaluates the display object to see if it overlaps or intersects with the obj display object.
hitTestPoint(x:Number, y:Number, shapeFlag:Boolean = false):Boolean
Evaluates the display object to see if it overlaps or intersects with the point specified by the x and y parameters.
http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/display/DisplayObject.html