ActionScript 3.0 :: Number Of Video / NetStream And NetConnection Instances Multiple Videos Would Require?
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
Similar Posts:
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
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
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
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
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
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
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
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
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
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
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
Jul 18, 2011
The stop button plays as expected. The play/pause button plays as expected. The issue is when you press pause which will cause the play button to appear, then press stop. the video automatically plays and it shouldn't. I have bolded the control button script for convenience.
[Code]...
View 1 Replies
Sep 22, 2009
If I'm streaming live video and chatting in an FMS app, should each component have its own instance of NetConnection or should they share one? Was thinking perhaps the quality of the live video stream would be hurt in a sharing situation but am not sure the architecture works like that.
From a development standpoint, I'd like to make one NetConnection instance in my main application file and connect with it. Then, when successfully connected, I'd like to pass that connection into any custom components that need it.
View 14 Replies
Dec 7, 2011
I am not sure how to accomplish what I need. I'm developing an iOS video app. I will package ALL videos with the ipa.I created a net connection and net stream successfully. I'm importing them into an array. They play perfectly. However, I need a way to mask out the main interface. Ideally, I'd like to drop that video into a dynamically called movie clip that has the controls in it. I made one called holder_mc.(There are no controls in it yet.) I cannot seem to get that on screen at the right z-index (not sure if that's the right term). I tried creating an empty movie clip and putting the video in it. That did not work either. This has to be simple.
View 1 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
Feb 4, 2010
I am creating a stand alone DVD to be used with Flash player. I am wanting to add different videos that play with different buttons. The following is the code I have for the video to play when the corresponding button is clicked..... My problem is how do I get that video to "leave" and stop playing when another button is pushed to play a different video.
Educators_btn.addEventListener(MouseEvent.CLICK,clickEducators);
function clickEducators(evtObj:MouseEvent)
{
gotoAndStop("OE")
[code]....
View 2 Replies
Sep 22, 2009
Have a Flex/FMS web meeting app that has multiple custom components - live streaming camera, chat, slide dec.
Each component does its share of communicating through the FMS server. Should all three of those things share one NetConnection object in the application or will the live video stream suffer when users chat or the meeting presenter advances slides and such?
View 2 Replies
Jun 9, 2010
today I install fms3.5 on my pc.
1)I can use rtmp://localhost/vod/mp4:sample2_1000kbps.f4v , it works ok. But when I use rtmp://192.168.8.3/vod/mp4:sample2_1000kbps.f4v, I got Netconnect.connection.rejected. 192.168.8.3 is my fms server IP.
2)When I set fms use port 1935 and 80, rtmp://192.168.8.3/vod/mp4:sample2_1000kbps.f4v works ok on other pc. But using wireshark(Wireshark is a network protocol analyzer for Unix and Windows.) I found , the flash player connect 1935 port at first, it send "connect",the server replay "connection.rejected" and "no scope "vod" on this server". Than it connect to 80 port, so I see the video is not send throw 1935 port with rtmp, but throw 80 port with rtmpt. Why? How can I see video throw rtmp?
View 9 Replies
Sep 8, 2009
Ok so here is my XML slideshow Actionscript:
ActionScript Code:
stop();
var xmlRequest:URLRequest= new URLRequest("graphicImages.xml");
var xmlLoader:URLLoader = new URLLoader(xmlRequest);
[Code]....
So I figured that the coding of separate scenes would work independently of one another, but I guess I was dead wrong, because when I apply this to a different scene and change the XML path for a different set of images, I get all sorts of conflict errors when I test the entire movie. I have my flash film set up so that each link send the user to a different scene, which plays a unique intro for each, and then the slideshow appears on screen and the viewer can navigate the images.
Is there a work around for this? Or am I going to have to break my flash movie into separate movies? Or should I just add a suffix to all my vars and functions so that they are unique for each scene?
View 1 Replies