Zurück   Flashforum > Flash > Flash Fortgeschritten > Flash MX

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 19-07-2003, 22:40   #1 (permalink)
Neuer User
 
Registriert seit: Dec 2002
Ort: Berlin
Beiträge: 16
Hilfe Variable reagiert nicht

Hallo allerseits,

ich habe ein kleines Problem. Ich habe eine Schaltfläche (code unten) die nach Anzahl der eingetragenen Werte die Schaltfläche mit dem Instanznamen "menupunkt" mehrfach auf dem Bildschirm platziert.

Hier der Code
ActionScript:
  1. on (release) {
  2.     _root.panoramabildarray = new Array("beuth.jpg", "haus_gauss.jpg");
  3.     _root.grundrissbildarray = new Array("karte.jpg", "karte.jpg");
  4.     _root.xpositionarray = new Array("570", "590");
  5.     _root.ypositionarray = new Array("400", "400");
  6.     _root.startwinkelarray = new Array("300", "100");
  7.     _root.textarray = new Array("beuth", "gauss");
  8.     //Schleife zum erzeugen von Schaltflächen
  9.     for (var i = 0; i<panoramabildarray.length; i++) {
  10.         duplicateMovieClip(_root.menupunkt, "mp"+i, 10+i);
  11.         var mc = _root["mp"+i];
  12.         trace("I Wert:"+i+" Bild an der Stelle "+i+":"+_root.panoramabildarray[i]);
  13.         mc._x = xpositionarray[i];
  14.         mc._y = ypositionarray[i];
  15.         mc.panoramabild = panoramabildarray[i];
  16.         mc.grundrissbild = grundrissbildarray[i];
  17.         mc.startwinkelwert = startwinkelarray[i];
  18.         mc.text = textarray[i];
  19.         //Diese onRelease Funktion soll jede Schalftlächen mit den aktullen Werten bekommen.
  20.         mc.onRelease = function() {
  21.             _root.bild_zu_laden = this.panoramabild;
  22.             trace(panoramabild);
  23.             _root.grundriss_url = this.grundrissbild;
  24.             _root.cursor._x = this._x;
  25.             _root.cursor._y = this._y;
  26.             _root.label = this.text;
  27.             _root.startwinkel = this.startwinkelwert;
  28.            
  29.             trace (_root.startwinkel);
  30.             gotoAndPlay(2);
  31.         }
  32.     }
  33. }
Es funktioniert alles bis bis unten die Variable _root.startwinkel dazu addiert werden soll.

ActionScript:
  1. onClipEvent (enterFrame) {
  2. //Der Wert kommt hier an 
  3. _root.startwinkel;
  4.   _root.winkel = _root.panorama_mc._width/_root.panorama_mc._height;
  5.   trace ("ich habe " + _root.startwinkel);
  6.   panbreite = _root.panorama_mc._width/2;
  7.   eingrad = 360/panbreite;
  8.   panposition = _root.panorama_mc._x;
  9. // Aber wird hier nicht mehr dazu addiert.
  10.   this._rotation = -((eingrad*panposition)+_root.startwinkel);
  11.   trace (this._rotation);
  12. }

Woran könnte es denn liegen.

Geändert von cesaria (19-07-2003 um 22:44 Uhr)
cesaria ist offline   Mit Zitat antworten
Alt 20-07-2003, 02:25   #2 (permalink)
{flasher}
 
Benutzerbild von Majo
 
Registriert seit: Mar 2003
Ort: on water
Beiträge: 2.823
ActionScript:
  1. onClipEvent (enterFrame) {
  2.         //Der Wert kommt hier an
  3.         _root.startwinkel;
  4.         _root.winkel = _root.panorama_mc._width/_root.panorama_mc._height;
  5.         trace ("ich habe " + _root.startwinkel);// [COLOR=red]<-----was sagt dieser trace ?[/COLOR]
  6.        panbreite = _root.panorama_mc._width/2;
  7.         eingrad = 360/panbreite;
  8.         panposition = _root.panorama_mc._x;
  9.         // Aber wird hier nicht mehr dazu addiert.
  10.         this._rotation = -((eingrad*panposition)+_root.startwinkel);
  11.         trace (this._rotation);
  12. }
__________________
hang loose

Geändert von Majo (20-07-2003 um 02:27 Uhr)
Majo ist offline   Mit Zitat antworten
Alt 20-07-2003, 07:03   #3 (permalink)
Freelancer
 
Benutzerbild von komashooter
 
Registriert seit: Oct 2001
Ort: Germany - Berlin
Beiträge: 1.777
Zitat:
onClipEvent (enterFrame) {
//Der Wert kommt hier an
_root.startwinkel;
_root.winkel = _root.panorama_mc._width/_root.panorama_mc._height;
trace ("ich habe " + _root.startwinkel);
panbreite = _root.panorama_mc._width/2;
eingrad = 360/panbreite;
panposition = _root.panorama_mc._x;
// Aber wird hier nicht mehr dazu addiert.
this._rotation = -((eingrad*panposition)+_root.startwinkel);
trace (this._rotation);
}

_root.startwinkel; das alleine bringt nix
lass es weg oder gib _root.startwinkel; einen wert
komashooter ist offline   Mit Zitat antworten
Alt 20-07-2003, 08:09   #4 (permalink)
{flasher}
 
Benutzerbild von Majo
 
Registriert seit: Mar 2003
Ort: on water
Beiträge: 2.823
den bekommt er ja aus dem button-event-handler
__________________
hang loose
Majo 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 02:15 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele