如何将影片剪辑恢复到原始大小?
我用 Flash 做了一个画廊。我将外部图像加载到固定的显示区域中——我称之为“imageStage”。加载图像后,我在 _x 和 _y 处调整影片剪辑的大小,以使图像适合舞台。
但发生了什么——当我翻阅上一张/下一张图像时,它们不断缩小。小于固定区域的图像会进一步缩小。
我该如何解决这个问题?我在想,如果我从 MovieClip 中清除现有图像,它会将自身重置回常规大小和比例。但我不知道该怎么做。有什么建议吗?
I made a gallery in flash. I have external images load in a fixed display area -- I call it 'imageStage'. When the image is loaded, I resize the movieclip at the _x and _y to make the image fit the stage.
But what happens -- when I flip prev/next through a couple images, they keep shrinking and shrinking. Images that are smaller than the fixed area are being shrunk even further.
How can I fix this? I'm thinking maybe if I clear the existing image from the MovieClip, it will reset itself back to regular size and proportions. But I don't know how to go about it. Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
仅当您通过这些参数进行调整时才会出现这种情况。
对我来说经常引用的是,当影片剪辑进入舞台时,我会在一些容器变量中记录它的高度/宽度/比例/x/y。
根据重置的触发方式,只需使用您存储的值恢复影片剪辑即可。
That's only if you are adjusting it by those parameters.
What has worked for me quote often is that when a movie clip enters the stage, I record it's height/width/scale/x/y inside some container vars.
Depending on how the reset is triggered, just restore your movie clip using the values you stored.