[swx] Getting data from a passed object
Paul Bainbridge
forums at innovativedesigns.org.uk
Mon Jun 2 09:42:56 PDT 2008
Got it
I put the sub data into an Array
OSexcel.dat = [];
for (var a:Number = 0; a<OSexcel.totalCount; a++) {
OSexcel.dat[a] = [_level0.leftHolder.mcOs.holder['mcCount'+a].tx1.text, _level0.leftHolder.mcOs.holder['mcCount'+a].tx2.text, _level0.leftHolder.mcOs.holder['mcCount'+a].tx3.text];
}
Then in the php script i have
for($i=0;$i<count($arrData);$i++){
$titleArr = $arrData[$i]->titles;
$titles = split(",",$titleArr);
$dataheader = "\n".$arrData[$i]->excelHead;
$dataheader .= "\n"."\t".$titles[0]." \t".$titles[1]." \n";
$count = $arrData[$i]->totalCount;
$line = '';
$data.=$dataheader;
for ($j = 0; $j < $count; $j++){
$value = $arrData[$i]->dat[$j][0]." \t".$arrData[$i]->dat[$j][1]." \t".$arrData[$i]->dat[$j][2];
$line .= $value."\n";
}
$data .= trim($line)."\n";
$data = str_replace("\r", "", $data);
if ($data == "") {
$data = "\nno matching records found\n";
}
}
----- Original Message -----
From: Paul Bainbridge
To: SWX Mailing List
Sent: Monday, June 02, 2008 3:13 PM
Subject: Re: [swx] Getting data from a passed object
Anyone?
----- Original Message -----
From: Paul Bainbridge
To: SWX Mailing List
Sent: Monday, June 02, 2008 1:25 PM
Subject: [swx] Getting data from a passed object
Hi guys,
So far so good i have been able to pull the headings and titles passed in the function for each object.
I have now run into another problem.
Below is what is being passed into the object
OSexcel.id = "os";
OSexcel.excelHead = "OPERATING SYSTEM USAGE";
OSexcel.totalCount = _level0.data_lv[OSexcel.id+'Count'];
for (var a:Number = 0; a<OSexcel.totalCount; a++) {
OSexcel['excelData'+a+'title'] = _level0.leftHolder.mcOs.holder['mcCount'+a].tx1.text;
OSexcel['excelData'+a+'percent'] = _level0.leftHolder.mcOs.holder['mcCount'+a].tx3.text;
OSexcel['excelData'+a+'count'] = _level0.leftHolder.mcOs.holder['mcCount'+a].tx2.text;
}
I am having a problem what i have in the for loop
i am pretty sure it just a way of how it should be code
Here is what i have so far
$header = $OSexcel->excelHead."\n\n";
$countA = $OSexcel->totalCount;
$counter = 0;
$header .= "Title \t"."Precent \t"."Count \t";
$line = '';
for ($i = 0; $i < $countA; $i++){
Can someon put me right?
thanks
Paul
----------------------------------------------------------------------------
_______________________________________________
swx mailing list
swx at osflash.org
http://osflash.org/mailman/listinfo/swx_osflash.org
------------------------------------------------------------------------------
_______________________________________________
swx mailing list
swx at osflash.org
http://osflash.org/mailman/listinfo/swx_osflash.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/swx_osflash.org/attachments/20080602/a6f01816/attachment.html
More information about the swx
mailing list