Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 19-01-2005, 04:36   #1 (permalink)
All-rounder
 
Benutzerbild von thebiz
 
Registriert seit: Mar 2004
Ort: Bayerische Rhön
Beiträge: 2.507
Skalierbare Ordner

Hi.

Weiß jemand, wie man solche skalierbaren Ordner erstellen kann.
Sie sollen per 8 Anfasser von allen Seiten veränderbar sein,
wie im Link zu sehen.

Dazu müssen die Ordner in diesem Diagramm angewählt werden.
http://www.gskinner.com/gmodeler/app/run.html

Danke
John
__________________

--------------------------------
Ich klicke, ergo bin ich. (me)
--------------------------------
thebiz ist offline   Mit Zitat antworten
Alt 19-01-2005, 09:39   #2 (permalink)
All-rounder
 
Benutzerbild von thebiz
 
Registriert seit: Mar 2004
Ort: Bayerische Rhön
Beiträge: 2.507
Also ich nehme mal an, dass die drawing-API
da zum Einsatz kommt.
Vielleicht kann jemand meine Annahme
bekräftigen. Mehr will ich nicht.

Gruß
John
__________________

--------------------------------
Ich klicke, ergo bin ich. (me)
--------------------------------
thebiz ist offline   Mit Zitat antworten
Alt 19-01-2005, 10:05   #3 (permalink)
squirlish
 
Benutzerbild von ChriZi
 
Registriert seit: Mar 2004
Ort: CH
Beiträge: 492
hmm,... vieleicht wird auch einfach der standord immer geupdated wenn man es nach oben skalliert!!!...
ja ok würde dann wermutlich nicht so flüssig laufen...
__________________
SQUIRLART|PHOTOGRAPHY
ChriZi ist offline   Mit Zitat antworten
Alt 20-01-2005, 02:32   #4 (permalink)
All-rounder
 
Benutzerbild von thebiz
 
Registriert seit: Mar 2004
Ort: Bayerische Rhön
Beiträge: 2.507
Hat sich erledigt

Ich habe jetzt mal etwas in Grundzügen erstellt,
falls jemand daran Gefallen findet.

Einfach das Skript in einen leeren Film kopieren.
Mehr muss nicht gemacht werden.
Es geht nur der rechte-obere Anfasser (rot hervorgehoben).

ActionScript:
  1. //--- Die Eckpunkte erstellen ---
  2.   _root.createEmptyMovieClip("ru_mc", 100);
  3.   _root.createEmptyMovieClip("lo_mc", 101);
  4.   _root.createEmptyMovieClip("lu_mc", 102);
  5.   _root.createEmptyMovieClip("ro_mc", 103);
  6.   function punkt(wer, x, y) {
  7.       with (wer) {
  8.           _x = x;
  9.           _y = y;
  10.           // nur um den Anfasser rechts-oben rot zu färben
  11.           if (wer == _root.ro_mc) {
  12.               beginFill(0xFF3333);
  13.           } else {
  14.               beginFill(0x333333);
  15.           }
  16.           moveTo(-5, -5);
  17.           lineTo(-5, 5);
  18.           lineTo(5, 5);
  19.           lineTo(5, -5);
  20.           lineTo(-5, -5);
  21.       }
  22.   }
  23.   punkt(_root.lo_mc, 100, 150);
  24.   punkt(_root.lu_mc, 100, 200);
  25.   punkt(_root.ro_mc, 290, 150);
  26.   punkt(_root.ru_mc, 290, 200);
  27.   //--- Die Funktion um die Fläche zu zeichnen ---
  28.   function zeichnen() {
  29.       _root.createEmptyMovieClip("box_mc", 1);
  30.       with (_root.box_mc) {
  31.           beginFill(0x55DD66);
  32.           moveTo(_root.lo_mc._x, _root.lo_mc._y);
  33.           lineTo(_root.ro_mc._x, _root.ro_mc._y);
  34.           lineTo(_root.ru_mc._x, _root.ru_mc._y);
  35.           lineTo(_root.lu_mc._x, _root.lu_mc._y);
  36.           lineTo(_root.lo_mc._x, _root.lo_mc._y);
  37.       }
  38.   }
  39.   //--- Der rote Eckpunkt bekommt die Funktionalität ---
  40.   _root.ro_mc.onPress = function() {
  41.       startDrag(this);
  42.       this.onMouseMove = function() {
  43.           _root.ru_mc._x = this._x;
  44.           _root.lo_mc._y = this._y;
  45.           zeichnen();
  46.           updateAfterEvent();
  47.       };
  48.   };
  49.   _root.ro_mc.onRelease = _root.ro_mc.onReleaseOutside = function () {
  50.       stopDrag();
  51.   };
  52.   //--- Beim Start schon mal eine Fläche erstellen ---
  53.   zeichnen();
Angehängte Dateien
Dateityp: zip skalieren.zip (647 Bytes, 5x aufgerufen)
__________________

--------------------------------
Ich klicke, ergo bin ich. (me)
--------------------------------

