A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: _width property not updating in real time

  1. #1
    An Average User warpdesign's Avatar
    Join Date
    Apr 2002
    Location
    Southern California
    Posts
    331

    _width property not updating in real time

    Hi,
    I have a function on my root timeline that's running onEnterFrame that I want to update the x pos. of some movie clips based on the width of the movie clips. I'm animating the width of the movie clips with shape tweens. The problem I'm having is, the property movieclip._width isn't getting updated until after the animation finishes, so instead of a smooth transition it just updates from one frame to the next. I traced the value of _width to the output window just to verify what was happening and it's not updating the _width value until the animation finishes.

    How can I get the current width of a movie clip that is being animated to be updated in real time?
    You know what they say:
    Teach a man to fish and you feed him for a lifetime.
    Unless he doesn't like sushi—then you also have to teach him to cook.

  2. #2
    An Average User warpdesign's Avatar
    Join Date
    Apr 2002
    Location
    Southern California
    Posts
    331
    I think maybe I need some kind of listener??
    You know what they say:
    Teach a man to fish and you feed him for a lifetime.
    Unless he doesn't like sushi—then you also have to teach him to cook.

  3. #3
    An Average User warpdesign's Avatar
    Join Date
    Apr 2002
    Location
    Southern California
    Posts
    331
    OK, so the problem is that it's a shape tween. I created an example of the problem attached... But I can't use a motion tween because my clip has rounded corners that get messed up and also I'm animating a gradient at the same time. So is there a way to get the current width of a movie clip that has a shape tween in it?
    Attached Files Attached Files
    You know what they say:
    Teach a man to fish and you feed him for a lifetime.
    Unless he doesn't like sushi—then you also have to teach him to cook.

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