www.webdeveloper.com
Results 1 to 3 of 3

Thread: Comic/manga page load script

  1. #1
    Join Date
    Feb 2010
    Posts
    3

    Comic/manga page load script

    Hello. Years ago i found here on javascript source a neat javascript for loading images, perfect for an online comic or manga. It just preloaded the images that you specified, it had a previous and next button, and thats it, but it worked great for my webcomics.

    I lost the code and i tried to find it again but i dont seem to find it. I remember it was practically hidden within the Javascript Source website. And i really need it again.

    If anyone can please help me, i will be eternally grateful.
    Thanks in advance.

  2. #2
    Join Date
    Feb 2010
    Posts
    3
    Or any alternative would be fine...like the scripts in mangahelpers.com and all those sites you can read comics online...thanks

  3. #3
    Join Date
    Feb 2010
    Posts
    3
    Okay, i found the code, but i have a problem...the images dont load. I think i modified it intentionally sometime ago, and removed something so the images wouldnt show, and now i cant remember what it is...but i am pretty sure it was in the part where you type the url of the images.
    Could someone please help? Thanks in advance

    <script language="JavaScript">
    // PUT THE URL'S OF YOUR IMAGES INTO THIS ARRAY...
    var Slides = new Array(
    'G:\roc\gfx\hen1\fin\hen1-prol1.jpg',
    'G:\roc\gfx\hen1\fin\hen1-intro.jpg',
    'G:\roc\gfx\hen1\fin\hen1-ftitle.jpg',
    'G:\roc\gfx\hen1\fin\chap-end.jpg');



    // DO NOT EDIT BELOW THIS LINE!
    function CacheImage(ImageSource) { // TURNS THE STRING INTO AN IMAGE OBJECT
    var ImageObject = new Image();
    ImageObject.src = ImageSource;
    return ImageObject;
    }

    function ShowSlide(Direction) {
    if (SlideReady) {
    NextSlide = CurrentSlide + Direction;
    // THIS WILL DISABLE THE BUTTONS (IE-ONLY)
    document.SlideShow.Previous.disabled = (NextSlide == 0);
    document.SlideShow.Next.disabled = (NextSlide ==
    (Slides.length-1));
    if ((NextSlide >= 0) && (NextSlide < Slides.length)) {
    document.images['Screen'].src = Slides[NextSlide].src;
    CurrentSlide = NextSlide++;
    Message = 'Picture ' + (CurrentSlide+1) + ' of ' +
    Slides.length;
    self.defaultStatus = Message;
    if (Direction == 1) CacheNextSlide();
    }
    return true;
    }
    }

    function Download() {
    if (Slides[NextSlide].complete) {
    SlideReady = true;
    self.defaultStatus = Message;
    }
    else setTimeout("Download()", 100); // CHECKS DOWNLOAD STATUS EVERY 100 MS
    return true;
    }

    function CacheNextSlide() {
    if ((NextSlide < Slides.length) && (typeof Slides[NextSlide] ==
    'string'))
    { // ONLY CACHES THE IMAGES ONCE
    SlideReady = false;
    self.defaultStatus = 'Downloading next picture...';
    Slides[NextSlide] = CacheImage(Slides[NextSlide]);
    Download();
    }
    return true;
    }

    function StartSlideShow() {
    CurrentSlide = -1;
    Slides[0] = CacheImage(Slides[0]);
    SlideReady = true;
    ShowSlide(1);
    }
    </script>
    <body onLoad="StartSlideShow()"
    link=#8B99CB vlink=yellow alink=cyan bgproperties="fixed">
    <STYLE type=text/css>
    A {FONT-WEIGHT: none; TEXT-DECORATION: none}
    A:hover {COLOR: #AEC0FF;}
    </STYLE>
    <form name="SlideShow">
    <table>
    <tr>
    <td colspan=2><img name="Screen" alt="Story&Arts by Kitsuen Koumori"></td>
    </tr>
    <td><input type="button" name="Previous"
    value=" Previous "
    onClick="ShowSlide(-1)"></td>
    <td align="right"><input type="button" name="Next"
    value=" Next " onClick="ShowSlide(1)"></td>

    </table>
    </form>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles