This content has been marked as final. Show 3 replies
Just put the following code in a frame of your main timeline where your movieclip also exists.
var myfunctionvalue = MovieClipName.functionName(parameters);
where MovieClipName is the name of the clip and functionName is the name of the function inside it.
That should work... if it doesn't then check your names are the correct case etc. Also make sure you don't give the movieclip on stage a name with a space in it or anything unusual like that.
Thanks GWD! It seems to work!
Is it also possible to run a action script on a movieclip in the main time line where
the function is not at frame 1 (of the movieclip)?
So if the function of the movieclip is at frame 10 and i would like to run this funtion,
would it be something like this?
Or is this not possible?
I do most of my actionscript on frame 1... but I know you can't do what you're suggesting. If the frame has already "played" then the function should exist, but not if it hasn't got there yet I think.
Do you want the child clip to go to frame 10 ?... just tell it to:
In your example it might be
But I would be inclined to put all my functions on frame 1 of the hello clip. You can tell it to go to frame 10 and still call that function.