i’m trying to get php to read how many .swf files are in a folder called “horns”
<?
$total= count(glob('./horns/'));
$total=$total+1;
// loads "hornNum" variable and ignores Server Automated Ads
echo "hornNum=" . $total . "&ignore=advert";
?>
but when i do try it, it some how becomes a ten or something
2 would end up to being 20
heres the actionscript code that leaves me thinking that
on (release) {
_root.pethorns++
var i:Number = _root.pethorns;
if (_root.pethorns>=_root.hornNum+1) {
_root.pethorns = 1;
_root.loadhorns("1.swf")
} else {
_root.loadhorns(i+".swf")
}
}
and heres the code on frame 1 of my flash file
function loadhorns(obj) {
_root.defaultpet.defaulthead.defaulthorn.loadMovie("horns/"+obj);
}
function petskin(obj) {
var skincolor:Color = new Color(obj);
skincolor.setRGB(_root.colorskin);
}
_root.colorskin = "0x006600";
loadVariablesNum("itemcounter.php?nocache="+random(65000), 0, "POST");
_root.pethorns = 1;
_root.pose = 1;
and heres the actual flash file right here
http://gaiahost.freeweb7.com/cap/test.swf
what i tried to do was make php count the files in the “horns” folder and pass it to flash as a variable
seems i did something wrong somewhere x.x;;