En plaçant plusieurs instances d'un MovieClip via le lien de la bibliothèque, quelqu'un sait-il comment appliquer hitTestObject sur ces instances? Je crée un jeu flash de style pacman dans AS3. Si quelqu'un connaît un bon tutoriel qui pourrait être utile, n'hésitez pas à me le faire savoir.Comment utiliser hitTestObject sur plusieurs instances placées dynamiquement sur la scène? (AS3)
0
A
Répondre
0
vous pouvez utiliser ces fonctions
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