Whether it "makes sense" or not, Helmut is right and this is how it works. Changing the value of a property dynamically via code /detaches/ it from any tweening applied by the timeline. The ideal solution is have a container inside of it. Or, really, don't use the timeline tweening at all.

Zeh

Boon Chew wrote:
Hmm, this doesn't make sense. The property of an object should be allowed to change since it's not changed during an actual tween. Also, the property involved is not what's being tweened, so why would it nullify a tween done on it at a different time? - boon

--- On Wed, 7/30/08, Helmut Granda <[EMAIL PROTECTED]> wrote:

From: Helmut Granda <[EMAIL PROTECTED]>
Subject: Re: [Flashcoders] Modifying movieclip property kills tween
To: "Flash Coders List" <[email protected]>
Date: Wednesday, July 30, 2008, 1:49 PM

This is the proper behavior since you are overriding the properties of the
object itself. Such as if you were overriding the x, y, scale properties.
You can wrap the object into a container and edit the properties of the
container that then will be reflected into its child, in this case the
"box".


On Wed, Jul 30, 2008 at 2:13 PM, Boon Chew <[EMAIL PROTECTED]> wrote:

Hi all, I ran into something strange whereby if I modify a movieclip's
property (say alpha), it would kill the tween that will take place later
that involves the movieclip.  Wonder if anyone has run into this?

1) In a test FLA, create a movieclip called "test".  Inside
"test", create
two frames, "start" on frame 2 and "end" on whatever
(say frame 30).
2) Put a movieclip called "box" on timeline and tween it from
"start" to
"end".
3) In the main timeline, add this:
stage.addEventListener(MouseEvent.MOUSE_DOWN, click);

function click(event:MouseEvent):void
{
    test.box.alpha = 1;  // <-- changing alpha value causes the tween
to
stop working, comment this out and tween works
    test.gotoAndPlay("start");  // tween test.box by moving it
across the
stage
}


- boon




_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to