Create 3D Dioramas in Flash
07 Last touches
07 Last touches

Tint the corals by about ten per cent in any colours you want. To add a feeling of depth, we are going to blur the Movie Clips a bit. The two corals in the front should have the most blur (around ten pixels, high quality), and then you can experiment with the rest.
08 Get the ActionScript

For the ActionScript section of this tutorial, we will use the AS file that came with the CD. Copy ‘Diorama.as’ into the same folder as ‘diorama.fla.’ Now click outside the Stage and in the Property Inspector, add ‘Diorama’ as the Document class.
09 Document class

Open ‘Diorama.as’ and have a quick glance through the code. There are quite a few variables, but it’s not that hard for you to get your head around. Still, there might be a few things that we need to dig deeper into. However, first things first…
10 Imported classes

On line two, start to import the classes used. The first two are the built-in Flash Display and Event packages. Then you have your external Tween and Easing classes. As you can see, you are using the same path to them in Flash as you do in your folder structure (gs>TweenMax).
11 Declare and add MCs

Under the class definition on line nine, set up the Movie Clips to be manipulated within the class. On line 25, assign the newly created MC instances with the MCs on the stage. When adding them to the stage, it must be done in the same order in which we want them on the stage.
12 Setting x and y

It’s important that we remember the x and y properties of each Movie Clip. That’s why each one is assigned a startX and a startY property, starting on line 43. These values will be used when we move the Movie Clips around later on, so that they always find their way back.
















My son is my son till he has got him a wife, but my daughter is my daughter all the days of her life