Re: [SPAM] [flexcoders] Animating items in a tilelist when filtering arraycollection

2010-02-13 Thread ZIONIST
Hi Valdhor, i have sent a new stand alone app to you email 
valdhorli...@embarqmail.com that does not require any application server and 
database, just uses xml to store data. hope you can work around with this one. 



Re: [SPAM] [flexcoders] Animating items in a tilelist when filtering arraycollection [1 Attachment]

2010-02-13 Thread amanyire arthur
Ok managed to make it a stand alone. does not require any application server. 
just uses xml for data. hope this is what you meant.


 



  











  

Re: [SPAM] [flexcoders] Animating items in a tilelist when filtering arraycollection

2010-02-12 Thread valdhor
Nope, sorry.

How about just exporting a Flex Builder Project Archive and including it in 
your email to the list. I have seen many people post projects this way.

--- In flexcoders@yahoogroups.com, ZIONIST stinas...@... wrote:

 hi Valdhor i sent the self contained app to your email. hope you got it.





Re: [SPAM] [flexcoders] Animating items in a tilelist when filtering arraycollection

2010-02-12 Thread ZIONIST
sent to valdhorli...@embarqmail.com



Re: [SPAM] [flexcoders] Animating items in a tilelist when filtering arraycollection

2010-02-12 Thread valdhor
Well, I got the file but it is not standalone - it requires a ColdFusion server 
which I do not have.

--- In flexcoders@yahoogroups.com, ZIONIST stinas...@... wrote:

 sent to valdhorli...@...





Re: [SPAM] [flexcoders] Animating items in a tilelist when filtering arraycollection

2010-02-11 Thread valdhor
I'm sorry. I obviously didn't explain myself very well. I really need a self 
contained application that will run without modification and shows the problem. 
This way I can copy/paste or import into FB and play with it until I get it to 
work (Or give up).

