# \[Flash8\]Problems with return()

**URL:** <https://forum.kirupa.com/t/flash8-problems-with-return/260303>\
**Category:** flash\
**Created:** [May 14, 2008, 10:40am UTC](https://forum.kirupa.com/t/flash8-problems-with-return/260303 "2008-05-14T10:40:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gcom](https://avatars.discourse-cdn.com/v4/letter/g/3e96dc/32.png) [@Gcom](https://forum.kirupa.com/u/Gcom)\
**Post date:** [May 14, 2008, 10:40am UTC](https://forum.kirupa.com/t/flash8-problems-with-return/260303/1 "2008-05-14T10:40:00Z")

</div>

Hi! I’m new and not very good on english, sorry for that… :crying:

I’m using Flash8 with AS2.0

i’ve problem using a datagrid/dataset with the function:

my\_ds.filterFunc = function(item:Object) {…

I’ve 5 information to control (price, town…)

for example, a person could want a house from 10000 to 20000 (price), in NY…

so I’ve have to ask my dataset the informations:

item.Price\>pricemin && item.Price\<pricemax;

item.Town == townset; etc…

one by one they works ando also if i write the function:

return(item.Price\>10000 && item.Price\<20000 && item.Town == “NY”…);

but when I’m trying to work dinamic with

var Pricing = “item.Price\>pricemin && item.Price\<pricemax”;  
var Towning = " && item.Town == townset";

and then:

return (pricing+towning+…)

it doesn’t work!! Ⓜ

probably is something wrong with the String() against the item:Object but I’m not so good to solve it…

there are too many combinations to write different functions with IF, ELSE IF…

so I’d like to have a system to mix the user’s choices with a single function

please HEEEELP ! :sen:

---

<div class="post-metadata">

**Author:** ![Pier25](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@Pier25](https://forum.kirupa.com/u/Pier25)\
**Post date:** [May 14, 2008, 11:55am UTC](https://forum.kirupa.com/t/flash8-problems-with-return/260303/2 "2008-05-14T11:55:00Z")

</div>

I’m not sure but I think the problem is you have to pass an object instead of a string.

for example:  
my\_object = {max\_price:100,min\_price:50,city:“NY”};

my\_function(my\_object);

Read the documentation to see what kind of object is that function expecting.
