#initclip
function starclass() {
}
starclass.prototype = new MovieClip();
starclass.prototype.onEnterFrame = function() {
cscale = this.scale;
for (i=0; i<mytit; i++) {
this["my"+i].onRollOver = function() {
myscale = cscale;
//trace(myscale)
num = this._name.substr(2, 1);
};
this["my"+i].onRollOut = function() {
myscale = 100;
num = this._name.substr(2, 1);
};
this["my"+num]._xscale += (myscale-this["my"+num]._xscale)/speed;
this["my"+num]._yscale += (myscale-this["my"+num]._yscale)/speed;
}
};
starclass.prototype.onLoad = function() {
mytit = this.tit;
myscale = this.scale;
speed = this.speed;
for (i=0; i<mytit; i++) {
this.createEmptyMovieClip("my"+i, i);
with (this["my"+i]) {
beginFill(0x0000FF, 50);
lineStyle(1, 0xff0000, 100);
moveTo(20, 20);
lineTo(-20, 20);
lineTo(-20, -20);
lineTo(20, -20);
lineTo(20, 20);
endFill();
}
this["my"+i]._x = i*80;
}
};
Object.registerClass("star", starclass);
#endinitclip
Flash 动画:
Flash 动画:
function starclass() {
}
starclass.prototype = new MovieClip();
starclass.prototype.onEnterFrame = function() {
cscale = this.scale;
for (i=0; i<mytit; i++) {
this["my"+i].onRollOver = function() {
myscale = cscale;
//trace(myscale)
num = this._name.substr(2, 1);
};
this["my"+i].onRollOut = function() {
myscale = 100;
num = this._name.substr(2, 1);
};
this["my"+num]._xscale += (myscale-this["my"+num]._xscale)/speed;
this["my"+num]._yscale += (myscale-this["my"+num]._yscale)/speed;
}
};
starclass.prototype.onLoad = function() {
mytit = this.tit;
myscale = this.scale;
speed = this.speed;
for (i=0; i<mytit; i++) {
this.createEmptyMovieClip("my"+i, i);
with (this["my"+i]) {
beginFill(0x0000FF, 50);
lineStyle(1, 0xff0000, 100);
moveTo(20, 20);
lineTo(-20, 20);
lineTo(-20, -20);
lineTo(20, -20);
lineTo(20, 20);
endFill();
}
this["my"+i]._x = i*80;
}
};
Object.registerClass("star", starclass);
#endinitclip
Flash 动画:
Flash 动画:
回复Comments
作者:
{commentrecontent}