Now: Tutorial for Web and Software Design > Flash > Basic > Flash Content
> Orbiting Sphere [Bookmark it]
Orbiting Sphere

Here's a way to give the illusion of motion in a 3D space. The technique is quite straightforward and can be adapted and used in many different ways.

Start a new movie. Draw 2 spheres, one somewhat smaller than the other. Fill each with a radial color gradient to give the appearance of a smooth sphere rather than a flat circle.

Put each sphere in a separate layer. Then select the small sphere and press F8 to convert it to a Graphic symbol. Do not convert the larger sphere to a symbol!

I'm going to call the spheres 'Moon' and 'Planet' from now on, so don't get confused.

image 1

Next, add a motion guide to the layer containing the Moon.

To add the guide, right-click on the Moon layer, and choose 'Add Motion Guide'. Draw an ellipse in the Guide Layer (use a contrasting color), and rotate it a little if you like. This is going to be the path around which the Moon will move.

Drag the Moon so that it is centred on the path. A small circle will appear at its centre to show that it has locked on.

image 2

Insert some more frames. 20 is a good number. Add 4 equally-spaced keyframes to the Moon layer. Move the Moon 1/4 of an orbit further round the ellipse on each successive keyframe. The 1st and 5th keyframes should be identical.

Right-click on each of the first 4 keyframes, and choose 'Create Motion Tween'.

On the right I've used the 'Edit Multiple Frames' tool to show all 4 Moon positions at once.

Now test the movie (Ctrl+Enter). The Moon should move in an elliptical path.

image 3

The trick for making the moon appear to go 'behind' the planet is to split the planet into 2, placing one half if front and one half behind the orbiting Moon.

Select the layer containing the Planet. Draw a contrasting line across the middle, splitting it into two (see illustration). You should be able to select the top half of the Planet and cut and paste it to a new layer (I called this PlanetTop).

Finally, go to the timeline and drag the layer containing the top half of the planet so that it is above the Moon layer and the Motion Guide layer (see the illustration).

Delete the line you used to split up the Planet.

The motion guide should now appear to go behind and in front of the Planet.

Note: A different effect can be obtained by reversing the positions of the PlanetTop and PlanetBottom layers.

image 4

Here's the finished product.

Download Source

But there's more...



This is an adaptation of the movie using an Alpha gradient to provide transparency.

I've also scaled the orbiting sphere at the 'nearest' and 'farthest' points of the motion to enhance the illusion of depth.

Download Source


[Bookmark][Print] [Close][To Top]
  • Prev Article-Flash:

  • Next Article-Flash:
  • Related Materias
    Shape Transformations
    Working with Texts
    Working with Texts
    Working with Sounds
    Working with Objects
    Cursor Follower
    Flash 8 Tutorial - Shape T
    Drawing and Working with C
    Drawing and Working with C
    BitmapData.loadBitmap Gone
    Topics
    Photoshop Tutorial
     

    Special Effect

      3D Effect
      Photoshop Articles
    Programming Tutorial
     

    C/C++ Tutorial

      Visual Basic
      C# Tutorial
    Database Tutorial
     

    MySQL Tutorial

      MS SQL Tutorial
      Oracle Tutorial
    Graphic Design Tutorial
     

    Coreldraw Tutorial

      Illustrator Tutorial
      3D Graphics Articles
    Webmaster Articles
     

    Domain Service

      Web Hosting
      Site Promotion
    Java Tutorial&Articles
     

    Java Servlets

      JavaEE Tutorial
     

    JavaBeans Tutorial

    XML Tutorial&Articles
     

    XML Style Tutorial

      AJAX Tutorial
      XML Mobile
    Flash Tutorial&Articles
     

    Flash Video

      Action Script
      Flash Articles
    OS Tutorial&Articles
     

    Linux Tutorial

      Symbian Tutorial
      MacOS Tutorial