Geändert von thebiz (20-01-2005 um 03:18 Uhr)
thebiz ist offline   Mit Zitat antworten
Alt 20-01-2005, 06:04   #5 (permalink)
Nix Wisser
 
Benutzerbild von nullidee
 
Registriert seit: May 2003
Ort: Würzburg, Kleinstadt
Beiträge: 3.510
schaut gut aus, ich hoffe du machst das fertig!

Ich habe nämlich auch mal sowas angefangen, ist aber wieder in der Schublade verschwunden.
Angehängte Dateien
Dateityp: zip resizer.zip (8,1 KB, 5x aufgerufen)
__________________
nullidee

Abakus GT 10² Kugeln - 80"Leinwand - CARAN D´ACHE SUPRACOLOR®
nullidee ist offline   Mit Zitat antworten
Alt 20-01-2005, 07:02   #6 (permalink)
All-rounder
 
Benutzerbild von thebiz
 
Registriert seit: Mar 2004
Ort: Bayerische Rhön
Beiträge: 2.507
Kann man bestimmt noch optimieren.
Hauptsache es geht erstmal.

ActionScript:
  1. //--- Die Eckpunkte erstellen ---
  2.  function punkt(wer, x, y, tiefe) {
  3.      _root.createEmptyMovieClip(wer, tiefe);
  4.      with (_root[wer]) {
  5.          _x = x;
  6.          _y = y;
  7.          beginFill(0x333333);
  8.          moveTo(-5, -5);
  9.          lineTo(-5, 5);
  10.          lineTo(5, 5);
  11.          lineTo(5, -5);
  12.          lineTo(-5, -5);
  13.      }
  14.  }
  15.  punkt("lo_mc", 100, 150, 100);
  16.  punkt("lu_mc", 100, 200, 101);
  17.  punkt("ro_mc", 290, 150, 102);
  18.  punkt("ru_mc", 290, 200, 103);
  19.  //--- Die Funktion um die Fläche zu zeichnen ---
  20.  function zeichnen() {
  21.      _root.createEmptyMovieClip("box_mc", 1);
  22.      with (_root.box_mc) {
  23.          beginFill(0xDDDDDD, 30);
  24.          lineStyle(1, 0x000000);
  25.          moveTo(_root.lo_mc._x, _root.lo_mc._y);
  26.          lineTo(_root.ro_mc._x, _root.ro_mc._y);
  27.          lineTo(_root.ru_mc._x, _root.ru_mc._y);
  28.          lineTo(_root.lu_mc._x, _root.lu_mc._y);
  29.          lineTo(_root.lo_mc._x, _root.lo_mc._y);
  30.      }
  31.  }
  32.  //--- Die Eckpunkte erhalten ihre Funktionalität ---
  33.  _root.ro_mc.onPress = function() {
  34.      startDrag(this);
  35.      _root.onMouseMove = function() {
  36.          _root.ru_mc._x = _root.ro_mc._x;
  37.          _root.lo_mc._y = _root.ro_mc._y;
  38.          zeichnen();
  39.          updateAfterEvent();
  40.      };
  41.  };
  42.  _root.ro_mc.onRelease = _root.ro_mc.onReleaseOutside = function () {
  43.      stopDrag();
  44.  };
  45.  //....................................................
  46.  _root.ru_mc.onPress = function() {
  47.      startDrag(this);
  48.      _root.onMouseMove = function() {
  49.          _root.ro_mc._x = _root.ru_mc._x;
  50.          _root.lu_mc._y = _root.ru_mc._y;
  51.          zeichnen();
  52.          updateAfterEvent();
  53.      };
  54.  };
  55.  _root.ru_mc.onRelease = _root.ru_mc.onReleaseOutside = function () {
  56.      stopDrag();
  57.  };
  58.  //....................................................
  59.  _root.lu_mc.onPress = function() {
  60.      startDrag(this);
  61.      _root.onMouseMove = function() {
  62.          _root.lo_mc._x = _root.lu_mc._x;
  63.          _root.ru_mc._y = _root.lu_mc._y;
  64.          zeichnen();
  65.          updateAfterEvent();
  66.      };
  67.  };
  68.  _root.lu_mc.onRelease = _root.lu_mc.onReleaseOutside = function () {
  69.      stopDrag();
  70.  };
  71.  //....................................................
  72.  _root.lo_mc.onPress = function() {
  73.      startDrag(this);
  74.      _root.onMouseMove = function() {
  75.          _root.lu_mc._x = _root.lo_mc._x;
  76.          _root.ro_mc._y = _root.lo_mc._y;
  77.          zeichnen();
  78.          updateAfterEvent();
  79.      };
  80.  };
  81.  _root.lo_mc.onRelease = _root.lo_mc.onReleaseOutside = function () {
  82.      stopDrag();
  83.  };
  84.  //--- Beim Start schon mal eine Fläche erstellen ---
  85.  zeichnen();
Angehängte Dateien
Dateityp: zip skalieren.zip (711 Bytes, 11x aufgerufen)
__________________

--------------------------------
Ich klicke, ergo bin ich. (me)
--------------------------------

Geändert von thebiz (20-01-2005 um 07:15 Uhr)
thebiz 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 05:36 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele