A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: matching stageWidth of movieClip with "z" property

  1. #1
    Member
    Join Date
    Jul 2009
    Location
    Florianópolis
    Posts
    81

    matching stageWidth of movieClip with "z" property

    Hi,

    I would like a movieclip on the stage to match the stageWidth by tweening its "z" property.

    How can this be done?

    Thanks
    Last edited by ziriguidum; 08-10-2010 at 04:32 PM. Reason: typo

  2. #2
    Member
    Join Date
    Aug 2010
    Posts
    65
    you will have to do some calculations, i can only think of
    mymovieclip.z = (stage.stageWidth/mymovieclip.width)*perspectiveFactor

    now the perspectiveFactor is somothing where you will have to try different values till you get somothing close.


    maybe a better way would be to check every frame if the stagewidth and movieclip width are >= and if not decrease the z of movieclip

Tags for this Thread

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