Jump to content
Search Community

toStephen

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by toStephen

  1. Ah now i understand where i made the mistake the last solution worked like a charm. Thanks man
  2. Hi all, I need to build a flash application that requires filtering of spots. Every time the user selects another filter i reload the layout function, remove all objects that are currently in the movieclip and then re-add them and re-apply the tween with one for lus. But for some odd reason, when i change the filter before all the tweens are completed, they stop rendering at the point i changed it. Causing the tween to get stuck... and displaying only half on the results. They get added in the display list but just aren't shown due to the tween not completing. Does someone has a solution? I think i need to reset the tweens on the object or clear something... override public function layout():void { var coloms:int = Math.floor(componentWidth/116.65); var padding:Number = 5; while(this.numChildren > 0) { TweenLite.killDelayedCallsTo(getChildAt(0)); TweenLite.killTweensOf(getChildAt(0)); this.removeChildAt(0); } if(tiles.length > 0) { trace('Thera are: '+this.numChildren+' in the displaylistt'); for(var i:int = 0; i < tiles.length; i++) { var spotThumb:SpotThumb = tiles[i]; spotThumb.x = (i % coloms) * (116.65 + padding); spotThumb.y = int(i / coloms) * (116.65 + padding); trace(i); switch(appModel.currentFilter) { case 'alle': default: { addChild(spotThumb); break; } case 'like': { break; } case 'monument': case 'foodendrinks': case 'vervoer': case 'shoppen': case 'hotel': { if(spotThumb.spotCat == appModel.currentFilter) { addChild(spotThumb); } break; } } TweenLite.from(spotThumb, 0.2, {alpha:0, delay: 0.1*i}); } } } Thanks in advance! Stephen
×
×
  • Create New...