A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Problems scaling width of movieclip

  1. #1
    Junior Member
    Join Date
    Mar 2009
    Posts
    9

    Problems scaling width of movieclip

    In my app I'm scaling the width of a movieclip using the Tween class. My problem is that the new scaled width is not right.

    Is this a bug in the as3 code? Does anyone have a solution?


    trace(graphPanel.width) // 500

    scaleValue = 5;

    new Tween(graphPanel, "scaleX", None.easeNone, 1, scaleValue, 2, true);

    trace(graphPanel.width) // 2494.25

  2. #2
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    Looks like a float-point error getting compounded...try listening to the Tween for a MOTION_FINISH event and manually setting the scale afterwards. Or use a 3rd party library like TweenLite.

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