home *** CD-ROM | disk | FTP | other *** search
/ Enter 2003 April / EnterCD 4_2003.iso / Multimedia / AlbumCreator 2.5 / AC2.exe / index.swf837 / scripts / frame_5 / DoAction.as
Encoding:
Text File  |  2002-12-26  |  2.1 KB  |  82 lines

  1. function reloadPage()
  2. {
  3.    NormalView._visible = false;
  4.    thumbnails.gotoAndPlay(2);
  5.    Next.gotoAndStop(1);
  6.    Previos.gotoAndStop(1);
  7.    Previous.enabled = curPage > 0;
  8.    if(Previous.enabled)
  9.    {
  10.       Previous._alpha = 100;
  11.    }
  12.    else
  13.    {
  14.       Previous._alpha = 50;
  15.    }
  16.    Next.enabled = (curPage + 1) * numperpage < images.length;
  17.    if(Next.enabled)
  18.    {
  19.       Next._alpha = 100;
  20.    }
  21.    else
  22.    {
  23.       Next._alpha = 50;
  24.    }
  25.    TITLE = TITLE.toUpperCase();
  26. }
  27. function showImage(n)
  28. {
  29.    NormalView._visible = true;
  30.    NormalView.Image.loadMovie(images[curPage * 4 + n].src);
  31. }
  32. if(!doc.loaded)
  33. {
  34.    gotoAndPlay(4);
  35. }
  36. else
  37. {
  38.    var images = new Array();
  39.    section = doc.firstChild.firstChild;
  40.    while(section != null)
  41.    {
  42.       if(section.nodeType == 1)
  43.       {
  44.          if(section.nodeName.toUpperCase() == "IMAGES")
  45.          {
  46.             imSection = section.firstChild;
  47.             while(imSection != null)
  48.             {
  49.                if(imSection.nodeType == 1 && imSection.nodeName.toUpperCase() == "IMG")
  50.                {
  51.                   i = images.length;
  52.                   images[i] = new Object();
  53.                   images[i].name = imSection.attributes.name;
  54.                   images[i].src = imSection.attributes.src;
  55.                   images[i].thm = imSection.attributes.thm;
  56.                   images[i].full = imSection.attributes.full;
  57.                   images[i].desc = imSection.attributes.description;
  58.                }
  59.                imSection = imSection.nextSibling;
  60.             }
  61.          }
  62.          else if(section.nodeName.toUpperCase() == "PARAMS")
  63.          {
  64.             parSection = section.firstChild;
  65.             while(parSection != null)
  66.             {
  67.                if(parSection.nodeType == 1)
  68.                {
  69.                   set(parSection.nodeName,parSection.firstChild.nodeValue);
  70.                }
  71.                parSection = parSection.nextSibling;
  72.             }
  73.          }
  74.       }
  75.       section = section.nextSibling;
  76.    }
  77.    var curPage = 0;
  78.    numperpage = Math.floor(560 / sizex) * Math.floor(400 / sizey);
  79.    zz.gotoAndPlay(1);
  80.    reloadPage();
  81. }
  82.