How to Create Simple Dynamic Rollovers – Actionscript 3.0

How to Create Simple Dynamic Rollovers – Actionscript 3.0

Create a series of simple rollovers very easily with Actionscript 3.0. Using Flash CS3 or newer you will be able to use AS3 (Actionscript 3.0) and create these rollovers and use them in any of many applications in Flash!

More from Nathaniel Dodson
The Extract Filter – Photoshop CS2
The Extract Filter In Photoshop CS2 Learn how to make and use...
Read More
Join the Conversation

40 Comments

  1. says: Pablo

    Hey Nathaniel!! your tutorials are awesome!!
    I have a situation in the tutorial
    How to Create Simple Dynamic Rollovers – Actionscript 3.0
    my images don’t return to original size… why?
    This is the code:

    import fl.transitions.Tween;import fl.transitions.easing.*;import flash.display.Shape;import flash.events.MouseEvent;import flash.display.MovieClip;
    var imgBorder:Shape = new Shape();imgBorder.graphics.lineStyle(5,0xFFFFFF);imgBorder.graphics.drawRect(0, 0, 250, 120); addChild(imgBorder);
    imgBorder.visible = false;
    images_mc.addEventListener(MouseEvent.MOUSE_OVER, rollOverF);images_mc.addEventListener(MouseEvent.MOUSE_OUT, rollOverF);
    function rollOverF (event:MouseEvent):void{ imgBorder.visible = true; var borderTween:Tween = new Tween(imgBorder, “alpha”, Strong.easeOut,0,1,1, true); var borderW:Tween = new Tween(imgBorder, “width”, Strong.easeOut,255,280,1, true); var borderH:Tween = new Tween(imgBorder, “height”, Strong.easeOut,125,137,1, true); var imgW:Tween = new Tween(event.target, “width”, Strong.easeOut,250,275,1, true); var imgH:Tween = new Tween(event.target, “height”, Strong.easeOut,120,132,1, true); imgBorder.x = event.target.x; imgBorder.y = event.target.y; images_mc.setChildIndex(event.target as MovieClip, numChildren-1);}
    function rollOutF (event:MouseEvent):void{ var borderTweenBack:Tween = new Tween(imgBorder, “alpha”, Strong.easeOut, 1,0,1, true); var borderHBack:Tween = new Tween(imgBorder, “width”, Strong.easeOut,280,255,1, true); var borderWBack:Tween = new Tween(imgBorder, “height”, Strong.easeOut,137,125,1, true); var imgWBack:Tween = new Tween(event.target, “width”, Strong.easeOut,275,250,1, true); var imgHBack:Tween = new Tween(event.target, “height”, Strong.easeOut,132,120,1, true);
    }
    :

  2. Pingback: Matka Result
  3. Pingback: Economics Tuition
  4. Pingback: Diego Wood
  5. Pingback: sabung ayam
  6. Pingback: sabung ayam
  7. Pingback: Nấm linh chi
  8. Pingback: link
  9. Pingback: 3D
  10. Pingback: Agen Bandarq
  11. Pingback: yandex ankara
  12. Pingback: yandex ankara
  13. Pingback: economics tuition
  14. Pingback: economics tuition
  15. Pingback: pharma steroid
  16. Pingback: ICQ Chat
  17. Pingback: Portland Seo
  18. Pingback: information
  19. Pingback: motogolf
  20. Pingback: read
  21. Pingback: economics tuition
  22. Pingback: joseph de saram
  23. Pingback: LGBT adoption
  24. Pingback: kimim ben
Leave a comment
Leave a comment

Your email address will not be published. Required fields are marked *