flash - AS3: resizing as a result of an eventListener -


I have coded a map when a province object is clicked, then moving it to the center of the screen Should the percentage of the width, along with many different things being displayed

The problem is that it needs to be double click to change the image size. It moves, and all children are displayed as they were designed to do, but the size-changing does not work on the first click. Any ideas how to fix this problem?

  menuItem4_mc.addEventListener (MouseEvent.CLICK, onClick); Public function onClick (mc: MouseEvent): Zero {menuItem4_mc.width = width * .65; MenuItem4_mc.height = Height * .7; // brings the stage set setildIndex (menuItem4_mc, numChildren - 1) to Ontario; MenuItem4_mc.x = 670/2; MenuItem4_mc.y = 480/2; ...}  

Thanks!

First try to move the positioning statement above the width and height details (X and Y reference ) It could work.

If this does not happen, refer to the width and height of the forum while specifying the container instead of the movieclip. I'm assuming that there are dimensions similar to the container's platform.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -