按比例缩放至低于影片剪辑大小
仅当项目的大小调整小于当前大小时,我才尝试按比例制作影片剪辑。
显然我可以像这样使用 ScaleX/Y 值:
if (cont.scaleX < cont.scaleY ) { cont.scaleY = cont.scaleX; } else { cont.scaleX = cont.scaleY; 才
仅在 stageWidth/Height 小于影片剪辑的特殊情况下,我
需要限制/重置比例比例。我这辈子都做不到。
谢谢
I'm trying to make a movieclip scale proportionally only if the item is being resize smaller than the current.
Obviously I can use the ScaleX/Y values like so:
if (cont.scaleX < cont.scaleY ) { cont.scaleY = cont.scaleX; } else { cont.scaleX = cont.scaleY; }
I need to restrict/reset the scale proportions only in special case that the stageWidth/Height are smaller than the movieclip.
Can't do it for the life of me.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只是从我的脑海中浮现出来,但您可能会找到一个探索可能的答案:
编辑:添加最大比例1以响应您的第一条评论,应该可以...
Just from the top of my mind, but you may find an answer exploring something likely :
EDIT : Added max scale of 1 in response to your first comment, should work ...