dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: 100% scalable flash problem loading mc's

  1. #1
    Senior Member
    Join Date
    Apr 2001
    Posts
    211

    100% scalable flash problem loading mc's

    In my flash I have my entire movie in one mc on the first frame called main. I set up a size listener so the entire movie can resize to the window:

    Code:
    this.scaleMode = "noScale"
    
    sizeListener = new Object();
    sizeListener.onResize = function() {
    main._width = Stage.width;
    main._height = Stage.height;
    };
    Stage.addListener(sizeListener);
    stageListener.onResize();

    Then I have an external mc, that basically does the same thing. When I test the external mc seperately, it works fine and scales to my window. But when I call it into my base movie, it doesn't scale to the window. Does anybody know why this might be happening?
    -FRIG-5
    Das Konzept Design
    www.daskonzept.com

  2. #2
    Can't Re-Member madzigian's Avatar
    Join Date
    Apr 2004
    Location
    Boston MA
    Posts
    2,662
    i'd check your code... You can't use onResize to resize a frame label. You have to target the mc based on instance name. Also, you have variations in your instance names : sizeListener & stageListener

    Try this instead:
    Code:
    Stage.scaleMode = "noScale";
    
    var stageListener:Object = new Object();
    
    stageListener.onResize = function() {
    	your_mc._width = Math.round(Stage.width);
    	your_mc._ height = Math.round(Stage.height)
    };
    
    Stage.addListener(stageListener);
    Please DO NOT PM me simply for individual help. Post in the public forums...that's what they are for, and they allow others to benefit as well. - Thx
    OS X 10.3.9 || Flash MX04 Pro
    | del.icio.us || furl || Helpful Source Files || Free Pixel Fonts |

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