ActionScript 3.0 :: Any Way To Detect End Of Video Clip (FLV)
Mar 29, 2010
I have a .flv playback player embedded in the 1st frame of my flash CS4 AS3program which calls in a video clip called carrie_mc as soon as the program starts. When the video is finished playing it disappears off the stage which is all good and is as it should be. Where I am having a problem is that I want my code to detect when the video is finished playing so that I can display a text box with further instructions to the user. I am using the following code to detect when the flv is finished and have added a trace statement to see verify if it is working. Although there are no error messages the code doesn't seem to be working as I do not see the trace message in the output cue. How can I detect when a movie clip has finished playing using CS4 AS3?
carrie_mc.onStatus = function(info){
if (info.code == "NetStream.Play.Stop"){
trace("flv has finished playing")
}
View 1 Replies
Similar Posts:
Sep 10, 2010
I have some FLV video files to be reproduced sequentially by a Flash video player. Suppose v1.flv and v2.flv. I want the player to start playing v2.flv once v1.flv has reached the end. According to this forum, the onPlayStatus does not fire in progressive FLVs. What can be done? A snippet of what I am trying below:
public class MyClass extends Sprite {
private var nc : NetConnection;
private var ns : NetStream;
[code].....
View 4 Replies
May 31, 2010
How can I detect when a video has finished playing a.k.a stopped playing, so I can tell flash to play the next video in an array?
This is my code:
Code: Select allvar x:XML = new XML();
x.ignoreWhite = true;
var urls:Array = new Array();
[code]....
View 1 Replies
Aug 17, 2009
How can I detect when a video has finished playing a.k.a stopped playing, so I can tell flash to play the next video in an array?
This is my code:
Code: Select allvar x:XML = new XML();
x.ignoreWhite = true;
var urls:Array = new Array();
var desc:Array = new Array();
[Code]....
View 1 Replies
Aug 11, 2011
I've imported a Quicktime video clip into my scene. I want to slide this video clip in from off screen and have it stop at center stage using keyframes. When I use keyframes to move a video clip - the playback of the clip resets to it's first frame at every keyframe. Is it possible to move a rolling video clip using keyframes without altering the playback of the clip?
View 2 Replies
Mar 5, 2006
using flash8 and i have a netstream object streaming progressive video... how do i detect the flv is complete? using buffer.flush doesnt work how i need as it flushes the buffer slightly before the video is finished.
View 2 Replies
Jan 1, 2012
I have an FLV player component, with this component I play several clip. Is there a way to detect, with as3, which is the name of the clip?
View 5 Replies
Dec 7, 2009
my question today deals with Flash AS3 video buffering. (Streaming or Progressive) I want to be able to detect when the video is being buffered, so I can display some sort of animation letting the user know to wait just a little longer.
Currently my video will start up, hold on frame 1 for 3-4 secs then play. Kinda giving the impression that the video is paused or broken :(
Update
NetStatusEvent from livedocs. It seems to me that the key status to be working in is "NetStream.Buffer.Empty" so I added some code in there to see if this would trigger my animation or a trace statement. No luck yet, however when the Buffer is full it will trigger my code :/ Maybe my video is always somewhere between Buffer.Empty and Buffer.Full that's why it won't trigger any code when I test case for Buffer.Empty?
public function netStatusHandler(event:NetStatusEvent):void
{
// handles net status events
[Code]....
View 4 Replies
Jun 7, 2005
I've got video that loads from an external source (not streaming though) and would like to be able to detect when the video has stopped playing. The video starts playing when the user clicks the "Play" button, but when it has finished, I want Flash to display an image, so I need to know when it has gotten to the end.BTW: it's likely to be MPEG video too(!) as new content will need to be dumped into the external video folder by someone who does not have Flash nor the ability to create FLV. If this is only possible with FLV (and I know it is -- I've seen other posts on this forum about that) then maybe I should tell this person to get software to enable them to convert videos to FLV before dumping them in the folder)
View 1 Replies
Aug 17, 2007
i've done work with dynamic .flvs (streaming and prog dl) but never really embedded an .flv in the timeline.
now i've got three of them embedded and i need to detect when each has finished playing (they will rotate).
I can't seem to find any good info on how to control playback on an embedded flv (i chose to embed them inside movieclip symbols).
View 2 Replies
Apr 9, 2010
I'm doing a rather fancy button with up,down,rollover,rollout,and static states, something the standard flash button structure isn't capable of as far as I can tell, I've tried it.
Here's the setup: My main timeline has a series of frames with stop(): scripts, and each frame has a movie clip representing what should happen during that state: still, rollover, rollout, mousedown, mouseup I can't get the mouseup event to work.
[Code]...
View 4 Replies
Oct 4, 2010
I have an animated movie clip on my stage with aprox 100 frames with a stop action on the movie clip's timeline frame 1. I have a button on the root timeline that starts the movie clip animation but what I want is a way of detecting when the last frame of the Movie Clip is reached.i.e when movie clip gets to the last frame trace something..
View 3 Replies
Dec 4, 2010
What are the rules for using encoded video in flash? If the video is 30fps does my flash animation have to be 30fps?
example of detecting the overall screen resolution and using it in a variable? [the resolution of the desktop]
View 3 Replies
Feb 19, 2010
I'm using Flash CS3 v9 on a PC to...
- use File > Import an AVI video and convert it to an FLV video.
- use File > publish to publish it.
- Then upload the four files...
.. MyVideo.flv
.. MyPage.html,
.. MyPage swf
.. AC_RunActiveContent.js
to my website.
Works Great!
My Question: Since Javascript seems to run the .swf file which pays the .flv video... (or some such) Can I use Javascript (or html) to tell when the FLV Video has finished playing... And then automatically call another webpage..
View 2 Replies
Jul 8, 2010
I am working on a Flash project, it has a module, that will play some video and display image as advertisements, and I set a listener that will trace when the video is playing, if the playing ends, and listener will do something.
[Code]...
if the image-sliding never shows up, everything is just fine. if the image-sliding shows-up, the advertisement module will get stuck at the video's end, and that will only happen to my own video.if the advertisement module get stuck at my video's end, then I can click the progress bar to get the video play again(no need to replay the whole, just a few seconds is ok), and then the advertisement module will continue to work correctly again.
View 1 Replies
Jul 29, 2010
Is there something i can check to see if a NetStream Video is a live stream? I have a DVR app, need the player to snap to live point (if it is live - seek(100000) ? or start from the begining if a recorded video - Ideall a boolean if the stream is live or not...
View 9 Replies
Feb 10, 2010
I'm using NetConnection, NetStream and a flash.media.Video control to play back video files stored on the local machine. Works great for FLVs, and for H.264-encoded MP4s, but for non-H.264 MP4s, I often get audio, but no video.
I realize this is to be expected. What I'm wondering is whether there's a way to reliably detect that the video portion of the file is unplayable, irrespective of the audio. Of the many events available in NetStream, and even in the client callbacks (onMetaData, etc.), I don't see anything that explicitly informs for an unplayable video track -- I see NetStream.Play.NoSupportedTrackFound, and NetStream.Play.Failed, but for these videos -- i.e., playable audio, non-playable video -- I don't get either one, presumably because the audio works.
View 1 Replies
May 26, 2010
Is there a way to detect whether an FLV file contains video, audio or both?The flv file is streamed to a flash client, that needs to show a certain view depending on the data in wrapped in the flv file.
View 1 Replies
Jan 21, 2011
I have a NetConnection attached to a NetStream, which is in turn attached to a Video. As you can guess, this is a video player. I've looked through the public properties of all three classes and could not find an "isPlaying" property - a boolean that would tell me video is currently running (and not paused, stopped, nor corrupted). [code]...
View 2 Replies
Feb 11, 2010
I'm sure this is a simple question, but I just can't crack it. In my video player I want to detect if the current status is playing or paused. But I can't figure out where this info comes from. Is it a property of the ns object?
View 4 Replies
Sep 25, 2010
Because of network latency,there will always be latency, how to know how many seconds the latency is with ActionScript?
View 2 Replies
Apr 30, 2010
Is it possible in Flex 4's VideoPlayer control (spark.components.VideoPlayer) to detect some attributes of the source video?
In my case, it's a local file. I would need to detect the original width and height of the input source video (an h264 f4v).
View 2 Replies
May 13, 2010
I have a video playing on my page. I want to show and hide some div's when the video reaches a certain point. Lets say hide something on 10th second and show it again on 20th second.I can easily do it in HTML5 with video tag and currentTime attribute but for IE I have to create the same functionality and I think with flash based videos (from YouTube or something like that).Is there a way to detect the current time of a video playing on my website, embeded from YouTube, Metacafe or any other video sharing site?I know I could detect it in flash and make it run some JavaScript function but I don't have flash nor have the skills to do it in AS3.
View 2 Replies
Jul 31, 2011
I'm building a video chat in flash and everything works really well, except for the part where I'm trying to detect if the other user is sending a working video stream. There's a couple of reasons why the other user isn't sending video.
-The other user got no camera
-The other user got a camera, but the camera is currently being occupied by another application(Skype, Photo Booth, Google Talk, etc.)
-The other user got a camera but hasn't allowed the use of his/hers camera.
(Other unexpected problems I guess...)
So how do I detect if the stream I receive from the other user is a black stream(because of the reasons above) using the NetStream class? The closest thing I have came up with is by adding a timer that polls the currentFps() function from the stream I receive from the other user. But so far this seems pretty unreliable because I might get currentFps() == 0 and show an error because of this even though I actually got video from the stream in some cases. The reason for this is because I poll the API every 4 seconds for the currentFPS function and let's say at 00:00:04 I get "no video" according to the poll but at 00:00:05 the video kicks in, and therefor I need to wait until the next tick until the error message disappears
This is what my current poll looks like
function subscribingStatusPoll(e:TimerEvent):void {
if (subscribingStream.currentFPS == 0){
error.text = "No video found from the other user...
} else {
error.text = "";
}}
This is the only hack I that I can come up with to detect this, but this is unreliable and I actually would prefer a way to instantly detect if the stream I receive got a working video attached to it.
View 2 Replies
Oct 13, 2010
I got myself an assignment which requires me to add buffering and few other video related functions to a flash file that uses embedded video( on the timeline).
this swf is about 30-40Mb in size and it loads quite a while.
what i need to do is to detect when the video stops playing, runs out of buffer, but i dont know how do i listen to the netstream events if there is no netstream on embedded video.
View 5 Replies
Apr 8, 2011
I'm using a video array to load external flvs randomly for a movie quiz game I am building. Is there a way to code my actionscript so that I can identify which flv is playing randomly so that I can choose and use a specific animation that is to go with that video?This is my code:
// video array set up
var videoArray:Array = new Array({vid:"question1.flv", ans:"school of rocketeers"},
{vid:"question2.flv", ans:"supermanhattan"},[code]......
View 1 Replies
Mar 24, 2009
I have the standard drag and drop functionality setup with the MOUSE_DOWN / MOUSE_UP commands. However, if I just click on the item and decide not to drag, it still executes the commands like it was dragged. Is there any code I can put in so that if they decide not to drag the movie clip, the function doesn't fire?
View 3 Replies
Jun 13, 2010
how to detect if an animation in a movie clip stops?I make myself clear:I have a movie clip with different animations which I call from the stage with mc.gotoAndPlay("frame label"). Being these animation one after another in the timeline I call a stop() function to avoid the animation after to begin without being called.
Now, on the stage I want to play one of these animations and when this stops I want to make something happen.Is there an event that tells me "this movie clip is not 'animating' anymore"?
View 9 Replies
Jun 24, 2011
I've got a FLV file (test.flv) in a movie clip playing on my timeline with controls for viewers to jump around if they'd like, does anyone know of a way that when the FLV movie clip comes to an end, it will detect this and continue on with the timeline?
View 1 Replies
Jun 20, 2007
I'm trying to use hitTest to detect if a dragged clip is over any one of 3 different targets - when it is I want that target to blink. And then when I drag off I'd like the blinking to stop. Make sense? I'm struggling a bit with the following code:
Code:
square_mc.onPress = function() {
this.startDrag();
for (z=1; z<4; z++) {
circle = _root["circle"+z+"_mc"];
[code]....
The "eval(circle)" part isn't really working.
View 4 Replies