Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 10-05-2005, 20:56   #1 (permalink)
tracer
 
Benutzerbild von andretti
 
Registriert seit: Jun 2004
Beiträge: 4.415
variable in prototype reagiert nicht....

ActionScript:
  1. //------------------------------link-prototype
  2. _global.aktiv;
  3. MovieClip.prototype.link = function(linkname, seite, flitzer) {
  4.     this.T_linkname.autoSize = "center";
  5.     this.T_linkname.text = linkname;
  6.     this.MC_overeffect._visible = false;
  7.     this.MC_overeffect.T_linkname_2.autoSize = "center";
  8.     this.MC_overeffect.T_linkname_2.text = linkname;
  9.     this.onRollOver = function() {
  10.         if (this != _global.aktiv) {
  11.             this.T_linkname.textColor = "0xFF9900";
  12.             this.MC_overeffect._visible = true;
  13.             wert = 1.5;
  14.             this.MC_overeffect.onEnterFrame = function() {
  15.                 this._alpha -= 5;
  16.                 this._y -= 5;
  17.                 this._x += wert;
  18.                 this._xscale = this._yscale += 10;
  19.                 this._x>=10 ? wert=-1.5 : 0;
  20.                 this._x<=10 ? wert=1.5 : 0;
  21.                 if (this._y<=-30) {
  22.                     this._visible = false;
  23.                     this._xscale = this._yscale=100;
  24.                     delete this.onEnterFrame;
  25.                 }
  26.             };
  27.         }
  28.     };
  29.     this.onRollOut = function() {
  30.         if (this != _global.aktiv) {
  31.             this.T_linkname.textColor = "0xFEFACD";
  32.             this.MC_overeffect._visible = false;
  33.             this.MC_overeffect._alpha = 100;
  34.             this.MC_overeffect._y = 19.2;
  35.             this.MC_overeffect._x = 0;
  36.             this.MC_overeffect._xscale = this.MC_overeffect._yscale=100;
  37.             delete this.MC_overeffect.onEnterFrame;
  38.         }
  39.     };
  40.     this.onPress = function() {
  41.         if (this != _global.aktiv) {
  42.             _global.aktiv.T_linkname.textColor = "0xFEFACD";
  43.             _root.seitenFader(seite);
  44.             _global.aktiv.enabled = true;
  45.         }
  46.         flitzer._x =300;//warum flitzt der nicht?!?!?!?!?!?!?
  47.         this.enabled = false;
  48.         _global.aktiv = this;
  49.         this.T_linkname.textColor = "0xFF9900";
  50.     };
  51. };
  52. _global.aktiv = MC_home;
  53. MC_home.T_linkname.textColor = "0xFF9900";
  54. // der aufrufer:
  55. MC_phil.link("Philosophie", "philosophie_5.swf", "MC_kugel");
warum bewegt sich "flitzer" nicht?
flitzer ist ein mc, der acu im root liegt;
__________________
Viola per Sempre
Alle Angaben ohne Gewehr!
trace your open mind in variables !
andretti
ActionScript Dictionary

Geändert von andretti (10-05-2005 um 20:58 Uhr)
andretti ist offline   Mit Zitat antworten
Alt 11-05-2005, 01:14   #2 (permalink)
brand new user
 
Benutzerbild von RustyCake
 
Registriert seit: May 2002
Ort: Laimbach 6 1/2
Beiträge: 16.884
Hast im "onPress" Dein "flitzer-dingens" schon mal getraced
Davon abgesehen hat dieses script zuviele ????
Ist nicht wirklich schlüssig
__________________
Bitte keine Fragen, zu Flash per PM. Dazu ist das Forum da. Danke MFG_RustyCake!
"Wer tanzen will, muß erst gehen lernen"
RustyCake ist offline   Mit Zitat antworten
Alt 11-05-2005, 06:04   #3 (permalink)
poke
 
Registriert seit: Dec 2002
Ort: Iserlohn [NRW]
Beiträge: 2.304
müsste eigentlich ein pfad problem sein!?

du rufst innerhalb des mcs, also du bist im mc drin und rufst dann einen mc auf, der eine ebene höher liegt..

versuchs mal mit

_root.flitzer._x oder zumindest _parent
pokepika ist offline   Mit Zitat antworten
Alt 11-05-2005, 08:01   #4 (permalink)
tracer
 
Benutzerbild von andretti
 
