Search Results

Search found 40 results on 2 pages for 'netstream'.

Page 1/2 | 1 2  | Next Page >

  • How to loop video using NetStream in Data Generation Mode

    - by WesleyJohnson
    I'm using a NetStream in Data Generation Mode to play an embeded FLV using appendBytes. When the stream is finished playing, I'd like to loop the FLV file. I'm not sure how to achieve this. Here is what I have so far (this isn't a complete example): public function createBorderAnimation():void { // Load the skin image borderAnimation = Assets.BorderAnimation; // Convert the animation to a byte array borderAnimationBytes = new borderAnimation(); // Initialize the net connection border_nc = new NetConnection(); border_nc.connect( null ); // Initialize the net stream border_ns = new NetStream( border_nc ); border_ns.client = { onMetaData:function( obj:Object ):void{ trace(obj); } } border_ns.addEventListener( NetStatusEvent.NET_STATUS, border_netStatusHandler ); border_ns.play( null ); border_ns.appendBytes( borderAnimationBytes ); // Initialize the animation border_vd = new Video( 1024, 768 ); border_vd.attachNetStream( border_ns ); // Add the animation to the stage ui = new UIComponent(); ui.addChild( DisplayObject( border_vd ) ); grpBackground.addElement( ui ); } protected function border_netStatusHandler( event:NetStatusEvent ):void { if( event.info.code == "NetStream.Buffer.Flush" || event.info.code == "NetStream.Buffer.Empty" ) { border_ns.appendBytesAction( NetStreamAppendBytesAction.RESET_BEGIN ); border_ns.appendBytes( borderAnimationBytes ); border_ns.appendBytesAction( NetStreamAppendBytesAction.END_SEQUENCE ); } } This will loop the animation, but it starts chewing up memory like crazy. I've tried using NetStream.seek(0) and NetStream.appendBytesAction( NetStreamAppendBytesAction.RESET_SEEK ), but then I'm not sure what to do next. If you just try to call appendBytes again after that, it doesn't work, presumably because I'm appending the full byte array which has the FLV header and stuff? I'm not very familiar with how that all works. Any help is greatly appreciated.

    Read the article

  • Easy bidirectional communication via P2P NetStream

    - by andsve
    I've been looking into the P2P support in Flash 10, using Adobe Stratus service. I have successfully been able to send data from one user to another, put my problem is that I haven't figured out how to send data back in some easy way (or as some kind of response to the first call). What I'm currently doing; First set up a connection with Stratus service nc = new NetConnection(); nc.addEventListener(NetStatusEvent.NET_STATUS, ncStatusHandler); nc.connect(APPLICATION_URL + DEVELOPER_KEY); On the "server" side I do: sendStream = new NetStream(nc, NetStream.DIRECT_CONNECTIONS); sendStream.addEventListener(NetStatusEvent.NET_STATUS, sendStreamHandler); sendStream.publish("file"); And on the "client" side: // remoteFileID.text is manually copied by the user from the server (which is nc.nearID). recvStream = new NetStream(nc, remoteFileID.text); recvStream.client = this; recvStream.addEventListener(NetStatusEvent.NET_STATUS, recvStreamHandler); recvStream.play("file"); Then I call a remote function on the client: ... sendStream.send("aRemoteFunction", parameterData); ... Now my problem; I want to do the same from the client to the server, to notify that everything went well, or something failed. From what I understand, I will have to setup a new NetStream from the client to the server (i.e publish on the client and play on the server). But to accomplish this, the server need to know the nc.nearID on the client. Is it possible to get that ID without forcing the user to manually copy it from the client to server? Or, is there an easier way for the client to talk back to the server that I am missing?

    Read the article

  • AS3: Showing bufferlength of NetStream

    - by Tinelise
    I am trying to show the buffered amount of a video that is playing. I am using netstream.bufferLength to do this and it kinda seems to be right. Exept from the fact that it is almost constantly the same amount that is buffered. This can't be right? I want it to be like youtube where you can press pause and the buffer will continue to rise. When I click pause it just stays the same.. Anybody knows how to show buffer length?

    Read the article

  • Actionscript NetStream.play drops port in relative URLs

    - by Steve Middleton
    Hi, the current page my flash application is running from is http://localhost:3000/. I'm trying to play a video using NetStream.play(relativeURL) by using a relative URL (e.g. "myVideo.flv"), but when I look at the actual request made by actionscript, it's dropping the port number. (e.g. http://localhost/myVideo.flv). Is there something I can do on the flash side to make this work? Is anyone else having this problem?

    Read the article

  • event listener says NetStream.Play.Start but I see no video

    - by Curtis
    I'm trying to test out the Adobe Media Server, and I'm following some tutorials in order to stream a video. I have a NetConnection which successfully connects to the application on the server, then I have the code below. It looks like it's supposed to play a video, but it doesn't. It creates the video object as a black square in the top left corner, and the event.info.code says NetStream.Play.Start, but I don't see the video playing. case "NetConnection.Connect.Success": var v:Video = new Video(); v.width=200; v.height=200; v.x=0; v.y=0; v.visible=true; v.opaqueBackground=false; stage.addChild(v); var ns:NetStream = new NetStream(nc); ns.addEventListener(NetStatusEvent.NET_STATUS,netStatusHandler); v.attachNetStream(ns); ns.play("mp4:polymorphics.f4v"); I can also try ns.play("rtmp://localhost/vod/mp4:tests/polymorphics.f4v"); but that gives me a Stream Not Found error The lines that begin with "ns" means that they're generated by my NetStream listener, as opposed to my NetConnection listener. Connecting... connected is: true event.info.level: status event.info.code: NetConnection.Connect.Success onReply recieved value: Hello, World! ns connected is: true ns event.info.level: status ns event.info.code: NetStream.Play.Reset ns connected is: true ns event.info.level: status ns event.info.code: NetStream.Play.Start

    Read the article

  • How to get netstream bytesLoaded and bytesTotal from streaming .mp4?

    - by Amy
    I have a flex 3 app that uses netstream and a video object to stream .mp4 movies. I want to use the bytesLoaded and bytesTotal properties of the netstream to display the buffering information. I would also like to get any information about the number of frames that are dropped if possible. When I've tested on .flv I'm able to get the information without a problem, but it doesn't seem to work on .mp4. Is it possible to get this information streaming .mp4? Is there some configuration that I'm missing to make things work the same for .mp4 as .flv? Thanks!

    Read the article

  • access netStream or movieClip from a loop AS2

    - by conspirisi
    I've got a load of videos var ns1:NetStream = new NetStream(nc); container1.compMa.theVideo.attachVideo(ns1); ns1.play("sukh_diesel.flv", 1); // var ns2:NetStream = new NetStream(nc); container2.compMa.theVideo.attachVideo(ns2); ns2.play("sukh_beneath.flv", 1); //and 4 more, which I've left out to be concise I want to pause them with function pauseVid(){ this.ns1.pause(); for(i=1;i<7;i++){ this["ns"+i]pause(); } } the commented out line: this.ns1.pause() works, but when I try it in a loop it can't access it?

    Read the article

  • Detect TCP connection close when playing Flash video

    - by JoJo
    On the Flash client side, how do I detect when the server purposely closes the TCP connection to its video stream? I'll need to take action when this occurs - maybe attempt to restart the video or display an error message. Currently, the connection closing and the connection being slow look the same to me. The NetStream object ushers a NetStream.Play.Stop event in both cases. When the connection is slow, it usually recovers by itself within seconds. I wish to only take action when the connection is closed, not when it is slow. Here's how my general setup looks like. It's the basic NetConnection-NetStream-Video setup. this.vidConnection = new NetConnection(); this.vidConnection.addEventListener(AsyncErrorEvent.ASYNC_ERROR, this.connectionAsyncError); this.vidConnection.addEventListener(IOErrorEvent.IO_ERROR, this.connectionIoError); this.vidConnection.addEventListener(NetStatusEvent.NET_STATUS, this.connectionNetStatus); this.vidConnection.connect(null); this.vidStream = new NetStream(this.vidConnection); this.vidStream.addEventListener(AsyncErrorEvent.ASYNC_ERROR, this.streamAsyncError); this.vidStream.addEventListener(IOErrorEvent.IO_ERROR, this.streamIoError); this.vidStream.addEventListener(NetStatusEvent.NET_STATUS, this.streamNetStatus); this.vid.attachNetStream(this.vidStream); None of the error events fire when the server closes the TCP or when the connection freezes up. Only the NetStream.Play.Stop event fires. Here's a trace of what happens from initially playing the video to the TCP connection closing. connection net status = NetConnection.Connect.Success playStream(http://192.168.0.44/flv/4d29104a9aefa) NetStream.Play.Start NetStream.Buffer.Flush NetStream.Buffer.Full NetStream.Buffer.Empty checkDimensions 0 0 onMetaData NetStream.Buffer.Full NetStream.Buffer.Flush checkDimensions 960 544 NetStream.Buffer.Empty NetStream.Buffer.Flush NetStream.Play.Stop

    Read the article

  • Actionscript: NetStream stutters after buffering.

    - by meandmycode
    Using NetStream to stream content from http, I've noticed that esp with certain exported h264's, if the player encounters an empty buffer, it will stop and buffer to the requested length (as expected). However once the buffer is full, the playback doesn't resume, but instead jumps ahead, as such- instantly playing the buffered duration in a brief moment, and thusly triggering an empty buffer again.. this will then continue over and over. Presumably when the netstream pauses to buffer, the playhead position continues, and the player is attempting to snap to that position on resume- however given it could take 5 seconds to build a 2 second buffer- it ends up with a useless buffer again.. (this is an assumption) I've attempted to work around this by listening for an empty buffer netstatus event, pausing the stream, and at the same time setting up a loop to check the current buffer length vs the requested buffer length.. and resuming once the buffer length is greater than or equal to the requested buffer.. however this causes problems when there isn't enough of the video remaining.. for example, a 10 second buffer with only 5 seconds remaining, the loop just sits there waiting for a buffer length of 10 seconds when theres only 5 left... You would think that you could simply check which was smaller, the time left or the requested buffer length.. however the times flash gives are not accurate.. If you add the net streams current time index, plus the buffered time, the total is not the entire duration of the movie (when at the end).. it is close but not the same. This brings me back to the original problem, and if there is another way to fix this, clearly flash knows when the buffer is ready, so how can i get flash pause when it buffers, and resume once the buffer is ready? currently it doesn't.. it pauses and then once the buffer is full- it plays the entire buffered content in about .1 of a second. Thanks in advance, Stephen.

    Read the article

  • Detect NetStream events with AS3 Video Object (not component)

    - by JFOX
    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. ns = new NetStream(nc); // Add video to stage vid = new Video(456,675); addChild (vid); // Add callback method for listening on // NetStream meta data client = new Object(); ns.client = client; client.onMetaData = this.nsMetaDataCallback; client.onCuePoint = this.onCuePoint; // Play video vid.attachNetStream ( ns ); ns.play ("flv/00_010.flv"); callback handlers in the same class as the above code: public function onCuePoint(info:Object):void { trace("cuePoint: time = " + info.time + " name = " + info.name + " type = " + info.type); if (ns) ns.pause(); } public function nsMetaDataCallback (mdata:Object):void { trace (mdata.duration); } Is there anything I am missing have wrong to capture events from my net stream?

    Read the article

  • Flash Player: Any remedy for the stale video image data problem (in a reused NetStream object)?

    - by amn
    Has anyone experienced stale stills of a previous playback for a reused NetStream object? If so, what are the workarounds for this, except re-creating the object (which eats performance and time)? It is hard to reuse NetStream objects because of a (in my opinion) fundamental issue with NetStream objects - when you 'close' a playing stream and at a later point issue a 'play' call on it again with a different name, the stream appears to still contain a stale image lingering from previous playback, and this is of course displayed in the Video object for a moment - the moment I assume it takes for new stream data to become available from server. Because of this behavior, to improve my users' visual experience, I simply discard a NetStream object after a playback session, and assign a new NetStream object to the same variable, set it up, and play something else. It appears to work - no stale image - but what bugs me is that it's a work around and costs performance (construction and setting up the object again - event listeners and 'client' delegates and more memory usage - NetStream objects are not garbage collected immediately, it takes some time). It would be really nice to REALLY be able to reuse a stream. I am thinking of something akin to Video.clear method, but for the NetStream class. Am I missing something?

    Read the article

  • Flash Player 11.3 et AIR 3.3 disponibles en versions bêta : améliorations de Stage3D, support de NetStream et Stylus pour Android

    Flash Player 11.3 et AIR 3.3 disponibles en versions bêta améliorations de Stage3D, support de NetStream, Stylus pour Android et débogage USB Flash Player 11.3, le lecteur multimédia et AIR 3.3 la plateforme d'applications media riche sont disponibles en versions bêta. Pour cette version de Flash Player, Adobe c'est une fois de plus concentrer sur l'intégration d'un ensemble de fonctionnalités rendant la plateforme plus attractive. Flash Player 11.3 Beta apporte le support du clavier en mode plein écran. Cette fonctionnalité permet aux développeurs de déterminer si l'application est en mode plein écran et d'utiliser toutes les fonctionnalités du clavier disponibles. Le mode protégé...

    Read the article

  • Syncing two AS3 NetStreams

    - by Lowgain
    I'm writing an app that requires an audio stream to be recording while a backing track is played. I have this working, but there is an inconsistent gap in between playback and record starting. I don't know if I can do anything to make the sync perfect every time, so I've been trying to track what time each stream starts so I can calculate the delay and trim it server-side. This also has proved to be a challenge as no events seem to be sent when a connection starts (as far as I know). I've tried using various properties like the streams' buffer sizes, etc. I'm thinking now that as my recorded audio is only mono, I may be able to put some kind of 'control signal' on the second stereo track which I could use to determine exactly when a sound starts recording (or stick the whole backing track in that channel so I can sync them that way). This leaves me with the new problem of properly injecting this sound into the NetStream. If anyone has any idea whether or not any of these ideas will work, how to execute them, or some alternatives, that would be extremely helpful! Been working on this issue for awhile

    Read the article

  • FMS NetConnection.Connect.Close happening when starts and even in the middle of video in Flash with

    - by Sunil Kumar
    Hi I have developed a Flash Video player in Flash CS3 with Action Script 2.0 to play video from Adobe Flash Media Server 3.5. To play video from FMS 3.5, first I have to verify my swf file on FMS 3.5 server console so that it can be ensure that RTMP video URL only be play in verified SWF file. Right now I am facing problem of "NetConnection.Connect.Close" when I try to connect my NetConnection Object to FMS 3.5 to stream video from that server. So now I am getting this message "NetConnection.Connect.Close" from FMS 3.5. When this is happening in my office area at the same time when I am checking the the same video url from out side the office (With help of my friends who is in another office) area it is working fine. My friends naver faced even a single issue with NetConnection.Connect.Close. But in my office when I got message NetConnection.Connect.Close, I can play another streaming video very well like mtv.com jaman.com rajshri.com etc. Some time FMS works fine and video starts playing but in the middle of the video same thing happen "NetConnection.Connect.Close" There is no issue of Bandwidth in my office. I do't know why this is happening. Please see the message when I am getting "NetConnection.Connect.Close" message. NetConn == data: NetConn == objectEncoding: 0 NetConn == description: Connection succeeded. NetConn == code: NetConnection.Connect.Success NetConn == level: status NetConn == level: status NetConn == code: NetConnection.Connect.Closed Please help Thanks & regards Sunil Kumar

    Read the article

  • How do I record video to a local disk in AIR?

    - by Jim OHalloran
    I'm trying to record a webcam's video and audio to a FLV file stored on the users local hard disk. I have a version of this code working which uses NetConnection and NetStream to stream the video over a network to a FMS (Red5) server, but I'd like to be able to store the video locally for low bandwidth/flaky network situations. I'm using FLex 3.2 and AIR 1.5, so I don't believe there should be any sandbox restrictions which prevent this from occurring. Things I've seen: FileStream - Allows reading.writing local files but no .attachCamera and .attachAudio methids for creating a FLV. flvrecorder - Produces screen grabs from the web cam and creates it's own flv file. Doesn't support Audio. License prohibits commercial use. SimpleFLVWriter.as - Similar to flvrecorder without the wierd license. Doesn't support audio. This stackoverflow post - Which demonstrates the playback of a video from local disk using a NetConnection/NetStream. Given that I have a version already which uses NetStream to stream to the server I thought the last was most promising and went ahead and put together this demo application. The code compiles and runs without errors, but I don't have a FLV file on disk which the stop button is clicked. - <mx:Script> <![CDATA[ private var _diskStream:NetStream; private var _diskConn:NetConnection; private var _camera:Camera; private var _mic:Microphone; public function cmdStart_Click():void { _camera = Camera.getCamera(); _camera.setQuality(144000, 85); _camera.setMode(320, 240, 15); _camera.setKeyFrameInterval(60); _mic = Microphone.getMicrophone(); videoDisplay.attachCamera(_camera); _diskConn = new NetConnection(); _diskConn.connect(null); _diskStream = new NetStream(_diskConn); _diskStream.client = this; _diskStream.attachCamera(_camera); _diskStream.attachAudio(_mic); _diskStream.publish("file://c:/test.flv", "record"); } public function cmdStop_Click() { _diskStream.close(); videoDisplay.close(); } ]]> </mx:Script> <mx:VideoDisplay x="10" y="10" width="320" height="240" id="videoDisplay" /> <mx:Button x="10" y="258" label="Start" click="cmdStart_Click()" id="cmdStart"/> <mx:Button x="73" y="258" label="Stop" id="cmdStop" click="cmdStop_Click()"/> </mx:WindowedApplication> It seems to me that there's either something wrong with the above code which is preventing it from working, or NetStream just can't be abused in this wany to record video. What I'd like to know is, a) What (if anything) is wrong with the code above? b) If NetStream doesn't support recording to disk, are there any other alternatives which capture Audio AND Video to a file on the users local hard disk? Thanks in advance!

    Read the article

  • Play video while downloading into local disk [AIR]

    - by vincentma
    Hello guys, Using NetStream, I can create progressive video player. But can I save the downloaded chunk to my local disk in AIR?? My first idea is that, download part of file into local disk, let NetStream pointing to that file, and then appends the chunks to that file (FileMode.APPEND) periodically. But it does not work and seems that NetStream would 'lock' the file preventing write operation. Any ideas?

    Read the article

  • How to detect when video is buffering?

    - by Leon
    Hi guys, my question today deals with Flash AS3 video buffering. (Streaming or Progressive) I want to be able to detect when the video is being buffered, so I can display some sort of animation letting the user know to wait just a little longer. Currently my video will start up, hold on frame 1 for 3-4 secs then play. Kinda giving the impression that the video is paused or broken :( Update Thanks to iandisme I believe I'm faced in the right direction now. NetStatusEvent from livedocs. It seems to me that the key status to be working in is "NetStream.Buffer.Empty" so I added some code in there to see if this would trigger my animation or a trace statement. No luck yet, however when the Buffer is full it will trigger my code :/ Maybe my video is always somewhere between Buffer.Empty and Buffer.Full that's why it won't trigger any code when I test case for Buffer.Empty? Current Code public function netStatusHandler(event:NetStatusEvent):void { // handles net status events switch (event.info.code) { case "NetStream.Buffer.Empty": trace("¤¤¤ Buffering!"); //<- never traces addChild(bufferLoop); //<- doesn't execute break; case "NetStream.Buffer.Full": trace("¤¤¤ FULL!"); //<- trace works here removeChild(bufferLoop); //<- so does any other code break; case "NetStream.Buffer.Flush": trace("¤¤¤ FLUSH!"); //Not sure if this is important break } }

    Read the article

  • C# StreamReader.EndOfStream produces IOException

    - by Ziplin
    I'm working on an application that accepts TCP connections and reads in data until an </File> marker is read and then writes that data to the filesystem. I don't want to disconnect, I want to let the client sending the data to do that so they can send multiple files in one connection. I'm using the StreamReader.EndOfStream around my outter loop, but it throws an IOException when the client disconnects. Is there a better way to do this? private static void RecieveAsyncStream(IAsyncResult ar) { TcpListener listener = (TcpListener)ar.AsyncState; TcpClient client = listener.EndAcceptTcpClient(ar); // init the streams NetworkStream netStream = client.GetStream(); StreamReader streamReader = new StreamReader(netStream); StreamWriter streamWriter = new StreamWriter(netStream); while (!streamReader.EndOfStream) // throws IOException { string file= ""; while (file!= "</File>" && !streamReader.EndOfStream) { file += streamReader.ReadLine(); } // write file to filesystem } listener.BeginAcceptTcpClient(RecieveAsyncStream, listener); }

    Read the article

  • There's a black hole in my server (TcpClient, TcpListener)

    - by Matías
    Hi, I'm trying to build a server that will receive files sent by clients over a network. If the client decides to send one file at a time, there's no problem, I get the file as I expected, but if it tries to send more than one I only get the first one. Here's the server code: I'm using one Thread per connected client public void ProcessClients() { while (IsListening) { ClientHandler clientHandler = new ClientHandler(listener.AcceptTcpClient()); Thread thread = new Thread(new ThreadStart(clientHandler.Process)); thread.Start(); } } The following code is part of ClientHandler class public void Process() { while (client.Connected) { using (MemoryStream memStream = new MemoryStream()) { int read; while ((read = client.GetStream().Read(buffer, 0, buffer.Length)) > 0) { memStream.Write(buffer, 0, read); } if (memStream.Length > 0) { Packet receivedPacket = (Packet)Tools.Deserialize(memStream.ToArray()); File.WriteAllBytes(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory), Guid.NewGuid() + receivedPacket.Filename), receivedPacket.Content); } } } } On the first iteration I get the first file sent, but after it I don't get anything. I've tried using a Thread.Sleep(1000) at the end of every iteration without any luck. On the other side I have this code (for clients) . . client.Connect(); foreach (var oneFilename in fileList) client.Upload(oneFilename); client.Disconnect(); . . The method Upload: public void Upload(string filename) { FileInfo fileInfo = new FileInfo(filename); Packet packet = new Packet() { Filename = fileInfo.Name, Content = File.ReadAllBytes(filename) }; byte[] serializedPacket = Tools.Serialize(packet); netStream.Write(serializedPacket, 0, serializedPacket.Length); netStream.Flush(); } netStream (NetworkStream) is opened on Connect method, and closed on Disconnect. Where's the black hole? Can I send multiple objects as I'm trying to do? Thanks for your time.

    Read the article

  • StreamReader.EndOfStream produces IOException

    - by Ziplin
    I'm working on an application that accepts TCP connections and reads in data until an </File> marker is read and then writes that data to the filesystem. I don't want to disconnect, I want to let the client sending the data to do that so they can send multiple files in one connection. I'm using the StreamReader.EndOfStream around my outter loop, but it throws an IOException when the client disconnects. Is there a better way to do this? private static void RecieveAsyncStream(IAsyncResult ar) { TcpListener listener = (TcpListener)ar.AsyncState; TcpClient client = listener.EndAcceptTcpClient(ar); // init the streams NetworkStream netStream = client.GetStream(); StreamReader streamReader = new StreamReader(netStream); StreamWriter streamWriter = new StreamWriter(netStream); while (!streamReader.EndOfStream) // throws IOException { string file= ""; while (file!= "</File>" && !streamReader.EndOfStream) { file += streamReader.ReadLine(); } // write file to filesystem } listener.BeginAcceptTcpClient(RecieveAsyncStream, listener); }

    Read the article

  • XMPP TLS connection with SslStream

    - by Marcom
    I am trying to create a simple xmpp client that connects to Gtalk. The first part of the handshake seems to work. Ror the TLS handshake I created a client SslStream, connected to the intended server (talk.google.com) and successfully got authenticated . The first SSlStream.Read is to receive the greeting reply, it went fine . I do a SslStream.write to send my first command, but when i do my Sslstream.Read() to get the reply , i get this error."System.IO.IOException: Unable to read data from the transport connection: An established connection was aborted by the software in your host machine." Can anyone point me to the right direction? I am using code very similar to the example on msdn http://msdn.microsoft.com/en-us/library/system.net.security.sslstream.aspx except that I switch from a Network stream to a Sslstream when TLS is negotiated. netStream.Flush(); sslStream = new SslStream(netStream, true, new RemoteCertificateValidationCallback(ValidateServerCertificate), null ); sslStream.AuthenticateAsClient("talk.google.com");

    Read the article

  • Connecting to a Ghost User in Flex RTMFP

    - by Dan
    I have a simple Flex RTMFP P2P video app in the same mold as the Adobe Cirrus VideoPhone Sample application. A problem I've been encountering in developing this app (the same problem occurs in the sample) is when you try to connect to a ghost Stratus instance i.e you try to call someone whose Stratus id is in the database but who is no longer on the page. So here's an example of what I mean: Let's say you go to the Adobe Stratus sample and connect as Dan. Then open up a new tab, go to the sample again and connect as Fred. If from this point, you (as Fred) call Dan everything will work fine. But, if you close the tab in which you connected as Dan, and then from the Fred tab try to connect to Dan the program will just hang. I would have thought there would be a NetStream event that would be triggered if you tried to connect to a Stratus instance that is not longer online but I can't seem to find anything besides NetStream.Connect.Rejected which doesn't seem to be called. Any help is much appreciated!

    Read the article

  • Masking FLV video in AS3 with PNG alpha channel.

    - by James Roberts
    Hey there, I'm trying to mask an FLV with a PNG alpha channel. I'm using BitmapData (from a PNG) but it's not working. Is there anything I'm missing? Cut up code below: var musclesLoader:Loader = new Loader(); var musclesContainer:Sprite = new Sprite(); var musclesImage:Bitmap = new Bitmap(); var musclesBitmapData:BitmapData; var musclesVideo:Video = new Video(752, 451.2); var connection:NetConnection = new NetConnection(); var stream:NetStream; function loadMuscles():void { musclesLoader.load(new URLRequest('img/muscles.png')); musclesLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, musclesComplete); } function musclesComplete():void { musclesBitmapData = new BitmapData(musclesLoader.content.width, musclesLoader.content.height, true, 0x000000); musclesImage.bitmapData = musclesBitmapData; musclesImage.smoothing = true; musclesContainer.addChild(musclesImage); contentContainer.addChild(musclesContainer); } function loadMusclesVideo():void { connection.connect(null); stream = new NetStream(connection); stream.client = this; musclesVideo.mask = musclesBitmapData; stage.addChild(musclesVideo); musclesVideo.attachNetStream(stream); stream.bufferTime = 1; stream.receiveAudio(true); stream.receiveVideo(true); stream.play("vid/muscles.flv"); } Outside this code I have a function that adds the containers to the stage, etc and places the objects in the appropriate spots. It sort of works - the mask applies, but in a square (the size of the boundaries of musclesBitmapData) rather than with the shape of the alpha channel. Is this the right way to go about this?

    Read the article

1 2  | Next Page >