Sunday, October 17, 2010

Implementation Log 2: To Video or not to Video

As I discussed with other classmate who had trouble integrating video into Flash, I realized it might not be as easy as I imagined. I quickly moved on to investigate how it is done in Flash. There are some complications in our case due to the fact that the movies must be able to resize dynamically. The initial research came back not looking good. Since the APIs Adobe provides do not include any method to resize video once it's been initialized. I thought this was not doable. I talked to the teammates about the possibility of using images instead of video. This, while quite understandable, freaked them out. However, after Kurt spent some time on it, he demonstrated it is indeed possible to resize video dynamically. Although the way he did it does not help me directly, at least it's proven achievable.

I spent some more time on researching it. I figured out if we put the video into a container, which Adobe calls it MovieClip, I will be able to resize the container and essentially resize the video inside it. It is not a very straight forward way of doing it though. However, at this point, I have to go with whatever works. The actual implementation involves creating several swf files to host each individual video, and put them all in the main swf file. It means I will have four swf files within one main swf file at any given time except where the mysterious scene comes in. It all sounds overly complicated, but it is the way to go.