[swx] Hey i am new here.
ben
ben_da_dog at yahoo.co.uk
Fri May 30 02:18:01 PDT 2008
Hmmm... you're not being very explicit as to where the problem lies.
From your last post it seems swx passes the data over fine across so it
seems to be more of an issue with what you do with the data passed over.
if for instance in your flash file you have an object called data
declared as such
var data = {
prop1 : 'some value',
prop2: 'something else',
anArray: [1, 2, 3]
};
and you pass that on to your swx call as args: [data]
then you probably also have a swx method in that format: myMethod($data)
in that case, $data will pretty much be accessed in the same structure
it was declared in your actionscript.
so in your method,
$data->prop1
$data->anArray[0];
count($data->anArray)
etc
etc
Hope that's what you meant.
If you're having difficulties generating the excel document out of your
data then that might be slightly off topic for this list. One tip
though... if all you want is a simple excel document with rows of data,
just generate it as a html table and give it the extension .xls
Excel will recognise and read such a file.
If that's not what you meant, please clarify.
Cheers
Ben
Paul Bainbridge wrote:
> So can anyone help me out here?
>
> I spent most of yesterday google for examples that would help me get
> some basic understanding but i am still at a loss.
>
> thanks
> Paul
>
> ----- Original Message -----
> *From:* holger arndt <mailto:holger.arndt at synap.de>
> *To:* Paul Bainbridge <mailto:work at innovativedesigns.org.uk> ; SWX
> Mailing List <mailto:swx at osflash.org>
> *Sent:* Wednesday, May 28, 2008 6:27 PM
> *Subject:* Re: [swx] Hey i am new here.
>
> ok, first thing i would change is the encoding
> since GET is limited to a certain amount of chars, i'd recommend
> using POST.
> But error opening url could have several other reasons.
> the gateway you set is just a dummy for this mail, right?
> I doubt that you really use www.mydomain.com <http://www.mydomain.com>
> (i just want to make sure you just didn't copy it from a tutorial
> ;-) )
> Have you used the explorer to assure that the service class exists?
> URL would be: http:// www.mydomain.com/swx_php/php/explorer/
> <http://www.mydomain.com/swx_php/php/explorer/>
>
> Let me know if all of this is correct.
>
>
>
>
> Am 28.05.2008 um 18:59 schrieb Paul Bainbridge:
>
>> Ha ha,
>>
>> I am new to using these list's
>> Regular forum user though.
>>
>> I have a lot of data that I am trying to export to php so it can
>> be written to execl file.
>> Unfortunately it looks like the url is to long and I end up with
>> error opening url.
>>
>> I have tried using Sephiroth's Serializer Class
>> <http://www.sephiroth.it/test/unserializer/> this also had the
>> nsame error.
>>
>> I have tried using AMFPHP wich poinbt blank would just not work
>> or at least i couldnt get it to work,
>>
>> So swx is my last port of call before i look over AMFPHP.
>>
>> Below is the code i am using to gather and try and send data to
>> the php script.
>> //---------------------------------------------------------------------------------------------
>> import org.swxformat.*;
>> var swx:SWX = new SWX();
>> var OSexcel:Object = new 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;
>> }
>> var BRexcel:Object = new Object();
>> //----------
>> BRexcel.id = "browser";
>> BRexcel.excelHead = "BROWSER USAGE";
>> BRexcel.totalCount = _level0.data_lv[BRexcel.id+'Count'];
>> for (var b:Number = 0; b<BRexcel.totalCount; b++) {
>> BRexcel['excelData'+b+'title'] =
>> _level0.leftHolder.mcBrowser.holder['mcCount'+b].tx1.text;
>> BRexcel['excelData'+b+'percent'] =
>> _level0.leftHolder.mcBrowser.holder['mcCount'+b].tx3.text;
>> BRexcel['excelData'+b+'count'] =
>> _level0.leftHolder.mcBrowser.holder['mcCount'+b].tx2.text;
>> }
>> var OTexcel:Object = new Object();
>> //----------
>> OTexcel.id = "other";
>> OTexcel.excelHead = "Tracking other";
>> OTexcel.totalCount = _level0.data_lv[OTexcel.id+'Count'];
>> for (var c:Number = 0; c<OTexcel.totalCount; c++) {
>> OTexcel['excelData'+c+'title'] =
>> _level0.leftHolder.mcOther.holder['mcCount'+c].tx1.text;
>> OTexcel['excelData'+c+'count'] =
>> _level0.leftHolder.mcOther.holder['mcCount'+c].tx2.text;
>> }
>> var PTexcel:Object = new Object();
>> //----------
>> PTexcel.id = "page";
>> PTexcel.excelHead = "Page tracking";
>> PTexcel.totalCount = _level0.data_lv[PTexcel.id+'Count'];
>> for (var d:Number = 0; d<PTexcel.totalCount; d++) {
>> PTexcel['excelData'+d+'title'] =
>> _level0.rightHolder.mcPage.holder['page'+d].tx1.text;
>> PTexcel['excelData'+d+'uniqueCount'] =
>> _level0.rightHolder.mcPage.holder['page'+d].tx2.text;
>> PTexcel['excelData'+d+'count'] =
>> _level0.rightHolder.mcPage.holder['page'+d].tx3.text;
>> }
>> var LIexcel:Object = new Object();
>> //----------
>> LIexcel.id = "internal";
>> LIexcel.excelHead = "Internal links";
>> LIexcel.totalCount = _level0.data_lv[LIexcel.id+'Count'];
>> for (var e:Number = 0; e<LIexcel.totalCount; e++) {
>> LIexcel['excelData'+e+'title'] =
>> _level0.rightHolder.mcLink.holder[LEMexcel.id+e].tx1.text;
>> LIexcel['excelData'+e+'uniqueCount'] =
>> _level0.rightHolder.mcLink.holder[LEMexcel.id+e].tx2.text;
>> LIexcel['excelData'+e+'count'] =
>> _level0.rightHolder.mcLink.holder[LEMexcel.id+e].tx3.text;
>> }
>> var LEexcel:Object = new Object();
>> //----------
>> LEexcel.id = "external";
>> LEexcel.excelHead = "External links";
>> LEexcel.totalCount = _level0.data_lv[LEexcel.id+'Count'];
>> for (var f:Number = 0; f<LEexcel.totalCount; f++) {
>> LEexcel['excelData'+f+'title'] =
>> _level0.rightHolder.mcLink.holder[LEMexcel.id+f].tx1.text;
>> LEexcel['excelData'+f+'uniqueCount'] =
>> _level0.rightHolder.mcLink.holder[LEMexcel.id+f].tx2.text;
>> LEexcel['excelData'+f+'count'] =
>> _level0.rightHolder.mcLink.holder[LEMexcel.id+f].tx3.text;
>> }
>> var LEMexcel:Object = new Object();
>> //----------
>> LEMexcel.id = "email";
>> LEMexcel.excelHead = "Email links";
>> LEMexcel.totalCount = _level0.data_lv[LEMexcel.id+'Count'];
>> for (var g:Number = 0; g<LEMexcel.totalCount; g++) {
>> LEMexcel['excelData'+g+'title'] =
>> _level0.rightHolder.mcLink.holder[LEMexcel.id+g].tx1.text;
>> LEMexcel['excelData'+g+'uniqueCount'] =
>> _level0.rightHolder.mcLink.holder[LEMexcel.id+g].tx2.text;
>> LEMexcel['excelData'+g+'count'] =
>> _level0.rightHolder.mcLink.holder[LEMexcel.id+g].tx3.text;
>> }
>> var DWexcel:Object = new Object();
>> //----------
>> DWexcel.id = "page";
>> DWexcel.excelHead = "Dwell times";
>> DWexcel.totalCount = _level0.data_lv[DWexcel.id+'Count'];
>> for (var h:Number = 0; h<DWexcel.totalCount; h++) {
>> DWexcel['excelData'+h+'title'] =
>> _level0.rightHolder.mcDwell.holder['page'+h].tx1.text;
>> DWexcel['excelData'+h+'time'] =
>> _level0.rightHolder.mcDwell.holder['page'+h].tx2.text;
>> }
>>
>> swx.gateway = "http://www.mydomain.com/swx_php/php/swx.php";
>> swx.encoding = "GET";
>> swx.debug = true;
>> swx.timeout = 5;// seconds
>> //var callParameters:Object = {serviceClass:"save_xls",
>> method:"isCreated", args:[OSexcel, BRexcel, PTexcel, "", "", "",
>> "", ""], result:[this, resultHandler], timeout:[this,
>> timeoutHandler], fault:[this, faultHandler]};
>> var callParameters:Object = {serviceClass:"save_xls",
>> method:"isCreated", args:[OSexcel, BRexcel, OTexcel, PTexcel,
>> LIexcel, LEexcel, LEMexcel, DWexcel], result:[this,
>> resultHandler], timeout:[this, timeoutHandler], fault:[this,
>> faultHandler]};
>> swx.call(callParameters);
>> function resultHandler(event:Object) {
>> trace("result:"+event.result);
>> }
>> function timeoutHandler() {
>> trace("Call timed out!");
>> }
>> function faultHandler(event:Object) {
>> trace("result fault:"+event.fault.message);
>> }
>> //---------------------------------------------------------------------------------------------
>>
>> Thanks for any help or advise you can give.
>> Paul
>>
>>
>> ----- Original Message -----
>> *From:* holger arndt <mailto:holger.arndt at synap.de>
>> *To:* Paul Bainbridge
>> <mailto:work at innovativedesigns.org.uk> ; SWX Mailing List
>> <mailto:swx at osflash.org>
>> *Sent:* Wednesday, May 28, 2008 5:42 PM
>> *Subject:* Re: [swx] Hey i am new here.
>>
>> Well i think that's why this list exists... ;-)
>>
>> Just go ahead...
>>
>> Cheers,
>> Holger
>>
>> Am 28.05.2008 um 18:32 schrieb Paul Bainbridge:
>>
>>> Hi Guys,
>>>
>>> New to swx but not flash or php.
>>> I got some issue's are there peeps around that can help?
>>>
>>> Thanks
>>> Paul
>>>
>>> _______________________________________________
>>> swx mailing list
>>> swx at osflash.org <mailto:swx at osflash.org>
>>> http://osflash.org/mailman/listinfo/swx_osflash.org
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> swx mailing list
>> swx at osflash.org <mailto:swx at osflash.org>
>> http://osflash.org/mailman/listinfo/swx_osflash.org
>>
>> _______________________________________________
>> swx mailing list
>> swx at osflash.org <mailto: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
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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/20080530/76509c83/attachment-0001.html
More information about the swx
mailing list