ActionScript 3.0 :: Flash Number Of Video - NetStream And NetConnection Instances Multiple Videos Would Require?
Dec 30, 2010
How many instances of Video, NetStream and NetConnection would be needed for multiple videos? Not sure that's the right question but essentially here's the objective:
Currently, I'm working on an interactive product tour, parts of which are to consist of short video clips, each covering a feature. While only one such clip will be playing at any given time, I'd like put them all at the application's fingertips as part of the initial preloading process before launching into it. The idea is to provide a seamless instant-play user experience without hitting the breaks before individual segments.
[Code]....
View 2 Replies
Similar Posts:
Dec 27, 2010
How many instances of Video, NetStream and NetConnection would be needed for multiple videos?Not sure that's the right question but essentially here's the objective:Currently, I'm working on an interactive product tour, parts of which are to consist of short video clips, each covering a feature. While only one such clip will be playing at any given time, I'd like put them all at the application's fingertips as part of the initial preloading process before launching into it. The idea is to provide a seamless instant-play user experience without hitting the breaks before individual segments.Honestly, I hate pre-caching crap into user's memory, especially when some of that content may be potentially ignored. However, given the target audience, it is reasonable to predict that all features will be explored most of the time, so it's a fair compromise to me. Besides, I went to great lengths to keep the mp4s' sizes to the minimum.Anyway, I'm guessing you don't really need more than one instance of the Video class but how many NetStreams and NetConnections do I you need, probably one of each per video, ha?
View 0 Replies
Nov 16, 2009
is it neccessary or recommended to close netstream and netconnection and create a new one before moving to next video?
View 1 Replies
Aug 4, 2009
As you can see, after all the items in the Carousel have loaded, a function called fadeItemIn() is called which displays each of them one by one. I am looking to call a small "swoosh" particle effect flv I made in AfterEffects so that as each item tweens in, it instead looks like it is sparkling in from the left.
The problem I have is that using the code below, the swoosh.flv file tends to freeze before it finishes. In this case the swooshIn() function is called three times because there are three items being loaded into the Carousel.
I am wondering why the FLV freezes when multiple instances of it are loaded through AS3 using NetStream.
Code:
private function fadeItemIn(item:CarouselItem):void {
trace("fadeItemIn");
this.tweens.push(new Tween(item, "altitude", Regular.easeOut, item.altitude, 2.5, 0.50, true));
[Code].....
View 1 Replies
Oct 16, 2011
Is it possible to have a same Video object ( and perhaps StageVideo) connected to multiple NetStream's objects? It's videoconferencing app, in which all members can speak ( So multiple audio sources) but should not hear themselves (that's why I don't join them in a single stream).
That's what I tried:
ns = new NetStream(nc);
ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
ns.client = this;
ns.play(streamName1);
ns2 = new NetStream(nc);
[Code]...
View 1 Replies
Apr 11, 2012
In multiple instances, limiting the maximum number of connections for the same IP?You give me the answer is to limit a single instance, whether there is a way to limit the number of users of the entire connected to the FMS?
View 5 Replies
Apr 30, 2009
I should probably be refrencing a book rather than continueing to ask questions here but there are no books for AS 3.0 and flash media server. So this forum is my book i suppose any way here is what i have...I have 2 .as files one holding code for a netConnection and one for creating the netStream my problem is i need to pass the netConnection refrence from the netConnection.as file to the netstream....here is my failed attempt to do so I also get the following error message..ArgumentError: Error #2126: NetConnection object must be connected.
[Code]...
View 3 Replies
Nov 22, 2011
I have to replace the mx:VideoDisplay component in an existing Flex project with a custom made component. To achieve this, I have to conform to its current Interface, so my component receives the video urls (via source parameter) in the form of either:
/data/myflvfile.flv (if the file is played locally)
rtmp://streamcloud.myserver.com/cfx/st/somedirectory/myflvfile.flv (if the file is streamed from Cloudfront)
My new component is based on NetConnection and NetStream. With any of the entries above I have to split the input in two strings: one for the NetConnection.connect(NetConnectionStr) method and the other for the NetStream.play(NetStreamStr) method. For instance:
Given /data/myflvfile.flv then:
NetConnectionStr = null
NetStreamStr = "/data/myflvfile"
[Code] .....
Building the two strings is very obvious for the "local files" case, but it gets tricky in the others. The problem is that I have no smart way to guess what part of the input is the server URL and what part is the stream name + directory structure. In some examples found on the Internet, people are simply guessing that the last part of the source (what is after the last "/" found) is the NetStream name. In my case, this is not always true because the streams may be in subdirectories on the server. It is even worse because server names may contain "/" characters!
Strategies to solve it:
Connecting to server, retrieving its real URL, finding stream name
As NetConnection seems to be "smart" enough, my first attempt was to invoke connect method with the full source url. Unfortunately, I found no way to get the real server address out of a NetConnection object (connection.uri returns back the exact input). So this seems to be a dead end. Connecting to server, iteratively retrieving streams. Another strategy could be to connect to the server and then try iteratively (starting from the very end) to play streams until it works:
Try 1: stream.play(myflvfile) FAIL
Try 2: stream.play(subdirectory/myflvfile) FAIL
Try 3: stream.play(somedirectory/subdirectory/myflvfile) SUCCESS
How to do it in the original VideoDisplay component (if it is based on NetConnection/NetStream objects?)?
View 2 Replies
Mar 11, 2011
I am implementing a video player in Actionscript and I need to be able to define the starting play time for the videos. Netstream.seek(pos) works for flv files but fails for H.264 files (the player starts playing the video from the beginning). Anyone knows what might be the problem? (I am using Netstream for this instead of adding a parameter with the starting time when I call the Netstream.play method because I don't have Flash Media Server).
View 2 Replies
Sep 6, 2011
I have this Main swf that is supposed (via buttons) load external swf's. These external swf's play single videos with code that follows ie:
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
[Code]....
When this video clip has ended I want the main swf to be loaded again.
View 2 Replies
Jan 17, 2011
I am having difficulty in adjusting a statement to fit my circumstances. I have a variable being set using flashvars that looks like:
Code:
video_link: "rtmp://s3hejskwlkdjsjs.cloudfront.net/cfx/st/sites/default/files/videos/myvideo.flv"
and a flash function that looks like:
Actionscript Code:
[Code]...
View 1 Replies
Jun 23, 2010
Would I be able to send a image using NetStream or NetConnection?
View 1 Replies
Apr 7, 2011
Both NetConnection object and NetStream object has a client property. Can I use the same client for both objects?
View 1 Replies
Dec 21, 2010
I am aware that I can share simple Objects using LocalConnection, but this does not (in my limited testing) appear to work with NetConnection or NetStream.
In short, I wish to have a single SWF that acts as a NetConnection proxy for other SWF files in the HTML page. The client SWFs require direct access to NetStream objects on the proxys NetConnection.
Is this at all feasible, or will each client SWF require its own NetConnection?
I am aware that I could build the entire application in flash and utilize a single NetConnection internally, but this is NOT what I want to do.
View 1 Replies
Aug 1, 2010
I want to have a number of scenes with video players on each. Pasting means I get problems with duplicative functions. I am okay with creating new instances, but still run into duplicative functions (like onMetaData) I just can't seem to get around. Is there an elegant way of telling flash at the beginning to create all new nc, ns, etc?
Below is partial code (the part that is the problem).
// Video setup
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
ns.addEventListener(NetStatusEvent.NET_STATUS, onStatus);
[Code] .....
View 0 Replies
May 24, 2010
i use loadmovie() to load youtube videos inside my flash website but when i load another video the old one doesn't stop, so i tried unloadmovie to destroy it but it seems that i did a mistake in my code
This is how the code looks to stop the old one an load the new:
vloader.unloadMovie();
vloader.loadMovie("http://www.youtube.com/v/Alw5hs0chj0&hl=fr&fs=1hJ-mPcGtC");
How to do that? use other objects or classes, i only want to edit that code.
Note: I have an empty MOVIE CLIP called "vloader" where i load the video player.
View 2 Replies
Oct 11, 2010
I'm trying to use the NetConnection class to connect to a live video feed on an external server. I have it set up to start playing my video when the user clicks a Play button, however, this appears in my output every time I click the Play button:
ArgumentError: Error #2126: NetConnection object must be connected.
at flash.net::NetStream/ctor()
at flash.net::NetStream()
at Over/connectLiveStream()[Over::frame2:31]
Here is the (I think relevant) code:
if (playVid.label == "Play") {
nc = new NetConnection();
nc.objectEncoding = flash.net.ObjectEncoding.AMF0;
nc.connect("rtmp://my.rtmp.server:1935/live/");
nsPlay = new NetStream(nc);
nsPlay.play("livestream.flv");
}
View 1 Replies
Oct 20, 2011
Is it possible to connect one Nestream (live from FMS) to many Video objects? So all the video objects on the stage show the same netstream.
View 1 Replies
Jul 18, 2005
I have two videos, and I control them using ns1 and ns2, the NetStream objects. I want to stop the sound of one of them, then turn on the sound of the other. When I use the following two lines, I try to use audio1 and audio2 to start and stop the sounds using setVolume, but it doesn't work.
Code:
this.createEmptyMovieClip("snd1", 0);
snd1.attachAudio(ns1);
audio1 = new Sound(snd1);
[Code]...
View 1 Replies
May 4, 2010
The argument to my method func() must implement the two unrelated interfaces IFoo and IBar. Is there a better way of doing this than declaring another interface only for this purpose that inherits from IFoo and IBar and using that interface as the argument type?
[Code]...
View 2 Replies
Aug 23, 2011
There are many times that I've needed to execute some code after a number of events have fired, and I've come up with counters and such but I feel there must be a better way.For example, say five files need to be loaded, after which a UI component will become active.If I set up a counter that increments each time a file is requested, then decrements each time one has loaded, I run the risk that the first two or three files may somehow get completely loaded before my code gets around to requesting the fourth and fifth, which would mean that my counter would be at zero when I still have two files to load, thus allowing the UI component to be prematurely activated.
There are some cases where you could know the number that need to be loaded before the requests go out, but it's possible that the first file contains the paths (and therefore the number of) files.And this file-loading scenario is only an example of the pattern I'm trying to explain.)
View 4 Replies
Sep 9, 2011
I am working on a video conferance projectthere will be a lecturer and an interpreter.interpreter will write the translated text simultaneously.what I am trying to is add vocal translation but I also want to keep the original audio is it possible to attach multiple audio to netStream or do I have to create another netStream for 2nd audio??
View 1 Replies
Aug 31, 2011
I'm very new to Flash. I'm going to have a motion graphics piece where a vid will play for a short time, filling the screen, then shrink to a small square thats in a grid of 6-9 small squares. Once it shrinks down, it stops at its current frame. So there will be 6-9 small squares of the last frame of 6-9 videos. Can this be accomplished in flash? These are not interactive videos; they will automatically play when the first appear
View 1 Replies
Jan 19, 2010
I'm using the netstream and video object to play a video in flash. Specifically a mp4 video.
What I'm trying to do is start playing the file from a specific position (Ex. 20seconds).
However with netstreamObject.seek(20) doesn't work unless the stream has been loaded past 20seconds. Is there a way to specify starting to load at 20s? Or any other way of accomplishing this?
View 5 Replies
Jun 13, 2011
Since I have to get data from other red5 application. is it possible using multiple netconnection in one mxml application?
View 1 Replies
Apr 17, 2007
Im a beginner at flash video, and have been using the built in FLV component which I can apply actionscript fades to easily. However I don't seem to be able to use them when I use the better method... NetStream. Here is an example fade:
[Code]...
View 1 Replies
Jan 25, 2011
I have a swf file, which plays 6 videos one after the other in a loop. This file is very huge so it is taking more than a minute for it to start playing after the page finished loading. I have taken the original video file, and split it into 6 files. I plan to have 6 tiles in the flash file as soon as the page loads, and when some tile is clicked, the video is loaded dynamically only that video or swf file so that it saves the loading time and once this is done, i want it to revert back to the main page with tiles. I am just starting off with flash and I have no clue how this is possible in flash. I am not asking for code, i need some tips to get started.
View 1 Replies
Feb 23, 2012
I'm trying to call AMFPHP two times on a single ActionScript method and what happen is that only the first call succeed. The second one doesn't return an error, doesn't alertsanything, it is more likely that it doesn't even happens and I'm not sure why.Here is an example:
public function editSomething():void{
if(dgChild.selectedIndex == -1){
Alert.show("You need to select a register in order to edit it.");
[code].....
View 1 Replies
Jan 11, 2010
I have created a FLV video player using the AS3 flash.media.Video object (not the FLV playback component) and I am trying to listen for meta events and Cue Points embedded in the FLV video but I am not receiving any when I trace the movie. The cue points are not being created dynamically, they are in the FLV video.
Video embed code:
// Initialize net stream
nc = new NetConnection();
nc.connect (null); // Not using a media server.
[Code]....
Is there anything I am missing have wrong to capture events from my net stream?
View 2 Replies
Oct 27, 2010
I'm trying to attach a single NetStream Object to two separate Video objects instead of pulling redundant streams from the server. The expected behavior would be for both Video's to display the same content. However, it seems that the last video I attach the NetStream to is the only Video that will display the content.Has anyone else run into this? I'd rather not go to the inelegant steps of using BitmapData to clone pixels if I don't have to.
View 2 Replies