Broadcasting stops itself in the bigger .fla?? :S

Hi!
I want to broadcast my webcam.
I have 2 fla's one is nearly empty and the other one is very big.
the bigger one has many movieclips other .as classes but it doesn't run them,
the code running in both fla's are exacty same!
I watch these webcams from another receiver flash.
When i use the bigger one stops broadcasting after a few seconds,
but the smaller fla's broadcast is received all the time???
What should i do to fix the bigger fla??
The broadcastion code is simple
Header 1
package {
    import flash.display.Sprite;
    import flash.events.*;
    import flash.media.*;
    import flash.net.*;
    import flash.text.TextField;
    import flash.text.TextFieldAutoSize;
    import flash.utils.Timer;
    import flash.events.TimerEvent;
    import flash.events.StatusEvent;
    import flash.events.MouseEvent;
    import flash.system.SecurityPanel;
    import flash.system.Security;
    public class streamer extends Sprite
        var vid:Video;
        private var cam:Camera;
        private var t:Timer = new Timer(1000);
        private var my_nc:NetConnection = new NetConnection();
        public function streamer()
            this.stage.addEventListener(Event.ENTER_FRAME, myEnterFrame);
            cam = Camera.getCamera();
            if(!cam)
                myTextField.text = "No camera is installed.";   
            else if (cam.muted)
                myTextField.text = "To enable the use of the camera,\n"
                                 + "please click on this text field.\n"
                                 + "Grant access to your camera.";
                myTextField.addEventListener(MouseEvent.CLICK, clickHandler);
            }else
                myTextField.text = "Connecting";
                connectCamera();
                goLive();
            addChild(myTextField);
            t.addEventListener(TimerEvent.TIMER, timerHandler);
        function myEnterFrame(evt:Event)
            this.setChildIndex(myTextField, this.numChildren - 1);
            this.setChildIndex(vid, this.numChildren - 1);
        private function clickHandler(e:MouseEvent):void
            Security.showSettings(SecurityPanel.PRIVACY);
            cam.addEventListener(StatusEvent.STATUS, statusHandler);
            myTextField.removeEventListener(MouseEvent.CLICK, clickHandler);
        private function statusHandler(event:StatusEvent):void {
            if (event.code == "Camera.Unmuted") {
                connectCamera();
                cam.removeEventListener(StatusEvent.STATUS, statusHandler);
        private function connectCamera():void
            vid = new Video(cam.width, cam.height);
            vid.x = 0;
            vid.y = 0;
            vid.attachCamera(cam);
            addChild(vid);
            t.start();
        private function timerHandler(event:TimerEvent):void
            myTextField.text = "fps: " + Math.round(cam.currentFPS);
            myTextField.appendText("bandwidth: " + cam.bandwidth + "\n");
            myTextField.appendText("currentFPS: " + Math.round(cam.currentFPS) + "\n");
            myTextField.appendText("fps: " + cam.fps + "\n");
            myTextField.appendText("keyFrameInterval: " + cam.keyFrameInterval + "\n");
        private function goLive()
            my_nc = new NetConnection();
            my_nc.client = this;
            my_nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
            my_nc.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
            my_nc.connect("rtmp://localhost/live/livestream");
        private function startLive()
            // capture my camera and publish "my_cam" to server
            var publisher:NetStream = new NetStream(my_nc);
            publisher.attachAudio(Microphone.getMicrophone());
            publisher.attachCamera(Camera.getCamera());
            publisher.publish("livestream", "live");
            // opens a stream using the previous connection object
            // play the published stream "my_cam"
            var viewer:NetStream = new NetStream(my_nc);
            viewer.play("my_cam");
        public function onBWDone():void
        private function netStatusHandler(event:NetStatusEvent):void {
            switch (event.info.code) {
                case "NetConnection.Connect.Success":
                    startLive();
                    break;
                case "NetStream.Play.StreamNotFound":
                    trace("Stream not found");
                    break;
        private function securityErrorHandler(event:SecurityErrorEvent):void {
            trace("securityErrorHandler: " + event);

Try registering some netstream handlers to see what is going on.
netStream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
private function netStatusHandler(event:NetStatusEvent) :void
     if(event.info.code == "NetStream.Play.Stop")
      etc....
You might also want to declare your streams, and assign them later.
public class streamer extends Sprite
        var vid:Video;
        private var cam:Camera;
        private var t:Timer = new Timer(1000);
        private var my_nc:NetConnection = new NetConnection();
        private var publisher:NetStream;
        private var viewer:NetStream;

Similar Messages

  • When I try to restore my iPod, it stops restoring at the same place and doesn't work. How do I fix this and make it completely restore itself?

    When I try to restore my iPod, it stops restoring at the same place and doesn't work. How do I fix this and make it completely restore itself?

    Did you make sure that your security software allows iTunes to contact Apple during the restore process? http://support.apple.com/kb/TS3125

  • How can I make the ipod stop itself after playing one song?

    How can I make the ipod stop itself after playing one song?

    When playing a song, are the controls at the top of the screen there? (Genius, Shuffle, Loop?)
    If not, tap the center of the page once to expose them
    now keep tapping the circle on the left part of the exposed controls untill a one (1) appears...

  • My ipod nano 6th generation plays , stops , fast foward and rewinds songs by itself. it also speaks song titles non stop even with the setting off . please help me.

    my ipod nano 6th generation plays , stops , fast foward and rewinds songs by itself. it also speaks song titles non stop even with the setting off . please help me.

    Found this solution in another thread, what you want to do is go into the Nike Fitness thing, go to run, go to Spoken Feedback and set it to off. This should fix your problems.

  • My I ph 5 once I start downloading anything it stops by itself in the middle or after some time ..

    My I ph 5 once I start downloading anything it stops by itself in the middle or after some time ..

    Hi Ravi4477,
    I apologize, I'm a bit unclear on the exact nature or context of your question. If you are talking about downloads from the iTunes Store, you may find the troubleshooting steps outlined in the following articles helpful:
    iTunes: How to resume interrupted iTunes Store downloads - Apple Support
    iTunes Store: How to delete a downloading purchase on iOS - Apple Support
    Regards,
    - Brenden

  • Media Encoder Stops Encoding with the New CS5.5

    I just upgraded to CS5.5 a yesterday and having some issues encoding an 1 1/2 program for a DVD. The program doesn't seem to crash per se, just stops encoding. The task manager says it's running. I tried to encode the same sequence, but shorter and have the in and out points go through the part where it always stops and it worked fine. It's just when I try the entire sequence it stops. Anyone have any experience like this with CS5.5 just coming out?
    Thank you,
    Doug

    Well, my problem happened with CS5, not 5.5. I don't encode enough to be able to say that it continues to be a problem. However, I would still pull up my CS4 AME if I needed to encode something again. But honestly, it sounds like the same problem as I had. My problem may have been further complicated by running CS5 as 64 bit.
    For the record, I was never able to fully encode the f4v file I was given. AME behaved as though it was corrupt at the same point each time, shaving off about a half hour of the presentation. For several days I thought it was only a half hour presentation! I was given this file by an a/v company that caters corporate meetings. It was a video that combined a Powerpoint presentation and the audio from the podium. I asked for a file that I could use for Flash because their world is all Quicktime.
    As I said, in the end the only way I could salvage this project was to extract the audio by encoding the f4v with Quicktime Pro and then use a third party software to marry it to the PPT presentation for a flash movie. That is a whole other issue I wish Adobe would look into, being able to encode PPT for flash. Corporations are doing some really cool presentations for business but MS just doesn't play well with Adobe Flash. It would really help me to be able to take my client's stuff and put it up on the web easily.
    The young guy I work with said it was the lack of Quicktime codecs on my computer that was the hangup because in all likelihood they encoded the f4v with Final Cut Pro.
    I work in a broadcast HD tv station. We are attempting to transition our clients commercial material to database for use on-air using computer files they provide (to get away from video tape). I can't tell you how much trouble missing codecs has been with this. Clients make their stuff in all kinds of environments and it can be professional or amateur. Sometimes the video is there but the audio is missing or vice versa. Sometimes one 30 sec spot will be fine, but the next one in the same file will take a 30 sec spot and stretch it into a 5 min timeline, losing the audio and playing the video slo mo. Our editing system is Grass Valley's Edius so that adds a whole new problem with codecs. It took us a long time just to figure out how to open a .mov on a timeline. So in the end we replaced one headache with muliple tape formats to a bigger headache with multiple codecs and proprietary software programs.

  • How do I get an actor to wait for its nested actors to stop running before stopping itself?

    I'm developing a series of projects that are based on the Actor Framework and my actor dependency hierarchy is starting to get some depth. One of the issues I'm facing now is making sure that each actor will only stop running (and signal this via a Last Ack to a higher-level actor or via a notification to non-AF code that launches it) once all of its nested actors have stopped running.
    For instance, say I have a type of actor that handles communication with a microcontroller over USB - a USB Controller Actor. I might want to have an application-specific actor that launches USB Controller Actor to issue commands to the microcontroller. When shutting down, I want this top-level actor to send a Stop Msg to USB Controller Actor and then wait to receive a Last Ack back before sending a notification within a provided notifier to the non-AF application code, which can then finish shutting down completely.
    I'm sure that having actors wait for all nested actors to shutdown before shutting down themselves is an extremely common requirement and I'm confident National Instruments have made it possible to handle that in a simple, elegant manner. I'm just struggling to figure out what that is.
    The approaches I've experimented with are:
    Creating a pseudo "Stop" message for an actor that won't actually stop it running straight away, but instruct it to stop all nested actors, wait for their Last Acks and then shut itself down by sending Stop Msg to itself. This isn't elegant because it means the client will be forced to fire off these pseudo stop messages instead of Stop Msg to certain actors.
    Instantiating an internally-used notifier and overriding Stop Core.vi and Handle Last Ack Core.vi. The idea is that within Stop Core.vi, I send Stop Msg to each of the nested actors and then make it wait indefinitely on the internal notifier. Within Handle Last Ack Core.vi, I make it send a notification using this notifier which allows Stop Core.vi to continue and perform deinitialisation for the top-level actor itself. Figures 1 & 2 below show this approach. I wasn't confident that this would work since it assumed that it was possible for Stop Core.vi to execute and then Handle Last Ack Core.vi to concurrently execute some time after. These assumptions didn't hold and it didn't work. It would have been messy even if it had.
    Overriding Stop Core.vi, making it send Stop Msg to each nested actor and then waiting for an arbitrarily long period of time (100ms, 200ms, etc.). What if a nested actor takes only 10ms to shut down? What if takes 400ms?
    The figures below show how I implemented the second approach. Ignore the broken object wires - they only appear that way in the snippets.
    Figure 1 - Stop Core.vi from the second approach
    Figure 2 - Handle Last Ack Core.vi from the second approach

    tst wrote:
    It wasn't that hard to find - https://decibel.ni.com/content/thread/27138?tstart=0
    But with dozens of posts, I have no intention of rereading it now.
    Also, when crossposting, it's considered polite to add a link, so that people can see if the other thread has relevant replies.
    Thanks. I've only read the first page for now but I find this interesting (I'm not sure how to format non-reply quotes, sorry):
     "AristosQueue wrote:
    CaseyLamers1 wrote:
    I think that this would be a nice addition. I think how a program stops is just as important as how it starts.
    I think everyone who has worked on AF design agrees with this. Indeed, managing "Stop" was *the* thing that lead to the creation of the Actor Framework in the first place. The other issues (deadlock/hang avoidance and resource management) were secondary to just trying to get a clean shutdown.
    CaseyLamers1 wrote:
    I find the current code a bit lacking.
    My concern would be that the mixing of a verified stop and a regular stop could create confusion and lead to people having trouble during editting and testing with the project ending up locked (due to VIs left running which did not shutting down).
    Your concern is to some degree why no verified Stop exists in the AF already. We looked at each actor as an independent entity, and left it open to the programmer to add an additional managment layer for those applications that needed it. But over time, I have seen that particular management layer come up more often, which is why I am exploring the option."
    So that gives one of the reasons why this hasn't already been implemented but also points out that it's something quite a lot of people want.
    > Also, when crossposting, it's considered polite to add a link, so that people can see if the other thread has relevant replies.
    Noted. Here's the discussion: https://decibel.ni.com/content/message/104983#104983
    Edit: since there doesn't seem to be any NI-provided way of doing this yet, I suppose I'll try rolling my own at some point. The ideas posted in the discussion you linked seem pretty useful.

  • How do i start a motion tween by clicking a button and stop it at the end of the tween.

    Hi guys,
    I am creating a website for a project and i am trying to activate a box bropping down from another box when i click on the enter here button i have created. I have set the motion tween and its working when i preview i just unsure of the correct actionscript to start this tween when i have clicked the entere here button or how to stop it at the end of the tween.
    I am scared i may have made the layers in the wrong place, they are all currently in scene 1. does my second box that is dropping down need to be set inside the layers of the first box?
    Bit of a newbie at this.
    Thanks in advance!

    Create the dropping box movieclip as an animation by itself with a stop() coomand in the first frame and a stop() command in the last frame.  The click of the button should tell the movieclip to play(); at which point the animation should play and stop at the end.
    Another option would be to use an actionscript Tween to make the box drop.  Going that route the animation is what you code it to be and there is no need to have to stop it as it will end where you tell the Tween to end at.

  • Brand new iPod touch restarts itself all the time

    Hello, my dad just came home from Japan, with a brand new iPod touch.
    I managed to register it in iTunes, but when i updated the firmware i got an error message. I tried again and i think that i succeed. Then i started to sync music and the rest of the stuff. The syncing stopped after a minute, and when i tried to navigate on my iPod i realised that the touch screen didn't respond. So after several attempts, i made a hard reset.
    But now, the iPod touch restarts itself. The Apple logo comes up, and then the screen turns off in a dramatical way, and then the Apple logo comes up again. If i hard reset my device again, the process continous.
    I sometimes the iPod shows the "charge battery" screen, and then I can charge the battery. BUT after 5 minutes, the iPod touch starts restarting itself again. :S
    Does anyone have a solution to this? Extremely strange.

    I suspect you have a hardware problem. Probably a non-functioning battery (over or under) and causing a hardware reset. Bring it to an Apple Store for replacement.
    iPhone / Touch / Shuffle (1st gen)

  • JSP Page stops execution before the whole page is loaded

    Software
    Tomcat 5.5.2
    JDK 1.5
    Problem
    I have a JSP Page
    The problem is that it never gets finished off completely
    I mean the page is always half loaded I mean it stops execution of the JSP Page in between and it shows no exception in the console Window
    The page is not completely loaded
    I don't know what is the reason and so can't understand the reason behind that
    Thanks in advance
    CSJakharia

    Though Still I am confused why is this Page Buffer creating a sort of Exception.
    I mean it is just a limit that if page reaches to that limit it should send the data
    to client but what is the problem to Server that it stops sending the dataAn error is happening on your page.
    Basically whether or not you get an error screen depends upon when the error is generated. If the error happens before the buffer fills up, then it can cancel the output, and show the error page.
    If the buffer has already been filled up/flushed it can't cancel the output at this point. So it just stops sending.
    That explains why
    1 - page output cuts off halfway through
    2 - if you make a bigger buffer, it can display the exception page - because the error happens before the bigger buffer fills up.
    Regardless of whether the buffer was flushed or not, an error message would always be written to the Tomcat logs - check those for any problems.
    Cheers,
    evnafets

  • My iPAD stopped connecting to the 3G network and had a restore message then shut it self down, when i tried to sync it won't let me finish as my iPAD is password locked but I can't get to the password screen,

    My IPAD stopped connecting to the 3G network, I then got a restore from I-Tunes message and the iPAD shut itself down and then turned itself on again, so I synced and downloaded the new software but this did not finish as it needed a password on the iPAD but I could not open the iPAD to the password page, it just stays on a connect to i-Tunes page. Please help

    tried all that and was looking good with new software etc downloaded and then got a message in iTunes."we're sorry we are unable to conitue with your activation at this time etc " tried process again and got to the same message. iPAD still has the connect to it tunes screen ..any suggestions?

  • TS1559 I have iPhone 4s, after i updated my software to 7.0.4 my wifi stopped working. The wifi icon at the top is gone. Its annoying that i have to us my data all the time. I've tried the network reset, it didn't work.

    I have iPhone 4s, after i updated my software to 7.0.4 my wifi stopped working. The wifi icon at the top is gone. Its annoying that i have to us my data all the time. I've tried the network reset, it didn't work. My phone works fine, just a lilttle bit slow before i upadated to 7.0.4. And now not only the wifi, the phone itself is slower than ever. I wish i didn't udgrade to iOs 7. There's too much problems. There's this one time that I can't send iMessage at all.

    Hi s.kouris,
    I'm afraid that unless you are able to contact the previous owner and have him wipe the device, or provide you with his Apple ID password so you can delete the iCloud account, you are out of luck.
    With iOS 7, an Activiation Lock was added to deter thieves. This lock prevents anyone but the owner of the device from deleting the iCloud account and restoring the device:
    http://support.apple.com/kb/ht5818
    Unless you are able to reach the original owner and get the device wiped or the iCloud account deleted, you are stuck with a brick.
    Sorry,
    GB

  • ICloud backup 6 hours long, stopping itself after 2 hours...

    Hi guys,
    Since i've upgraded to iOS 5, i have multiple problems such as the title says, the iCloud backup is estimated at 6 hours long... And it automatically stops after about 2 hours. Another major problem is that i can't sync my iPhone 4 with iTunes through Wi-fi, my iPhone looks for my MacBook about 2 or 3 minutes and stops itself, without any error message... I hope some one will be able to help me

    The iCloud backup still doesn't work... I'm getting fed up with that, please help me guys...

  • My iphone misbehaves when I play music.  It starts and stops, skips to the next or previous song, voice control pops on and off.  Usually this starts about 1/2 hour into playing music.  I just replaced phone thinking it was hardware related but it persist

    I recently replaced my iphone thinking this would fix the problem but it still occurs.  I use EXACTLY the same playlists I use on my ipod and the skipping, misbehaving only occurs on my iphone, never on my ipod.  With the new phone I am running OS6.
    Any suggestions?

    I’ve read reports from many other iTunes users who are having the same issue I am.  Please read on...
    When listening to songs that I purchased from iTunes (as opposed to those I imported from CD), several, but not all, of them stop playing prematurely several seconds (or even minutes) before the end of the tune.  Playback jumps immediately to the beginning of the next tune. 
    I noticed this, I believe, shortly after moving my iTunes library to a new iMac (3.1 GHz Intel Core i5, 12 GB memory) running iTunes 10.5.3 (3) on Mac OS 10.7.3.  Everything was fine before the move.
    Of the 283 purchased songs in my iTunes library, about 100 of them exhibit this behavior.  The song playback times at which this happens range from 2:14 to 5:19.
    What is interesting, is that tunes from the same album all end at the same playback time!  For example, I purchased the whole album “River - The Joni Letters” (Herbie Hancock’s album covering a number of Joni Mitchell tunes).  Every song from that album now stops playing at 3:39.  The same happens with other tunes that happen to be from the same album, too.  I have no idea why this would be the case, but it certainly seems significant.
    Another interesting finding, is that if I copy one of tunes exhibiting this issue to the desktop and play it from there, the song plays all the way through to the end without a problem.  This would, I think, rule out a corrupt file and tend to point to iTunes itself as the source of the problem.
    The problem certainly is annoying, and it would be great if we could find some resolution and get back to enjoying our music without the mind-jarring bump that too often now happens without warning.
    Sincerely,
    Michael Loomis

  • Messages application forcing itself to the front

    Hi,
    I've just bought a new Mac Mini, and am now happily running Mountain Lion (10.8.3). The problem I'm having is that the Messages application seems to push itself to the front of whatever else I'm doing, when I receive a message, even though I have it included in my Notifications in System Preferences to show a banner notification.
    For example, I could be using Safari, and then I receive a text - Messages will sometimes then shove Safari aside and become the focus of attention. I thought the point of Notifications was to let me receive the banner and let me continue working in my current app! I've noticed that this seems to occur most often if I don't have Messages currently open, so the messages are being pushed to it as a closed app; I don't know why this should make a difference, but it does seem that if I have Messages open, but hidden, I will just receive the notification and not be pushed straight to Messages.
    This must either be a bug in the current version of OSX or the Messages application, but if anyone else has found a way to stop this happening, I'd be most grateful!
    Thanks for reading my query,
    Darren

    Hi,
    There is a setting in the Messages Preferences which by Default "Listens" to the various services that the accounts Log in to for Off Line Messages.
    This includes AIM and iMessages for certain but may vary depending on the Jabber server you use.
    There is an support app called IMAgent in later versions (It used to be called iChatAgent)
    One of the things it does is start up on Computer launch and realistically it is partially logged in to the Services. (it will show you as On line).
    In the case of AIM as well as the Setting set at AIM for Off Line Messages this setting in iChat and Messages is also needed.
    If you then get an Off Line Message (As far as you are concerned with the app Closed) then IMAgent will start up the App.
    This of course will be in Front of any existing app the same as any other app start up would be.
    The Notifications are shown as the IMAgent is "listening" and partially logged in.
    Go to Messages > Preferences and tick the line about "When I Quit, set my Status to Off Line".
    This will stop the IMAgent Listening for Off line IMs for AIM and iMessages from the iMessages server.
    In turn this will stop the app from "popping up in front".
    As SCalkins has said there may also be some play in whether an App is in Full Screen (different Space) mode that is effecting this as well.
    8:36 PM      Monday; April 1, 2013
      iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.3)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

Maybe you are looking for

  • How to  delete the charater from a column value

    Hi could anyone please enlighten me how to achieve this? I have table called CAMAPIGNS there is one column called NAME with no limit of length. Already data in my table i want to delete the character exceeding 100 length from the column NAME.

  • Will EC support setting default file type and Open With from file menu?

    The default file types I can live without, but at least allow for Open With on right click from Windows Explorer. I currently have EC set in the Open With programs list, but EC does not comply for any files I opt to open it with (.css, .php, .html et

  • Is it Possible to Exclude Documents from Portal Export ?

    Hello, In preparation for upgrading from Portal 9.0.4.3 (Release 1) to the latest portal version, we need to Export from a PROD Portal instance and import into a TEST portal instance. I plan to use separate transport sets for a Pagegroup and Provider

  • Creating User in Portal and SAP Backend simultaneously?

    Is it possible when you create a new user for the portal (in my case, active Directory is used as central user storage) for SSO, that this user will also be created simultaneously in different SAP Backends without creating it manually everytime? Or i

  • Adding text under images CS6

    I have various images inside an .indd file I used the rectangle frame tool , sized then placed images inside. I now need to have captions ( text )underneath the images within the rectangled box. I can't seem to get the text in there which tells me th