Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Feb 2009
    Location
    Worcester
    Posts
    172
    Thanks
    13
    Thanked 6 Times in 6 Posts

    Slider .99 values?

    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:
    Code:
    		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
    Last edited by loki421; 03-30-2009 at 07:00 PM.

  • #2
    Regular Coder
    Join Date
    Feb 2009
    Location
    Worcester
    Posts
    172
    Thanks
    13
    Thanked 6 Times in 6 Posts
    Wow, 95 views and no suggestions 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'


  • #3
    Regular Coder
    Join Date
    Feb 2009
    Location
    Worcester
    Posts
    172
    Thanks
    13
    Thanked 6 Times in 6 Posts
    Oh my... i've been as dumb as fry!

    It appears that i was going about it all wrong!

    Problem never really exsisted, just me being stoopid


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •