Zurück   Flashforum > Flash > Flash Fortgeschritten > Flash CS4 Professional

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 13-08-2010, 14:09   #1 (permalink)
frischling
 
Benutzerbild von Dust_inc
 
Registriert seit: Aug 2010
Beiträge: 1
Question Konflikt beim einlesen von Text über Bild via XML

Hallo Flashforum User

Bin seit bald 2 Wochen an einem Problem.
Habe ein existierendes AS mit einem Texttween per AS. Der Text wird mit einem XML eingelesen. Soweit läuft das alles, ich möchte jedoch ein Hintergrundbild mit derselben XML Datei laden. Leider klappt es aber nicht, die Struktur für den vorhandenen Textween im AS so anzupassen, dass man weitere Nodes für das Bild im XML anfügen kann.

FILE = http://www.soniccube.ch/user/label/news.zip

XML ( so funzt es mit dem Bild, aber KEIN Text ) :

Code:
<?xml version="1.0" encoding="iso-8859-1"?>

<news1>

      <text>
   
   <cpItem captionName="This is a multiline text coming from an external xml file." />
   <cpItem captionName="One time the xml file is loaded every letter of the entire text became a textfield inside a movie clip." />

   </text>


      <picture>
               <bild name="news1.jpg"></bild>
                     
      </picture>
            
    
</news1>

AS :
Code:
//XML Background Pic Load
this.createEmptyMovieClip("BackgroundPicCon_mc",1);

BackgroundPic_xml = new XML();
BackgroundPic_xml.ignoreWhite = true;

BackgroundPic_xml.load("features.xml");
BackgroundPic_xml.onLoad = function(success){
  if(success){
     
  BackgroundPic = BackgroundPic_xml.firstChild.childNodes[1].childNodes[0].attributes.name;
  BackgroundPicCon_mc.loadMovie(BackgroundPic);   
  }
}



// XML Settings for Text effects
var ObjXML:XML = new XML();
ObjXML.ignoreWhite = true;
ObjXML.onLoad = Parse;
ObjXML.load(xmlFile);


function Parse(success)
{
     if(success)
     {
        
        Container = ObjXML.firstChild.childNodes;
        var k:Number = 0;
        for(k = 0; k < Container.length; k++)
        {
           Caption_arr.push(Container<i>.attributes.captionName);
        }
        i = 0;
        if(autoRun == true)
        {
           Steps(Caption_arr[i]);
        }
     }
}


// XML node callback
function Steps(myCaption)
{
     if(i < (Caption_arr.length - 1))
     {
        i++;
        SplitString(myCaption, posCaptionX, posCaptionY, numSpaces, maxSpaces);
     }
     else
     {
        i = 0;
        SplitString(myCaption, posCaptionX, posCaptionY, numSpaces, maxSpaces);
     }
}

stop();
Bin für jeder Hilfe sehr Dankbar.

Liebe Grüsse aus Zürich DD

Geändert von Dust_inc (13-08-2010 um 14:12 Uhr)
Dust_inc 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


Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
Text über Bild - Template Optimierung für Outlook Pro_fate HTML und CSS 0 08-04-2010 15:45
Problem beim navi.weis nicht wie ich seil über bild legen kann Mysteryxxx Flash MX 2004 4 09-02-2005 14:26
prblem beim laden von text und bild noStein Flash MX 2 13-01-2005 15:17
Dynamischer Text bei Rollover über ein Bild 21w Flash MX 5 25-08-2004 08:47
alterntiver text über bild sub Flash 4 und Flash 5 11 14-06-2004 09:17


Alle Zeitangaben in WEZ +1. Es ist jetzt 21:32 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele