After completing my prototype, it was now time to split whatever I had onto MVC.So far I have created my folder structure, a few VIEWS, a MODEL and a CONTROLLER.
So to start with this process, I had to start designing my main and most important view: The booth itself.For this I've imported all the images i needed and I have made its view class, this is called the CameraView.
CameraView basically contains the "video" coding, to allow the camera to start, as well as a capture button.This capture button calls a model method, and this will dispatch an Event that a new view (called CountDownView) will listen for. This then triggers a time countdown (3 seconds). Once the countdown reaches 1, this tells the model to dispatch an Event. In order to capture the image, CameraView will listen for this and will send the BitmapData to CaptureView... phew!, such a long process for a single snapshot!.
This looks like the following:
Friday, 25 February 2011
Splitting my prototype onto MVC
Labels:
bitmap,
bitmapData,
MVC
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment