i've never had a problem. what problem are you having?
As I said, the problem is that the MovieClipLoader broadcast the onLoadInit event before the loaded movie is completely initialized when this have many methods.
For exemple, I created a movie with many methods named Movie1.swf
Then I created the Main.swf
At the Main.swf I load the Movie1.swf with MovieClipLoader. What is happening is that on the onLoadInit event I traced any of the methods and the return is undefined. But if I delay, it returns [type Function].
Was I clear? If not, I can upload a sample.
are any methods that fail defined in frame 1 of the _root timeline of Movie1.swf? if so, are you using _root in Movie1.swf and causing a problem?
All the methods are in an AS file that is included in the first frame of Movie1.swf, but no methods are using _root.methodName
What I tried is like the following sample:
At the main.swf I have:
var obList:Object = new Object();
obList.onLoadInit = function(ob)
var mcLoader:MovieClipLoader = new MovieClipLoader()
Doing that, the return is undefined, what means that the anyMethod at the Movie1.swf is not yet initialized.
Obs.: Excuse me by the poor english, I'm not American, and learned English by myself.
if you have a function (anyMethod) defined on frame 1 of the main timeline of Movie1.swf, use:
The question is that the method don't exists yet. When I traced, I really tried to trace de object and the return should be [type Function]
If I trace like trace(ob.anyMethod()); I will have the return of the function, but I traced the Function object and it return undefined, meaning that it not exists. Otherwise it return [type Function]
As I said, if I delay with a setInterval, for exemple, it traces [type Function], meaning that at this moment the movie is completely initialized.
post a link to the flas that display the issue.
Thanks by the effort.
I was answered at the Adobe Brazil Forum.
The solution can be acessed at the following link:
Thank you again.
i dont believe there is a problem with onLoadInit(). i suspect you're trying to access something that isn't available when the first frame of the main timeline in your external swf loads.
post a link to your flas if you think there is something that is defined in the first frame of the main timeline and not available onLoadInit().
As you mentioned this subject, at trust, the error occurs when I have a Shared Library at the external movie. I founded a solution by loading the same shared library at the main movie and using a textbox to force the load of the SL at the first frame of the main movie. It works, but that other solution is more inteligent and is the solution that the own Flash components uses.
I will upload the files and contact here.
Hi, I have the same problem with "not ready methods and functions". The link in the brazilian forum is dead, can u provide me a hint? Some example would be great, it seems that the solution is export the functions like components, but I don't know how to do that.
Thanks in advance!!