First time here? First time here? Newsletter Signup Newsletter
651326 Members and growing! | Flash Jobs
Search tutorials
Author: Tim Murray | Website: http://www.gmg.com.au

Stopping the spin

Alright, now that we have the video imported, we need to control how it will spin under the user's control.

The first step is to pad out the driver layer frames in your qtvr Movie Clip so that they run the length of the QuickTime movie that you just imported, otherwise our driver object will only be in frame 1. In our case, we had a QTVR movie of 36 frames. So, in frame 36 of the driver layer insert some frames.

Now to add a stop() ActionScript command to stop the spin. Select frame 1 in the actions layer, go to the Actions window and add the code. You should be in Expert Mode (Ctrl+Shift+E in your Actions window), and your code will look like this:

stop();

While we're here, create a new Movie Clip and name it "driver". You know: "Insert > New Symbol..." (Ctrl+F8), set Name field to "driver", and choose a Movie Clip Behavior.

Go back to your qtvr Movie Clip and select frame 1 of the driver layer. Drag the driver Movie Clip on to the stage.

Open the driver Movie Clip object and draw in a box shape starting at the 0, 0 point. Give it a width of 100 and a height of anything you like because we won't be using the height. The width of this object will define how far the mouse has to move across the screen to cause the object to complete one full rotation. The 100 width will mean 100%.

The shape doesn't need a Stroke color, but make the Fill color red for now so that we can see it when we do some testing. Later on we will set the Alpha to 0% so that we can't see it. Ultimately, we don't want to see the shape or it will obscure the movie. I know we could drag it off the stage, but I want to put it over the QTVR movie so that it is easier to compare the width of the object to the size of the QTVR movie.

You may as well name the layer "invisible box".

Previewing this should show your movie stopped at the first frame and you should have a big red box somewhere as well.

The next few sections will make extensive use of the trace() ActionScript command. Learn to love the trace and it will reward you abundantly. Check it out in your Flash MX help file at "ActionScript Dictionary > T > trace".

Save now while you have a read.

» Level Advanced

Added: 2003-12-16
Rating: 8 Votes: 76
(10 being the highest)
» Author
Tim is a co-director of the Glasson Murray Group, providing quality graphic design, illustration, 3D visualisation, interactive environments, virtual reality, multimedia and website services.
» 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: doc_chin7
» Description:

The flash's horizontal road drive was done in CS4 and was upgraded to CS6. The car responds to right/ left key and flash will auto-generate the movement of roads from left-right or right-left based on random number. Have fun driving in this virtual environment and avoid other cars... :) If you are creative, a road driving game can be created from it.

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.