Actionscript 3 :: Seek Playhead To Specific Location In Flash Video?
Dec 21, 2011
If you load up a FLVPlayback component in Flash or VideoDisplay in Flex and try to seek to a specific location or set playheadTime to a specific location, the movie always rounds up or down by very large amountsIn flash, drag a FLVPlayback component to stage and set source to Then try to video.seek(6) or video.playheadTime = 6;It will just goto 10. Likewise if you use their built in scrubber the only intervals are 0, 5, or 10. So at most the scrubbing frame you see is 3Here is an example of flex with the same result.
I'd like to start playing a web-based video at a specific time, say 2 minutes in, even if the video hasn't been downloaded that far. I thought I could just "seek" to that time but that apparently only works when the video is buffered first.
So for example, this: Code: nc = new NetConnection(); nc.connect(null); ns = new NetStream(nc); ns.play("[URL]"); ns.seek(123); video.attachVideo(ns);
Seems to work if you have the video cached or buffered or whatever, but if you don't it gives the "NetStream.Seek.InvalidTime" error, which makes sense. I want to know if it's possible to start playing a video at a specific time, even if the video hasn't loaded up to that point.
Do you know why the VideoDisplay.seek() would always go to the same frame at 1 second, no matter whether it is asked to seek forward or backward? This happens to some MP4 and other others. Is there some functions or variables I need to set?The MP4s that don't work with VideoDisplay.seek(), can be seeked using Quicktime.
im looking to be able to use a mouse click to trigger an animation of something spinning. but depending on which event listener is clicked i want the animation to stop at a specific frame for each thus allow further mouse clicks and feature access. does anyone know how i can do this in AS3?
It's streaming RTMP, and I'm trying to get my video to seek correctly if the user clicks on the groove bar (gray bar under the green progress bar) Currently it does not seek and gives me a NaN on my duration variable and an error on my progress bar width variable, which is puzzling me.
For some reason my videoDuration variable is coming up as NaN when used inside of my seeker function, also I'm getting a null object reference error when trying to trace out playerCntrls.progressTotalW which is the total width of the groove bar[code]...
I've a flash AS3 based application that provides option to play/pause/record FLV files from flash media server. These files are only audio files. Now, I want to add a new functionality of inserting audio at a specific location.Like if the already recorded file is of five minutes duration, and I want to record 1 minute audio after third minute, the end result should be a six minute file with the new audio added from 3rd to 4th minute.
I am trying to make a flash movie and have it find a external movie to show. I also need to be able to change the location of the video without flash, so I think I have to use a seperate .as file.
Issue: I need to move a rectangle (that has only sides and no fills) to a specific location on the animation, what happens is that if the user enters some info (through HTML form processed by PHP and sent to the movie through FlashVars), this info should then me find the x and y coordinates of a button that should then be overlapped by this said rectangle.Code:
Code: if (_root.signUp == 1){ // the FlashVar variable flag var buttoSym= "_root.thumbMain.thumbSymbol.b" + _root.signNumber
Is the Flash Video (or Flex VideoDisplay) component capable of seeking to an exact moment in a video?It seems to always 'snap' to keyframes (which is understandable). I'm just wondering if there are any mechanisms in the video classes for seeking to exact frames, ie it should do the translation from keyframe to specific frame in the background rather than having to actually play the video forward to the desired frame.This is not a streaming file and has nothing to do with buffering. The player is just downloading a movie file from the web and playing it from memory.
I have an object inside my flash file and i want to lock the object on 0 x-axis 0 y-axis but when i re-size my SWF file my object's location changed to another location how can i fix that?
I am recording FLV videos with Red5 server and playing them back in a Flex app. I am aware that Red5 does not properly inject the FLV MetaData, so I am using an external commandline tool to get the metadata in there.
Because I am injecting the metadata, my duration of the video is correct.
The problem I am having, and this is true with all FLV players I try to play the video with (even 3rd party stand-alone video players), is the PlayHead time is never started at 0. When I load up the FLV to play and lets say the video is 10 seconds long, the current time label on the playhead starts at 1-2seconds instead of 0 and the horizontal slider current time indicator also is moved away from 0 and is set to 1-2 seconds along the slidebar. the video plays back fine from what I can see though.
Is there a byte in the FLV that I need to change so that it will start the playhead at 0? I realize this is probably something to do with Red5, so if anyone has any work-arounds or potential things to watch out for that may be causing this
Does anyone know of any tutorials that explain how to make a seek bar with a handle that will be linked to the main timeline, so that when you move the handle the animation will move too, e.g. if you drag the handle to the centre of the bar then it will skip to the middle of the animation?
I currently have a handle that move on the x axis with in a set boundary, but not sure how to link it to the main timeline.
I'm looking for a tutorial on the interwebs to create a scrubber for the length of a movie clip.For example:If a movieclip is 300 frames long, the beginning of the scrubber would be Frame 1 and the end would be Frame 300 with Frames 2-299 in the middle.I'd like the user to be able to scroll through the movie much like a Quicktime VR
I'm trying to load an SWF file into antother SWF file.But I dont have a lot of experince with flash!I want the SWF file to load in the top right corner!
I'm trying to load my movie into a specific location...I got the code to load it properly, and now I need to know how to load it to specific X and Y positions.
I am trying to make a flash movie and have it find a external movie to show. I also need to be able to change the location of the video without flash, so I think I have to use a seperate .as file.
I'm using fl.video.VideoPlayer and I'd like to be able to seek arbitrarily within the video. seek() works unless the given time isn't yet loaded, in which case the video hiccups and continues playing normally. I'd like it to seek to the specified second even if it's not yet loaded, loading/buffering as necessary. I've tried seek() and play() and haven't been able to make this work.
I'm working on development of a medical training app and have come across a stumbling block I can't work out. I'm using FlashCS5, and AS3.Basic setup is this:
- 1 flvplayback with an H.264 MP4 loaded into it, stock controller
- 1 standard UILoader with a jpeg put into it
The jpeg still image is a sideview of a medical image, and the idea is that the user can move their mouse over this image and move the corresponding movie to a certain timecode. The full width of the image maps directly to the length of the movie clip, i.e. if you put your mouse on the very left of the still image, you are at 0 seconds of the movie, all the way on the right will be 49 seconds.
So, attached to my UILoader I added a simple routine that gets the mouseX, does some basic math to determine how far into the movie we should go, and sets the movie to that time.The problem is that using playheadTime, seek(), or seekSeconds() gives me incredible lag. You can move the mouse on the still image and the output window shows instantaneous reporting of the proper calculated time, but the movie itself might take 5-10 seconds to actually move to that time.
The movie has been rendered out using the CS5 Media Encoder and has a keyframe every 1 sec.Here is a link to a screen capture I did to show the problem. As you can see, using the standard controller is pretty responsive, but my other method is unusable. This happens locally as well, with the movie being fully loaded instantly.
h t t p://cl.ly/2gZY (1MB, quicktime)
Partial code, very basic:
ActionScript Code: screenImageView.addEventListener(MouseEvent.MOUSE_MOVE, pullbackJump); ... public function pullbackJump(e:MouseEvent):void {
Does anyone know if it's possible to get your FLV to seek to a point beyond what's already been loaded into the buffer... just like how youTube does it?I want it to seek to the new point, drop all buffered data that it had before and then just start buffering from the new point.I'm NOT (and can't) use a media streaming server - is this possible without it? After a bit of research it's not looking good :sIf you can't do it then I'm thinking I'll have to preload the whole FLV before the user even sees anything!
I have 4 movieclips that are animated around the stage and a basket movieclip button as the home button in the far left corner. When I click the basket I would like to have actionscript animate those 4 movieclips into the basket with an acceleration in 20 frames. This I can easily do without acceleration as I can find out the current location of the movie clips, find out the distance between it and the basket and then divide it by the number of frames I need, and then use that as the speed. But to be honest I am not sure where to begin when I include acceleration. I have dabbled with acceleration in the past but not with a specific number of frames in mind.
I already understand how it works, now in this swf what happen is there are filters added to the video(output) to make the motions color white. I will put the files here.
The swf is inside the bin folder. (this is made by soulwire) Here is his site/blog
[URL]
I am trying to mod it to improve it. Well you can study code if you want to
But what I want to do with getColorBoundsRect is:
- Having only one source to detect the color "WHITE". But having multiple "getColorBoundsRect" detecting white on that ONE source but on DIFFERENT regions.
Lets say this M1(colorboundsrect) will only detect the first part of the source) and M2 will be detecting on another region of SAME source.
1 source, but multiple getColorBoundsRect on different regions of that 1 source
I am creating a custom flash video player for my friend's wife's surprise 40th birthday party. I was progressing through and everything was working fine, but now the seekbar and volume bar handles are completely gone. I was working on doing some buttons to load each video segment when I realized the missing handles. My actionscript is below:
import fl.video.*; var flvPlayer:FLVPlayback = new FLVPlayback();addChild(flvPlayer); flvPlayer.playButton = playbtn; flvPlayer.pauseButton = pausebtn; flvPlayer.seekBar =
I have a "video on demand" video that I'd like to seek at any point of the video. It's playing on a Motorola Xoom tablet. I can seek to the beginning of the video when the playhead is near the beginning. However, if I the playhead is towards the end of the video and I attempt to seek to the beginning of the video, the video seeks many seconds after the start of the video. I thought this might be a buffering issue, so I set inBufferSeek to true, but I still have the same issue.
I have a video player that doesn't have "seek from unloaded time" functionality. I want to add it now. I simply load video like this; stream.play("vidurl.flv"); (pseudo streaming) Server side is ready. I can call videos like videourl.flv?start=xxx but cant play them in player cuz video comes without metadata To sum up: 1. stream.play("vidurl.flv"); works, video plays 2. user clicks to seek bar. on unloaded part. I get the position and convert it to seconds stream.play("vidurl.flv?start=10"); Doesn't work! No metadata what I should do after?