Resizing image. [ActionScript]

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

  1. #1

    Default Resizing image. [ActionScript]

    Hi,
    I'm loading image into movie using this code:
    ....
    picHolder._x = 50
    picHolder._y = 110

    picHolder.loadMovie(picName);
    ....

    I want to have ability to change image size during loading.
    For example i want to load movie in position 50,110 and i want this image to
    be resized by 20% (smaller)
    Is this possible??
    if yes, could someone post a piece of code.

    Thanks


    Piotr Guest

  2. Similar Questions and Discussions

    1. image resizing
      Hi, Is there a toggle switch in InDesign which enables one to resize an image using the pick tool without cropping it? -Paul
    2. Resizing a image!
      Hello, I just started with PHP. And I have made a code for uploading images. Now I wil resize the image also to a tumbnail, but when I search...
    3. Resizing an image...
      I have a jpg that when clicked upon opens to about 4 x 6 on screen. How can I resize this photo so that the maximum it will only open to is a 3" x 4"...
    4. Resizing high res image smaller results in blurred image
      Hi there, I have a high res logo in PSD format (around 1500px x 1500px) but when I resize it to around 300px x 300px the resulting image is not...
    5. Resizing image with fills
      When you do a resize (Modify>Image Size) Is the "scale attributes" box checked? -- BR "foosball is th' DEVIL, Bobby Bouchet"
  3. #2

    Default Re: Resizing image. [ActionScript]

    On Fri, 11 Jun 2004 00:15:01 +0200, "Piotr" <buhajbej [CUT] @zuk.pl>
    wrote:
    >Hi,
    >I'm loading image into movie using this code:
    >...
    >picHolder._x = 50
    >picHolder._y = 110
    >
    >picHolder.loadMovie(picName);
    >...
    >
    >I want to have ability to change image size during loading.
    >For example i want to load movie in position 50,110 and i want this image to
    >be resized by 20% (smaller)
    >Is this possible??
    >if yes, could someone post a piece of code.
    >
    >Thanks
    Why not just change the source image size BEFORE you bring it into
    Flash? It would also benefit from being a smaller file size.

    If you want to do it the hard way:

    Convert to a symbol. In its propety box give it instance name like
    myPicture_mc then then the code is:

    myPicture_mc._xscale = 80;
    myPicture_mc._yscale = 80;

    This would make the image 80% of it original size or 20% smaller.


    Adam Albright Guest

  4. #3

    Default Re: Resizing image. [ActionScript]

    Adam Albright wrote:
    > On Fri, 11 Jun 2004 00:15:01 +0200, "Piotr" <buhajbej [CUT] @zuk.pl>
    > wrote:
    >
    >
    >>Hi,
    >>I'm loading image into movie using this code:
    [snip]
    > Why not just change the source image size BEFORE you bring it into
    > Flash? It would also benefit from being a smaller file size.
    I have seen reasons for going wither way with this, but yes resizing it
    before pulling it in would be best as it will also minimize download
    amount and keep the picture looking better as most graphics programs
    scall pictures much better than flash will.

    Another thing to keep in mind when loading graphics like this is that
    they have to be jpegs, and CAN NOT be interlaced. If they are they will
    be imported just fine (ie no error) but will not display as Flash does
    not have the ability to de-interlace them at this time.
    > If you want to do it the hard way:
    >
    > Convert to a symbol. In its propety box give it instance name like
    > myPicture_mc then then the code is:
    >
    > myPicture_mc._xscale = 80;
    > myPicture_mc._yscale = 80;
    >
    > This would make the image 80% of it original size or 20% smaller.
    >
    >
    >

    --
    Brandon Bradley
    Macromedia Certified Instructor
    [url]http://www.attconline.org/[/url]

    Brandon Bradley 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