Hello kirupa flashers,
I create a new MovieClip, call it Somehow, and link it to the name “MyClip”, for example.
Inside of the Clip, there must be a Function like this:
this.sayHello = function() { return("Hello"); }
(In fact, my script should do different things, but this should be enough at first 
In my root frame, i do something like that:
attachMovie("MyClip", "MyClip01", 1);
trace(MyClip01);
trace(MyClip01.sayHello());
For the first trace i get “_level0.MyClip01”, which is correct.
But i cant call the function sayHello(), it says: “Undefined”.
And when i put the last line in the second frame, or as a button action, it is working, but
this is not what i want.
The reason is, that i get a big struct object where all the information is stored about
the Clips i have to create and how to initialize them and so on.
It LOOKS LIKE this:
for(i=1; i<=100; i++) {
attachMovie("MyClip", "MyClip"+i, i);
theClip = eval("MyClip"+ i);
theClip.tellSomething(i*i);
}
They must be MovieClips, because the functions not only response with hello, like in the example.
So I want to create the Clip copies and call the functions in one step. This example is also not working when i put it inside of a onLoad, or onEnterFrame and so on…
And ideas? I doubt that its so difficult…
Eclipse2k
Congratulations! Looks like that would be exactly what i want to do, becauseh the callback functions might be much easier but they muddle the running sequence completely. (I used similar callback methods to synchronize web sites in frames and such things in javascript…)
However, you can use Flash Player 6 in movies that use AS 2.0 just so long as you dont use methods and objects which are available to 7 only - you’ll get a little more detail when you set this in Flash preferences (using AS 2.0 and exporting to Flash 6). Nevertheless, it is preferable to use 7 (it gets people updated and its actually much faster than 6).