如何在 Flex 中创建图像和内容滑块?
我想在 Flex 中创建一个图像和内容滑块。有很多 jquery 插件可用 (cfr.Flexslider http://flex.madebymufffin.com/)但我找不到替代品弹性。
谁能解释一下我该如何实现这个?
谢谢!
I would like to create a image and content slider in Flex. There are many jquery plugings available
(cfr. Flexslider http://flex.madebymufffin.com/) but i can't find an alternative for Flex.
Can anyone explain me how i can implement this?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
啊,碰巧我已经做了这个...很久以前,所以它是 Flex 3,但我相信它的工作原理与 Flex 4 一样,我已将其与其他 Flex 4 项目集成,并进行了一些性能改进(主要是选择 Group 而不是 Canvas 并进行了一些延迟实例,因为我们决定将其用作相当复杂的网站的骨干)。
http://www.shaunhusain.com/ImageSlider/
http://www.shaunhuusain.com/ImageSlider/srcview/index.html
应该允许你拖动并捕捉到其左上角最接近容器本身左上角的图块,只要它具有焦点,也可以使用键盘导航左右上下,我在顶部制作了那些可用于触发的按钮的动作。基本上,我尝试用所有可能的选项来重载该示例,这样我就可以复制它并删除我不想要的内容。事实证明,即使我在编写它时没有触摸屏,它也可以很好地转换为触摸屏,捕捉到最近的东西在 Android 上可以正常工作(即使该版本完全没有针对移动设备进行优化)。哦,是的,你可以使用键盘或滚轮上的 - 和 + 进行缩放,怀疑这是否真的有必要,但当时这似乎是一个很酷的主意。
Ah it just so happens I already made this... a long time ago so it's Flex 3 but I believe it works as is in Flex 4, I've integrated this with other Flex 4 projects and have since made some performance improvements (mainly opting for Group over Canvas and did some deferred instantation since we decided to use it as the backbone for a pretty complex site).
http://www.shaunhusain.com/ImageSlider/
http://www.shaunhusain.com/ImageSlider/srcview/index.html
Should allow you to drag and snaps to the tile with it's top left corner nearest the top left of the container itself, also can use keyboard navigation left right up down so long as it has focus, and I made those buttons on top that can be used to trigger the movements. Basically I tried to overload that example with all possible options so I can just copy it and strip off what I don't want. It also turns out this translates pretty well to touch screens even though I didn't own one when I wrote it, the snap to nearest thing works alright on an android (even with that version which is totally not optimized for mobile). Oh yeah and you can use - and + on the keyboard or the scroll wheel to zoom, doubt if that's really ever necessary but it seemed like a cool idea at the time.