# Adding parameters

**URL:** <https://forum.kirupa.com/t/adding-parameters/248988>\
**Category:** flash\
**Created:** [January 14, 2008, 12:20pm UTC](https://forum.kirupa.com/t/adding-parameters/248988 "2008-01-14T12:20:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![derm116](https://avatars.discourse-cdn.com/v4/letter/d/67e7ee/32.png) [@derm116](https://forum.kirupa.com/u/derm116)\
**Post date:** [January 14, 2008, 12:20pm UTC](https://forum.kirupa.com/t/adding-parameters/248988/1 "2008-01-14T12:20:06Z")

</div>

Hi all,

I’m trying to build a flex front end which sends a few parameters to a train timetable site - station, period and direction and this then returns the time the train will be at the station!

I’m trying to add the above parameters in AS3 like this

[COLOR=red]var params:Object = new Object() ;

//use values selected by user in the combo boxes  
params.STATION = station.selectedLabel ;  
params.PERIOD = period.selectedLabel ;  
params.DIRECTION = direction.selectedLabel ;[/COLOR]  
[COLOR=#ff0000][/COLOR]  
[COLOR=navy]NB I have 3combo boxes for the user to select from, they’re called[/COLOR]  
[COLOR=navy] - station[/COLOR]  
[COLOR=navy] - period[/COLOR]  
[COLOR=navy] - direction[/COLOR]  
[COLOR=navy]respectively[/COLOR]  
[COLOR=red][/COLOR]  
[COLOR=red]//create an HTTPService object named service  
var service:HTTPService = new HTTPService();[/COLOR]

[COLOR=red]//set the properties of the service object  
//url is where to connect  
service.url = “[/COLOR][[COLOR=red]http://dartTimetable.com/widget/getTrain.pl[/COLOR]](http://dartTimetable.com/widget/getTrain.pl)[COLOR=red]”;  
service.method=“post”;[/COLOR]  
[COLOR=red][/COLOR]  
[COLOR=red]//connect to the URL and pass the name-value pairs int The parameters object  
service.send(params);[/COLOR]  
[COLOR=black]For some reason the parameters aren’t added to the request? Does anyone have any ideas what I might be doing wrong or can anyone advise me on a better way of doing this?[/COLOR]

Thanks a mil for any help in advance,

Regards,  
Derm
