2 Replies Latest reply: Apr 10, 2010 6:55 AM by k.loy RSS

    preloader code in wordpress template

    k.loy Community Member

      I used this code as a preloader on a site a made a few months ago.

      I'm trying to use it again in a wordpress template using PHP and it's not working.

      The movies loads, but doesn't load the main .swf??

       

      Any ideas why this would work on one site and not another? Is it a PHP conflict?

       

       

       

      var l:Loader = new Loader();
      l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
      l.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
      l.load(new URLRequest("ns_headermovie.swf"));

       

      function loop(e:ProgressEvent):void{
      }
      function done(e:Event):void
      {
          removeChildAt(0);
          addChild(l);
      }