-
get next frame?
is there anyway in AS that you can automatically get the next frame when called? Much like _root.getNextHighestDepth works, is there any way to do this? I want it so that on each press the frame is stopped and then when it is pressed again it advances to the next frame.
-
5+5=55
You mean like... _root._currentframe+1?
-
well I have something on the frame and i want it to play that something like
this is inside a onKeydown fuction:
_root.MC.nextFrame();
but when i do this the key down press only advances the frame once, and I want it to advance the frame each time the key is pressed
-
5+5=55
Can you post the entire code?
-
code:
if((clipArray[i]._y + clipArray[i]._height) >= (btn[0]._y + 17) && clipArray[i]._y <= (btn[0]._y + btn[0]._height - 20)){
if(Key.isDown(49)){
if(movX[i] > btn[0]._x && movX[i] < (btn[0]._x + btn[0]._width)){
clipArray[i]._alpha = 0;
//sound up
fade=90;
_root.Status.nextFrame();
}
This controls one of the button presses and the particular part that i want is the _root.Status.nextFrame.
The whole code is 180 lines long. so posting the whole thing would not be efficient.
-
i need it to advance to the next frame every time key 40 (button 1) is pressed.
-
5+5=55
How about something like:
Code:
keyPressed = false;
this.onEnterFrame = function() {
if (Key.isDown(49) && !keyPressed) {
keyPressed = true;
_root.nextFrame();
} else if(!Key.isDown(49)){
keyPressed = false;
}
};
-
-
see the problem is that I have attached the MC through AS so it's not just placed on the screen, so I can't put code on it, I have to do it like this
_root.MC.nextFrame();
and when I do this it advances once, but dosn't work any more than once.
-
5+5=55
Would _root.MC.gotoAndStop(_root.MC._currentframe+1) work?
-
nope didn't work. sorry it took so long to get back i just go through spurts on working on this thing.
any other suggestions?
-
flip-flopper
how about
_root.MC.gotoAndStop(_root._currentframe + 1);
you're trying to move everything along to next frame on the main timeline right?
-
nope I just need one movieclip to advance to the next frame every time a button is pushed. it works once but then stops working.
-
flip-flopper
your conditional is still met after the first execution? is it possible the conditional no longer evaluates true, and thus just doesn't run again?
-
AHH! i just figured it out, whats happening is it's going true and staying true, therefore it can't go to the next because it never gets to false again, is this a possibility?
-
flip-flopper
cool. i thought it might be that...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|