4 Replies Latest reply on Aug 9, 2010 12:06 PM by AttaBoy2

    new URLRequest not working

    Little Ricky Productions Level 1

      I have copied code from one set of files that work and pasted them into another set of files and they do not work.  The site I am developing is for an artist.  You choose your medium and a field of pictures appear.  When you choose an image it enlarges.  From there you can go to previous, next or exit.  Previous and exit works, but next does not.  I have no idea why.

       

      Working:

       

      stop();

      previous_mc.buttonMode = true;

      previous_mc.addEventListener(MouseEvent.CLICK,pi)

      function pi(e){

      Loader(this.parent).load(new URLRequest("/fla/water/individual/graphiteWater17.swf"));

      }

      next_mc.buttonMode = true;

      next_mc.addEventListener(MouseEvent.CLICK,ni);

      function ni(e){

      Loader(this.parent).load(new URLRequest("/fla/water/individual/graphiteWater2.swf"));

      }

      exit_mc.buttonMode = true;

      exit_mc.addEventListener(MouseEvent.CLICK,exit);

      function exit(e){

      this.parent.parent.removeChild( this.parent );

      }

       

       

      Not Working:

       

      stop();

      previous_mc.buttonMode = true;

      previous_mc.addEventListener(MouseEvent.CLICK,pi)

      function pi(e){

      Loader(this.parent).load(new URLRequest("/fla/leaves/leavesGraphite/individual/smallleaves7SOLD.swf"));

      }

      next_mc.buttonMode = true;

      next_mc.addEventListener(MouseEvent.CLICK,ni);

      function ni(e){

      Loader(this.parent).load(new URLRequest("/fla/leaves/leavesGraphite/individual/smallleaves8SOLD.swf"));

      }

      exit_mc.buttonMode = true;

      exit_mc.addEventListener(MouseEvent.CLICK,exit);

      function exit(e){

      this.parent.parent.removeChild( this.parent );

      }

       

      I would also like to get rid of the long string - "/fla/leaves/leavesGraphite/individual/smallleaves8SOLD.swf" - but it will not let me.  The file calling this is in "/fla/leaves/leavesGraphite/ so I would like to put "/individual/smallleaves8SOLD.swf"

       

      I hope someone can help.

       

      Thanks,

       

      Richard