--- In flexcoders@yahoogroups.com, ZIONIST stinas...@... wrote:

 okay this is exactly what am doing. i have an arraycollection(dataAr) that is 
 populated by data from a database. i have a multiple filter function that i 
 use to filter the arraycollection(dataAr) and each time its filtered i 
 refresh it. i then assign the filtered arraycollection(dataAr) to a new 
 arraycollection(copydataAr), which i use as the dataprovider for the 
 tilelist. here is a snippet of the code.
 
 [Bindable]
   private var dataAr:ArrayCollection = new ArrayCollection;
 public function displayResult(event:ResultEvent):void{
   dataAr = new ArrayCollection((event.result as 
 ArrayCollection).source);
   }
 
 private function filterGrid():void{
   dataAr.filterFunction=myFilterFunction;
   dataAr.refresh();
   }
   
   private function myFilterFunction(item:Object): Boolean{
   return(item.city == selectedCity || selectedCity == All)  
   (item.location == selectedLocation || selectedLocation == 
 All) 
   (item.bedrooms = selectedbdrm || selectedbdrm == -- Choose 
 One --)  
   (item.bathrooms = selectedbathrm || selectedbathrm == -- 
 Choose One --) 
   (item.category == category.selectedValue)
   (!garageSelected || item.garages)
   (!tileflrSelected || item.tile_floor)
   (!hardwoodflrSelected || item.hardwood_floor)
   (!laminateflrSelected || item.laminate_floor)
   (!balconySelected || item.balcony)
   (!yardSelected || item.backyard)
   (!closetSelected || item.closets)
   (!poolSelected || item.pool);   
  
   }
 
 private var selectedCity : String = All;
 private var selectedLocation : String = All;
 private var selectedValue: Boolean;  
   private var selectedbdrm : String = -- Choose One --;
 private var selectedbathrm : String = -- Choose One --;
 private var poolSelected: Boolean = false;
 private var yardSelected: Boolean = false;
 private var closetSelected: Boolean = false;
 private var garageSelected: Boolean = false;
 private var tileflrSelected: Boolean = false;
 private var hardwoodflrSelected: Boolean = false;
 private var laminateflrSelected: Boolean = false;
 private var balconySelected: Boolean = false;
   
   private function cityChangeHandler(event:Event):void{
   if( city_cb.selectedItem != null )
   selectedCity = city_cb.selectedLabel;
 filterGrid(); 
 currentState = '';
   }
 
 private function locationChangeHandler(event:Event):void{
 if( lct_cb.selectedItem != null )
 selectedLocation = lct_cb.selectedLabel;
 filterGrid(); 
 currentState = '';
 }
   
 private function bedroomChangeHandler(event:Event):void{
 if( room_cb.selectedItem != null )
 selectedbdrm = room_cb.selectedLabel;
 filterGrid(); 
 currentState = '';
 }
   
 private function bathroomChangeHandler(event:Event):void{
 if( bath_cb.selectedItem != null )
 selectedbathrm = bath_cb.selectedLabel;
 filterGrid(); 
 currentState = '';
 }
   
   private function categoryChangeHandler(event:Event):void{
 if(category.selectedValue != null)
   selectedValue = category.selectedValue;
 filterGrid();
 currentState = '';
 vidz.player.stop();   
 }
   
 private function poolFilter():void{   
   poolSelected = pool_ckb.selected;
   
 filterGrid();
   currentState = '';
   }
 
 private function yardFilter():void{   
 yardSelected = yard_ckb.selected;
   
 filterGrid();
   currentState = '';
   }
 
 private function closetFilter():void{ 
 closetSelected = closet_ckb.selected;
   
 filterGrid();
   currentState = '';
   }
 
 private function garageFilter():void{ 
 garageSelected = garage_ckb.selected;
   
 filterGrid();
   currentState = '';
 }
 
 private function tileflrFilter():void{
 tileflrSelected = floor_tiles.selected;
   
 filterGrid();
 

Re: [SPAM] [flexcoders] Animating items in a tilelist when filtering arraycollection

2010-02-11 Thread ZIONIST
hi Valdhor i sent the self contained app to your email. hope you got it.



Re: [SPAM] [flexcoders] Animating items in a tilelist when filtering arraycollection

2010-02-10 Thread valdhor
Could you provide  a small application including some data? I find it much 
easier to see a problem if I can run it myself.

--- In flexcoders@yahoogroups.com, ZIONIST stinas...@... wrote:

 hi guys any help?





Re: [SPAM] [flexcoders] Animating items in a tilelist when filtering arraycollection

2010-02-10 Thread ZIONIST
okay this is exactly what am doing. i have an arraycollection(dataAr) that is 
populated by data from a database. i have a multiple filter function that i use 
to filter the arraycollection(dataAr) and each time its filtered i refresh it. 
i then assign the filtered arraycollection(dataAr) to a new 
arraycollection(copydataAr), which i use as the dataprovider for the tilelist. 
here is a snippet of the code.

[Bindable]
private var dataAr:ArrayCollection = new ArrayCollection;
public function displayResult(event:ResultEvent):void{  
dataAr = new ArrayCollection((event.result as 
ArrayCollection).source);
}

private function filterGrid():void{
dataAr.filterFunction=myFilterFunction;
dataAr.refresh();
}

private function myFilterFunction(item:Object): Boolean{
return(item.city == selectedCity || selectedCity == All)  
(item.location == selectedLocation || selectedLocation == All) 
(item.bedrooms = selectedbdrm || selectedbdrm == -- Choose One --) 
 
(item.bathrooms = selectedbathrm || selectedbathrm == -- Choose One 
--) 
(item.category == category.selectedValue)
(!garageSelected || item.garages)
(!tileflrSelected || item.tile_floor)
(!hardwoodflrSelected || item.hardwood_floor)
(!laminateflrSelected || item.laminate_floor)
(!balconySelected || item.balcony)
(!yardSelected || item.backyard)
(!closetSelected || item.closets)
(!poolSelected || item.pool);   
 
}

private var selectedCity : String = All;
private var selectedLocation : String = All;
private var selectedValue: Boolean;  
private var selectedbdrm : String = -- Choose One --;
private var selectedbathrm : String = -- Choose One --;
private var poolSelected: Boolean = false;
private var yardSelected: Boolean = false;
private var closetSelected: Boolean = false;
private var garageSelected: Boolean = false;
private var tileflrSelected: Boolean = false;
private var hardwoodflrSelected: Boolean = false;
private var laminateflrSelected: Boolean = false;
private var balconySelected: Boolean = false;

private function cityChangeHandler(event:Event):void{
if( city_cb.selectedItem != null )
selectedCity = city_cb.selectedLabel;
filterGrid();   
currentState = '';
}

private function locationChangeHandler(event:Event):void{
if( lct_cb.selectedItem != null )
selectedLocation = lct_cb.selectedLabel;
filterGrid();   
currentState = '';
}

private function bedroomChangeHandler(event:Event):void{
if( room_cb.selectedItem != null )
selectedbdrm = room_cb.selectedLabel;
filterGrid();   
currentState = '';
}

private function bathroomChangeHandler(event:Event):void{
if( bath_cb.selectedItem != null )
selectedbathrm = bath_cb.selectedLabel;
filterGrid();   
currentState = '';
}

private function categoryChangeHandler(event:Event):void{
if(category.selectedValue != null)
selectedValue = category.selectedValue;
filterGrid();
currentState = '';
vidz.player.stop(); 
}

private function poolFilter():void{ 
poolSelected = pool_ckb.selected;

filterGrid();
currentState = '';
}

private function yardFilter():void{ 
yardSelected = yard_ckb.selected;

filterGrid();
currentState = '';
}

private function closetFilter():void{   
closetSelected = closet_ckb.selected;

filterGrid();
currentState = '';
}

private function garageFilter():void{   
garageSelected = garage_ckb.selected;

filterGrid();
currentState = '';
}

private function tileflrFilter():void{  
tileflrSelected = floor_tiles.selected;

filterGrid();
currentState = '';
}

private function hardwoodflrFilter():void{  
hardwoodflrSelected = hardwood_floors.selected;

filterGrid();
currentState = '';
}

private function laminateflrFilter():void{  
laminateflrSelected = laminate_floors.selected;

filterGrid();
currentState = '';
}

private function 

Re: [SPAM] [flexcoders] Animating items in a tilelist when filtering arraycollection

2010-02-09 Thread ZIONIST
hi guys any help?




Re: [SPAM] [flexcoders] Animating items in a tilelist when filtering arraycollection

2010-02-07 Thread ZIONIST
hi Tracy, i tried doing as you said, i have my dataprovider (dataAr) which i 
filter and then assign the result to another arraycollection (copydataAr) which 
i then use as the dataprovider for my tilelist. this has not worked though. 
maybe there is something am doing wrong. here is the code so far.

[Bindable]
private var dataAr:ArrayCollection = new ArrayCollection;
public function displayResult(event:ResultEvent):void{  
dataAr = new ArrayCollection((event.result as 
ArrayCollection).source);
}

[Bindable]
private var copydataAr:ArrayCollection = cloneCollection(dataAr);

private function filterGrid():void{
dataAr.filterFunction=myFilterFunction;
}

private function myFilterFunction(item:Object):Boolean{
return(item.city == selectedCity || selectedCity == All)  
(item.location == selectedLocation || selectedLocation == All) 
(item.bedrooms == selectedbdrm || selectedbdrm == -- Choose One --) 
 
(item.bathrooms == selectedbathrm || selectedbathrm == -- Choose One 
--) 
(item.category == category.selectedValue)
(!garageSelected || item.garages)
(!tileflrSelected || item.tile_floor)
(!hardwoodflrSelected || item.hardwood_floor)
(!laminateflrSelected || item.laminate_floor)
(!balconySelected || item.balcony)
(!yardSelected || item.backyard)
(!closetSelected || item.closets)
(!poolSelected || item.pool);   
 
}

private function 
cloneCollection(dataAr:ArrayCollection):ArrayCollection{
var copydataAr:ArrayCollection = new ArrayCollection();
copydataAr.source = copydataAr.source.concat(dataAr.source);
return copydataAr;
}

// Syncs destination collection2 to source collection1, removing or 
adding items as necessary. Assumes the source collection is sorted
private function syncCollection(collection1:ArrayCollection, 
collection2:ArrayCollection):void{
var idx:int = 0;

while (idx  collection1.length  idx  collection2.length)
if (collection2[idx]  collection1[idx])
collection2.removeItemAt(idx);
else{
if (collection2[idx]  collection1[idx])

collection2.addItemAt(collection1[idx],idx)
idx++;
}

while (idx  collection1.length)
collection2.addItemAt(collection1[idx],idx++);
while (idx  collection2.length)
collection2.removeItemAt(idx);
}

then on the individual components,

private function cityChangeHandler(event:Event):void{
if( city_cb.selectedItem != null )
selectedCity = city_cb.selectedLabel;
filterGrid();
dataAr.refresh();
syncCollection(dataAr,copydataAr);
currentState = '';
}

private function locationChangeHandler(event:Event):void{
if( lct_cb.selectedItem != null )
selectedLocation = lct_cb.selectedLabel;
filterGrid();
dataAr.refresh();
syncCollection(dataAr,copydataAr);  
currentState = '';
} etc 



RE: [SPAM] [flexcoders] Animating items in a tilelist when filtering arraycollection

2010-01-18 Thread Tracy Spratt
Try filtering a separate ArrayCollection then re-assignng the dataProvider.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of ZIONIST
Sent: Monday, January 18, 2010 4:11 AM
To: flexcoders@yahoogroups.com
Subject: [SPAM] [flexcoders] Animating items in a tilelist when filtering
arraycollection

 

  

i guys i have probably asked this several times but i have never gotten
anything solid. i have a tile list that is populated with an array
collection of data from a database. i also have a filter function that i use
to filter the array collection based on multiple criteria. i would like to
have some kind of effect play as data is filtered to show data change just
like in the flex store example. but apparently the itemschangeeffect in flex
3 does not work with filter functions. any way of achieving that goal?