Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 08-02-2004, 13:11   #1 (permalink)
#no.991 @ MM
 
Benutzerbild von hugeinc
 
Registriert seit: Apr 2003
Ort: München
Beiträge: 327
Sorry, nochmal "underline" mehere variable Texte

HI zusammen,
ich komm hier auf keinen grünen Zweig.
Ich hab hier folgenden Text, der per loadVars in Fla geladen wird:

headline=Bitte Headline eingeben&copytext=Bitte Copytext <a href="http://www.google.de">eingeben</a> und eventuelle Pfadangaben (<a href="http://www.google.de">URL</a> ) hinzufügen

Mein AS sieht so aus:
ActionScript:
  1. System.useCodepage = true;
  2. loadText = new LoadVars();
  3. loadText.load("test.html");
  4. tHead.html = true;
  5. tCopy.html = true;
  6. loadText.onLoad = function(success) {
  7.     if (success) {
  8.         tHead.htmlText = this.headline;
  9.         tCopy.htmlText = this.copytext;
  10.         los = 0;
  11.         anz = this.copytext.length;
  12.         anzeige = tCopy.getTextFormat(selStart, selEnd);
  13.         if (tCopy.url != '') {
  14.             for (anz; los<anz; los++) {
  15.                 selStart = this.copytext.indexOf("<a href");
  16.                 selEnd = this.copytext.lastIndexOf("</a>");
  17.                 anzeige.underline = true;
  18.                 anzeige.target = "_blank";
  19.                 tCopy.setNewTextFormat(selStart, selEnd, anzeige);
  20.             }
  21.         }
  22.     } else {
  23.         tHead.htmlText = "<b>ERROR</b> loading headline!";
  24.         tCopy.htmlText = "<b>ERROR</b> loading copytext!";
  25.     }
  26. };
Problem ist, das ich die Texte mit den URLs EINZELN underlne anzeigen möchte.
Hat jemand von euch ne Idee, wie ich das schaffen kann?

Greets, Micha
__________________
Arbeit ist keine Lösung...
hugeinc ist offline   Mit Zitat antworten
Alt 08-02-2004, 13:41   #2 (permalink)
#no.991 @ MM
 
Benutzerbild von hugeinc
 
Registriert seit: Apr 2003
Ort: München
Beiträge: 327
Ich Depp hab doch Flash MX 2004.

ActionScript:
  1. System.useCodepage = true;
  2. //neues style sheet object erzeugen
  3. var myCSS = new TextField.StyleSheet();
  4. // pfad dahin
  5. var cssURL = "style.css";
  6. myCSS.load(cssURL);
  7. myCSS.onLoad = function(success) {
  8.     if (success) {
  9.         loadText = new LoadVars();
  10.         loadText.load("test.html");
  11.         loadText.onLoad = function(success) {
  12.             if (success) {
  13.                 tHead.htmlText = this.headline;
  14.                 tCopy.htmlText = this.copytext;
  15.                 tCopy.styleSheet = myCSS;
  16.             }
  17.         }
  18.     }
  19. }

mein CSS:
PHP-Code:
a:link {
  
color#666666;
  
text-decorationunderline;
}

a:hover{
  
color#999999;
  
text-decorationunderline;


Funktioniert ;-)

Micha
__________________
Arbeit ist keine Lösung...
hugeinc 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 05:50 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele