A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: _rotation and dimensions

  1. #1
    Junior Member
    Join Date
    Oct 2001
    Posts
    19

    _rotation and dimensions

    Ok, this is really making me go crazy !!

    I create a circle, convert it to an MC and then rotate it by increments of 15, after each increments I output the _width of the object and it's not always the same, it's like if flash is rotating the bouding box and get the dimension from it.

    Thanks

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    convert the circle inside the MC that you rotate, and check for that inside movieclip's _width:

    this._rotation+=15;
    trace(this.circle_mc._width);

  3. #3
    Junior Member
    Join Date
    Oct 2001
    Posts
    19
    Thanks,

    But wouldn't the circle always be the same width ?

    Ok, maybe my circle example is too simple, I was using this because it's easy to know that after each rotation, it sould always be the same width.

    But let's take an oval for example, if I rotate it's parent mc, the oval would always be the same width, I would like to have the bounding box, but flash seems to rotate the bounding box also, so it's not the true bounding box.

    I hope this makes sense ?

  4. #4
    Senior Member braxius's Avatar
    Join Date
    Jul 2005
    Location
    Lithuania
    Posts
    126
    flash always resizes bounding box around mc, as bounding box is based on _x,_y and _width,_height.

  5. #5
    Junior Member
    Join Date
    Oct 2001
    Posts
    19
    Quote Originally Posted by braxius
    flash always resizes bounding box around mc, as bounding box is based on _x,_y and _width,_height.
    So are you saying that it should work or that it is a normal behavior ?

    I mean why would a circle's width be different when it is rotated at 15 degree than when it is not, too me it doesn't make any sense

    The getBounds function should at least treat it properly !

  6. #6
    Senior Member braxius's Avatar
    Join Date
    Jul 2005
    Location
    Lithuania
    Posts
    126
    sorry bout last post, looks like flash rotates bounding box together with mc and so changes mc's its width
    Attached Files Attached Files

  7. #7
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    AS i was saying before, you will have the REAL size of the circle/oval/whatever shape of the mc INSIDE the rotating one.

    gparis

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