Jump 3 Frames Ahead?
Oct 6, 2009The button tells the playhead to jump to the next frame with this code:
on (press){nextFrame ();} Where can I put a "+ 2" in there to make it jump 3 frames ahead?
The button tells the playhead to jump to the next frame with this code:
on (press){nextFrame ();} Where can I put a "+ 2" in there to make it jump 3 frames ahead?
I have a custom video player that I built with AS3. When people are viewing the videos I want them to be able to jump ahead of their current download position so that they don't have to wait until the video downloads to watch that portion.
View 7 RepliesI have a movieclip in which I show pictures. Each picture was 1 frame long, so my button (mc) to go ahead to the next picture had the following script:
this.onRelease = function(){
_parent.nextFrame();
}
Now I've changed the timeline so that each picture is 24 frames long. By reading some posts I've found this code:
gotoAndStop(_currentframe+5);
Still I don't manage to go ahead 24 frames. Does anyone know how I can change the first code to go ahead 24 frames, or even better, to the next keyframe?
Is there a way to move the timeline ahead or back by several frames relative to it's current position?
View 3 RepliesIs there a way to move the timeline ahead or back by several frames relative to it's current position?
View 3 RepliesI have several labeled clips in my timeline for a website i am making. the clips are in and out transitions and are labeled like this: home_in, home_out, products_in, products_out, contact_in, contact_out, etc. so, my button code is like this:
[CODE]....
I'm trying to build a basic website, and I want it to where when I click a button for another page, it plays the out animation for the current page, then the in animation for the page selected. Basically, for example:
Frames 1-10 are the out animation for a page, frames 20-30 are the in animation for page 2. When I click the button for page 2, I want it to play 1-10, then jump to and play 20-30.
I'm using the Flashdock component from FlashWebTools. The online tutorial gives the code for loading a swf in the mcTarget:
Code:
navigationMenu.addEventListener("onRelease", this, "onNavigationMenuRelease");
function onNavigationMenuRelease(Sender) {
// Sender is the released button
[code].....
What I want to do is have two of the buttons open an html page (_blank), and the rest of the buttons to jump to a specific frame in the current flash movie. What code would I use for this? I'm assuming there would be no more need for the mcTarget symbol, right?
i have on a close button code which says gotoAndPlay this frame (the onrelease effect) etc...anyway at the end of this effect i have a stop aswell as _root.gotoAndStop("home"); the home that appears there and what your looking at, at the end of the effect is the same thing...so why am i getting this jumping or flash? before it goes back to normal?
View 1 RepliesI want to make an interactive flash file, and the way I want to have it layed out is that a steady animation will play in one layer, while being able to jump around in frames with events such as a mouseover.I'm going to give a generic example, this isn't what I'm going to do, but it gets the point across.Theres a house and a tree. The leaves on the tree are falling, and upon mouseover of the house door, the door will open. Yet the leaves will remain falling (without skipping frames in the animation) while the door is still opening.How do you do this without using a goToAndPlay(x) or such that jumps the whole animation?
View 11 RepliesI'm using a combobox to jump to different frame lables. Nothing is working. Here is my code:
menuCombo.addItem("Home", "Home")
menuCombo.addItem("About Us", "About Us")
menuCombo.addItem("Products", "Products")
[Code]....
I'm trying to figure out the basics. Right now I'm just trying to make a flash sequence that continues to jump randomly from frame to frame without stopping.
View 5 RepliesI have been tasked with making this happen [URL] - What Ive done is take out footage and include keyframes for each frame (cue points on every frame), which i read helps with scrubbing... and it does. however using an invisible scrubber bar (seekbar) just isnt smoooth enough... So i was wondering if I could register an eventListener on the mouse and when it moved forward, jump x frames/time forward in the flv clip.
View 1 RepliesI want to be able to add an action script for a button that is able to jump to different frames of a movie and play them in sequence. For example I want to be able to add an action script to a button so that when the button is released I want the movie (animation) to start at frame 10, play till it reaches, frame 20, then immediately jump to frame 30, play to frame 40 and then stop. The Idea is to play different animations in sequence with just one button. Whenever I press the button I don't want to see the animation in frames 1-9 or 11-19. If I can figure out how to do this I will be to have different buttons controlling different sequences of the animation of the movie.
View 3 RepliesI have a movie with various movie clips on certain frames. What I want is the playhead to randomly jump to different frames I specify within the movie after each Movie clip has played. So at the end of each movie clip there would be a random script forcing the playhead to play another movie clip randomly. My movie has 100 frames but I only want the random sequence to occur on the following frames 10, 13, 25, 86, 75, 56. Or If I labelled the frames how would I label them?? Would they all have to have the same label, or each label different?
View 2 RepliesI have my main swf and another swf in "/tools/FrameJumper.swf" In my main swf I have a movieclip container on the stage "myContainer" and when I click a button it loads that "FrameJumper.swf" into that container. Now in that "FrameJumper.swf" I have a txt box and a button. here is the code on that button
[Code]...
I just have a button and a movie clip (MenuUp) and i want the button to be able to make the movie clip jump to different frames...
[Code]...
I am brand new to scripting in Flash, and was hoping I could get some help on a question. I have an animation that is 300 frames long. The first 100 frames are an animated 'ad' (for lack of a better term), the second 100 frames are a different ad, and the third 100 frames are the last ad. This can be viewed straight from beginning to end (and is intended to loop if no action is taken), but I would also like to add some functionality to the animation, so that people can jump forward to the next ad, or back to the previous ad (hitting back from the first ad would take them to the third ad, and vice versa.)
[Code]...
This does not turn up any errors when I test the movie, but the functionality does not work. Am I anywhere near a working script, or am I attempting this in a completely wrong way?
Is there a way to trigger a movie clip to go ahead one frame within it?I currently have a drag and drop interactivity where I want my drop target (which is a movie clip) to go ahead one frame within it everytime the right drag object is dropped on it. I would assume it is going to go under my if statement. Here is my current if statement to help:
if(event.currentTarget.hitTestObject(event.currentTarget._targetPiece) ) { event.currentTarget.x = 950; event.currentTarget.y = 100; event.currentTarget.removeEventListener(MouseEvent.MOUSE_DOWN, dragMe); event.currentTarget.buttonMode = false; _ffBack ++; if (_ffBack == 12) { correct_txt.visible = true; } }
I would like to create a game that would analyze an mp3 a few seconds ahead of where it is playing live. A basic idea would be similar to guitar hero, the 'frets' you can see coming and prepare, then they hit and sync with the song in real time.
Is there a way to analyze a Sound file ahead of time, or analyze a muted Sound file?
I am streaming a playlist of multiple mp4 video files and have been experiencing strange netStream.time values when the buffering is set for an extra long time on slow connections.
For example, when starting the video, if I set the buffer to something like 90 seconds, while filling the buffer netStream.time reads 0. The second the buffer is full, instead of reading 0,1,2 +++ it jumps to a really high value, in this case 53535 and sticks there until the video, which seems to play correctly from the begining ,catches up to that time and then starts incrementing as it should. What's odd about this is that the time the netStream.time gets stuck to always corresponds to the end/begining point between two streams in the playlist. For whatever reason this always seems to be the third video in the playlist. IF I seek to a new location, it re buffers, and then the time properly is stuck at the time that corresponds to the end of the 4th stream.
If the connection is relatively fast and the buffer is set to a smaller value, I never see any issues.
I know netStream.time is notoriously buggy, but something tells me there is more going on here.
I am streaming a playlist of multiple mp4 video files with flash 9 and FMS 3 and have been experiencing strange netStream.time values when the buffering is set for an extra long time on slow connections. When I have my buffer set to something like 60 seconds I'll start experiancing this problem:
the NetStream.time value will return 0 on progress events while buffering, but the moment the buffer is full, instead of reading 0,1,2 +++ it jumps to a really high value, in this case 53.5 seconds, and sticks there until the video (which seems to play correctly from the beginning) catches up to that time and then the netStream.time starts incrementing as it should.
Another relevant fact is that the time the netStream.time gets stuck to always corresponds to the end/begining point between two streams in the playlist. For whatever reason this usually seems to be the third video in the playlist. If the connection is relatively fast and the buffer is set to a smaller value,
I'm very used to building things with hard references in mind using AS2. I build it knowing I'm going to put a panel A in _level0.panela_mc and interface B in _level0.interfaceb_mc and Login Prompt in _level0.login_mc.login_com, etc etc.. I always know these will exist and you simply reference them via _level0.whatever. What is the new strategy to managing references to lots of sprites?
If I build a panel in a class method, the var somepanel:Sprite = new Sprite() I create inside the method to hold the panel I'm making will be up for garbage collection if I don't make sure a reference stays intact (via either add it to a display list, add an event handler, etc..). The reference "somepanel" I made in the method will go out of scope at the end of the method as well. Should I expect to have needed to make a class variable ahead of time to store a reference to this? Should I be keeping a class genericObject:Object that holds a list of references to everything I ever make almost like a global registry?I'm just used to AS2. You just create a movieclip and when the method ends, the clip still exists and you know the _level0.ref.ref.ref will always exist and how to get back to it.
How are larger projects managed where content loaded isn't known ahead of time and the layout is rather dynamic. What are the strategies used to manage all that dynamic chaos?Lastly I'm so overly used to being able to target a movieclip using a single daisy chained list of clips, like: _level0.this_mc. that _mc.those_mc. I noticed I can't seem to do this approach with the getChild() approach. using someSprite.getChildByName('this').getChildByName ('that') .get ChildByNa me('those') doesn't work. How do you drill down into nested clips? I did notice I can do it one level at a time, such as: refA = someSprite.get ChildByName('this'); refB = refA.getChildByName('that'); refC = refB.getChildByName('those'); .. Is that what I'm expected to do?
Anyway, my question is this: In AS3, how do I get it to (for example) gotoAndPlay frames 15-20, then jump to frame 50?Basically I have a heap of buttons, all of which (when pressed) I would like to play frames 15-20, but then each go to a different frame once they've reached frame 20...
View 2 RepliesI want to create a preloader that plays a certain amount of frames as it loads the rest of the frames. So, I have labels on the frames basically and need a preloader to play the "loading" frames as it is loading the "content" frames. Does that make sense? I have no idea how to even start this one... p.s. I am using AS 2.0, but if it can be done in 3.0 easier, I can switch over its no biggie
View 4 Repliesthere seems to be no accepted method of playing multiple flv using buttons. My latest attempt has me putting multiple instances of the flvPlayback component in different frames and using buttons to navigate to those frames. It works but nothing anyone has posted anywhere will result in removing the flv when you go to a different frame and instance. This was simple in AS2. Load movie to a traget and each time you load a new movie the other one goes away. REALLY goes away.
View 7 Repliesbasically im making a quiz on my main timeline ive got my questions and answers and on the last frame i want it to say how many answers the user got right. ive made a movie clip on this last frame. in the movie clip ive got 11 frames with the posible totals so frame one would be 0/10 frame 2 would be 1/10 etc what i want to do is when the user clicks the correct answer on the other frames i want flash to make the frames within the movie clip to go 1 step forward.
View 2 RepliesI have a function that counts days and some other variables and displays the values via dynamic text.
[Code]...
I have to place the incrementCount(): function every 12 frames so that it increments the values. Seems like it would be easier to simply modify the script to count "every 12 frames" but I can't find anything that tells me how to "count frames" in flash. Seems to be this is probably basic but I've searched unsuccessfully....so how do you do this. How do I get my script to work so it's frame based so I don't have to put incrementCount() every 12 frames?
Is it possible to have an movieclip of about 50 frames and navigate between these 50 frames? As if u put a marker on frame 10 and one at frame 30 and if u use a button it plays to frame 10 and stops and use another button to go from frame 10 to frame 30 and stop... and reverse if u use the earlier button.
View 5 RepliesI want to preload all of the voiceover swf files before a lesson starts so that they are instantly available when each frame / page that incorporates a voiceover is first visited.
View 4 Replies