Problem in getting Flv's total time

This is a discussion on "Problem in getting Flv's total time" within the Flash & Multimedia Forum section. This forum, and the thread "Problem in getting Flv's total time are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Flash & Multimedia Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old May 9th, 2007, 06:42
Junior Member
Join Date: May 2007
Location: india
Age: 24
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to balaakrs
Problem in getting Flv's total time

I tried to implement video player that work with a list component using xml for importing flv details dynamically. Actually i got a tutorial for changing videos with list componnet. to make it iteractive i added some player coding to that and place respected movieclips for that. that code infact works well -videos are palying , but i can't able to get ns.totaTime property so that i can dispaly the amout loaded and playhead position in seek bar. i can't figure out where i went wrong . please help me to complete this work. it's urgent
please reply to this threa d and help me to fiure out were i went wrong
can i use onmetadata to get flv's totaltim,e if yes tell me how to use it

you can get my fla file as file , flv file here:

http://www.esnips.com/doc/c229b041-b...-list-in-Falsh

also i've attached with this thred
Attached Files
File Type: zip flv_list.zip (4.11 MB, 16 views)

Last edited by balaakrs; May 9th, 2007 at 09:13. Reason: URgency
Reply With Quote

  #2 (permalink)  
Old May 9th, 2007, 14:55
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Sgaspar11
Re: Problem in getting Flv's total time

Well at a quick glance I can see that you don't have a variable of totalTime defined anywhere in your project.

Something like: var totaltime:Number = 180; //3 minutes default

This assigns a number to total time upfront and declares your variable.

Oh AND you reference it is totalTime not totaltime. Capitals do matter. and I believe you want totaltime.

These streaming flash players are hard to figure out sometimes. I've built one for my organization that is similar to this one, but there are still 100 different ways to accomplish the same sort of thing.
Last Blog Entry: Yay!? (Oct 8th, 2007)

Last edited by Sgaspar11; May 9th, 2007 at 15:09.
Reply With Quote
  #3 (permalink)  
Old May 9th, 2007, 15:11
Junior Member
Join Date: May 2007
Location: india
Age: 24
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to balaakrs
Re: Problem in getting Flv's total time

i got it wat you said , you r saying that i'm forgot to declare the ns.totalTIme varaible. that's a good idea but it still didn't work . i used below function to get the ns's totaltime. but i donot know to use this . i kow it will return the flv's duration and details . but don't know when it will be called. i think this function is not being called. can you check this from my source file

ns.onMetaData = function(obj) {
var totaltime:Number = 180;
this.totalTime = obj.duration;
};
Reply With Quote
  #4 (permalink)  
Old May 9th, 2007, 15:17
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Sgaspar11
Re: Problem in getting Flv's total time

Make sure that all of your variables are totaltime not totalTime too. Capital letters do matter.

But I'll take a look when I get a chance.
Last Blog Entry: Yay!? (Oct 8th, 2007)
Reply With Quote
  #5 (permalink)  
Old May 9th, 2007, 15:24
Junior Member
Join Date: May 2007
Location: india
Age: 24
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to balaakrs
Re: Problem in getting Flv's total time

i'll check it , thank you , reply me when you got something
Reply With Quote
  #6 (permalink)  
Old May 9th, 2007, 15:38
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Sgaspar11
Re: Problem in getting Flv's total time

Hello,

So I have a lot of work to get done before I leave for my wedding tomorrow, so I am just going to post this:

Code: Select all
 
var perPixel:Number = (my_c.bar.bg._width - my_c.bar.butt._width) / 100;
function checkTime() {
 var myPercent = ns.time/totaltime * 100;
 my_c.bar.butt._x = my_c.bar.bg._x + (myPercent * perPixel);
}
This code sets up a variable of perPixel figures out how long the bar is in my MC - my_c.bar.bg //bar.bg being the timeline withing the my_C movieclip which houses my play, pause buttons. and divides that by 100 to turn it into a percent.

It then creates another variable myPercent (this is the part that looks sort of like yours). Then it takes the _x position to determine how far along the slider is.

Hopefully this will get you started in the right direction.
Last Blog Entry: Yay!? (Oct 8th, 2007)
Reply With Quote
  #7 (permalink)  
Old May 12th, 2007, 06:40
Junior Member
Join Date: May 2007
Location: india
Age: 24
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to balaakrs
Re: Problem in getting Flv's total time

oh, sorry to disturb u, i was unable to reply you as yesterday was a leave. i wish you to have a happy journey with your partner. keep in touch. i've seen your coding i'll try it and ontact you later


bala
Reply With Quote
  #8 (permalink)  
Old May 12th, 2007, 07:19
Junior Member
Join Date: May 2007
Location: india
Age: 24
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to balaakrs
Re: Problem in getting Flv's total time

I have found out the roblem, where it's going wrong. ns.onmetaData funtion is not beingcalled . i put some trace statement to check whether it's working or not. but the trace object is not executed. how can i explicitly call that function in my coding. is there any other geting flv stream's totaltime.
Reply With Quote
  #9 (permalink)  
Old May 12th, 2007, 08:26
Junior Member
Join Date: May 2007
Location: india
Age: 24
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to balaakrs
Re: Problem in getting Flv's total time

i got it right, i'ts the onmetadata() function is not worked properly. I misplaced the function. i tried to placed it in playmovie function after the ns.playmovie (). i worked. now the seek bar is working fin. thanx for your reply to get me in right track, without your help i can't able to figure out where i have gone wrong. all the best for your married life.

bala
Reply With Quote
Reply

Tags
flash player

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Total Development alexgeek Free Web Site Critique 33 Sep 25th, 2007 17:49
Total beginner here.. Sofie Introduce Yourself 17 May 22nd, 2006 10:49
Problem accessing multiple databases, not at the same time.. poisedforflight PHP Forum 2 Nov 21st, 2005 13:25
Date/Time format & multiple selection with listbox problem frmsasp ASP.NET Forum 0 Oct 12th, 2005 10:29
Adjusting time from server time to local time Tim356 Classic ASP 10 Jun 21st, 2004 14:57


All times are GMT. The time now is 19:52.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43