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]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Karl DeSaulniers
Design Drumm
http://designdrumm.com
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders