Jumping Out of Sequence: Memento Brings You Back
In the last installment on the Memento Design Pattern, you saw an abstract minimalist version to get an idea of how the Memento saved state and got it back again. I used a string variable as the “state” to be saved and retrieved without breaking encapsulation. This time around I used the Memento to solve a more practical and definitely real world problem. How to allow a user to jump around a multimedia online presentation without getting lost. To get an idea of how this works, take a look at a working example of this application at:
http://www.sandlight.com/memento/
When you run the application, you can jump to another level, and then just click the Return to Last button, and it will take you back to your jump point. Also, I put up the zip file to save time in getting all of the code in. Figure 1 shows what you can expect to see:
You can download it at:
Download the FMS Memento Zip File
All of the files are in Flash CS3 format, but the ActionScript files are pretty easy to port over to Flex.
Continue reading ‘ActionScript 3.0 Memento Design Pattern: Flash Media Server 3 Application’





Latest Comments