PHP erzeugte XML in Flash auf kyrillisch...


#1
Hallo
Habe folgendes Problem:
Ich soll einen Flash-Banner[AS2] (programmiert von Person-A [nicht ich]), der Text/Bilder aus einer von PHP erzeugten XML Datei (von Person-B [auch nicht ich]) bezieht, dazu zu bringen das ganze gegebenenfalls auf Kyrillisch auszuspucken. Sowohl Person-A als auch Person-B sagen das ihr Skript einwandfrei funktioniert...

Da ich seit 6 Jahren kein aufwendigeres AS mehr programmiert habe und mit PHP nur auf mySQL basis gearbeitet habe, komm ich irgendwie nicht weit und hoffe das ihr mir helfen könnt.

Die Ausgabe in Flash bring immer "war nix".

AS-Teil
Code:
System.useCodepage = false;

import QueryString.as;
import mx.transitions.*;
import mx.transitions.easing.*;
import flash.filters.*;

if (xmlFileName != undefined) {
     myTxt.text = xmlFileName;
}

var xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = function(loaded) {
     if (loaded) {
        var xmlNode = this.firstChild;
        image = [];
        description = [];
        effektlist = [];
        anz = xmlNode.childNodes.length;
        for (var i = 0; i<anz; i++) {
           image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
           description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
           effektlist[i] = xmlNode.childNodes[i].attributes.effect;
        }
        if (anz<2) {
           einBild();
        } else {
           
           nextPic();
        }
     } else {
        trace("war nix");
     }
};

xmlFileID = _root.xmlFileID;
navText = _root.navText;
var xml_urlpath = 'defaultFlashXML.php?' + xmlFileID + '&navText=' + navText;

xmlData.load(xml_urlpath);
anzeige.swapDepths(6);

var tl = this;
var i = -1;
var slidePause = 6;
tl.createEmptyMovieClip("watcher",0);
tl.watcher.createEmptyMovieClip("loader1",1);
tl.watcher.createEmptyMovieClip("loader2",3);
tl.createEmptyMovieClip("maske_mc",4);

