This behavior is very easy to manage.  Here's how I do it.

You can set properties of a clip even though you cannot call methods of a
clip.  This is how Flash works.

So, what I do is this.  I have the movieclip itself call its own method.  I
have the attacher set its initial properties when it attaches the clip so
that those properties are available to the clip.  There is no need to use an
interval.  It's very simple.

For example:

Inside the attacher clip:

var mc = holder.attachMovieClip("SYM_Clip", "item", 10);
mc.controller = this;
mc.foo = "something";
mc.bar = 15;

Inside the SYM_Clip movieclip in the library:

function init() {
    FooTextField.text = foo;
    BarTextField.text = bar;
}
init();

Use the most basic of OOP principles and let the movieclip call its own init
rather than making an interval for every single clip.  The Flash timeline
will do the delay for you.  Don't make extra work for yourself if you don't
have to.  =)

-Steven


> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf
> Of Dave Mennenoh
> Sent: Sunday, April 02, 2006 7:01 AM
> To: Flashcoders mailing list
> Subject: [Flashcoders] Question on attachMovie
>
> I am attaching some thumb clips from the library into a
> holder clip on
> stage, using attachMovie. Because of the timing thing with the clips'
> methods not becoming available immediately, I wait 250ms
> before calling a
> method of each clip. This works great - I just have one
> issue. I am able to
> set the text property of a field within the attached clip
> immediately after
> attaching it. So, why is the text property of a field
> available immediately,
> but a method not? I'd expect to have to wait to set any
> properties or call
> any methods but that isn't the case.
>
> Thanks
>
>
>
> Dave -
> Adobe Community Expert
> www.blurredistinction.com
> www.macromedia.com/support/forums/team_macromedia/
>
> _______________________________________________
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com 


_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to