Hi all.
I made a swf much like a slideshow, wich loads a list of items from a database. I made a php file that outputs a xml file with the items. The swf file is loaded from a php file in some folder (i.e. “helper” - folder). Ok, here’s my problem.
-
If i try to lo load the php file “http://localhost/site/helper/flash.php” the flash is working fine.
-
In index.php file I have the include function ( include “helper/flash.php”). If i load the index.php file “http://localhost/site/index.php” the flash is not working.
Please help
I don’t know what else to tell you, but if anyone needs more details, please ask.
my code:
_root.scena.denumire.text=“stop timer”;
timer.stop();
var my_xml:XML = new XML();
my_xml.ignoreWhite = true;
my_xml.onLoad = function(success:Boolean) {
if (success) {
_root.scena.denumire.text=“loaded XML”;
scena._visible=false;
makeArray();
_root.scena.denumire.text=“loaded XML”;
trace(“XML loaded successfully, loading data”);
//ShowSlide(2);
trace (curr_slide);
trace (max_slide);
timer.play();
} else {
_root.scena.denumire.text=“Unable to load XML”;
}
};
_root.scena.denumire.text=“prep load xml”;
my_xml.load(“http://localhost/site/helper/micro1.php”);
function makeArray(){
parseArray = [];
nodes = my_xml.firstChild.childNodes;
_root.curr_slide=0;
_root.max_slide=nodes.length-1;
for(i=0;i<nodes.length;i++){
denumire = nodes*.attributes.denumire;
pret = nodes*.attributes.pret;
pic = nodes*.attributes.pic;
parseArray.push({denumire:denumire,pret:pret,pic:pic});
}
};
function changedir(dir) {
if (dir==1)
{
if (curr_slide<max_slide) {
curr_slide = curr_slide+1;
}
else {
curr_slide = 0;
}
}
else
{
if (curr_slide>0) {
curr_slide = curr_slide-1;
}
else {
curr_slide = max_slide;
}
}
ShowSlide(curr_slide);
};
function ShowSlide(item) {
this.scena.pret.text = parseArray[item].pret;
this.scena.denumire.text = parseArray[item].denumire;
this.scena.mcload.contentPath= parseArray[item].pic;
scena._visible=true;
};