Flex ActionScript 动态状态更改和移动项目

发布于 2024-10-04 08:03:49 字数 1127 浏览 2 评论 0原文

我正在尝试做到这一点: http://livedocs.adobe.com/flex/3 /html/help.html?content=transitions_7.html 只需按回本页底部即可查看我想要的滤镜效果,

但我动态地做到了,其中包含 n 个元素的状态和所有内容。现在我的问题是如何在左侧制作滚动条,但滚动时不需要影响大面板,所以我只想滚动例如 200 个面板而不移动大面板。 我的代码的一部分,我为每个面板放置状态:面板是面板的 ArrayList

for(var i:int=0; i<6 ;i++)  
// get panel from list panels and set states
{
//addChild((panels.getItemAt(i) as Panel)); 
(states[i] as State).overrides=[ new SetProperty(panels.getItemAt(i),"x",110), new SetProperty(panels.getItemAt(i),"y",0), new SetProperty(panels.getItemAt(i),"width",widthBigPanel), new SetProperty(panels.getItemAt(i),"height",heightBigPanel)];
  var yy:int=0;
  for(var k:int=0;k<6;k++)
   {
    if(k!=i){    
(states[i] as State).overrides = (states[i] as State).overrides.concat([ new SetProperty(panels.getItemAt(k),"x",x), new SetProperty(panels.getItemAt(k),"y",yy),
new SetProperty(panels.getItemAt(k),"width",widthPanel), new SetProperty(panels.getItemAt(k),"height",heightPanel)]);
       yy+=110;

      }
     }

I'm trying to make this :
http://livedocs.adobe.com/flex/3/html/help.html?content=transitions_7.html
just press back on the bottom of this page to see the filter effect that I want

but dynamically and I did, with the states and everything for n elements. Now my question is how can I make a scroll bar on the left side but when scrolling does not need to affect the big panel so I just want to scroll for example 200 panels and not moving the big panel.
part of my code where I put states for every panel: panels is a ArrayList of panels

for(var i:int=0; i<6 ;i++)  
// get panel from list panels and set states
{
//addChild((panels.getItemAt(i) as Panel)); 
(states[i] as State).overrides=[ new SetProperty(panels.getItemAt(i),"x",110), new SetProperty(panels.getItemAt(i),"y",0), new SetProperty(panels.getItemAt(i),"width",widthBigPanel), new SetProperty(panels.getItemAt(i),"height",heightBigPanel)];
  var yy:int=0;
  for(var k:int=0;k<6;k++)
   {
    if(k!=i){    
(states[i] as State).overrides = (states[i] as State).overrides.concat([ new SetProperty(panels.getItemAt(k),"x",x), new SetProperty(panels.getItemAt(k),"y",yy),
new SetProperty(panels.getItemAt(k),"width",widthPanel), new SetProperty(panels.getItemAt(k),"height",heightPanel)]);
       yy+=110;

      }
     }

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文