A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: mask adding width

  1. #1
    Senior Member
    Join Date
    Aug 2012
    Posts
    115

    mask adding width

    Hello,

    Is it possible to discount the width of an elongated masked movieclip?

    Basically i have a masked clip, which is a image slider, however when i center the container clip using

    Actionscript Code:
    myClip._x = (Stage.width - myClip._width) / 2;

    it takes onboard the width of the masked clip and does not truly visually center it, so am I able to ignore that hidden width?

    Thank you in advance

  2. #2
    Senior Member Steven FN's Avatar
    Join Date
    Mar 2010
    Location
    CA, USA
    Posts
    276
    If the mask clip is a child of the container clip, then i don't think there is a way to ignore its dimensions. I would just add an offset to your code to center the clip.

    Code:
    myClip._x = (Stage.width - myClip._width / 2) + xOffset;

  3. #3
    Senior Member
    Join Date
    Aug 2012
    Posts
    115
    Hi there,

    I already tried using an offset and it works to an extent. But the fails again if the mask width increases when the image count increases, i pull the images with php from a folder and make flash array.

    Perhaps i can trick flash by flciking the images sideways and messing around with the y coords instead of the x, worth a bash.

    Thanks for responding.

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