Official website for Web Designer - defining the internet through beautiful design
FOLLOW US ON:
Author: Dave Harfield
8th April 2009

Create 3D Dioramas in Flash

07 Last touches

07 Last touches

Create 3D Dioramas in Flash

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

Create 3D Dioramas in Flash

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

Create 3D Dioramas in Flash

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

Create 3D Dioramas in Flash

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

Create 3D Dioramas in Flash

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

Create 3D Dioramas in Flash

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.

Pages: 1 2 3 4

Tags: ,
  • Tell a Friend
  • Follow our Twitter to find out about all the latest web development, news, reviews, previews, interviews, features and a whole more.

    One Comment »

    • suntradetop said:

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

    What's your opinion?

    Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

    Be nice. Keep it clean. Stay on topic. No spam.

    * Required fields