【问题标题】:How to use hitTestObject on multiple instances dynamically placed on the stage? (AS3)如何在舞台上动态放置的多个实例上使用 hitTestObject? (AS3)
【发布时间】:2010-09-14 22:47:51
【问题描述】:

通过库中的链接放置多个 MovieClip 实例,有人知道如何在这些实例上应用 hitTestObject 吗?

我正在 AS3 中创建一个吃豆人风格的 Flash 游戏。如果有人知道可能有用的好教程,请随时告诉我。

【问题讨论】:

    标签: flash hittest


    【解决方案1】:

    你可以使用这些功能

    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

    【讨论】:

      猜你喜欢
      • 2014-01-04
      • 1970-01-01
      • 1970-01-01
      • 2016-06-23
      • 2013-11-25
      • 1970-01-01
      • 2014-10-25
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多