Flash - 缩小图像
对于 Flash 来说,我是一个十足的新手。但我听说我想要的东西在 Flash 中是可能的;
我正在寻找放大图像: 示例:教堂的图片。尽可能放大教堂塔楼。
然后它需要慢慢缩小,这样你就有时间猜测它可能是哪个教堂。 示例:慢慢缩小,显示出越来越多的图片。
有人有什么想法吗?
谢谢你!
I'm a complete newb when it comes to Flash. But I heard what I want is possible in Flash;
I'm looking to zoom in on an image:
Example: Picture of a church. Zoom in as far as possible on the church tower.
Then it needs to slowly zoom out, so you have time to guess which church it could be.
Example: Slowly zooms out, revealing more and more of the picture.
Anyone have any ideas?
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
首先,您需要一个相当高分辨率的图像,以便在放大时不会太像素化。还要确保将位图的平滑属性设置为 true(这可以通过代码或在库中完成。
要缩小它,请执行以下任一操作:按照时间轴动画或使用补间库,最好是 Greensock 补间库:http://www.greensock.com/
需要修改scaleX和scaleY参数。
First you will need a quite high resolution image for it not to be too pixelated when zoomed in. Also make sure to set the smoothing property of the bitmap to true (this can be done by code or in the library.
To zoom it out either go by a timeline animtation or use a tweening library, preferably Greensock tweening library: http://www.greensock.com/
You need to modify the scaleX and scaleY parameters.
如果您像您所说的那样是一个完全的新手,那么直接深入到 ActionScript 3 和补间库可能不是最好的解决方案。这是一篇文章+一个视频教程,介绍了如何基本上实现这种效果(只是向后)。该人开始缩小和放大,但通过学习原理,您应该能够轻松修改效果以满足您的需求。
http://www.hypergurl.com/blog/flash/zoom-rescale.html
此外,如果您有兴趣深入了解 Flash,我会像 Andreas 一样建议您研究编码(学习 ActionScript 3,而不是 ActionScript 2),使用补间库、类等。以下网站是一个优秀的免费资源,包含视频教程、示例项目等,可帮助您学习 Flash 中从基础到高级应用程序的各种内容。
http://gotoandlearn.com/index.php
祝一切顺利。
If you're a complete newb as you say, then diving right into actionscript 3 and tweening libraries probably isn't the best solution. Heres an article + a video tutorial on how you basically accomplish this effect, just backwards. The person is starting zoomed out and zooming in but by learning the principles you should be able to easily modify the effect to suit your needs.
http://www.hypergurl.com/blog/flash/zoom-rescale.html
Also if you're interested in getting deeper into flash, I would then advise as Andreas has, that you look into coding (learn actionscript 3, not actionscript 2), using tweening libraries, classes etc. The following website is an excellent free resource of video tutorials, sample projects and more to learn a wide range of things in flash from basic to advanced applications.
http://gotoandlearn.com/index.php
All the best.