PDA

Просмотр полной версии : Подскажите


alexsys
30.05.2002, 01:39
Есть такой код:
iterations=7;
_root.object0.number=0;
_root.object0.iterations=iterations;
for (i=1; i<(iterations+1); i++) {
duplicateMovieClip ("object0", "object"+i, i);
_root["object"+i].number=i;
_root["object"+i].iterations=iterations;
_root["object"+i].gotoAndStop(i+1);
}
Movieclip.prototype.tan_load=function(){
boolean=0;
mycol=new Color(this);
x=(2*Math.PI)*(number/iterations);
};
Movieclip.prototype.tan_update=function(){
x -= (_parent.tracer._x-275)/7000;
t = Math.tan(x);
_x = (t*140)+270;
_xscale = Math.abs(t*20)+100;
white=Math.abs(t*40);
if(this.hitTest(_root._xmouse,_root._ymouse,true)){invert();} else {
mycol.setTransform({ra:100,ga:100,ba:100,rb:white,gb:white,bb:white})
_visible=1;
boolean=0;}
};
Movieclip.prototype.invert=function(){
boolean=!boolean;
_visible=!_visible
ca=(boolean*200)-100;
cb=255-(boolean*255);
mycol.setTransform({ra:ca,ga:ca,ba:ca,rb:cb,gb:cb,bb:cb});
};
Movieclip.prototype.tracer=function(delay){
_x+=(_root._xmouse-_x)/delay;
_y+=(_root._ymouse-_y)/delay;
};

подскажите какой код надо повесить на кнопку, чтобы выгрузить этот эффект.
Спасибо.

Maks
30.05.2002, 04:00
Ты бы хоть исходник с работающим примером своего эффекта для начала выложил...

sapiens
30.05.2002, 09:40
а еще есть вот такой код ;)
function createMosquitos (count) {
// create mosquitos
var i;
for (i=1; i<=count; i++) {
_root.attachMovie("mosquito", "mosquito"+i, i);
}
}
function changeCursor (movieclip) {
// create custom cursor
Mouse.hide();
_root.attachMovie(movieclip, "customCursor", 9999);
_root.customCursor.startDrag(true);
}
function calculateRandom (min, max) {
// random with the math object (Flash 5)
return Math.floor(Math.random()*(max+1-min))+min;
}
function playSound (max, x, soundID) {
// play stereo sound depending on the x-position of the action
var soundobject;
soundobject = new Sound();
soundobject.attachSound(soundID);
if (x<0) {
x = 0;
} else if (x>max) {
x = max;
}
soundobject.setPan((x-(max/2))*100/(max/2));
soundobject.start();
}

что делать с ним? :confused:
p.s. телепаты в отпуске

alexsys
30.05.2002, 14:02
Вот исходник.....

DeliMIter
30.05.2002, 20:48
2sapiens

Ты хочешь сказать БЫЛ такой код? ;))))))

alexsys
30.05.2002, 21:03
Может я ошибаюсь