Registriert seit: Jun 2004
Beiträge: 4.415
nö, des is es net
__________________
Viola per Sempre
Alle Angaben ohne Gewehr!
trace your open mind in variables !
andretti
ActionScript Dictionary
andretti ist offline   Mit Zitat antworten
Alt 11-05-2005, 08:44   #5 (permalink)
tracer
 
Benutzerbild von andretti
 
Registriert seit: Jun 2004
Beiträge: 4.415
@pokepika:
ActionScript:
  1. //------------------------------link-prototype
  2. _global.aktiv;
  3. _global.oldFlitzer;
  4. MovieClip.prototype.link = function(linkname, seite, flitzer) {
  5.     var ziel1 = 300;
  6.     var ziel2 = 820;
  7.     this.T_linkname.autoSize = "center";
  8.     this.T_linkname.text = linkname;
  9.     this.MC_overeffect._visible = false;
  10.     this.MC_overeffect.T_linkname_2.autoSize = "center";
  11.     this.MC_overeffect.T_linkname_2.text = linkname;
  12.     this.onRollOver = function() {
  13.         if (this != _global.aktiv) {
  14.             this.T_linkname.textColor = "0xFF9900";
  15.             this.MC_overeffect._visible = true;
  16.             wert = 1.5;
  17.             this.MC_overeffect.onEnterFrame = function() {
  18.                 this._alpha -= 5;
  19.                 this._y -= 5;
  20.                 this._x += wert;
  21.                 this._xscale = this._yscale += 10;
  22.                 this._x>=10 ? wert=-1.5 : 0;
  23.                 this._x<=10 ? wert=1.5 : 0;
  24.                 if (this._y<=-30) {
  25.                     this._visible = false;
  26.                     this._xscale = this._yscale=100;
  27.                     delete this.onEnterFrame;
  28.                 }
  29.             };
  30.         }
  31.     };
  32.     this.onRollOut = function() {
  33.         if (this != _global.aktiv) {
  34.             this.T_linkname.textColor = "0xFEFACD";
  35.             this.MC_overeffect._visible = false;
  36.             this.MC_overeffect._alpha = 100;
  37.             this.MC_overeffect._y = 19.2;
  38.             this.MC_overeffect._x = 0;
  39.             this.MC_overeffect._xscale = this.MC_overeffect._yscale=100;
  40.             delete this.MC_overeffect.onEnterFrame;
  41.         }
  42.     };
  43.     this.onPress = function() {
  44.         if (this != _global.aktiv) {
  45.             _global.aktiv.T_linkname.textColor = "0xFEFACD";
  46.             _root.seitenFader(seite);
  47.             _global.aktiv.enabled = true;
  48.             oldFlitzer.onEnterFrame = function() {
  49.                 this._x += 60;
  50.                 if (this._x>=ziel2) {
  51.                     this._x = ziel2;
  52.                     delete this.onEnterFrame;
  53.                     this._parent[flitzer].onEnterFrame = function() {
  54.                         this._x += (ziel1-this._x)/3;
  55.                     };
  56.                 }
  57.             };
  58.         }
  59.         this.enabled = false;
  60.         _global.aktiv = this;
  61.         oldFlitzer = this._parent[flitzer];
  62.         this.T_linkname.textColor = "0xFF9900";
  63.     };
  64. };
  65. _global.aktiv = MC_home;
  66. MC_home.T_linkname.textColor = "0xFF9900";
  67. MC_home.enabled = false;
  68. oldFlitzer = MC_webdesignS;
thx a lot!!!


edit_ final version..........
__________________
Viola per Sempre
Alle Angaben ohne Gewehr!
trace your open mind in variables !
andretti
ActionScript Dictionary

Geändert von andretti (12-05-2005 um 06:07 Uhr)
andretti ist offline   Mit Zitat antworten
Alt 12-05-2005, 00:42   #6 (permalink)
brand new user
 
Benutzerbild von RustyCake
 
Registriert seit: May 2002
Ort: Laimbach 6 1/2
Beiträge: 16.884

wenns funzt
scheint mitr immernoch sehr umständlich aufgebaut zu sein
__________________
Bitte keine Fragen, zu Flash per PM. Dazu ist das Forum da. Danke MFG_RustyCake!
"Wer tanzen will, muß erst gehen lernen"
RustyCake ist offline   Mit Zitat antworten
Alt 12-05-2005, 07:39   #7 (permalink)
_//\\#//\\_
 
Benutzerbild von warrantmaster
 
Registriert seit: Jan 2003
Beiträge: 7.060
[ot]

tach freund rusty

[ot]
warrantmaster 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 09:21 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele