Zurück   Flashforum > Flash > Stuff

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 20-01-2005, 17:40   #1 (permalink)
Nix Wisser
 
Benutzerbild von nullidee
 
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);
Angehängte Dateien
Dateityp: zip wobblebox.zip (4,3 KB, 97x aufgerufen)
__________________
nullidee

Abakus GT 10² Kugeln - 80"Leinwand - CARAN D´ACHE SUPRACOLOR®
nullidee ist offline   Mit Zitat antworten
Alt 20-01-2005, 17:48   #2 (permalink)
!diot
 
Benutzerbild von Fuery3302
 
Registriert seit: Aug 2003
Ort: PunkRockCity-Linz
Beiträge: 95
hey echt geil. hab sowas schon mal probiert, aber is nix geworden. kann man sicher gebrauchen
__________________
Incubus rocks
Fuery3302 ist offline   Mit Zitat antworten
Alt 07-04-2005, 08:56   #3 (permalink)
Zeitgenosse
 
Benutzerbild von tylerdurden
 
Registriert seit: Oct 2003
Ort: München
Beiträge: 177
wobblebox

hallo,

könntest du bitte die zip-datei nochmal reinstellen?
die vorhandene wurde beschädigt.

vielen dank, andreas
tylerdurden ist offline   Mit Zitat antworten
Alt 07-04-2005, 12:44   #4 (permalink)
Nix Wisser
 
Benutzerbild von nullidee
 
Registriert seit: May 2003
Ort: Würzburg, Kleinstadt
Beiträge: 3.510
hier bitte
Angehängte Dateien
Dateityp: zip wobblebox.zip (4,3 KB, 79x aufgerufen)
__________________
nullidee

Abakus GT 10² Kugeln - 80"Leinwand - CARAN D´ACHE SUPRACOLOR®
nullidee ist offline   Mit Zitat antworten
Antwort

Lesezeichen

Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks sind an
Pingbacks sind an
Refbacks sind an



Alle Zeitangaben in WEZ +1. Es ist jetzt 18:43 Uhr.

Domains, Webhosting & Vserver von Host Europe
Unterstützt das Flashforum!
Adobe User Group


Copyright ©1999 – 2012 Marc Thiele