// Slidefunktion
function nextPic() {
     clearInterval(tl.slideshow);
     i += back ? -1 : 1;
     if (i>=anz) {
        i = 0;
     } else if (i<0) {
        i = anz-1;
     }
     if (mc != tl.watcher.loader1) {
        mc = tl.watcher.loader1;
     } else {
        mc = tl.watcher.loader2;
     }
     mc._alpha = 0;
     mc.swapDepths(3);
     mc.loadMovie(image[i]);
     tl.watcher.onEnterFrame = function() {
        var l = mc.getBytesLoaded();
        var t = mc.getBytesTotal();
        if (l>=t && l>4) {
           delete this.onEnterFrame;
           mc._alpha = 100;
           trace(anz);
           if (anz<2) {
              tween1.onMotionFinished = function() {
                 tween1.stop();
                 tween2.stop();
                 tween3.stop();
                 tween4.stop();
                 tween5.stop();
                 tween6.stop();
              };
           }
           cleaner();
           tl.anzeige.beschr_txt.text = description[i];
           tl.anzeige.beschr_txt2.text = description[i];
           var effektname= effektlist[i];
           var tween1:Tween = new Tween(tl.anzeige.beschr_txt, "_xscale", Regular.easeOut, 50, 100, slidePause, true);
           var tween2:Tween = new Tween(tl.anzeige.beschr_txt, "_yscale", Regular.easeOut, 50, 100, slidePause, true);
           var tween3:Tween = new Tween(tl.anzeige.beschr_txt, "_alpha", None.easeNone, 0, 50, slidePause, true);
           var tween4:Tween = new Tween(tl.anzeige.beschr_txt2, "_xscale", Regular.easeOut, 70, 150, slidePause, true);
           var tween5:Tween = new Tween(tl.anzeige.beschr_txt2, "_yscale", Regular.easeOut, 70, 150, slidePause, true);
           var tween6:Tween = new Tween(tl.anzeige.beschr_txt2, "_alpha", None.easeNone, 0, 80, slidePause, true);
           if (tl.anzeige.beschr_txt.text == "undefined") {
              tl.anzeige.beschr_txt.text = "";
              tl.anzeige.beschr_txt2.text = "";
           }
           if (effektname == "lamellen") {
              TransitionManager.start(mc,{type:Blinds, direction:0, duration:1, easing:Regular.easeOut, numStrips:6, dimension:0});
           }
           if (effektname == "burns") {
              tl.maske_mc.attachMovie("mc2","maske",100);
              tl.maske_mc.maske._height = 295;
              tl.maske_mc.maske._width = 1000;
              tl.watcher.setMask("maske_mc");
              new Tween(mc, "_xscale", None.easeNone, 100, 110, slidePause-1, true);
              new Tween(mc, "_yscale", None.easeNone, 100, 110, slidePause-1, true);
              new Tween(mc, "_x", None.easeNone, 0, -20, slidePause-1, true);
              new Tween(mc, "_y", None.easeNone, 0, -8.5, slidePause-1, true);
              TransitionManager.start(mc,{type:Fade, direction:0, duration:slidePause, easing:None.easeNone});
           }
           if (effektname == "iris") {
              TransitionManager.start(mc,{type:Iris, direction:0, duration:4, easing:Regular.easeOut, startPoint:5, shape:"CIRCLE"});
           }
           if (effektname == "schieben") {
              TransitionManager.start(mc,{type:Fly, direction:0, duration:3, easing:Regular.easeOut, startPoint:4});
           }
           if (effektname == "pixel") {
              TransitionManager.start(mc,{type:PixelDissolve, direction:0, duration:2, easing:None.easeNone, xSections:50, ySections:11});
           }
 
           if (effektname == "stauchen") {
              TransitionManager.start(mc,{type:Squeeze, direction:0, duration:2, easing:Regular.easeOut, dimension:1});
           }
           if (effektname == "verwischen") {
              TransitionManager.start(mc,{type:Wipe, direction:0, duration:2, easing:Regular.easeOut, startPoint:2});
           }
           if (effektname == "photo") {
              TransitionManager.start(mc,{type:Photo, direction:0, duration:2, easing:Strong.easeOut});
           }
           if (effektname == "linien") {
              tl.attachMovie("linien","maske",100);
              mc.setMask("maske");
           }
           if (effektname == "lamellen2") {
              tl.attachMovie("lamellen2","maske",100);
              mc.setMask("maske");
           }
           if (effektname == "schieben2") {
              tl.attachMovie("schieben2","maske",100);
              mc.setMask("maske");
           }
           if (effektname == "punkte") {
              tl.attachMovie("punkte","maske",100);
              mc.setMask("maske");
           }
           tl.slideshow = setInterval(nextPic, slidePause*1000);
        }
     };
}
// einBild
function einBild() {
     i += back ? -1 : 1;
     if (i>=anz) {
        i = 0;
     } else if (i<0) {
        i = anz-1;
     }
     if (mc != tl.watcher.loader1) {
        mc = tl.watcher.loader1;
     } else {
        mc = tl.watcher.loader2;
     }
     mc.loadMovie(image[i]);
     tl.watcher.onEnterFrame = function() {
        var l = mc.getBytesLoaded();
        var t = mc.getBytesTotal();
        if (l>=t && l>4) {
           delete this.onEnterFrame;
           trace(anz);
           cleaner();
           tl.anzeige.beschr_txt.text = description[i];
           tl.anzeige.beschr_txt2.text = description[i];
           var tween1:Tween = new Tween(tl.anzeige.beschr_txt, "_xscale", Regular.easeOut, 50, 100, slidePause, true);
           var tween2:Tween = new Tween(tl.anzeige.beschr_txt, "_yscale", Regular.easeOut, 50, 100, slidePause, true);
           var tween3:Tween = new Tween(tl.anzeige.beschr_txt, "_alpha", None.easeNone, 0, 50, slidePause, true);
           var tween4:Tween = new Tween(tl.anzeige.beschr_txt2, "_xscale", Regular.easeOut, 70, 150, slidePause, true);
           var tween5:Tween = new Tween(tl.anzeige.beschr_txt2, "_yscale", Regular.easeOut, 70, 150, slidePause, true);
           var tween6:Tween = new Tween(tl.anzeige.beschr_txt2, "_alpha", None.easeNone, 0, 80, slidePause, true);
           if (tl.anzeige.beschr_txt.text == "undefined") {
              tl.anzeige.beschr_txt.text = "";
              tl.anzeige.beschr_txt2.text = "";
           }
           if (effektname == "lamellen") {
              TransitionManager.start(mc,{type:Blinds, direction:0, duration:1, easing:Regular.easeOut, numStrips:6, dimension:0});
           }
           if (effektname == "burns") {
              tl.maske_mc.attachMovie("mc2","maske",100);
              tl.maske_mc.maske._height = 295;
              tl.maske_mc.maske._width = 1000;
              tl.watcher.setMask("maske_mc");
              new Tween(mc, "_xscale", None.easeNone, 100, 110, slidePause-1, true);
              new Tween(mc, "_yscale", None.easeNone, 100, 110, slidePause-1, true);
              new Tween(mc, "_x", None.easeNone, 0, -20, slidePause-1, true);
              new Tween(mc, "_y", None.easeNone, 0, -8.5, slidePause-1, true);
              TransitionManager.start(mc,{type:Fade, direction:0, duration:slidePause, easing:None.easeNone});
           }
           if (effektname == "iris") {
              TransitionManager.start(mc,{type:Iris, direction:0, duration:4, easing:Regular.easeOut, startPoint:5, shape:"CIRCLE"});
           }
           if (effektname == "schieben") {
              TransitionManager.start(mc,{type:Fly, direction:0, duration:3, easing:Regular.easeOut, startPoint:4});
           }
           if (effektname == "pixel") {
              TransitionManager.start(mc,{type:PixelDissolve, direction:0, duration:2, easing:None.easeNone, xSections:50, ySections:11});
           }
           if (effektname == "stauchen") {
              TransitionManager.start(mc,{type:Squeeze, direction:0, duration:2, easing:Regular.easeOut, dimension:1});
           }
           if (effektname == "verwischen") {
              TransitionManager.start(mc,{type:Wipe, direction:0, duration:2, easing:Regular.easeOut, startPoint:2});
           }
           if (effektname == "photo") {
              TransitionManager.start(mc,{type:Photo, direction:0, duration:2, easing:Strong.easeOut});
           }
           if (effektname == "linien") {
              tl.attachMovie("linien","maske",100);
              mc.setMask("maske");
           }
           if (effektname == "lamellen2") {
              tl.attachMovie("lamellen2","maske",100);
              mc.setMask("maske");
           }
           if (effektname == "schieben2") {
              tl.attachMovie("schieben2","maske",100);
              mc.setMask("maske");
           }
           if (effektname == "punkte") {
              tl.attachMovie("punkte","maske",100);
              mc.setMask("maske");
           }
        }
     };
}
// cleaner
function cleaner() {
     mc.filters = 0;
     tl.maske.removeMovieClip();
     tl.watcher.maske_mc.removeMovieClip();
}
PHP-Teil
PHP:
<?php
ob_start();

