| |||||||
Du magst keine Werbung? Wir auch nicht!
Einfach registrieren und die Werbung ist weg. Diese Nachricht sehen nur nicht registrierte Nutzer.
![]() |
| | LinkBack | Themen-Optionen | Ansicht |
| | #1 (permalink) |
| Nix Wisser Registriert seit: May 2003 Ort: Würzburg, Kleinstadt
Beiträge: 3.510
| [STUFF] wobblebox, ein aufpoppendes Fenster
hi, habe gerade mal meine Dateien gesichtet und was gefunden, vielleicht kanns ja jemand gebrauchen. Habe das mit SWiSHmax gemacht, aber das Script geht jetzt auch mit Flash. einfach in die Hauptzeitleiste legen. war nur mal ein Versuch, kann man sicher noch verbessern, OEF deleten etc. nullidee Code: _root.over = "false";
_root.createEmptyMovieClip("box",100);
_root.createEmptyMovieClip("butt",10);
box._x = 50;
box._y = 50;
butt._x = 50;
butt._y = 50;
breite = 480;
hoehe = 280;
breite_klein = 60;
hoehe_klein = 70;
gum = 0.4; // gum-factor
faktor = 1-gum; // the wobble
trans = 100; // Transparent
// play with this cx2 and cy2 for more effects
cx2 = 0;
cy2 = 0;
movieclip.prototype.drawRec = function(x,y,w,h,color,trans) {
this.beginFill(color,trans);
this.moveTo(x,y);
this.lineTo(w,y);
this.lineTo(w,h);
this.lineTo(x,h);
this.lineTo(x,y);
this.endFill();
};
//------------
_root.butt.onRollover = function() {
_root.over = "true";
};
_root.butt.onRollout = function() {
_root.over = "false";
};
_root.box.onEnterFrame = function() {
if (_root.over == "false") {
_root.box.drawWobbleBox(0,0,breite_klein,hoehe_klein,0xFFFFFF,0xFF6600,100,5);
_root.butt._width = _root.box._width;
_root.butt._height = _root.box._height;
}
if (_root.over == "true") {
_root.box.drawWobbleBox(0,0,breite,hoehe,0xFFFFFF,0xFF6600,100,10);
_root.butt._width = _root.box._width;
_root.butt._height = _root.box._height;
}
};
//------------
//===== draw a wobbling box with shadow ======
// x,y = the top left corner
// w,h = the width and height of the box
// color,color2 = the outer and inner frame
// trans = the % of the color transparent
// frame = the width of the outer frame
movieclip.prototype.drawWobbleBox = function(x,y,w,h,color,color2,trans,frame) {
this.clear();
vx2 = Math.round((x+w/2-cx2)*gum + vx2*faktor);
vy2 = Math.round((y+h/2-cy2)*gum + vy2*faktor);
cx2 += vx2;
cy2 += vy2;
this.beginFill(0x000000,10); // shadow
this.moveTo(x+vx2-2,y+vy2+2); // top left
this.curveTo(cx2+w/2,cy2-h/2,x+w-vx2+8,y+vy2+2); // top right
this.curveTo(cx2+w/2,cy2-h/2,x+w-vx2+8,y+h-vy2+8); // bottom right
this.curveTo(cx2-w/2+18,cy2+h/2,x+vx2-8,y+h-vy2+8); // bottom left
this.curveTo(cx2-w/2+18,cy2+h/2,x+vx2-2,y+vy2+2); // top left
this.endFill();
this.beginFill(color,trans); //outer Frame
this.moveTo(x+vx2+4,y+vy2); // top left
this.curveTo(cx2+w/2-16,cy2-h/2+6,x+w-vx2,y+vy2); // top right
this.curveTo(cx2+w/2+6,cy2-h/2-2,x+w-vx2,y+h-vy2); // bottom right
this.curveTo(cx2-w/2+8,cy2+h/2+6,x+vx2,y+h-vy2); // bottom left
this.curveTo(cx2-w/2+8,cy2+h/2+6,x+vx2+4,y+vy2); // top left
this.endFill();
this.beginFill(color2,trans/4); //inner frame
this.moveTo(x+vx2+frame+4,y+vy2+frame); // top left
this.curveTo(cx2+w/2-16,cy2-h/2+frame+2,x+w-vx2-frame,y+vy2+frame);// top right
this.curveTo(cx2+w/2-frame,cy2-h/2,x+w-vx2-frame,y+h-vy2-frame); // bottom right
this.curveTo(cx2-w/2+8,cy2+h/2-frame+6,x+vx2+frame,y+h-vy2-frame); // bottom left
this.curveTo(cx2-w/2+(frame+8),cy2+h/2,x+vx2+frame+4,y+vy2+frame); // top left
this.endFill();
};
butt.drawRec(0,0,breite_klein,hoehe_klein,0xFFFFFF,0);
__________________ nullidee Abakus GT 10² Kugeln - 80"Leinwand - CARAN D´ACHE SUPRACOLOR® |
| | |
![]() |
| Lesezeichen |
| Themen-Optionen | |
| Ansicht | |
| |