嗨,这会杀死我:)我使用asocular as3移动,旋转,缩放,偏斜加载图像到MC和伟大的工程,但花了很多时间,找不到好的解决方案用鼠标剪切这种MC(带有加载的图像)。有人有解决方案(代码)吗?as3裁剪图像加载为MC
0
A
回答
1
要显示裁剪区域,您只需应用一个遮罩,该遮罩只是另一个显示对象。
我还没有使用Senocular的代码,但如果你使面具他的移动/比例代码的目标,那么你可以很容易地实现裁剪。在Adobe文档中有很多掩码:http://livedocs.adobe.com/flex/3/html/help.html?content=05_Display_Programming_28.html
实际上,在裁剪时必须隐藏调整大小/移动控件,反之亦然,这就是为什么Flash本身或Photoshop等工具具有单独的变换和裁剪的原因模式。
从Senocular的文档:
// import for the Transform Tool classes used
import com.senocular.display.transform.*;
// create a box object to interact with
var box:Sprite = new Sprite();
addChild(box);
box.graphics.beginFill(0xAACCDD);
box.graphics.drawRect(-50, -50, 100, 100);
box.x = 100;
box.y = 100;
// create the Transform Tool
var tool:TransformTool = new TransformTool(new ControlSetStandard());
addChild(tool);
// select the box with the transform tool when clicked.
// deselect when clicking on the stage
box.addEventListener(MouseEvent.MOUSE_DOWN, tool.select);
stage.addEventListener(MouseEvent.MOUSE_DOWN, tool.deselect);
只要做到这一点,但箱需要在你的影片剪辑的面具,这样,当你调整它,你会裁剪影片剪辑。
相关问题
- 1. AS3:使用蒙版和裁剪图像
- 2. Django solr_thumbnail裁剪图像无法加载
- 3. 裁剪图像
- 4. 裁剪图像
- 5. 裁剪图像
- 6. WinRT中的裁剪/裁剪图像
- 7. 无法剪裁/裁剪图像
- 8. 图像裁剪AVCaptureSession图像
- 9. 笨裁剪图像
- 10. 图像裁剪c#
- 11. Itext7 - 裁剪图像
- 12. WPF图像裁剪
- 13. html5图像裁剪
- 14. Silverlight图像裁剪
- 15. 裁剪YUV图像
- 16. WPF图像裁剪
- 17. 图像裁剪PHP
- 18. 裁剪android图像
- 19. PHP - 裁剪图像
- 20. GWT图像裁剪
- 21. As3从Libary添加MC并访问加载的内容MC
- 22. 裁剪图像,转换为黑白图像并加以锐化
- 23. AS2将图像加载到多个MC
- 24. 与毕加索一起裁剪图像
- 25. imagecropper在primefaces属性附加伤害图像不剪裁,尽管图像加载
- 26. 将图像裁剪为固定尺寸
- 27. 在UIImageView上为图像裁剪画UIBezierPath
- 28. 图像裁剪作为网页
- 29. Phonegap的裁剪图像为Android
- 30. 将图像裁剪为正方形 - Android
你想只显示图像,如果它被裁剪,或者你需要改变(然后保存)的实际图像? – JcFx
当加载图像时,我需要可以左右/上/下移动两侧的盒子,并且在那个方向上停留在舞台上的作物MC – Simon
或者用简单的词语,像变形的senocular http://www.senocular.com/ flash/tutorials/transformtool /,这正是我需要在舞台上剪裁MC的 – Simon