A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: loadMovie, image, resize

  1. #1
    Senior Member vevmesteren's Avatar
    Join Date
    Sep 2001
    Location
    Montréal, Québec
    Posts
    566

    loadMovie, image, resize

    hello folks,

    here's what I want to do. Load in an image, then, once it's loaded resize it to a certain width and height in case it exceeds the maximum size.

    I did the obvious, load in the image, then in the next frame :

    if(imageholder._width > 328){
    imageholder._width = 328
    }
    if(imageholder._height > 328){
    imageholder._height = 328
    }

    nothing happens, when I trace those two values, they come out as zero, does the image have yet another instance I know nothing about and cannot influence, I DON'T think so. So that's it. I need YOUR help to move on in this Flash Remoting project of mine...

    V
    it is your mind that decides - it is with your mind that you fly


    vevmedia

  2. #2
    Senior Member vevmesteren's Avatar
    Join Date
    Sep 2001
    Location
    Montréal, Québec
    Posts
    566
    surfe3d a bit. and found an answer, the following code had to be attached to the placeholder instance:

    onClipEvent(data) {
    a=320;
    b=320;
    c=b/a;
    x=this._width;
    y=this._height;
    if (x>0 and y>0) {
    if (y>=x) {
    z=b/y;
    } else {
    z=a/x;
    }
    if (z<=(y/x)) {
    this._xscale*=z;
    this._yscale*=z;
    }
    }
    }
    it is your mind that decides - it is with your mind that you fly


    vevmedia

  3. #3
    Registered User
    Join Date
    Apr 2013
    Posts
    1
    have you used another image software? NET Image SDK image loading options allows users to load different image file types, such as PNG, BMP, GIF, JPG, and many more.

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