Difference between revisions of "Gallery.as"

From Organic Design wiki
(try another angle)
m
Line 20: Line 20:
 
pic[3] = "purple.jpg";
 
pic[3] = "purple.jpg";
  
for ( p in pic) {
+
for ( i=0; i<pic.lenl i++) {
     echo( p );
+
     echo( p[i] );
 
     }
 
     }
  

Revision as of 02:06, 11 April 2006

  1. include 'debug.as';

layer = 99999;

// paths in webspace for image access imageRoot = "/w/angela-images"; thumbPath = imageRoot + "/small"; imagePath = imageRoot + "/big";

// gallery metrics maxColumns = 3; maxRows = 4; thumbSpacing = 10;

// list of images // TODO get this from socket or GET var pic = new Array(); pic[0] = "purple.jpg"; pic[1] = "purple.jpg"; pic[2] = "purple.jpg"; pic[3] = "purple.jpg";

for ( i=0; i<pic.lenl i++) {

   echo( p[i] );
   }

function thumb( parentMovieClip, layer, imageUrl, x, y ) {

   var name = 'thumb'+layer;
   parentMovieClip.createEmptyMovieClip( name, layer );
   this.thumb = parentMovieClip[name];
   this.thumb.loadMovie( imageUrl );
   this.thumb._x = x;
   this.thumb._y = y;
   this.onRollOver  = function() {
       this.thumb._alpha = 60;
       }; 
   this.onRollOut  = function() {
       this.thumb._alpha = 100;
       }; 
   }

something = new thumb( _root, layer--, "/w/angela-images/small/purple.jpg", 10, 10 );


// per-frame function function reduce() { }