简体   繁体   English

在运行时更改库符号

[英]Changing a library symbol at runtime

I have a problem and I'm not really sure where to start. 我有一个问题,我不确定从哪里开始。 What I have is an animation of a character in the library. 我所拥有的是图书馆中一个角色的动画。 The Character is made up of a few movieclips for the body that move about and one for the face that holds a stock photo. 角色由几个动画片段组成,用于身体移动,一个用于持有照片的脸部。 I have a camera section that grabs an image of the users face and now what I need to do is swap the stock face photo for the one taken in the last scene. 我有一个摄像头部分,可以抓取用户脸部的图像,现在我需要做的是将最后一个场景拍摄的照片面部照片换成。 No idea at all how to start on this, any help would be much appreciated. 根本不知道如何开始这个,任何帮助将不胜感激。

Thanks. 谢谢。

what you could do is make a movieclip of the stockphoto and then you could do the following: 你可以做的是制作stockphoto的动画片段然后你可以做以下事情:

head.removeChild(stockphoto_movieclip); head.removeChild(stockphoto_movieclip); head.addChild(camera_image); head.addChild(camera_image);

to take an image from the camera, there are plenty of tutorials online. 从相机拍摄图像,有很多在线教程。 It basically revolves around grabbing the bitmpdata of the camerastream. 它主要围绕抓住相机流的bitmpdata。

Here's one tutorial that does just that... 这是一个教程就是这样......

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM