ActionScript 3.0 :: Get Loaded Video Time?
Nov 7, 2009How can i get the time duration of video has been loaded?[code]...
View 1 RepliesHow can i get the time duration of video has been loaded?[code]...
View 1 RepliesHow can i get the time duration of video has been loaded?
Example: Total length - 1minute.
loaded length - 30second.
Then How can I get this loaded length?
I am not talking about the total duration of video. and I am using web hosting server not RTMP server.
I've loaded a video into the FLVPlayback component and I'm looking for a way to get the total time and the time played so far and output them to two text fields so the end result would look something like "00:12/00:50".
Right now I'm defining the video by the components inspector but I'm eventually hoping to define this bit by actionscript as well.
the player uses a VideoDisplay and i set the source like videoDisplay.source = "sourceStringURL"
and the vid doesn't play until it's fully loaded
I have loaded an external video with playback component in Flash CS4.
Now the question is do I need to add streaming script or not?
I know with a standard Flash FLV player you can get the pcent loaded of an flv. But can you know up to what time is currently loaded? I have a chapter selection drop down and would like to figure out when chapters are available to jump to.
View 1 RepliesI am loading external swf files into my main file to move between different contents.It all works fine with most of the files except with some.The files that work fine have pictures in different frames in the timeline and the navigation buttons within this swf move between this frames to display a very simple slideshow.The files that don't work, I only made one frame, I've made sure it stops there and then I'm only changing the visibility property of the images to view the different pictures.
This files load fine the first time but if I come out of them and come back, they don't seem to load properly the second time.I have tried making sure that the mc_container in the main movie is unloaded each time before loading a new one into it, but that didn't seem to make any difference.the files that don't work are:
Producing / Carnesky's Ghost train
Solo / Film
Solo / Rupture
Artist Collaborations / The Giant Accordion
I'am looking for a flv/video player which allow to seek for not loaded part of the video,just like on youtube.
View 1 RepliesI want to communicate with an object within a loaded swf. I know I can use this event listener and function to do so right when the swf has completed loading:
imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadSections)
function loadSections(event:Event):void { event.target.content.mc.y+=2
}
But I want to be able to manipulate a given object from the loaded swf at any time not just when the loading is complete. So basically as long as the swf is loaded, is there a way to manipulate objects and call functions within that swf?
Both the external and host swf are AS3.
i read this tutorial, it is about how to control the time line of the loaded swf
[URL]
but i get this error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at main_fla::MainTimeline/frame1()
[Code]....
i have a mc with instance name "preload" on the first frame of the main timeline, with a movie clip instace "numbers" inside that, which contains 100 frames, with text 1-100, masking a gradiant. on the preload mc i have the following code:
ActionScript Code:
onClipEvent (enterFrame) {
var bytes = _root.getBytesTotal();[code].....
which goes to the 2nd frame once loaded marvelously... but it just stays at 1% the whole time until loaded... i keep tweaking it but no improvement.
URL...Basically, you press button to enter and the tape measure will roll in time with the amount of data/frames loaded. So if 50% of data/frames loaded, the animation would be halfway completed. Upon completion, it zooms in on tape measure and I have animations from there to get to the main site.This was successfully done in Actionscript 2.0, but I need it to work in Actionscript 3.0.
View 3 RepliesWhat I need to obtain is the playhead location of a playing video when the Stop button is pressed. I need this to be either in milliseconds or hours:minutes:seconds. Either format is fine as I can work with either.I need this so that I can add a cue point to the video so that when the user returns to the presentation, it will start playing again at that point.
View 1 Repliesi set up a function to check and display the duration of my video in a dynamic text field. It works fine but I am trying to have it display as min and sec.(00:00). What would be the best way to do this?
Here is my code so far:
var playProgressTM:Timer = new Timer(100,0);
playProgressTM.addEventListener(TimerEvent.TIMER, playProgressHandler);
function playProgressHandler(evt:TimerEvent):void
[code]...
basic coding plan for scaling up and down the video at run time when I open a digital scrap book.The idea is very simple.. I have a Digital Interactive scrap book which will flip to the page which has the event housed on that page and will show a Thumbnail of the event. In the meantime the Loader will keep loading the movie file and show a progress bar. Once when the loader is done with, I want the Video to scale up to the size of the Stage and then play the video and once the file has reached the end it should scale down the video and go back to the Index page-the home page whioch started this..
View 1 RepliesHere is the situation : When a user watches the full duration of a video, I would like to add a new row to the database. For example, if there is a video of 100 MB with a duration of 2 hours and the user watches the full video add a new row, else do nothing. I am using JW player and js.
View 1 RepliesIs that possible to streaming a video from a certain time.
For an example i want to start the video from the time of 1.23 min but its always start from 0 only
time= something in millisecond;
I gave nsStream.seek(time) but even its start from 0 only.This is because the stream is not available for that time.
So can we start video streaming from mentioned timing is that possible.
I don't want to use FMS or Red5 for this.I know there is a possibility using server.
I am creating a flv player and sofar so good. But now I want to build in a start time for a part that isn't loaded yet.Currently you can click a spot in the progress bar, however if that part is not loaded yet it will simply jump to the end of the loaded bar instead of starting to load at the clicked point.i.e. I have a video of 1:45, it's loaded for 0:30, however I want to start playing at 1:00. Howe can I create this? I cannot get it to work with seek(70) as it still jumps to seek(30) (as this is loaded);
View 3 Repliesit´s clear to me that I can load external SWF-Movies and other stuff like Bitmaps, Sounds etc. But how is it with the differentDisplayObejcts in the swf-root.
My specific problem: For a numerous mask-effected MovieClip-Field, the Constructor inside an external class creates 3 Instances of different DisplayObjects in every loopcycle. First, the masked Object, then the mask (simply a black movieclip without code) and then, to seperate the masking from the Main-Class, a object container which contains the previously mentioned two Objects.
After creating the instances, they should brought into their Relationship on the DisplayList and added to Stage.
My Problem is: I think, the instancing of these many objects will take some time. Is there an Even-Listener and an Event, that checks if the Instancing was successfull and is ready be to displayed? Or do I have to create a boolean variable complete to my Constructor Funtion in the instanced object, that is set true after the end of the procedure? A loop in the Parent DisplayObject would check the value of the attribute and if it is set true, it will all add to the DisplayList and stage. Are there alternatives?
I have tried all manner of AS3 scripts to no avail. Most scripts that are listed on the internet either loads them and displays them at the same time (simlutaneously) or I get script errors.
View 1 RepliesI'm doing an Image Cache following this method: [URL] I copied the two as classes, renaming them CachedImage and CachedImageMap. The thing is that I don't want to store the image after being loaded a first time, but while the application is being loaded. For that, I've created a function that is called by the application pre-initialize event. This is how it looks:
[Code]....
I have a problem with listed code that every time I click on btn1 the variable (num) will be initialize to 1. so what is the best practice in my case to initialize the variable (num) for only one time when the flash loaded.
stop();
var num:Number =1;
function b1(event:MouseEvent):void[code].........
I am working in AS2 and I am wondering if someone knows how to make a video so it doesn't reset everytime the user logs in - it just remembers where they are and what they already clicked.I created a video that will be uploaded in a learning management system.Students can click on movie clips and make them disappear.What I would like to have happen is have the flash video remember which movie clips the student already clicked (and made disappear) so that the next time they log in the movie clips that should be invisable remain invisable (rather than starting over)Basically, it is like a little game, once saved you do not need to start at the beginning every time you go back to it.....it remembers where you left off.
View 5 RepliesI want to capture webcam video at run time.user can preview and save the video.
I am able to capture video using camara.get();
I use FMLE to publish h264 video to FMS , my server side code (main.asc)[code]...
View 10 RepliesHow do I play at video, but starting from say 20 seconds in?
View 1 RepliesI'm using this code and basically I want it to start like .5 seconds in.
ActionScript Code:
var nc:NetConnection = new NetConnection();
nc.connect(null);
[code]...
is it possible import many video files at a time.
View 0 RepliesI have published some videos with flash, but I need to find a way to display a very simple timer showing the elapsed time. I tried to use a dynamic text with AS3 without any success. I would like to use one of the ready-made skin for my player, and just add anywhere on the stage a dynamic text field with my time inside.
View 2 RepliesI want to develop a player , which shows images.URL...but I am so much confused about the progress bar or scrubber which can be moved or how to arrange with respect to time just like VIDEO Player every image will have to play 10 sec , so if 20 images , so there will be 200 sec.so how i should control this time bar or even when user move the scrubber, it moves to exact image with respect to time
View 3 Replies