0 Replies Latest reply on Jan 16, 2009 1:34 AM by asmith3006

    RTMP Video player not showing

    asmith3006
      Hi,

      I am very new to Flash so learning everything as I go along. I'm trying to make a banner advert and so far I have made the animation pause on the first frame where it downloads some XML data every few seconds. If the XML data changes then it calls gotoAndPlay(2) and plays a small animation from frame 2 to frame 10 where it then gets sent back to frame 1 where it stops and waits for another XML change.

      My problem is that I have a rtmp video stream I need to integrate with it. I have used the following code:
      quote:

      mainVideo = new Video();
      mainVideo.x = 0;
      mainVideo.y = 0;

      mainVideo.width = 550;
      mainVideo.height = 400;

      addchild(mainVideo);
      url = "rtmp://........";
      streamname = "streamname";
      nc = new NetConnection();
      nc.connect(url);
      ns = new NetStream(nc);
      ns.bufferTime = 2.0;
      mainVideo.attachNetStream(ns);
      ns.play(streamname);



      This almost works, I can hear the audio for the stream, but I can't see the video. I've done a quick test by removing "addchild" and the end result is exactly the same, it's as if addchild isn't doing anything.

      Can anyone help me? Where am I going wrong

      Thanks for any and all help.

      Andrew.