Hallo na alle,
eigentlich ist es ganz einfach, aber es will einfach nicht funktionieren. sonnen_rotation ist eine globale Variable, welche ich in Frame 1 initialisiert habe. Wenn ich diese mit trace() überwache ist auch alles in Ordnung. Aber bei ‚trace (Sonne1._rotation);‘ kommt jedes mal undefined raus. Sonne1 ist die Instanz eines Movieclips auf dem Frame auf dem das Skript unten ausgeführt wird. Hab schon alles probiert mit this, _root, _parent davor. Nichts hat geholfen. Ach…und es dreht sich natürlich nichts.
Actions auf Frame 2:
onEnterFrame = function() {
//trace (sonnen_rotation);
trace (Sonne1._rotation);
Sonne1._rotation = sonnen_rotation;
sonnen_rotation = sonnen_rotation + 1;
gotoAndPlay(2);
}