Help - Fixing Image Size in Picture Scroller...

Ask a Question related to Macromedia Flash, Design and Development.

  1. #1

    Default Help - Fixing Image Size in Picture Scroller...

    Hello,

    I have developed a simple picture scroller that connects to my backend MySQL
    Database to retrieve the image filenames etc. This all works fine except
    for the fact that users may want to upload images of different sizes - extra
    large, large, small etc. My picture scroller will only show the images
    within a specific area around 380 pixels wide and 250 pixels high...

    As in normal web page development, this problem is easily overcome by simply
    telling teh "dynamic image" that it MUST be a pre-set size so whatever the
    size of the image in reality, it will be shown on the web page in the size i
    want it to be (this may end up distorting the image but thats not a
    concern). The problem is that for some reason, Flash wont allow me to do
    this same type of update whereby i can give the image(s) a pre-set size...?

    So i have a picture scroller at the moment, that shows parts of images
    because the images are far too large and are not being resized within the
    animation itself - how can i overcome this issue...?

    I would appreciate ANY feedback on this...

    Many thanks,

    Alex


    alex Guest

  2. Similar Questions and Discussions

    1. DHTML image scroller with layers
      I'm hoping someone here can point me in the right direction. I have a website with a photo gallery and 12-15 photos in each gallery. The...
    2. Javascript image scroller
      Greetings to all who read this... I need a bit of help here... I want an image scroller that instead of having to define each image i want it to...
    3. Dynamic image scroller asp flash
      Hi, I m searching a flash solution ( i m not using flash..but dwmx 2004 and databases) to display pictures from a database recordset ( records...
    4. Fixing window size of flash projector
      Hi, I am using the fscommand to fix the width of the my movie, but I want to be able to stop people resizing the projector window because I have...
    5. Fixing size of flash player
      Hi, I have created a movie to go a cd. When the customer puts the cd in their computer it runs an autorun file runs the movie in the flash player....
  3. #2

    Default Re: Help - Fixing Image Size in Picture Scroller...

    On Tue, 14 Sep 2004 07:47:31 GMT, "alex" <ahe@blueyonder.co.uk> wrote:
    >Hello,
    >
    >I have developed a simple picture scroller that connects to my backend MySQL
    >Database to retrieve the image filenames etc. This all works fine except
    >for the fact that users may want to upload images of different sizes - extra
    >large, large, small etc. My picture scroller will only show the images
    >within a specific area around 380 pixels wide and 250 pixels high...
    >
    >As in normal web page development, this problem is easily overcome by simply
    >telling teh "dynamic image" that it MUST be a pre-set size so whatever the
    >size of the image in reality, it will be shown on the web page in the size i
    >want it to be (this may end up distorting the image but thats not a
    >concern). The problem is that for some reason, Flash wont allow me to do
    >this same type of update whereby i can give the image(s) a pre-set size...?
    >
    >So i have a picture scroller at the moment, that shows parts of images
    >because the images are far too large and are not being resized within the
    >animation itself - how can i overcome this issue...?
    >
    >I would appreciate ANY feedback on this...
    >
    >Many thanks,
    >
    >Alex
    >
    Use _width = and _height = in combination or _xscale = and _yscale =

    Adam Albright Guest

  4. #3

    Default Re: Help - Fixing Image Size in Picture Scroller...

    Hey,

    Thanks for your reply...its very much appreciated...
    > Use _width = and _height = in combination or _xscale = and _yscale =
    I just want to confirm that this will automatically make 100% sure that ALL
    images will be shown within my designated area at the exact size i want them
    to be (even though most if not all of them will be far larger than i need
    them to be)...?

    Once again, your advice is very much appreciated...

    Regards,

    Alex


    "Adam Albright" <AA@ABC.net> wrote in message
    news:q6sdk0tim9r9jid84jl21j5o23atkh5ba1@4ax.com...
    > On Tue, 14 Sep 2004 07:47:31 GMT, "alex" <ahe@blueyonder.co.uk> wrote:
    >
    > >Hello,
    > >
    > >I have developed a simple picture scroller that connects to my backend
    MySQL
    > >Database to retrieve the image filenames etc. This all works fine except
    > >for the fact that users may want to upload images of different sizes -
    extra
    > >large, large, small etc. My picture scroller will only show the images
    > >within a specific area around 380 pixels wide and 250 pixels high...
    > >
    > >As in normal web page development, this problem is easily overcome by
    simply
    > >telling teh "dynamic image" that it MUST be a pre-set size so whatever
    the
    > >size of the image in reality, it will be shown on the web page in the
    size i
    > >want it to be (this may end up distorting the image but thats not a
    > >concern). The problem is that for some reason, Flash wont allow me to do
    > >this same type of update whereby i can give the image(s) a pre-set
    size...?
    > >
    > >So i have a picture scroller at the moment, that shows parts of images
    > >because the images are far too large and are not being resized within the
    > >animation itself - how can i overcome this issue...?
    > >
    > >I would appreciate ANY feedback on this...
    > >
    > >Many thanks,
    > >
    > >Alex
    > >
    > Use _width = and _height = in combination or _xscale = and _yscale =
    >

    alex Guest

  5. #4

    Default Re: Help - Fixing Image Size in Picture Scroller...

    alex wrote:
    > Hey,
    >
    > Thanks for your reply...its very much appreciated...
    >
    >
    >>Use _width = and _height = in combination or _xscale = and _yscale =
    >
    >
    > I just want to confirm that this will automatically make 100% sure that ALL
    > images will be shown within my designated area at the exact size i want them
    > to be (even though most if not all of them will be far larger than i need
    > them to be)...?
    >
    > Once again, your advice is very much appreciated...
    >
    > Regards,
    >
    > Alex


    hi Alex,

    some time ago, i posted a reusable generic function for loading
    a picture onto a target area, with automatic smart-resizing
    capability. i post it here again. you might find it useful.

    -----
    The Count, Singapore
    Learning Objects (e-Learning) Consultant




    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~
    // The following function will load a picture (.swf movie or
    // .jpg still) stored in a file called strFileName and
    // automatically fit it into a rectangular target area called
    // mcTargetArea which is a MovieClip (or at least an Object
    // with _x, _y, _height and _width properties)
    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~
    function LoadPicture(strFileName, mcTargetArea) {
    createEmptyMovieClip("mcHolder", 1);
    var mcpH = mcHolder;
    //
    mcpH._x = mcTargetArea._x;
    mcpH._y = mcTargetArea._y;
    mcpH.th = mcTargetArea._height;
    mcpH.tw = mcTargetArea._width;
    mcpH.createEmptyMovieClip("mcInner", 100);
    mcpH.mcInner.loadMovie(strFileName);
    //
    mcpH.onEnterFrame = function() {
    var mcpI = this["mcInner"];
    var myh = mcpI._height;
    var myw = mcpI._width;
    var myxs = mcpI._xscale;
    var myys = mcpI._yscale;
    if (myw>0) {
    var xScale = this.tw/myw;
    var yScale = this.th/myh;
    var mScale = Math.min(xScale, yScale);
    mScale *= 0.99;
    this._width = this._width*mScale;
    this._height = this._height*mScale;
    delete this.onEnterFrame;
    }
    };
    };
    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~
    Der Zählmeister Guest

  6. #5

    Default Re: Help - Fixing Image Size in Picture Scroller...

    Hi,

    I just noticed your rather comprehensive reply - i will test the solution
    later today - but just wanted to say thank you for posting it...!! :-)

    Regards,

    Alex



    "Der Zählmeister" <the_count@mozilla.com.sg> wrote in message
    news:ci9m8k$rl8$1@mawar.singnet.com.sg...
    > alex wrote:
    >
    > > Hey,
    > >
    > > Thanks for your reply...its very much appreciated...
    > >
    > >
    > >>Use _width = and _height = in combination or _xscale = and _yscale =
    > >
    > >
    > > I just want to confirm that this will automatically make 100% sure that
    ALL
    > > images will be shown within my designated area at the exact size i want
    them
    > > to be (even though most if not all of them will be far larger than i
    need
    > > them to be)...?
    > >
    > > Once again, your advice is very much appreciated...
    > >
    > > Regards,
    > >
    > > Alex
    >
    >
    >
    > hi Alex,
    >
    > some time ago, i posted a reusable generic function for loading
    > a picture onto a target area, with automatic smart-resizing
    > capability. i post it here again. you might find it useful.
    >
    > -----
    > The Count, Singapore
    > Learning Objects (e-Learning) Consultant
    >
    >
    >
    >
    > // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~
    > // The following function will load a picture (.swf movie or
    > // .jpg still) stored in a file called strFileName and
    > // automatically fit it into a rectangular target area called
    > // mcTargetArea which is a MovieClip (or at least an Object
    > // with _x, _y, _height and _width properties)
    > // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~
    > function LoadPicture(strFileName, mcTargetArea) {
    > createEmptyMovieClip("mcHolder", 1);
    > var mcpH = mcHolder;
    > //
    > mcpH._x = mcTargetArea._x;
    > mcpH._y = mcTargetArea._y;
    > mcpH.th = mcTargetArea._height;
    > mcpH.tw = mcTargetArea._width;
    > mcpH.createEmptyMovieClip("mcInner", 100);
    > mcpH.mcInner.loadMovie(strFileName);
    > //
    > mcpH.onEnterFrame = function() {
    > var mcpI = this["mcInner"];
    > var myh = mcpI._height;
    > var myw = mcpI._width;
    > var myxs = mcpI._xscale;
    > var myys = mcpI._yscale;
    > if (myw>0) {
    > var xScale = this.tw/myw;
    > var yScale = this.th/myh;
    > var mScale = Math.min(xScale, yScale);
    > mScale *= 0.99;
    > this._width = this._width*mScale;
    > this._height = this._height*mScale;
    > delete this.onEnterFrame;
    > }
    > };
    > };
    > // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~

    alex Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139