• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

rollover picture to make it bigger

New Here ,
Jul 27, 2012 Jul 27, 2012

Copy link to clipboard

Copied

What is the as3 code in order to rollover a image and it will automatically get bigger?

TOPICS
ActionScript

Views

640

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 27, 2012 Jul 27, 2012

Copy link to clipboard

Copied

You can have your ROLL_OVER event handler function change the scaleX and scaleY properties of the object, or you could have the width and height of the object changed instead.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 27, 2012 Jul 27, 2012

Copy link to clipboard

Copied

LATEST

you need set the image into a MovieClip, a container

then

add the code

containerImage.addEventListener(MouseEvent.MOUSE_OVER, bigSize)

function bigSize(e:MouseEvent):void{

    e.target.scaleX= e.target.scaleY=3 // size X 3

}

containerImage.addEventListener(MouseEvent.MOUSE_OUT, normalSize)

function normalSize(e:MouseEvent):void{

    e.target.scaleX= e.target.scaleY=1 // normal size

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines