A Flash Developer Resource Site

Page 1 of 3 123 LastLast
Results 1 to 20 of 45

Thread: HELP: load the movie clip in FIXED size ,but...

  1. #1
    Member
    Join Date
    Jan 2008
    Posts
    57

    HELP: load the movie clip in FIXED size ,but...

    but the movie clip is loaded through another swf ,and this also is loaded through the main.swf in levels
    so the problem is that my main.swf is set to scaled (and i want it like this)
    but i need to load some movie clips that will have photos so i want them to appear at the size i will give (for example 600x600 and allways at the right)
    what i mean is if the user resize the window ,the main movie will scale but this mc (with the photo) will STAY at the size it is.
    but because of the main movie is scaled those mcs also do scale!
    if i set stage no scale AS at the mcs with the photos then the scale will be lost from the main movie! (it's allways loaded at level0)
    help me i tried everything!!
    i don't want to build the site from the beggining ..is huge!
    is there any way?

    my site is like this: main.swf(allways loaded ,set to SCALED 100%) -->
    --> menu.swf (will load with a button from main.swf at level1) -->
    photo.swf (will load with a button from menu.swf at level2 ,and will unload menu from level1)

    the reason i want those mcs not scaled is because they contain photos and if broswer scale the photos get pixelized etc...it's bad!

    please help me and if you didn't understand something ask me..i will follow this thread everyday ..i need to finish this!

    sorry for my bad english i hope to everyone a happy new year
    Last edited by steber_j; 01-06-2008 at 06:17 PM.

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    if your publish settings are to allow scale, then no matter what, when the html page is resized so will the swf. If you do'nt want to scale the pictures they have to be on a different html page with noScale publish settings.

    The only workaround I see:

    publish 100% noScale.
    resize only the content you want to be enlarged to Stage.width and height.

    gparis

  3. #3
    Member
    Join Date
    Jan 2008
    Posts
    57
    publish 100% no scale the main.swf?
    the main.swf is 1278x900 ,will it not be cropped if a user has 1024x768?
    can you give me an example of resize only the content i want ?
    with AS in the mcs at 1st frame?

  4. #4
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    yes it will be cropped (scrollbars will appear in the browser left and bottom). But i guess that if it was designed in 1278x900 dimensions, then the 1024x768 audience was not targetted anyway?

    gparis

  5. #5
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    to resize content, you'll need this.

    gparis

  6. #6
    Member
    Join Date
    Jan 2008
    Posts
    57
    ok and if it was designed at 1024x768 then the 800x600 or the 1280x1024 audience still is not targetted!
    i just wanted the photos to stay at fixed size ..that was my only thought
    movie clip with photos made at 600x600 so every 1024x768 user would be happy
    now they are scaled
    it's shame there is no way to leave the main movie "exactfit" (scaled) and load the photos at fixed size ...

  7. #7
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    well, if you or your client decide prior to starting any design that the target should be the majority of users, then it should be for 1024x768.

    gparis

  8. #8
    Member
    Join Date
    Jan 2008
    Posts
    57
    i'm so disappointed on this!
    there must be a way to load the mc at fixed size even if the main.swf is set to "exactfit" (scaled)
    on wide screens the photos appear very shapeless!
    for example if there is a moon at the photo ,it looks like an egg!!

    i understand that it's because of the html that loads the 1st flash all the others will follow but there is no trick???
    something...what to do ..open a popup/different window html for every picture??
    no wayyyy
    please guys i'm begging for help
    at least try ...

    basic problem:
    main movie is scaled and all the other clips that will load do the same
    ok for the menu,ok for some other mcs but there are photos that scale also!
    if i set Stage.scaleMode = "noScale" to the movie clip(phoyo01.swf) then this photo will load fixed but the main movie also will lose the scale,scrollbars will appear or i must crop and this is no good!

    pleaaaaaaaaaaaaaaaaaaaaaaaaaaase!!

  9. #9
    Member
    Join Date
    Jan 2008
    Posts
    57
    question:
    if i create a swf with just one frame that will have this AS
    Stage.align = "TL";
    Stage.scaleMode = "noScale";

    and this to load my main movie at level0

    loadMovieNum("MAIN.swf" ,0);

    then i'll be a able to control the movie clips fixed size? (cause now everything will be at noscale)

    cause if this can happen ,i will set to scale the MAIN.SWF (how?)
    the MENU.SWF ,some other clips
    and when the PHOTO.swf will come will have fixed size
    can this happen?
    i understand that the .html controls the scale so there i will leave it noscale (show all)
    and then i will control separately my mcs if they will have 100% scale or fixed size

    please guys at least try to help me ,there's been 1 week now that i'm looking for this!
    i've read ALL the internet.zip!!

  10. #10
    Member
    Join Date
    Jan 2008
    Posts
    57
    how to set mcs:
    potition (for example allways right)
    scale in 100% (for my main movie)
    noscale
    ?
    plz help ...............................

  11. #11
    Member
    Join Date
    Jan 2008
    Posts
    57
    up
    i need to control the scale/position/dimension on mcs
    1 or 2 mcs to scale and the other to fixed size
    i know this can happen if you set the 1st empty clip to noscale (that will load the main.swf)
    that will load all the others
    i had luck with some AS but still it's not perfect
    i need something like this but only for 1 clip that will screth in width&height:


    Stage.align = "TL";
    Stage.scaleMode = "noScale";

    stop ();
    // initiate postitions and scaling values for objects
    fluid._x = (Stage.width + 200)/2
    fluid._y = Stage.height/2
    bottomstretch._height = Stage.height;
    rightstretch._height = Stage.height;
    topstretch._width = Stage.width;
    rightstretch._x=201;
    tutoriobutton._x = Stage.width - tutoriobutton._width
    // end initial position setting


    //create a listner that checks to see if the browser window is resized
    sizeListener = new Object();
    sizeListener.onResize = function() {
    // change movieclip properties when the window is resized.
    topstretch._width = Stage.width;
    fluid._y = Stage.height/2;
    fluid._x = (Stage.width + 200)/2;
    bottomstretch._height = Stage.height;
    rightstretch._height = Stage.height;
    //*note* 200 is the width of the left column
    tutoriobutton._x = Stage.width - tutoriobutton._width
    };
    Stage.addListener(sizeListener);

    also i found the scale for the mcs but doesn;t do what i want if i set it to 100%
    so confused..........i need sleep ..PLEASE help

  12. #12
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    i need something like this but only for 1 clip that will screth in width&height:
    resize only the content you want to be enlarged to Stage.width and height.
    I'll assume the instance name of the movieclip is 'content' so just use this:
    PHP Code:
    Stage.align "TL";
    Stage.scaleMode "noScale";
    sizeListener = new Object();

    //When browser gets resized
    sizeListener.onResize = function() {
    content._width Stage.width;
    content._height Stage.height;
    };
    Stage.addListener(sizeListener);

    //When browser loads
    content._width Stage.width;
    content._height Stage.height
    gparis

  13. #13
    Member
    Join Date
    Jan 2008
    Posts
    57
    ok it works ,thank you
    but if i go this way i must rebuild all my site and there are about 100mcs!
    so i just want to ask the last thing...
    is there any way (even if the 1st movie is set to scaled)
    1 mc that will load inside this movie from a swf to act indiepent?
    with a placeholder that will not be scaled..i don;t know ..something!
    no trick?
    what i mean is that imagine my site like this:
    O----o-----o-----o-----o-----o-----o-----o----o-----o----!
    i will have to remake all the "o" clips with noscale just because i need 1 clips "!" to be noscaled!

  14. #14
    Member
    Join Date
    Jan 2008
    Posts
    57
    to understand me..
    my problem is not that the pics will SCALE
    but that they will STRECH
    it's not really bad if from 1280x1024/1024x768 will scale normally (square)
    but in a monitor with 1440x990 (WIDE) will scretch!
    so ...please can i set to this movie clip NEVER strech by width???

  15. #15
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    content._height = Stage.height;
    content._xscale = content._yscale;

    this keeps the ratio.

    gparis

  16. #16
    Member
    Join Date
    Jan 2008
    Posts
    57
    thanks for trying to help!
    i can't make it work...
    what i do:
    create an empty .fla ,put a picture in it ,set the dimensions of the project exactly the size of the photo (455x700)
    convert this photo to movie clip ,give the instance name "content" and at the 1st frame of this movie i paste the AS you gave me
    i tried now at the laptop (wide screen) the photo still strech!
    and it's a portrait photo (hight=bigger) imagine how it looks cause it strech at width to fill the size of the wide monitor
    if it was an egg now it looks like a ball
    what am i doing wrong?
    i need to remind you that there is nowhere stage scalemode =noscale
    everything is exactfit ,so could one indiepent clip avoid this and stop streching to wide??
    i can't set the stagemode=noscale at the main movie ..no way
    just need to find a way for certain movie clips not to strech at width
    if they don't strech at all this would be WONDERFULL ..this was my main point

    why did the discover wide monitors..why..?!

  17. #17
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    everything is exactfit/just need to find a way for certain movie clips not to strech
    not possible.

    gparis

  18. #18
    Member
    Join Date
    Jan 2008
    Posts
    57
    so the code you gave me?
    content._height = Stage.height;
    content._xscale = content._yscale;

  19. #19
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    works with Stage.scaleMode = "noScale";

    I gave you 2 workarounds in my first post (read again). I don't see any 3rd workaround.

    gparis

  20. #20
    Member
    Join Date
    Jan 2008
    Posts
    57
    thank you for your help
    i can't do anything i'll leave it to strech for now

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