I’m just learning flash. Created a 23 pic slide show. Along the bottom are pic numbers from 1 to 23. If u dont move ur mouse over a number, when it gets to the 23rd pic it starts again. Moving the mouse over a number shows that pic and pauses there. Moving it off the number makes the slide show continue.
Here is my action script up to 4 buttons. Its alot of repeating. I’m sure I can decrease the number of lines. Could someone show me?
play();
function handleRollOver2( pEvent:MouseEvent):void
{
if( pEvent.target == p2btn )
{
gotoAndStop( 50 );
}
}
function handleRollOut2( pEvent:MouseEvent):void
{
if( pEvent.target == p2btn )
{
gotoAndPlay( 51 );
}
}
function handleRollOver1( pEvent:MouseEvent):void
{
if( pEvent.target == p1btn )
{
gotoAndStop( 21 );
}
}
function handleRollOut1( pEvent:MouseEvent):void
{
if( pEvent.target == p1btn )
{
gotoAndPlay( 22 );
}
}
function handleRollOver3( pEvent:MouseEvent):void
{
if( pEvent.target == p3btn )
{
gotoAndStop( 80 );
}
}
function handleRollOut3( pEvent:MouseEvent):void
{
if( pEvent.target == p3btn )
{
gotoAndPlay( 81 );
}
}
function handleRollOver4( pEvent:MouseEvent):void
{
if( pEvent.target == p4btn )
{
gotoAndStop( 110 );
}
}
function handleRollOut4( pEvent:MouseEvent):void
{
if( pEvent.target == p4btn )
{
gotoAndPlay( 111 );
}
}
p2btn.addEventListener( MouseEvent.ROLL_OVER, handleRollOver2 );
p2btn.addEventListener( MouseEvent.ROLL_OUT, handleRollOut2 );
p1btn.addEventListener( MouseEvent.ROLL_OVER, handleRollOver1 );
p1btn.addEventListener( MouseEvent.ROLL_OUT, handleRollOut1 );
p3btn.addEventListener( MouseEvent.ROLL_OVER, handleRollOver3 );
p3btn.addEventListener( MouseEvent.ROLL_OUT, handleRollOut3 );
p4btn.addEventListener( MouseEvent.ROLL_OVER, handleRollOver4 );
p4btn.addEventListener( MouseEvent.ROLL_OUT, handleRollOut4 );