Flash :: Length Of Its Videos?
Nov 26, 2009I need to find the length of a flash video hosted on any of the popular video sharing websites. Is this possible?
How does Blinkx determine length of the videos it has indexed?
I need to find the length of a flash video hosted on any of the popular video sharing websites. Is this possible?
How does Blinkx determine length of the videos it has indexed?
I am trying to use the class Sound of actionscript.My code is really basic :
var snd:Sound = new Sound();
snd.load(new URLRequest("mysound.mp3"));
trace( new String(snd.length));
snd.play();
The audio is playing very well but in my trace, I get 0 instead of the length in milliseconds of the Sound.
Let's say I have array foo and a positive integer y, where foo.length > y.I want to remove elements from foo so that foo.length becomes y (or very close to it).Also, I need to preserve the first and last element of foo. The indices of the removed elements must be spaced apart as equally as possible. Foo can be sliced, or it can be used to create a new array.
Example: if foo = [a,b,c,d,e,f,g,1,2,3,4,5] and y = 6, then trimmedfoo could be [a,c,e,g,2,4,5] or maybe [a,c,e,2,4,5], but not [a,c,e,g,2,4] because the last element of foo is missing.
how to do this
function foo(x:*, ...args):* {
}
function bar(x:*, ...args):* {[code].....
how to expand args ? when I call bar(1,2,3), I wish it call foo(1,2,3), but it call foo(1,[2,3])
Is there any way to determine if a (anonymous) function has defined the ...(rest) parameter in ActionScript 3? I know there's the function.length property, but it only counts the explicitly defined arguments.
View 2 RepliesI am trying to get the length of arrays within an array, here is my example (MX 2004):
[Code]...
I get an output of of 3. the number of variables within the first array, this is not what I had expedted.
Is there a way to create videos in a playlist that i can limit the views to 10 videos per user?
View 1 Repliesdo anyone know how to script the dynamic text length to the amount of text in the text file instead of manually drag it to the length?
Code:
myLoadVars_lv = new LoadVars();
myLoadVars_lv.onLoad = function(success) {
[code].....
I have situation I want the player to play the video from the beginning to only 15 sec, even the video length is more than 15 sec for example it will be about 10 min. but I only want it to play beginning 10 sec. Is there a way for the flash player to only play 15 sec of the video? how is this work, and what function should I look for? is it also possible with HTML5 player?
View 1 RepliesI am unable to get the length of the array.[code]...
View 3 RepliesI am making a side scrolling flash game. The level is pre-made so there arent objects wich spawn on runtime. Now I made this level quite long, but in the editor window it suddenly stops. But in game it still scrolls on.This is in the editor.You can see that the scroll bar cant go left any more.The level is longer than then shown in editor. At first it was just putting an object at the border of the scene to increase it.
View 1 RepliesI have two values which are both ints: val1 and val2.
I set a movie clip's width equal to the difference of the two values:
mc.width = val1 - val2
After doing this calculation, the width of the object is 149.9 when it should be 150. This happens for other values as well. When I trace(val1 - val2), it returns 150.
What seems to be happening is the width value of my movie clip is not adjusting correctly. My movie clip is composed of a bunch of bitmaps and filters. I didn't think this would be a problem, but when I switched it out for a plain shape, the problem went away.
Is there something funny about bitmaps or filters that would make the width value screw up by .1?
Other errors just came up
var minNum:Number=0;
var maxNum:Number=7;
var minother:Number=8;
[code]....
I'm having a lot of trouble getting the total sample length of an mp3.
Also, when I load in the mp3 it does not play all the way through. It plays about half of it's length.
The mp3 I'm testing can be found here, [URL]
The code I'm using to play the sound is:
[Embed(source='assets/ffmangun_loop_79393.mp3')]
private var _snd_class:Class;
private var sound:Sound = new _snd_class as Sound;
[Code].....
This is my first time posting to a forum as I have been unable to find the solution to this problem. I am receiving an array from a php script in this manner[code]...
View 1 RepliesI load a song and when I get the length the song never reach this value.Here is issue document by another guy AS3 - SoundChannel.position never reaches Sound.length.And here is my code
import flash.display.Sprite;
import flash.net.URLRequest;
import flash.media.Sound;[code]....
How would I go about using a timer to initiate multiple movie clips at once, and then loop them if they are all different lengths so that they restart in sync once more?
For example, say at t=0, 3 movie clips are started. Movie clip 1 is 3 seconds long. Movie clip 2 is 6 seconds long. Movie clip 3 is 10 seconds long. Movie clip 1 would end before movie clip 2 and 3, but I don't want it to restart until the others are both finished.
Furthermore, is it possible to set a countdown so that the the movie clips are initiated not after a duration, but after a specific time? For example, instead of having a timer countdown from 10 seconds and then playing, it instead countdowns until say 12:00 PM and then plays the movie clip.
As far as I know, Flash doesn't know the exact length of an MP3 loaded via URLLoader (or similar) before it's actually fully downloaded. There are ways to approximate it but they are close to zero precision to me:
[Code]...
I have an array with many values pushed into it (happen to be names of objects). I am using a for loop to check all of the objects (by index number) for collisions, etc. Periodically, depending on a condition, I want to remove the currently checked object's name from the array list. I noticed that there is a problem if I immediately splice the checked name from the list. Namely, the list gets shorter, which is what I want, but not until I'm done checking all objects. Is it a good idea to solve the issue by incrementing i-- after the splice? I do this so that the object that used to be next in the list doesn't get skipped.It seems to work very well but I want to know if this is a lame/problematic solution and if there are any better ways of dealing with it
for (i=0;i<myarray.length;i++){
var ob=myarray[i]
//any old condition
[code].....
When i import a video into my flash document i choose one of the premade skins in flash and when im in the design view i can see it. However when i publish the file as a swf or .exe the skin either disapears or just doesn't work.I have managed to get a skin that stays when i publish however the play, rewind and fast forward buttons don't work. However the seek and volume ones do. Im am currently using flash cs4 and actionscript 2
View 1 Repliesim getting really frustrated because i can not watch any of the NHL videos on [url]......i have the latest FLASH plugin but i just get a black screen when trying to view a video. Im running vista.
View 2 RepliesWe would like to display flash video files (tutorials) on our Sharepoint site.Problem is, we cannot seem to either stop it from auto-playing (using the Windows Media Player) or start it playing by clicking (using flash embed).We have a Content Editor WebPart with this code currently:
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="320" HEIGHT="240" id="Tutorial1" ALIGN="">
<PARAM NAME=movie VALUE="video.swf">
<PARAM NAME=quality VALUE=high>
[code]....
how we can get a "play" button or begin the video playing once the user clicks it?
is it possible to mix videos and webcamera streams in flash to send them to flash media server as one stream?
Forexample put two webcamera streams side-by side and send them to server as one steam.
I have some FLV videos was to play on web (play in a flash player, e.g. JWPlayer). How can I protect it? I do not want someone else to download these videos.The videos was high secret! Only allow play on my website.
View 3 RepliesI have Adobe Flash CS5 but haven't a clue how to convert videos. I also got out my install disks and added Adobe After Effects with Media Encoder as well. Though I thought there would be a standalone Media Encoder app... I cannot seem to find it.
View 2 Repliesbeen looking everywhere for a tutorial but i cant find any. I am making myself a website where i will be putting my animation work, including my showreel. I need to find a way how to put the showreel into the website, the website is being done using flash.does anyone know how to add .swf videos in flash??
View 2 RepliesI would like to know what bitrate is song, so I count it this way:
var bitrate = Math.floor( 8*_snd.bytesTotal/_snd.length);
but unfortunately I can not retrieve valid value for _snd.length before all the song is loaded. Is there any other way to achieve that value?
i have a movie that has a next button on it that if clicked its going to flip/rotate and play the other movie,, here another problem if i click the next button it flip but the second movie clip is keep on pausing and playing how can i fix this?
View 9 Replieswatch this Flash file I've created that includes a video.
[URL]
When importing the .flv file of the video into the Flash project, I chose the imbedding method. I realize this increases the size of the overall .swf file when doing so. On the first watch (before the file is cached) it tends to pause while loading and/or jumps. I've tried other methods (like choosing the file has already been deployed to a web server, and play methods such as progressive download from a web server, stream from a Flash video streaming service, and stream from a Flash communication server). When choosing those other methods, the video loads nicely but the audio sounds a bit more distorted while playing. So, at present, I'm using the embed video in SWF and play in timeline option. Does anyone have any other suggestions to improve the video buffer speed, performance and the overall loading and quality of the Flash file? I'm still using Flash Professional 8.
I created a photo gallery using flash and I can't get it to work on my web page.I am using Flash CS5 and Dreamweaver CS3.If I just open the html file (the one Flash created when I published it) it works just fine but, when I put the Flash video on the page I created in Dreamweaver, it plays, but without the images.
View 12 Replies