Re: [Flashcoders] Stage instances, nested clips frames (AS3)

2008-11-13 Thread Olivier Besson

hi,
this old as3 feature has upset so many people that, as far as I 
remember, this has been fixed in flash player 10.
Meanwhile, you have to resort to tricks, sorry I don't know which one is 
the best.


This one seems to be what you suggested:
http://www.lecrabe.net/blog/index.php?post/2008/08/05/41-as3-gotoandstop-gotoandplay-issue

Here senocular suggests listening ADDED event from a parent node: 
(because ADDED bubbles ;))

http://www.kirupa.com/forum/showthread.php?t=247040

  Olivier

jonathan howe a écrit :

Hello,

I've got a situation where animators hand me a clip that has a bunch of
frame labels, each representing an animation sequence.  At each frame label,
I've got labelled MovieClips inside the clip. So, for example, on each frame
I have a clip called character_mc, talkbubble_mc, hitarea_mc. The
reason for the setup like this is that the animators position the key clips
in different ways depending on the state of the character (walking, running,
etc.). They like it all in one clip so they can make sure the transitions
between the states are smooth.

So, the problem I have is that in AS3, I'll tell the parent clip to go to a
frame, and the value of character_mc will return null ... sometimes. This
never used to happen in AS2; it always seemed that as soon as I executed
gotoAndStop on a parent clip, the stage instances of that parent clip were
available to me on the very next line of code. [OR, perhaps I was fooled
into thinking this because of AS2's permissive ways (i.e. I was actually
calling operations on a null instance)?] What I find strange is that
character_mc is not null the line before the gotoAndStop execution. Almost
as if the parent clip is in a halfway state ...

So my question is, how can I make sure that the instances on the stage are
initialized, defined and ready to access?  Is there a way to force this? Do
I have to create a deferred part of the code and add an ENTER_FRAME event
every time I want to access the clip? Or to get away from this, do I really
have to convert all of the animators' clips into a structure that doesn't
rely on the parent clip's timeline?

-jonathan


  


--
Olivier Besson (gludion) - (33 1) 44 64 78 99
http://.gludion.com
http://blog.gludion.com

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Stage instances, nested clips frames (AS3)

2008-11-13 Thread jonathan howe
Great links, Olivier!

One of the additional oddities called out in the second link:

if i trace the number of children i get 1 still, but if i do getChildAt(0),
it traces null on the first frame
That is something I noticed myself but forgot to include in my link. Really
amazing!

I am going to give the CustomWait static helper a shot.
Can anyone confirm for me that it's fixed (sorry changed) in FP10?
-jonathan


On Thu, Nov 13, 2008 at 11:14 AM, Olivier Besson [EMAIL PROTECTED] wrote:

 hi,
 this old as3 feature has upset so many people that, as far as I remember,
 this has been fixed in flash player 10.
 Meanwhile, you have to resort to tricks, sorry I don't know which one is
 the best.

 This one seems to be what you suggested:

 http://www.lecrabe.net/blog/index.php?post/2008/08/05/41-as3-gotoandstop-gotoandplay-issue

 Here senocular suggests listening ADDED event from a parent node:
 (because ADDED bubbles ;))
 http://www.kirupa.com/forum/showthread.php?t=247040

  Olivier

 jonathan howe a écrit :

 Hello,

 I've got a situation where animators hand me a clip that has a bunch of
 frame labels, each representing an animation sequence.  At each frame
 label,
 I've got labelled MovieClips inside the clip. So, for example, on each
 frame
 I have a clip called character_mc, talkbubble_mc, hitarea_mc. The
 reason for the setup like this is that the animators position the key
 clips
 in different ways depending on the state of the character (walking,
 running,
 etc.). They like it all in one clip so they can make sure the transitions
 between the states are smooth.

 So, the problem I have is that in AS3, I'll tell the parent clip to go to
 a
 frame, and the value of character_mc will return null ... sometimes. This
 never used to happen in AS2; it always seemed that as soon as I executed
 gotoAndStop on a parent clip, the stage instances of that parent clip were
 available to me on the very next line of code. [OR, perhaps I was fooled
 into thinking this because of AS2's permissive ways (i.e. I was actually
 calling operations on a null instance)?] What I find strange is that
 character_mc is not null the line before the gotoAndStop execution. Almost
 as if the parent clip is in a halfway state ...

 So my question is, how can I make sure that the instances on the stage are
 initialized, defined and ready to access?  Is there a way to force this?
 Do
 I have to create a deferred part of the code and add an ENTER_FRAME event
 every time I want to access the clip? Or to get away from this, do I
 really
 have to convert all of the animators' clips into a structure that doesn't
 rely on the parent clip's timeline?

 -jonathan





 --
 Olivier Besson (gludion) - (33 1) 44 64 78 99
 http://.gludion.com
 http://blog.gludion.com

 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




-- 
-jonathan howe
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Stage instances, nested clips frames (AS3)

2008-11-12 Thread jonathan howe
Hello,

I've got a situation where animators hand me a clip that has a bunch of
frame labels, each representing an animation sequence.  At each frame label,
I've got labelled MovieClips inside the clip. So, for example, on each frame
I have a clip called character_mc, talkbubble_mc, hitarea_mc. The
reason for the setup like this is that the animators position the key clips
in different ways depending on the state of the character (walking, running,
etc.). They like it all in one clip so they can make sure the transitions
between the states are smooth.

So, the problem I have is that in AS3, I'll tell the parent clip to go to a
frame, and the value of character_mc will return null ... sometimes. This
never used to happen in AS2; it always seemed that as soon as I executed
gotoAndStop on a parent clip, the stage instances of that parent clip were
available to me on the very next line of code. [OR, perhaps I was fooled
into thinking this because of AS2's permissive ways (i.e. I was actually
calling operations on a null instance)?] What I find strange is that
character_mc is not null the line before the gotoAndStop execution. Almost
as if the parent clip is in a halfway state ...

So my question is, how can I make sure that the instances on the stage are
initialized, defined and ready to access?  Is there a way to force this? Do
I have to create a deferred part of the code and add an ENTER_FRAME event
every time I want to access the clip? Or to get away from this, do I really
have to convert all of the animators' clips into a structure that doesn't
rely on the parent clip's timeline?

-jonathan


-- 
-jonathan howe
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders