[quoted text, click to view] > I think this is a serious flaw in logic.
The flaw is really in your logic I'm afraid :) .. you asume that the code in
the first frame will get called immediately .. that sort of thing never
happens. All the code ofr a frame executes completely before any other
frame code .. so the code for the frame in the new clip does not get to
execute until after the code in the frame of the parent finishes. That is a
very sensible behaviour, you will know that the code in your frame executes
uninterrupted.
That's why it is better not to define 'methods' for your clips in the first
frame. Do it from the parent frame .. or define a class for your clip.
[quoted text, click to view] > With attachMovie, you kind of
> instantiate an object (hope it's the right word... making an instance of
> s.th.). So calling a method of that object should be possible right after
> that
All the methods of the clips class are available .. its just that then LATER
ON, you define an additional method .. that method is not available until
its defined.
[quoted text, click to view] > (even if it returns rubbish, because the object's members may not be set
> yet).
> At least that's what I'd expect with a little OO background.
In your OO background, you would have defined you methods BEFORE you
instantiate .. you are adding a new one dynamically AFTER you instantiate.
That's where your problem lies. The same is true in any other OO system
that allows you to dynamically add methods.
[quoted text, click to view] > Is it the same behaviour with class objects? I mean, would it be the same
> if I
> had that function in an external class, and would use the class
> constructor
> instead of attachMovie? I hope it wouldn't... guess I'll just try it.
If your movieclip is an instance of a class, then attaching it will call the
constructor for that class immediately whenit is instantiated.
[quoted text, click to view] > Anyway, thx for the feedback.
You're welcome.
Jeckyl