2010-03-28 5 views
1

En ce moment j'ai un point que je dois mettre à jour avec les x et y d'un objet d'affichage à utiliser avec l'objet hitTestPoint; est-il possible de trouver un point à partir d'un objet d'affichage sans avoir à créer un nouveau point var et mettre à jour continuellement ses x et y?AS3: Point pour l'objet d'affichage x, y?

Répondre

2

Essayez ceci:

// Your display object you want to get the position from 
var something:DisplayObject; 

// Retrieve the position as a Point object 
var position:Point = something.transform.pixelBounds.topLeft; 
Questions connexes