1. Computing & Technology

Discuss in my forum

Flash Halloween Costume Dress-Up Doll II: Controls & Scripting

By , About.com Guide

10 of 10

Making the Menu Scroll IV
Flash Halloween Costume Dress-Up Doll II: Controls & Scripting
Next Step

On the main stage, right click on the arrow that’s intended to play your movie clip <i>forward</i>, and select Actions. Instead of using on(release) as a trigger for the motion, we’ll use on(press) to start it, and on(release) to stop it – so that the closet items scroll while the user holds down the mouse button and stops when they release it:

on (press) {
_root.menu.play( ) ;
}

on (release) {
_root.menu.stop ( ) ;
}

This makes the forward button work in the same manner as the play and pause buttons from the lesson on creating video playback controls in Flash – but it combines both functions into a single button, acting on instance name menu on the root level.

I’ve run out of space on this lesson template, but we’ve still got one last crucial thing to do: we’ve got to wrangle the backward-scrolling button into working, so click here to continue on to the next steps of this lesson.

©2012 About.com. All rights reserved.

A part of The New York Times Company.