/** * @(#) $RCSfile: FlipperInit.as,v $ $Revision: 1.4 $ $Date: 2003/03/21 17:26:00 $ * * Copyright 2003 Orgdot AS. All Rights Reserved. * http://dev.swfit.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /** * Init script for the flipper menu. * * @author Olaf Havnes * @version $Revision: 1.4 $ $Date: 2003/03/21 17:26:00 $ * @since SWFIT1.0 */ // Set the positions start_y = set_start_y eq "" ? 0 : set_start_y; end_y = set_end_y eq "" ? 100 : set_end_y; y_step = set_y_step eq "" ? 20 : set_y_step; // Number of clips num = 5; // Duplicate the movie clips i = 1; while (i < num) { duplicateMovieClip ("flip_0", "flip_" add i, i); i++; } i = 0; while (i < num) { set ("pos_" add i, i < num - 1 ? start_y + y_step * i : end_y); i++; } i = 0; while (i < num) { // Spread the clips out p0 = eval ("pos_" add i); setProperty ("flip_" add i, _y, p0); set ("flip_" add i add ":p0", p0); // Give each clip a number set ("flip_" add i add ":which", i); set ("flip_" add i add ":pos", i); set ("flip_" add i add ":pos_old", i); i++; } // Set the active one current = num - 1; hover = - 1; // Set the rest position for the marker marker_rest_pos = eval ("pos_" add (num - 1));