Results 1 to 6 of 6

Thread: The simplest example, I cant get it to work in flex.

  1. #1
    Join Date
    Dec 2012

    Unhappy The simplest example, I cant get it to work in flex.

    Im just starting out and Im feeling really dumb because I'm having trouble getting really simple examples to work.
    Im trying to make a flex version of the simple video stream that opens when wowza starts. Im using the code from page 46 of the user guide.

    There are lots of examples, and they look great, but they are all .fla files which I cant open in flash builder.

    Here is my mxml file that Im using at the moment, which is the best I have been able to do, I am getting sound out of this but video is black.

    Any help would be really appreciated, I think I just need something really simple that I can play around with to get started.

    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="" 
    			   xmlns:mx="library://" minWidth="955" minHeight="600"
    		<!-- Place non-visual elements (e.g., services, value objects) here -->
    			private var myCam:Camera;
    			//private var camVideo:Video;
    			private var wowzaVideo:Video;
    			private var nc:NetConnection = new NetConnection();
    			private var ns:NetStream = null;
    			private function init():void
    				nc.addEventListener(NetStatusEvent.NET_STATUS, ncOnStatus);
    				myCam = Camera.getCamera();
    			private function ncOnStatus(infoObject:NetStatusEvent):void
    				if ( == "NetConnection.Connect.Success")
    					ns = new NetStream(nc);
    					ns.bufferTime = 3;
    	<mx:VideoDisplay id="wowzaVideoDisplay" x="404" y="48" width="282" height="222"/>
    	<mx:VideoDisplay id="camVideoDisplay" x="74" y="48" width="282" height="222"/>

  2. Default

    You can't add a video object as a child of a VideoDisplay in flex. You can add the video object to a UIComponent, or you can attach the netstream to the VideoDisplay's mx_internal::videoPlayer. See for details.

  3. #3
    Join Date
    Dec 2007


    You can use this for reference:


  4. #4
    Join Date
    Dec 2012


    Thankyou both!
    thats all I was really after I can get it to work now.

  5. #5

    Default Where are the simple examples?

    Quote Originally Posted by pjackson View Post
    Thankyou both!
    thats all I was really after I can get it to work now.
    I tried to navigate to the root directory of flex examples for at and I get a 404 type error. Is there a new link for them?

  6. #6
    Join Date
    Dec 2007

Similar Threads

  1. Replies: 5
    Last Post: 06-12-2014, 07:17 AM
  2. Simplest way to record a live stream
    By ajsinclair in forum Live Streaming and Encoder Discussion
    Replies: 4
    Last Post: 06-26-2013, 04:26 AM
  3. Simplest way to redirect RTMP connection to another server?
    By daveuofu in forum Server-side Modules and Code Samples Discussion
    Replies: 2
    Last Post: 03-19-2012, 05:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts