is the playhead moving on a parent timeline? if you go to a keyframe in a parent timeline where there is a new instance of the MC you are manipulting then that cause cause you some problems.
On 14 November 2011 10:53, Paul Andrews <[email protected]> wrote: > On 14/11/2011 09:19, Karl DeSaulniers wrote: > >> Any luck with children? >> > > Well currently I'm restructuring the game to reduce the nesting and that > solves the problem. There are twelve drag and drop targets and I've done > two of them and for those, problem solved. > > I'm putting it down to being one of those things. > > > >> Try this code on your container MC. The first level (not the three deep). >> It may help you see the target it and possibly control it. >> >> for (var i:uint = 0; i < target_mc.numChildren; i++){ >> trace ('\t|\t ' +i+'.\t name:' + target_mc.getChildAt(i).name + '\t >> type:' + typeof (target_mc.getChildAt(i))+ '\t' + target_mc.getChildAt(i)); >> } >> >> grabbed it from here: http://www.matthijskamstra.nl/** >> blog/index.php/2008/04/30/as2-**to-as3-get-all-objects-in-a-**movieclip/<http://www.matthijskamstra.nl/blog/index.php/2008/04/30/as2-to-as3-get-all-objects-in-a-movieclip/> >> Or is this something you've tried already? >> > Thanks for the suggestion Karl. The mc contained components on seperate > frames - the code above would let me access all children, but only of the > current frame. My problem was an inability to change frame. > > Paul > > >> HTH, >> >> Best, >> Karl >> >> >> On Nov 14, 2011, at 3:08 AM, Paul Andrews wrote: >> >> On 14/11/2011 09:00, Karl DeSaulniers wrote: >>> >>>> Hi Paul, >>>> Can you tell it instead of nextFrame to advance currentFrame+1? >>>> >>> Yes, this was the original way of doing it. >>> >>> I have used currentFrame+1, specific frame number, frame label, inside >>> enterframe event, outside enterframe event. >>> >>> The first drag and drop in the app and the code works. >>> The second drag and drop and the frame won't advance. Apart from the >>> frame not advancing the traces are exactly the same. The MC is nested three >>> deep. >>> >>> I am currently changing this stuff to reduce the nesting. >>> >>> >>> Paul >>> >>> >>>> IE: >>>> My AS3 is very rusty, so I may be corrected.. >>>> >>>> targetMC.addEventListener(**Event.ENTER_FRAME, frameNumber); // or >>>> Event.DRAG ?? (Guessing on that one) >>>> function frameNumber(evt:Event):void { >>>> targetMC.gotoAndStop(this.**currentFrame+1); // or gotoAndPlay( >>>> } >>>> >>>> Or, maybe throw in a targetMC.stop(); before calling >>>> targetMC.nextFrame(); as an alternate option. >>>> Might create a pseudo reset that will allow the nextFrame() to function >>>> in the whole dynamics of your dilemma. >>>> >>>> JAT >>>> >>>> HTH, >>>> Karl >>>> >>>> On Nov 13, 2011, at 9:15 PM, Paul Andrews wrote: >>>> >>>> Well, of course nextFrame works, but only the first time around in an >>>>> app I've been asked to look at (not my app). >>>>> >>>>> In this AS3 app targetting FP9, we have a bunch of nested movieclips. >>>>> Interaction with the app involves dragging and dropping a movieclip to the >>>>> right target then paging through a number of frames, one at a time, in a >>>>> nested movieclip using gotoAndStop(). >>>>> >>>>> Essentially it's a quiz kind of thing - drag the movieclip over the >>>>> correct target selects the correct movieclip to display and then a button >>>>> is used to page through the frames of the chosen movieclip. >>>>> >>>>> It works beautifully for the first choice. After the next drag and >>>>> drop, the chosen movieclip is left showing frame 1. Perfect. Click on the >>>>> button, advance to frame 2, that's all that's required, but it won't move >>>>> to frame 2. >>>>> >>>>> I have investigated targeting the wrong MC in some way and using >>>>> enterframe events to move the movieclip along, but it won't budge. >>>>> totalFrames for the movieclip is greater than 1. There are no errors. Code >>>>> works fine until the second drag and drop. As far as I can tell I'm just >>>>> trying to tell a movieclip that has two frames to move to frame 2. Traces >>>>> tell me it's on frame 1 and following a call to gotoAndStop(2) it reports >>>>> being in frame 1, but never traces being in Frame 2. >>>>> >>>>> It sounds absolutely crazy, I know. I can't share the code, nor make >>>>> an example. >>>>> >>>>> Any thoughts before I change the way this thing has been written to >>>>> simplify what it's doing? changing the target to FP10 made no difference. >>>>> ______________________________**_________________ >>>>> Flashcoders mailing list >>>>> [email protected].**com<[email protected]> >>>>> http://chattyfig.figleaf.com/**mailman/listinfo/flashcoders<http://chattyfig.figleaf.com/mailman/listinfo/flashcoders> >>>>> >>>> >>>> Karl DeSaulniers >>>> Design Drumm >>>> http://designdrumm.com >>>> >>>> ______________________________**_________________ >>>> Flashcoders mailing list >>>> [email protected].**com <[email protected]> >>>> http://chattyfig.figleaf.com/**mailman/listinfo/flashcoders<http://chattyfig.figleaf.com/mailman/listinfo/flashcoders> >>>> >>>> >>> ______________________________**_________________ >>> Flashcoders mailing list >>> [email protected].**com <[email protected]> >>> http://chattyfig.figleaf.com/**mailman/listinfo/flashcoders<http://chattyfig.figleaf.com/mailman/listinfo/flashcoders> >>> >> >> Karl DeSaulniers >> Design Drumm >> http://designdrumm.com >> >> ______________________________**_________________ >> Flashcoders mailing list >> [email protected].**com <[email protected]> >> http://chattyfig.figleaf.com/**mailman/listinfo/flashcoders<http://chattyfig.figleaf.com/mailman/listinfo/flashcoders> >> >> > ______________________________**_________________ > Flashcoders mailing list > [email protected].**com <[email protected]> > http://chattyfig.figleaf.com/**mailman/listinfo/flashcoders<http://chattyfig.figleaf.com/mailman/listinfo/flashcoders> > _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

