Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 14-10-2005, 08:54   #1 (permalink)
Neuer User
 
Registriert seit: Jan 2002
Beiträge: 1.244
MC und Auswahlrahmen drehen (width,height)

Hi,

Habe das Problem, das nach dem drehen des MC sich width und height nicht mit
anpassen. Wenn ich nach dem drehen den MC erneut anklicke, stimmt die Beite
und Höhe des Auswahlrahmens nicht mehr.

Jemand eine Idee ?

ActionScript:
  1. this.createEmptyMovieClip ("cont", 0);
  2. var h = cont.attachMovie ("h", "h", 0, {_x:200, _y:200});
  3. h.onRelease = function ()
  4. {
  5.     cont.dreh()
  6. };
  7. //
  8. MovieClip.prototype.dreh = function ()
  9. {
  10.     var a = this.attachMovie ("aktiv", "aktiv", 1, {_x:200, _y:200});
  11.     a._rotation = h._rotation
  12.     a.rahmen._width = h._width + 20;
  13.     a.rahmen._height = h._height;
  14.     //
  15.     a.r_btn.obj = h;
  16.     a.r_btn.onPress = function ()
  17.     {
  18.         this.onEnterFrame = function ()
  19.         {
  20.             var ro = Math.atan2 (this.obj._x - _root._xmouse, this.obj._y - _root._ymouse);
  21.             this.obj._rotation = a._rotation = (-ro * 180 / Math.PI) - 90;
  22.             trace (a._rotation);
  23.         };
  24.     };
  25.     //
  26.     a.r_btn.onRelease = a.r_btn.onReleaseOutside = function ()
  27.     {
  28.         delete this.onEnterFrame;
  29.     };
  30. };
Angehängte Dateien
Dateityp: rar drehen.rar (5,3 KB, 4x aufgerufen)
__________________
Mfg aus Brandenburg.

harego

Spiel

Zur Page
harego 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 22:29 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele