0 Replies Latest reply on Mar 12, 2009 8:49 PM by gbataille

    TileList zoom on top problem

    gbataille
      Hi, Im' trying to make a youtube player list:
      Click here

      I must remove child from TileList and add child to "lastChild" to get the zoo effect:
      private function moveOnTop():void
      {
      var tempTileList:TileList = new TileList();
      tempTileList = parentDocument.tileList;
      var removeChild:RemoveChild = new RemoveChild();
      removeChild.target = this;
      removeChild.apply(parentDocument.tileList);

      var addChild:AddChild = new AddChild();
      addChild = new AddChild();
      addChild.relativeTo = tempTileList;
      addChild.position = "lastChild";
      addChild.target = this;
      addChild.apply(tempTileList);
      }

      But when I click on the image to play the video I get this error:
      TypeError: Error #1009: Il est impossible d'accéder à la propriété ou à la méthode d'une référence d'objet nul.
      at mx.controls.listClasses::ListBase/drawItem()[E:\dev\3.0.x\frameworks\projects\framework\s rc\mx\controls\listClasses\ListBase.as:4906]
      at mx.controls.listClasses::TileBase/placeAndDrawItemRenderer()[E:\dev\3.0.x\frameworks\proj ects\framework\src\mx\controls\listClasses\TileBase.as:616]
      at mx.controls.listClasses::TileBase/makeRowsAndColumns()[E:\dev\3.0.x\frameworks\projects\f ramework\src\mx\controls\listClasses\TileBase.as:410]
      at mx.controls.listClasses::ListBase/makeRowsAndColumnsWithExtraRows()[E:\dev\3.0.x\framewor ks\projects\framework\src\mx\controls\listClasses\ListBase.as:1360]
      at mx.controls.listClasses::ListBase/updateDisplayList()[E:\dev\3.0.x\frameworks\projects\fr amework\src\mx\controls\listClasses\ListBase.as:3654]
      at mx.controls.listClasses::TileBase/updateDisplayList()[E:\dev\3.0.x\frameworks\projects\fr amework\src\mx\controls\listClasses\TileBase.as:2353]
      at mx.controls.listClasses::ListBase/validateDisplayList()[E:\dev\3.0.x\frameworks\projects\ framework\src\mx\controls\listClasses\ListBase.as:3281]
      at mx.managers::LayoutManager/validateDisplayList()[E:\dev\3.0.x\frameworks\projects\framewo rk\src\mx\managers\LayoutManager.as:602]
      at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.0.x\frameworks\projects\frame work\src\mx\managers\LayoutManager.as:675]
      at mx.managers::LayoutManager/validateNow()[E:\dev\3.0.x\frameworks\projects\framework\src\m x\managers\LayoutManager.as:728]
      at mx.effects::Tween$/timerHandler()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\effec ts\Tween.as:189]
      at flash.utils::Timer/_timerDispatch()
      at flash.utils::Timer/tick()

      I'm really stuck with this, that could be a nice app without this bug... BTW after I click continue the video start to play and if I remove the moveOnTop(): function everything works fine.

      Your my last hope.