Link to home
Start Free TrialLog in
Avatar of john_yourspace
john_yourspace

asked on

AS3 parent function

Hi guys,

I am trying to access a function in my class file (.as file)


I am using this code which isnt working

the trace displays [object Game]

Game is the name of my file Game.as

trace(this.parent);

if (this.parent != null)
{
var p:MovieClip = this.parent as MovieClip;
p.goToLeaderBoard();
}

Open in new window


Here is my function


public function goToLeaderBoard() : void 
		{
			trace("hit function");
			
		}

Open in new window



Suggestions please :D

J
ASKER CERTIFIED SOLUTION
Avatar of section25
section25

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Where are you trying to access goToLeaderBoard from?
if you want assistance could you please be a bit more specific. Please describe your setup.
Tx.
Avatar of john_yourspace
john_yourspace

ASKER

i traced it and found was too deep