header ("Cache-Control: no-cache, must-revalidate"); 
header ("Pragma: no-cache");
header ("Content-type: text/xml");

include('../lib/data/dbini.php');
include('./xmlFunctions.php');

$xmlFunctions = new xmlFunctions();

$buffer = NULL;

if(isset($_GET['xmlFileID']) && is_numeric($_GET['xmlFileID'])){
    $buffer .= '<?xml version="1.0" encoding="UTF-8"?>';
   
    $sql = "SELECT flashmanagement_relations.flama_rel_text, flashmanagement_relations.flama_rel_pic, flasheffects.fe_descr
    FROM flashmanagement
    INNER JOIN flashmanagement_relations ON flashmanagement.flama_id = flashmanagement_relations.flama_fk
    INNER JOIN flasheffects ON flashmanagement_relations.flama_rel_type = flasheffects.fe_seq
    WHERE flashmanagement.flama_id='" . $_GET['xmlFileID'] . "' ORDER BY flashmanagement_relations.flama_rel_sort";
    $query = mysql_query($sql);
   
    $buffer .= '<images>';
        while($fetch = mysql_fetch_assoc($query))
        {
            $caption = $fetch['flama_rel_text'];
            if(empty($caption)){
                $caption = $_GET['navText'];
            }
           
            $buffer .= '<pic effect="' . $fetch['fe_descr'] . '">';
                $buffer .= '<image><![CDATA[' . $xmlFunctions->getPicByID($fetch['flama_rel_pic']) . ']]></image>';
                $buffer .= '<caption><![CDATA[' . $caption . ']]></caption>';
            $buffer .= '</pic>';
        }
    $buffer .= '</images>';
   
    echo $buffer;
}

ob_end_flush();
?>
Ohne System.useCodepage = false;
Mit System.useCodepage = false;
 
#2
Ok das Problem mit dem Kyrillischen wäre gelöst
es lag an der Art, wie geladen wurde (GetURL ->sendVars)

Allerdings Ruckelt es jetzt sehr stark beim einladen.
Woran könnte das liegen?