Professional Web Applications Themes

Scale parts of an object - Macromedia Flash Actionscript

I want to scale a movieclip but keep a nested movieclip within that the same size. Is there any way of doing this? At first I thought I could just do the following code: this._parent._xscale = this._parent._xscale + 10; this._parent._yscale = this._parent._yscale + 10; this._xscale = this._xscale - 10; this._yscale = this._yscale - 10; but I was being exceptionally dumb and forgetting the percents of different sizes will produce different results I-'. any ideas?...

  1. #1

    Default Scale parts of an object

    I want to scale a movieclip but keep a nested movieclip within that the same
    size. Is there any way of doing this? At first I thought I could just do the
    following code:

    this._parent._xscale = this._parent._xscale + 10;
    this._parent._yscale = this._parent._yscale + 10;
    this._xscale = this._xscale - 10;
    this._yscale = this._yscale - 10;

    but I was being exceptionally dumb and forgetting the percents of different
    sizes will produce different results I-'.

    any ideas?

    domconlon Guest

  2. #2

    Default Re: Scale parts of an object

    Get _width and _height of the nested object before scaling down its parent.
    Whenever you scale the parent set the dimensions of the nested element to the
    values
    you have retrieved. Don't know about the visual effect. Maybe you could hide
    the mc
    during scaling ...

    HTH,

    -c.

    CesareRocchi Guest

  3. #3

    Default Re: Scale parts of an object

    Ah of course. Many thanks.
    domconlon Guest

Similar Threads

  1. can't scale object or text box with selection tool
    By Debbie_Shelton@adobeforums.com in forum Adobe Illustrator Windows
    Replies: 17
    Last Post: September 7th, 08:22 PM
  2. How to Scale an Object or Image to 100%
    By Saleh A. aziz in forum Dreamweaver AppDev
    Replies: 1
    Last Post: May 22nd, 09:15 PM
  3. loadFile() and object scale :/
    By in forum Macromedia Director 3D
    Replies: 1
    Last Post: April 20th, 08:03 AM
  4. CS - Scale point doesn't move with the object..
    By brandon_hopkins@adobeforums.com in forum Adobe Illustrator Macintosh
    Replies: 0
    Last Post: April 8th, 09:09 PM
  5. Selecting certain parts of an object in an arc
    By Wayne_Michael@adobeforums.com in forum Adobe Illustrator Macintosh
    Replies: 2
    Last Post: February 11th, 05:18 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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