Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 09-08-2003, 11:30   #1 (permalink)
Revived @ Sunday
 
Benutzerbild von MacEvil
 
Registriert seit: Apr 2003
Ort: Nowhereland
Beiträge: 3.244
Arrow Widht und Height eines Fenster per Drag Knopp

Hallo Zusammen,
ich bastle im Moment an einem OS X Fenster.Da ich es ziemlich proffensionell gestalten will (zbSp. auch 2 Scrollbalken),
möchte ich einen Knopf der die Höhe und die Breite des Fenster verschiebt,so wie man ihn in vielen Betriebssystem unten Rechts findet.
Hab schon einiges ausprobiert aber irgendwie nicht so doll g'worde :
ActionScript:
  1. onClipEvent (enterFrame) {
  2. // Skript auf den Drag Knopp
  3. // x Pos von Drag Knopf
  4.     x = 882.05;
  5. // xPos von Fenster
  6.        x2 = 933;
  7. // yPos von Fenster
  8.     y2 = 389;
  9. //yPos von Drag Knopf
  10.     y = 373.55;
  11.     _parent.Fenster._width = x2+x-this._x;
  12.     _parent.Fenster._height = y2+y-this._y;
  13.     this.onPress = function() {
  14.         this.startDrag("");
  15.     };
  16.     this.onRelease = function() {
  17.         this.stopDrag();
  18.     };
  19. }

Gibbet's da irgend ne Formel das es immer parallel abläuft ?

Gruss,

Mäck IhveL
MacEvil ist offline   Mit Zitat antworten
Alt 09-08-2003, 11:45   #2 (permalink)
Hirnverbrannt
 
Benutzerbild von NastyFrog
 
Registriert seit: Aug 2001
Ort: AUSTRIA
Beiträge: 2.020
Ich versteh nicht so ganz, wie du das mit dem Parallel meinst. Das ganze Problem von dir ist etwas undurchsichtig.
Eins kann ich dir aber sagen: Es ist nicht sinnvoll das onPress und onRelease bei jedem onEnterFrame zu definieren. Einmal reicht vollkommen.
__________________
50 Seiten hardcore ActionScript von den Grundlagen bis zu 3D Darstellungen.... eben eine Abendlektüre.

Dogs fucked the Pope, no fault of mine. Watch out! ... Why money? My name is Brinks; I was born ... born? Get sheep over side ... women and children to armored car ... orders from Captain Zeep.(Hunter S. Thompson)
NastyFrog ist offline   Mit Zitat antworten
Alt 09-08-2003, 12:38   #3 (permalink)
Revived @ Sunday
 
Benutzerbild von MacEvil
 
Registriert seit: Apr 2003
Ort: Nowhereland
Beiträge: 3.244
Najo,
dann halt
ActionScript:
  1. on (press) {
  2. this.startDrag("");
  3. }
  4. on (release) {
  5. this.stopDrag();
  6. }
Ich meine das Verhältnis zwischen dem DragKnopf und dem Fenster.
Also Wenn der Knopf 10 Pixel nach unten verschoben wird....
MacEvil ist offline   Mit Zitat antworten
Alt 09-08-2003, 14:54   #4 (permalink)
Hirnverbrannt
 
Benutzerbild von NastyFrog
 
Registriert seit: Aug 2001
Ort: AUSTRIA
Beiträge: 2.020
ActionScript:
  1. onClipEvent (enterFrame) {
  2.         // Skript auf den Drag Knopp
  3.         // x Pos von Drag Knopf
  4.         x = dragKnopf._x;
  5.         // xPos von Fenster
  6.         x2 = 933;
  7.         // yPos von Fenster
  8.         y2 = 389;
  9.         //yPos von Drag Knopf
  10.         y = dragKnopf._y;
  11.         _parent.Fenster._width = x2+x-this._x;
  12.         _parent.Fenster._height = y2+y-this._y;
  13. }

Meinst du so?? Musst doch nur die _x vom DragKnopf nehmen anstatt einer fixen Zahl.
__________________
50 Seiten hardcore ActionScript von den Grundlagen bis zu 3D Darstellungen.... eben eine Abendlektüre.

Dogs fucked the Pope, no fault of mine. Watch out! ... Why money? My name is Brinks; I was born ... born? Get sheep over side ... women and children to armored car ... orders from Captain Zeep.(Hunter S. Thompson)
NastyFrog 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 13:35 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele