Flex ActionScript 动态状态更改和移动项目
我正在尝试做到这一点: 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论