First time here? First time here? Newsletter Signup Newsletter
Login | Register | 651326 Members and growing! | Flash Jobs
Search tutorials
Author: V. Ramraj

The Final touch

Now just two more steps to go.

  1. If you cannot see the stage, press Tab key to hide all the panels. Now, select the button you once dragged on to the stage. Scroll through the stage to find it. After it has been selected, press Ctrl+Alt+Ato open the ActionScript window. Copy and paste the following code into it:
    on (keyPress "<%lt%>up<%gt%>") {
    by = 2;
    }
    on (keyPress "<%lt%>down<%gt%>") {
    by = -2;
    }
    on (keyPress "<%lt%>left<%gt%>") {
    bx = 2;
    }
    on (keyPress "<%lt%>right<%gt%>") {
    bx = -2;
    }
    on (keyPress "a") {
    bz = 2;
    }
    on (keyPress "z") {
    bz = -2;
    }
    on (keyPress "'") {
    Viewport += 5;
    }
    on (keyPress "/") {
    Viewport -= 5;
    }
    
    
    These just add more interactivity to the movie. Now, the user can rotate the object in any axis and also zoom in or out of it. By press in up or down keys, the user is giving a positive or negative value to the bx variable. Remember that this variable also affects rotation.

    Similarly, pressing the left and right keys rotates the object in y axis.

    Since there is no way of controlling the z axis, pressing the a and z keys rotates it on the z axis.

    The Next 2 events increment or decrement the Viewport variable. This variable is used to convert the 3d objects to 2d objects. This variable determines how close to the screen the point of origin is. So, by pressing the apostrohe(') and the slash(/) keys, you literally zoom in and out of the object.

There is one more small thing left to do. If you don't see the Library window, press Ctrl+L to invoke it. Now open the Line movieclip and select the "fat-line" like thing. If you don't see the Mixer panel, go to Window - Panels - Mixer to see the mixer panel. Now, change the alpha value of the circle to 83%.

If you want, you can give a color tween to the line movieclip so that it changes color as it moves.

Now that's it. Project Complete. Publish or save the file and view it in the standalone player.

Comments and suggestions welcome.

Author: V. Ramraj
Email: ramraj_1999@yahoo.com

» Level Advanced

Added: 2002-07-05
Rating: 9 Votes: 1240
(10 being the highest)
» Author
Age: 14 Profession: High School Student Location: Chennai, India(Not Indiana). Just doing it for fun. Ready to do small Freelance jobs.
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!

Comments

  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: work2survive
» Title: Girl Walking 1kb
» Description: Walking girl, animation just takes 1kb, using high heels shoes, and fashion model attitude.
Featured Sound Loops
Image for equalize

Audio Player

» Author: BoxCat
» Title: CPU Talk
» Description: From the cyberpunk RPG, "Nameless: the Hackers" Completely Free to use! Keywords: edm hip hop rap electronic mysterious mission hacking chase exciting spy ios ambient chilling love happy sad angry suspense
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: nathan
» Description:

A recorded sound of the Dimensional Fork Gate.