Skip to main content
Participant
July 21, 2007
Question

calling function from inside the MovieClip

  • July 21, 2007
  • 1 reply
  • 261 views
Here's the code I wrote in the first frame of the timeline

function test(){
trace("function Called!!!!!");
}

then I creat a movieclip on the stage, and the problem is how to call the function from inside the MovieClip somewhere?
I tried these in the movieclip

_root.test();
// _root was gone in AS3, so of course it dosen't work

stage.test();
// the LiveDoc said the _root was replaced by "stage", but it still dosen't work ?

parent.test();
// don't know why it dosen't work either



please help me...

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
July 21, 2007
all the following should work: