English 中文(简体)
具有大量成分的弹性体内oth升
原标题:Smooth sliding animation in Flex with large amounts of components

我设立了一个构成部分,如“意见书”,但下一个指数组成部分则从四个方面中的一个方面滑坡。 我现在想说,它工作得够好,它能被人们接受使用,但我想提高其效率。

现在 我用Canvas作为基数组成部分,用图象Snapshot(new Birmap(图像Snapshot.captureBitmapData(本))绘制了当前看法的概况,我把新指数推向指数变化之上。

我基本上想到如何以更好的方式做到这一点的建议。 在部件负荷过后,在滑坡发生后,我推测了最初被ja走到最低点,但我们通常将这种情况用于过渡电网,这样,第一或第一 couple的滑坡几乎总是缓慢。

这里,有些人认为:

private function creationComplete(e:Event):void
{
  tmpImage.source = new Bitmap( ImageSnapshot.captureBitmapData( this ) );
}

public function set selectedIndex(value:int):void
{
  if(_selectedIndex == value + 1)
    return;
  _selectedIndex = value+1;

  var obj:UIComponent;

  tmpImage.height = height;
  tmpImage.width = width;
  tmpImage.visible = true;
  tmpImage.x = 0;
  //tmpImage.includeInLayout = true;

  for (var i:int = 1; i < numChildren; i++)
  {
    obj = UIComponent(getChildAt(i));
    //obj.x = width;
    if(i == _selectedIndex){
      obj.visible = true;
      objDisplay = obj;
    }
    else
      obj.visible = false;
  }

  mv1.target = tmpImage;
  mv2.target = objDisplay;

  switch ( direction )
  {
    // X/Y sliding logic
  }
  parEfect.play();

  tmpImage.source = new Bitmap( ImageSnapshot.captureBitmapData( this ) );
}

如果你想的话,我会使用图象中的图象0,把我选择的Index的习惯用1。

如果需要的话,我会把更多的职位搁置起来,但我想把这个问题减少到最低限度,而这样大概如此。

Any help is greatly appreciated! I really want to get this component to perform better. Also, this has to be done using Flex 3

最佳回答

什么是零1和零2? 它们是否具有灵活性? 如果它们非常缓慢,我建议使用TweenLite。 如果你绝对需要使用这些编号 , 暂停处理程序 = 真正的。 最后,但并非最不重要的是,确保你不给他们安排布局。 如果你这样做,就会造成每一框架的重复,从而容易消减。

问题回答




相关问题
Disable button tooltip in AS3

I want to disable the tooltip on certain buttons. The tooltip manager seems to be an all or nothing solution. Is it possible to disable the tooltip for just one or two buttons?

Multiple Remote call made simultenously

I was making multiple remote calls and they are done sequentially and when I am getting a result event back it s triggering calls to all the methods with ResultEvent as an argument . I am supposed to ...

Attaching a property to an event in Flex/AS3

I have a parameter that needs to be passed along with an event. After unsuccessful attempts to place it on the type by extending the class, I ve been advised in another SO question to write a custom ...

Clearing RSL in Cache

I have built a flex application which has a "main" project and it is assosciated with a few RSL s which are loaded and cached once i run my "main" application. The problem i am facing is that the ...

What s a good way of deserializing data into mock objects?

I m writing a mock backend service for my flex application. Because I will likely need to add/edit/modify the mock data over time, I d prefer not to generate the data in code like this: var mockData =...

AS3 try/catch out of memory

I m loading a few huge images on my flex/as3 app, but I can t manage to catch the error when the flash player runs out of memory. Here is the what I was thinking might work (I use ???? because i dont ...