A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Stage.onResize

  1. #1
    Member
    Join Date
    Sep 2014
    Posts
    75

    Stage.onResize

    Hello,

    The code is about when re-sizing the stage a movieclip (menuMC) on stage will be re-sized as well.

    This movieclip (menuMC) works as a container for set of button components. Inside the menuMC there are 3 frames, on each frame there are 3 button components.

    The problem is that when the parent movieclip (menuMC) is re-sized, the buttons are also re-sized.

    How that can be prevented? All the buttons which are locacted on different frames inside the menuMC.

    PHP Code:
    Stage.scaleMode "noScale";
    var 
    stageListener:Object = new Object();
    stageListener.onResize = function() {
    Stage.align "TL";
    _root.menuMC._x 3;
    _root.menuMC._width Stage.width-2;
    };
    //
    Stage.addListener(stageListener); 
    Thanks for any tips!

  2. #2
    Senior Member realMakc's Avatar
    Join Date
    Oct 2002
    Posts
    927
    keep menuMC empty and add things that need resize (such as background maybe) as yet another child inside it; resize that other child
    who is this? a word of friendly advice: FFS stop using AS2

  3. #3
    Member
    Join Date
    Sep 2014
    Posts
    75
    Quote Originally Posted by realMakc View Post
    keep menuMC empty and add things that need resize (such as background maybe) as yet another child inside it; resize that other child
    Thank you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center