I’m having troubles activating the HitTest, passing the objects name as a parameter through a global function. Let’s say there is the following function on the main timeline:
_global.fallIntoBasket = function (fallingObject) {
if (_root[fallingObject].hitTest(_x, _root.basket_mc._y+(_root.basket_mc._height/2)-7, true)) {
trace ("teste");
_root[fallingObject]._alpha=0;
}
}
I then call this function passing the this._name of the object as a parameter in a onClipEvent (EnterFrame) on each of the falling Objects action box. The whole detection thing doesn’t work though… but if I place the hitTest code on each of the object, and change the _root[fallingObject] to this it works.
Any ideas? Can I not pass hitTest through a function? Thanks!!
ghjr