| |||||||
Du magst keine Werbung? Wir auch nicht!
Einfach registrieren und die Werbung ist weg. Diese Nachricht sehen nur nicht registrierte Nutzer.
![]() |
| | LinkBack | Themen-Optionen | Ansicht |
| | #1 (permalink) |
| frischling Registriert seit: Aug 2010
Beiträge: 1
|
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(); Liebe Grüsse aus Zürich DD Geändert von Dust_inc (13-08-2010 um 14:12 Uhr) |
| | |
![]() |
| Lesezeichen |
| Themen-Optionen | |
| Ansicht | |
| |
Ä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 |