0 Replies Latest reply on Jun 9, 2006 12:56 AM by siliconguru

    preloading multistream video

    siliconguru
      I am writing a "Virtual Visit" script, based on short flv clips. The navigation is similar to a VR walkthrough, but it's implemented through connecting videos. Suppose you are visiting a building. In each room you may choose to go right, left of straight, or to take a staircase, or a lift. You end up with some 50 video clips, organized in a threaded tree structure. My problem is how to avoid stopping at each crosspoint and waiting for the next clip to load. So I need to preload them before I get to the cross point. One way of doing that is to have a different netstream for each clip. Something like this:

      var ncDef:NetConnection = new NetConnection();
      ncDef.connect(null);

      var myStreams:Array = new Array(); // how do I tell him this is an "Array of NetStream"???

      for (var i:Number = 0; i <= 50; i++) {
      myStreams = new NetStream(ncDef);
      }

      looks like the "new" statement only works within the context of a var definition, but not in an assignement.

      Any hints?

      cheers
      Sil