Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 02-04-2006, 12:25   #1 (permalink)
Neuer User
 
Registriert seit: Jun 2003
Beiträge: 145
Question createTextField, eigenschaften?

hallo,

ich erzeuge eine per AS ein textfeld in einem (attachten) MC, es treten mehrere probleme auf:

1. der text kümmert sich gar nicht um meine größen-angaben und wird immer nach rechts und nach unten (wenn er denn so lang ist) aufgezogen...

2. in abhängigkeit von der MC-größe verändert sich auch die schriftgröße, obwohl sie in jedem MC gleich sein sollte...

meine frage: was mache ich FALSCH??

ActionScript:
  1. _level0[ref].createTextField("txtBox_1",1,1,1,pW,pH);
  2.         _level0[ref].txtBox_1.type = "dynamic";      
  3.         _level0[ref].txtBox_1.multiline = true;
  4.         _level0[ref].txtBox_1.wordWrap = true;
  5.         _level0[ref].txtBox_1.autoSize = false; // true oder false ergibt keinen unterschied!
  6.         _level0[ref].txtBox_1._width = pW;   
  7.         _level0[ref].txtBox_1.html = true;
  8.         _level0[ref].txtBox_1.embedFonts = false;            
  9.        
  10.         txtFormat = new TextFormat(_level0[ref].txtBox_1)
  11.        
  12.         if(txtCol=="" || txtCol==undefined)
  13.         {
  14.             txtFormat.color = "0x000000";
  15.         }
  16.         else
  17.         {
  18.             txtFormat.color = "0x" + txtCol;
  19.         }            
  20.    
  21.         if( contentType=="title" )
  22.         {
  23.             txtFormat.size = 10;
  24.             txtFormat.bold = true;
  25.             txtFormat.italic = false;
  26.         }
  27.         else if( contentType=="untertitel" )
  28.         {
  29.             txtFormat.size = 10;
  30.             txtFormat.bold = false;
  31.             txtFormat.italic = true;
  32.         }
  33.         else
  34.         {
  35.             txtFormat.size = 10;
  36.             txtFormat.bold = false;
  37.             txtFormat.italic = false;         
  38.         }
  39.  
  40.         txtFormat.font = "Verdana";  
  41.         txtFormat.underline = false;
  42.         txtFormat.url = "";
  43.         txtFormat.target = "";
  44.         txtFormat.align = "left";
  45.         txtFormat.leftMargin = 0;
  46.         txtFormat.rightMargin = 0;
  47.         txtFormat.indent = 0;
  48.         txtFormat.leading = 0;
  49.         txtFormat.bullet = false;   
  50.  
  51.  
  52.         //_level0[ref].txtBox_1.maxChars = null;
  53.         //_level0[ref].txtBox_1.text = prepareContent[0];
  54.         _level0[ref].txtBox_1.htmlText = prepareContent[0];    
  55.  
  56.         //_level0[ref].txtBox_1.setNewTextFormat(txtFormat);
  57.         _level0[ref].txtBox_1.setTextFormat(txtFormat);
__________________
23.000th FF-Member :)
greener ist offline   Mit Zitat antworten
Alt 02-04-2006, 14:41   #2 (permalink)
agedoubleju
Gast
 
Beiträge: n/a
Hast du _level0[ref] irgendwo eine andere Größe oder Skalierung zugeordnet?
  Mit Zitat antworten
Alt 02-04-2006, 15:05   #3 (permalink)
Neuer User
 
Registriert seit: Jun 2003
Beiträge: 145
ja, das hab ich den tat. _level0[ref] ist halt der mc, den ich aus der bib "attache"... dessen größe wird halt definiert, aber erst dann wird das textfeld hineingeladen. muss ich da was bestimmtes beachten?
__________________
23.000th FF-Member :)
greener ist offline   Mit Zitat antworten
Alt 02-04-2006, 22:34   #4 (permalink)
agedoubleju
Gast
 
Beiträge: n/a
Wenn du das Textfeld hineinlegst, wird das auch skaliert, egal ob vorher oder nachher... Also, besser Textfeld in einen eigenen MC legen.
  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 01:53 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele