ActionScript 2.0 :: Going Back Or Forth A Certain Number Of Frames?
Jan 26, 2012
I'm making a game with health bars in it and I'm trying to have it so that if a character is hit, the bar will go forward a certain number of frames before it eventually hits zero.The thing is, I'm a dunce and I'm not sure how to do this exactly. All I need to know is the going ahead a certain number of frames part.Say on an action I needed a movie clip to go ahead three frames. How would I code that? I thought I could use nextFrame(); while putting a 3 in the parenthesis, but that doesn't seem to do anything.
View 7 Replies
Similar Posts:
Oct 8, 2010
I'm trying to go back a certain number of frames (let's say 20) after I hit the "Left" keyboard key.
PHP Code:
import flash.events.KeyboardEvent;
import flash.ui.Keyboard;
[code].....
View 6 Replies
Oct 25, 2007
I accidentally clicked an area on the timeline that made all the frames to the right of the layers disappear. I've gone through all the menus including VIEW and WINDOW where I thought I would be able to make the frames appear and can't find it anywhere! I've docked and un-docked, moved around the timeline and still can't get the frames back. Adobe HELP couldn't help me. How do I get the frames to get back to the right of the layers?
View 16 Replies
Sep 15, 2009
This is probably really simple but I don't know what I am doing. I have two arrows, one to go back and one to go forwards. They can move 5 frames either way - or go to the next or previous frame label - same thing. I can't seem to get it to work
View 5 Replies
May 25, 2009
So I have a movie with 20 frames...on each frame...there is a question...so I want the user to access that pool of questions...when it pops up...it will randomly choose a Frame to go to...Now...how do I go about...when that Frame is chosen...take it out of the pool of the random questions...so it doesn't land on that frame again...I'm thinking with variables maybe...but I actually don't know how to even begin to write the code for that.
View 1 Replies
Jul 1, 2009
I'm using Flash CS3 and AC2... I have a button on my main TL and I want to go back a few frames and play a MC at a specific frame when hit.
View 3 Replies
Mar 9, 2009
I have a page which has an intro animation which lasts 314 frames and finishes with a button. When you click the button it takes you to a separate html page with a scrolling photogallery. When I click the 'back' button in the photogallery it takes me back to the first html page with the intro animation.
How do I make sure that when I click the back button it skips the first 314 frames (bearing in mind I am returning from a separate html page)?
View 4 Replies
Jan 21, 2005
Is there a way to move the timeline ahead or back by several frames relative to it's current position?
View 3 Replies
Dec 28, 2006
In the continuing evolution of my code, I simply want a button to alternate moving the playhead backwards and forwards along the timeline between frames 1 and 17. This code is not working. I have attached a screen capture to clarify your questions in advance
[Code]...
View 2 Replies
Jan 21, 2005
Is there a way to move the timeline ahead or back by several frames relative to it's current position?
View 3 Replies
Aug 20, 2009
So I have my function here which sets up the tween for movieClips that have images on them:
[Code]....
This code is done 20 times with different images added to two different movieClips (b0 and b1) that are waiting in the library. So, the glitch is - this function works damn near perfectly except after a while of navigating to other frames and coming back to the frame with this sometimes the b0 wont tween all the way onto the stage and sometimes not at all. And dont worry about the b0 not being described as a variable I have done this outside the button function as I was getting error messages. I have spent almost a week tooling around with this but nothing works I get the same glitches.
View 9 Replies
Jun 13, 2007
How can I get the number of frames in a specific MC?
View 3 Replies
Dec 9, 2008
I have a SWF which loads another SWF with addChild(), but the graphic designer, says that he wont put code into the animation. So is its possible to check how many frames there is in the external SWF and if it has reached the last frame, checked from the master SWF? and then the master can do a function...?
View 2 Replies
Jul 30, 2010
detect the end of an embedded FLV video. Is there some kind of listener that could jump to a function when the last frame is reached?
Or is there a listener that could jump to a function when, lets say, frame number 100 i reached?
I use actionscript 3.
View 2 Replies
Mar 11, 2006
how can I get the number of frames in a movieclip?
View 11 Replies
May 3, 2010
Even though I HATE TimeLine based code (despite it being convenient for quick prototypes) I have been dabbing a slight bit in "addFrameScript()"
The problem is, there doesn't seem to be any way to set the number of frames in a MovieClip via code, and Flash doesn't automatically adjust the number of frames based on where "addFrameScript" code is located.
I'm not sure what use it would server, but is it possible to set the number of frames in a MovieClip without using the Flash Professional IDE?
And, as usual, a "No, Andreas. For the n-th time, it is not possible." response is okay.
View 3 Replies
Jan 21, 2004
Is it possible to find out the number of frames of a movieClip using actionscript? Like in the main timeline have some actions in frame 1 to find out the number of frames in "content" movieClip?
View 2 Replies
Aug 27, 2003
ok, i made a form and i want to count how many characters you can type so i got this far...
[AS]
mlength = message.length;
charsleft = 466-mlength+" characters left";
[/AS]
that works except when i made the movie 2 frames and looped it back the form wont work
[Code]...
View 10 Replies
Jun 10, 2009
Okay, so I've got a happy little movie that shows an atom diagram. Every seven frames shows an electron popping up in the ring around the nucleus. This is all contained in a movie clip. I want a button that when pressed, tells the movie clip with the atom to advance the seven frames ( making an electron pop up ) and then stop. The same button if pressed again, will advance the movie clip an additional seven frames ( thus adding another electron ).
I've looked around quite a bit but haven't found a solution that will work for me. Also, I am working in AS2. (if you're feeling especially helpful, do you also know how to do the same but in reverse? I've found how to play movie clips in reverse, but not for a certain frame interval.)
View 1 Replies
May 22, 2010
Are there anyway to get number of frames in a specific scene? There's a totalFrames property of MovieClip class, but that's the total frames of all scenes.
View 3 Replies
Jun 30, 2010
[code]...
obviously it doesn't work because it's not the correct syntax but i wrote it for you to understand ..
how can i make something that add's a x number of frames to the actual timeline?
View 3 Replies
Apr 25, 2010
Is it possible to set up a frame number by the code, rather than doing so in the timeline? This usually is tedious, if you keep adding and removing frames till you get the desired effect.
View 1 Replies
May 24, 2010
I'm working on a visualisation where the user inputs the number of songs they have and it shows you a visual of how many CDs this is (for a uni assignment). I have my variable 'output' and somehow I need to code a button so that when the user clicks it it takes them to my movie clip 'cdstack' frame 'output - 10' and plays then stops when it gets to frame 'output'. So it will play for ten frames then stop when it reaches 'output'.
View 1 Replies
Mar 10, 2009
I'm trying to create a function that looks at two Frame Labels and calculates the number of frames between them. This is what I've got so far:
Code: Select allfunction convertLabelsToFrames (targetClip:MovieClip, startFrameLabel:String, endFrameLabel:String):int
{
var time:int = targetClip.endFrameLabel.frame - targetClip.startFrameLabel.frame;
return time;
};
The problem I'm having is that you don't seem to be able to find a FrameLabel within a MovieClip in the simple sort of way that I've used above (I know the way I specify here won't work). It does seem, though, like there should be SOME way of finding a FrameLabel within a MovieClip.
View 2 Replies
Jul 30, 2009
i'm having DocmentClass for my FLA..i'm having main movieclip inside that main movieClip i'm having n number of frames..Which is having same name called my_MC.According to the condition i'm giving gotoAndStop(1)or (2) or etc.But my Document class functionality not at all working Except 1st frame..
View 1 Replies
Jan 21, 2004
Is it possible to find out the number of frames of a movieClip using actionscript? Like in the main timeline have some actions in frame 1 to find out the number of frames in "content" movieClip?
View 2 Replies
Mar 12, 2004
I have a movie clip that is about 80 frames. It just cycles through 4 pictures at 20 frames per pic. I want to use actionscript so I can cut down the number of frames. I thought I could use a while loop to do this. Here is what my code looked like:
[Code]...
View 9 Replies
Jul 18, 2008
I have created a set of MC's loaded from library via attachMovie in a for loop. Right now I have a set of MC's that are attached with the numbers 1-8. I would like to be able to select a MC and traces back its number. I know this can be achieved through an array. I know how to build arrays, but I do not know how to create an array what would trace back a number form a for loop.
Here is the code:
this.createEmptyMovieClip("navClip",this.getNextHighestDepth());
for (i=0; i<8; i++) {
currentThumb = navClip.attachMovie("numberBox", "clip"+i, i, {_x:(i*50)});
currentThumb.imageNum.text = i+1;
navClip._x = (Stage.width/2)-(navClip._width/2);
currentThumb.onRelease = function() {
trace(currentThumb);
};}
I need it to call back in the onRelease the number associated with that clip(array).
View 5 Replies
Oct 23, 2009
So i am building a portfolio and have my main stage with three frames, the first is my navigation section with 2 buttons button 1 sends the playhead to frame2 and button sends the playhead to frame3 etc here is the code
[Code]...
View 3 Replies
Oct 27, 2009
How to calculate the number of frames used in the timeline?
View 3 Replies