dcsimg
A Flash Developer Resource Site

Results 1 to 13 of 13

Thread: loading large res .jpgs into small MC

  1. #1
    Junior Member
    Join Date
    Feb 2003
    Location
    Boulder, CO
    Posts
    15

    loading large res .jpgs into small MC

    Hey all,
    I'm trying to make a slide show that will always display the image, no matter what the resolution, inside the size of the mc. Never tried this before. My code for the mc is a simple (this is in MX):
    loadMovie("1.jpg", "movieclip");

    so far, what that does is displays the images at their resolution and it's way too big for how I want it displayed. Any help would be greatly appreciated.

    nicfu

  2. #2
    Senior Member
    Join Date
    Feb 2003
    Posts
    825
    ...and it's way too big for how I want it displayed.


    Too big in K size? or too big in height & width?

  3. #3
    Resident Shostakovich Scholar
    Join Date
    May 2003
    Location
    Nottingham, UK.
    Posts
    299
    This might work:

    tellTarget("path to imported movie clip symbol, the jpg image") {
    _width = getProperty("holder movie clip", _width);
    _height = getProperty("holder movie clip", _width);
    }

    //i.e. set it to the same dimentions as the movie clip parenting it.

  4. #4
    Junior Member
    Join Date
    Feb 2003
    Location
    Boulder, CO
    Posts
    15
    iguanagirl - too big in height and width, I want the jpgs to display within the boundaries of the height and width of the MC

    Mitya- gimme a few minutes and I'll give it a try

    thanks for your help

  5. #5
    Resident Shostakovich Scholar
    Join Date
    May 2003
    Location
    Nottingham, UK.
    Posts
    299
    Oops, made a mistake, I set both getProperty statements to width. Obviouly the bottom one should be _height.

  6. #6
    Senior Member
    Join Date
    Feb 2003
    Posts
    825
    if you resize the image dynamically in flash, you will run into image quality issues (they can get distorted)...your best bet is to resize all your images in an image editing program first, then import them into flash.

  7. #7
    Senior Member
    Join Date
    Oct 2001
    Posts
    135
    After you load in the file, just change the _width and _height properties of the mc to your taste.
    -Mav

  8. #8
    Resident Shostakovich Scholar
    Join Date
    May 2003
    Location
    Nottingham, UK.
    Posts
    299
    Exactly as I put, Maven

    Image quality issues can be a pain in the arse, but if you don't know what size the parent holder will be, you can't fix it. As a rule, only redefine the _width and/or _height in Flash if you have no other choice, as quality will be lost both ways.

  9. #9
    Junior Member
    Join Date
    Feb 2003
    Location
    Boulder, CO
    Posts
    15
    Hey yall,
    Thanks for the help. I think I'm just gonna go with a mask over the movie clip and when images are too big, the upper left corner will be displayed and what ever else that won't fit will be cut off.

    Mitya- I wasn't able to get the code to work. It had some trouble in the:
    tellTarget ("mc name", "1.jpg")

    it didn't like the "1.jpg".

    I think I'll just have to edit the images individually to be the right height and width. Thanks again for the help.

  10. #10
    Resident Shostakovich Scholar
    Join Date
    May 2003
    Location
    Nottingham, UK.
    Posts
    299
    That's becuase tellTarget statements only accept one argument. You've got two. It should be just:

    tellTarget("path to imported movie clip") {

    That is, the imported jpg which you attached using loadMovie.

  11. #11
    Senior Member
    Join Date
    Feb 2003
    Posts
    825
    why not just resize them outside of flash?

    do you really want the images to be cut off????

    if you resize the image in a photo editing program, BEFORE importing it into Flash, the quality loss will be minimal...
    Last edited by iguanagirl32; 07-23-2003 at 05:12 PM.

  12. #12
    Resident Shostakovich Scholar
    Join Date
    May 2003
    Location
    Nottingham, UK.
    Posts
    299
    I think it's fair to say he would have thought of that, if it was an option. I think the point here is, unless I'm mistaken, that he doesn't know what size the jpgs being imported will be, hence the dynamic element.

    This would all be simply as pie if it were set pictures with no dynamic features.

  13. #13
    Junior Member
    Join Date
    Feb 2003
    Location
    Boulder, CO
    Posts
    15
    Mitya- you read my mind.

    Basically I just want to build in a fail-safe just in case the person using this, who has very little computer skills, tries to put a picture in the picture folder that isn't quite sized perfectly (as in a little too big).

    Thanks for all of your help, If you all have any other ideas, please send em over.

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