Difference between revisions of "Gallery.as"

From Organic Design wiki
m
m
Line 16: Line 16:
  
 
// drag start
 
// drag start
something.onDrag = function() {
+
something.thumb.onDrag = function() {
 
     this.startDrag();
 
     this.startDrag();
 
     };  
 
     };  
  
 
// drag end
 
// drag end
something.onDragOut = function() {
+
something.thumb.onDragOut = function() {
 
     this.stopDrag();
 
     this.stopDrag();
 
     };  
 
     };  

Revision as of 07:48, 10 April 2006

layer = 99999;


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;
   }

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


// drag start something.thumb.onDrag = function() {

   this.startDrag();
   }; 

// drag end something.thumb.onDragOut = function() {

   this.stopDrag();
   }; 

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