Im fairly new in Actionscript. That being said, I’m trying to access a nested Movieclip in a MovieClip. My code looks like this
if (ground.hitTestPoint(char.getChildByName("charBox").x, char.getChildByName("charBox").y,true))
{
falling = false;
jumping = false;
jumpSpeed = 1;
fallSpeed = 0;
speed = 15;
}
This is just a snippet of the hitTest. the “charBox” is the Movieclip I’m trying to access in the char Movieclip. So where did I go wrong?
Should work to get the x value if you have an instance of a MovieClip inside the parent clip Class like so:
Or you have the instance name of that clip set to ‘charBox’ if you’re using the Flash IDE, note the instance name is different than the name in the Flash IDE library.