So my main goal is to make a sort of slideshow that has a bunch of small thumbnails that i currently have set has buttn types that will tween to full size on the stage then tween back into the thumbnail. I got that working by simply doing it all manually by hand on the timeline, but my first question is…Could I have done (or can I in the future do) some AS3 that would automatically tween all my 50 px by 50px thumbnails on the stage to full size and centered than back again? More importantly though, when they are tweened up to full stage size, they are behind the other thumbnails that are above them on the timeline. How can I make them tween to full size in front of everything else? I looked at setChildIndex a little, but it wasn’t working for me. Here’s my LONG and TEDIOUS code that I have at the moment. I want the final slideshow to tween full size and tween back to the thumbnail periodically on it’s own, but I also want to set it up so that the user can hover over any thumbnail to stop(); the auto movement, then CLICK on any of the thumbnails to see that one specific thumbnail tween to full size. And then obviously MOUSEOUT to continue on with the automatic tweening of the slideshow on it’s own. Does that make sense? Ok, here’s my ridiculous code so far…PLEASE tell me how to do this easier and less tidiously in the future, and how I can make it work the rest of the way now how I;d like it too!!!
import flash.events.MouseEvent;
btn1.addEventListener(MouseEvent.MOUSE_OVER, shapeOverHandler);
btn2.addEventListener(MouseEvent.MOUSE_OVER, shapeOverHandler);
btn3.addEventListener(MouseEvent.MOUSE_OVER, shapeOverHandler);
btn4.addEventListener(MouseEvent.MOUSE_OVER, shapeOverHandler);
btn5.addEventListener(MouseEvent.MOUSE_OVER, shapeOverHandler);
btn6.addEventListener(MouseEvent.MOUSE_OVER, shapeOverHandler);
btn7.addEventListener(MouseEvent.MOUSE_OVER, shapeOverHandler);
btn8.addEventListener(MouseEvent.MOUSE_OVER, shapeOverHandler);
btn9.addEventListener(MouseEvent.MOUSE_OVER, shapeOverHandler);
btn10.addEventListener(MouseEvent.MOUSE_OVER, shapeOverHandler);
btn11.addEventListener(MouseEvent.MOUSE_OVER, shapeOverHandler);
btn12.addEventListener(MouseEvent.MOUSE_OVER, shapeOverHandler);
btn13.addEventListener(MouseEvent.MOUSE_OVER, shapeOverHandler);
btn14.addEventListener(MouseEvent.MOUSE_OVER, shapeOverHandler);
btn15.addEventListener(MouseEvent.MOUSE_OVER, shapeOverHandler);
btn16.addEventListener(MouseEvent.MOUSE_OVER, shapeOverHandler);
btn17.addEventListener(MouseEvent.MOUSE_OVER, shapeOverHandler);
btn18.addEventListener(MouseEvent.MOUSE_OVER, shapeOverHandler);
btn19.addEventListener(MouseEvent.MOUSE_OVER, shapeOverHandler);
btn20.addEventListener(MouseEvent.MOUSE_OVER, shapeOverHandler);
btn21.addEventListener(MouseEvent.MOUSE_OVER, shapeOverHandler);
btn22.addEventListener(MouseEvent.MOUSE_OVER, shapeOverHandler);
btn23.addEventListener(MouseEvent.MOUSE_OVER, shapeOverHandler);
btn24.addEventListener(MouseEvent.MOUSE_OVER, shapeOverHandler);
btn25.addEventListener(MouseEvent.MOUSE_OVER, shapeOverHandler);
btn26.addEventListener(MouseEvent.MOUSE_OVER, shapeOverHandler);
btn27.addEventListener(MouseEvent.MOUSE_OVER, shapeOverHandler);
btn28.addEventListener(MouseEvent.MOUSE_OVER, shapeOverHandler);
btn29.addEventListener(MouseEvent.MOUSE_OVER, shapeOverHandler);
btn30.addEventListener(MouseEvent.MOUSE_OVER, shapeOverHandler);
function shapeOverHandler(event:MouseEvent):void
{
var overShape:DisplayObject = event.target as DisplayObject;
if (overShape == btn1)
{
gotoAndStop(71);
}
else if (overShape == btn2)
{
gotoAndStop(138);
}
}
btn1.addEventListener(MouseEvent.MOUSE_OUT, shapeOutHandler);
btn2.addEventListener(MouseEvent.MOUSE_OUT, shapeOutHandler);
btn3.addEventListener(MouseEvent.MOUSE_OUT, shapeOutHandler);
btn4.addEventListener(MouseEvent.MOUSE_OUT, shapeOutHandler);
btn5.addEventListener(MouseEvent.MOUSE_OUT, shapeOutHandler);
btn6.addEventListener(MouseEvent.MOUSE_OUT, shapeOutHandler);
btn7.addEventListener(MouseEvent.MOUSE_OUT, shapeOutHandler);
btn8.addEventListener(MouseEvent.MOUSE_OUT, shapeOutHandler);
btn9.addEventListener(MouseEvent.MOUSE_OUT, shapeOutHandler);
btn10.addEventListener(MouseEvent.MOUSE_OUT, shapeOutHandler);
btn11.addEventListener(MouseEvent.MOUSE_OUT, shapeOutHandler);
btn12.addEventListener(MouseEvent.MOUSE_OUT, shapeOutHandler);
btn13.addEventListener(MouseEvent.MOUSE_OUT, shapeOutHandler);
btn14.addEventListener(MouseEvent.MOUSE_OUT, shapeOutHandler);
btn15.addEventListener(MouseEvent.MOUSE_OUT, shapeOutHandler);
btn16.addEventListener(MouseEvent.MOUSE_OUT, shapeOutHandler);
btn17.addEventListener(MouseEvent.MOUSE_OUT, shapeOutHandler);
btn18.addEventListener(MouseEvent.MOUSE_OUT, shapeOutHandler);
btn19.addEventListener(MouseEvent.MOUSE_OUT, shapeOutHandler);
btn20.addEventListener(MouseEvent.MOUSE_OUT, shapeOutHandler);
btn21.addEventListener(MouseEvent.MOUSE_OUT, shapeOutHandler);
btn22.addEventListener(MouseEvent.MOUSE_OUT, shapeOutHandler);
btn23.addEventListener(MouseEvent.MOUSE_OUT, shapeOutHandler);
btn24.addEventListener(MouseEvent.MOUSE_OUT, shapeOutHandler);
btn25.addEventListener(MouseEvent.MOUSE_OUT, shapeOutHandler);
btn26.addEventListener(MouseEvent.MOUSE_OUT, shapeOutHandler);
btn27.addEventListener(MouseEvent.MOUSE_OUT, shapeOutHandler);
btn28.addEventListener(MouseEvent.MOUSE_OUT, shapeOutHandler);
btn29.addEventListener(MouseEvent.MOUSE_OUT, shapeOutHandler);
btn30.addEventListener(MouseEvent.MOUSE_OUT, shapeOutHandler);
function shapeOutHandler(event:MouseEvent):void
{
play();
}
…with more to come of course…PLEASE HELP!!!
Thanks!