Difference between revisions of "Gallery.as"
From Organic Design wiki
m |
(try prototype) |
||
Line 1: | Line 1: | ||
layer = 99999; | layer = 99999; | ||
− | + | function thumb( handle, x, y, imageUrl ) { | |
− | + | this.imageUrl = imageUrl; | |
+ | this.handle = handle; | ||
+ | this.x = x; | ||
+ | this.y = y; | ||
+ | this.createEmptyMovieClip(handle, _root.layer-- ); | ||
+ | } | ||
+ | thumb.prototype.sayHello = function() { | ||
+ | echo "Hello, I'm a " + this.species; | ||
+ | }; | ||
+ | |||
+ | bob = new thumb( 'sponge', 10, 10, "/w/angela-images/small/purple.jpg" ); | ||
+ | bob.sayHello(); | ||
+ | |||
+ | |||
+ | //createEmptyMovieClip('thumb', layer-- ); | ||
+ | //thumb.loadMovie("/w/angela-images/small/purple.jpg"); | ||
+ | |||
+ | /* | ||
with (thumb) { | with (thumb) { | ||
− | _x = | + | _x = 0; |
− | _y = | + | _y = 0; |
− | |||
} | } | ||
− | + | */ | |
// start drag | // start drag | ||
femaleCap.onPress = function() { | femaleCap.onPress = function() { |
Revision as of 02:15, 10 April 2006
layer = 99999;
function thumb( handle, x, y, imageUrl ) {
this.imageUrl = imageUrl; this.handle = handle; this.x = x; this.y = y; this.createEmptyMovieClip(handle, _root.layer-- ); }
thumb.prototype.sayHello = function() {
echo "Hello, I'm a " + this.species; };
bob = new thumb( 'sponge', 10, 10, "/w/angela-images/small/purple.jpg" ); bob.sayHello();
//createEmptyMovieClip('thumb', layer-- );
//thumb.loadMovie("/w/angela-images/small/purple.jpg");
/* with (thumb) { _x = 0; _y = 0; }
- /
// start drag femaleCap.onPress = function() { // this.startDrag( false, 0, 0, 600-width-2, 400-height-2 );
this.startDrag(); };
// drag end femaleCap.onRelease = function() {
this.stopDrag(); };
// drag end _root.onDragOut = function() {
this.stopDrag(); };
// per-frame function function reduce() { }