This content has been marked as final. Show 5 replies
Yes, but it you need to take the function out of the movieclip, put it in an external .as file and import it into both clips. I assume you're talking AS 2.0.
I would like to confirm on how this goes. So I basically a function now in the attached MovieClip/Symbol B that refers to a TextArea object within B. If I were to abstract that function out into a separate AS file, wouldn't the compiler complain about not being able to find the TextArea object within the function.
Is there a tutorial out there on how this works?
you don't need to do all that.
just use the path/instance name of your attached movieclip to reference your function. for example, if you have a function f1() in a movieclip with linkage id = mcID, you can use:
yes, I did the attachMovie of the symbol B and it seems like none of the ActionScript written in B was not carried over.
This is how I built B into a symbol :
(1) Two layers ( one for the ActionScript only, the other for the Components)
(2) I defined the functions to be called remotely by A in the ActionScript layer
(3) I selected all the components in the Components Layer and did a Convert To Symbol
(4) I added the Symbol into A's Library
(5) I used attachMovie to instantiate the Symbol of B
I must have missed out something somewhere
you may need to delay your call to the function by 1ms so the code in its first frame can execute: