2 Replies Latest reply on Dec 23, 2010 5:56 PM by Mayank (Adobe)

    Videos on website won't load/play immediately

    13kenny13

      hello everyone,

       

      i've been trying to find an answer for days now but without much luck.

      using adobe flash catalyst, i recently created a website with videos (FLV format) and when you click onto any one of them, they will load and play. but here's the problem - they won't play immediately (unlike youtube), and most of the time when you click on a video, you'll have to wait (the loading bar won't even start downloading until a good 15-20 seconds) while some videos would load and play immediately.

       

      i understand there's an actionscript for a preloader to set the buffer time and have the selected video to load and play immediately upon clicking.

      i found this actionscript:

       

      var nc:NetConnection = new NetConnection();

      nc.connect(null);

      var ns:NetStream = new NetStream(nc);

      //attach videodisplay

      _level0.attachVideo(ns);

      ns.setBufferTime(0);

      ns.play('http://static.askapache.com/f/flv/create-boot-ini.flv');

      ns.pause();

      ns.seek(0);

       

      (source: http://www.askapache.com/flash/preloading-caching-flv-mp3.html#m0-askapache1)

       

       

      i haven't tried using that script on flash builder because simply i don't know where to put it, or if the script would work at all on builder (i heard actionscript works on adobe flash?)

       

      this might be a really stupid question to you guys but i'm just starting out with websites and hope you could help me out.

       

      much appreciated.

      kenny