...

View Full Version : Slider .99 values?



loki421
03-30-2009, 05:58 PM
Hi again all :)

I've got a tile list and i'm trying to filter the price of products within the list, and 99.99% of these have a .99 on the end, ie 100.99.

So i've created the slider and added the logic for the filter below:


private function filterPrice(item:Object):Boolean
{
if (item.price == productPrice.value)
{
return true;
}
else
{
return false;
}
}

private function doFilterPrice():void
{
if (productPrice.value == 0)
{
productData.filterFunction = null;
}
else
{
productData.filterFunction = filterPrice;
}
productData.refresh();
}


And that works fine if i'm using round numbers, but like i said before, i need to have each value to contain the .99 so that it'll fiter the data correctly. Is this possible? or should i look at another way of doing this?

Or maybe there's some way of preforming a 'like' search instead of an exact match that'd probably work too.

Many thanks in advance all for any help offered :D

loki421
04-03-2009, 12:45 PM
Wow, 95 views and no suggestions :p lol

Well, looks like it can't be done then hey? I might have to look into other alternatives.....

'Karter, hand me my thinking granades'

:D

loki421
04-22-2009, 05:51 PM
Oh my... i've been as dumb as fry!

It appears that i was going about it all wrong! :p

Problem never really exsisted, just me being stoopid :D



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum