Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 05-02-2004, 17:43   #1 (permalink)
Neuer User
 
Registriert seit: Apr 2003
Ort: USA
Beiträge: 130
brauch dringend hilfe

Ich hab ein problem zur object reference. ich erstelle textfelder in einem movieclip und dazu jeweils einen dazugehoerigen buttonMovieClip. ich schaffs einfach nicht das dazugehoerige textfeld anzusprechen:

ActionScript:
  1. this.theInfo = new Array("dealer","news","products","accessories");
  2.  
  3. function createNav(){
  4.     tHN = this.createEmptyMovieClip("horizNav",1);
  5.     for (i=0;i<this.theInfo.length;i++) {   
  6.         HIT = tHN.attachMovie("transpi","transpi"+i,i+555)
  7.         theButton = tHN.createEmptyMovieClip('button_'+i,i+222);
  8.         theButton.createTextField('bLabel_'+i,1,0,0,100,100);
  9.         theTextfield = theButton['bLabel_'+i];
  10.         theTextfield.autoSize=true;
  11.         theTextfield.background=true;
  12.         theTextfield.selectable=false;
  13.         theTextfield.embedFonts = false;
  14.         theTextfield.text = this.theInfo[i];
  15.         this.format=new TextFormat();
  16.         this.format.align = "center";
  17.         this.format.bold = false;
  18.         this.format.font = "tahoma";
  19.         this.format.font = 14;
  20.         theTextfield.format = this.format;
  21.         theTextfield.setTextFormat(theTextfield.format);
  22.         xpos += (HIT._x+HIT._width);
  23.         theTextfield._x = HIT._x = xpos;
  24.         trace(xpos)
  25.        
  26.         HIT.onRollOver = function(){
  27.             theTextfield._y = theTextfield._y + 5
  28.         }
  29.         HIT.onRollOut = function(){
  30.             theTextfield._y = theTextfield._y - 5
  31.         }      
  32.     }
  33.            
  34. };
  35. createNav();

siehe auch anhang.

hilfe dringend erbeten.
osoful ist offline   Mit Zitat antworten
Alt 05-02-2004, 17:45   #2 (permalink)
Neuer User
 
Registriert seit: Apr 2003
Ort: USA
Beiträge: 130
anhang

anhang vergessen
Angehängte Dateien
Dateityp: zip obj_reference.zip (4,1 KB, 4x aufgerufen)
osoful ist offline   Mit Zitat antworten
Alt 05-02-2004, 21:22   #3 (permalink)
_//\\#//\\_
 
Benutzerbild von warrantmaster
 
Registriert seit: Jan 2003
Beiträge: 7.060
ActionScript:
  1. this.theInfo = new Array("dealer", "news", "products", "accessories");
  2. function createNav()
  3. {
  4.     var holder = this.createEmptyMovieClip("horizNav", 1);
  5.     for (i=0; i<this.theInfo.length; i++)
  6.     {
  7.         //
  8.         var mc = holder.attachMovie("transpi", "transpi"+i, i+555, {_x:i*mc._width});
  9.         //
  10.         mc.createEmptyMovieClip('button', 1);
  11.         //
  12.         mc.button.createTextField('bLabel', 1, 0, 0, 100, 100);
  13.         //
  14.         var tf = mc.button.bLabel;
  15.         mc.tf = tf;
  16.         //
  17.         tf.autoSize = true;
  18.         tf.background = true;
  19.         tf.selectable = false;
  20.         tf.embedFonts = false;
  21.         tf.text = this.theInfo[i];
  22.         this.format = new TextFormat();
  23.         this.format.align = "center";
  24.         this.format.bold = false;
  25.         this.format.font = "tahoma";
  26.         this.format.size = 14;
  27.         tf.setTextFormat(this.format);
  28.         //
  29.         mc.onRollOver = function()
  30.         {
  31.             this.tf._y += 5;
  32.         };
  33.         mc.onRollOut = function()
  34.         {
  35.             this.tf._y -= 5;
  36.         };
  37.     }
  38. }
  39. createNav();
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 21:42 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele