0
Community Beginner
,
/t5/animate-discussions/motion-tween-and-actionscript-color-change/td-p/94460
Nov 11, 2008
Nov 11, 2008
Copy link to clipboard
Copied
Hello, I'm rather new to flash and actionscript, having been
introduced to Flash MX recently. Everything was flowing smoothly
until now. Here's the scenario:
I create a new document and create a Movie Clip symbol, then add a motion tween to it. So far, so good. Then I edit the symbol and on the first frame of the movie clip add the action "_alpha = 50;". Suddenly the motion tween ceases to function.
You can find a minimal fla file that exhibits the issue here: tweenproblem.fla
This problem has me totally stumped, as actions such as stop() and gotoAndPlay() in the same place don't affect the tween, while other color actions (such as Color.setTransform) display the same behavior. Any advice is much appreciated!
I create a new document and create a Movie Clip symbol, then add a motion tween to it. So far, so good. Then I edit the symbol and on the first frame of the movie clip add the action "_alpha = 50;". Suddenly the motion tween ceases to function.
You can find a minimal fla file that exhibits the issue here: tweenproblem.fla
This problem has me totally stumped, as actions such as stop() and gotoAndPlay() in the same place don't affect the tween, while other color actions (such as Color.setTransform) display the same behavior. Any advice is much appreciated!
TOPICS
ActionScript
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 Correct answer
Community Beginner
,
Nov 11, 2008
Nov 11, 2008
Thank you very much for your time kglad, however I managed to
find a workaround for the problem by simply converting the symbol
into a symbol again. It seems that only tweens in the immediate
parent are affected, so the new symbol can be tweened normally
while the original symbol is still affected by the actionscript.

Community Expert
,
/t5/animate-discussions/motion-tween-and-actionscript-color-change/m-p/94461#M244040
Nov 11, 2008
Nov 11, 2008
Copy link to clipboard
Copied
you can't combine timeline tweening and actionscript
tweening. use all one or all of the other.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
puck6633
AUTHOR
Community Beginner
,
/t5/animate-discussions/motion-tween-and-actionscript-color-change/m-p/94462#M244041
Nov 11, 2008
Nov 11, 2008
Copy link to clipboard
Copied
Hm, I see.. That's a rather strange limitation in Flash,
considering I'm not actually trying to change the color over time,
but only set it once based on a variable. Correct me if I'm wrong,
but I don't believe the flash interface allows you to set
components (such as alpha) based on a variable, so that's not an
option. My last question then is this: Is actionscript tweening
even possible in Flash MX? A google search brings up lots of
information about the Tween object, yet the actionscript reference
doesn't list it.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
/t5/animate-discussions/motion-tween-and-actionscript-color-change/m-p/94463#M244042
Nov 11, 2008
Nov 11, 2008
Copy link to clipboard
Copied
assigning a color will stop the tween.
alpha is a property, not a component. properties can be assigned using variables.
actionscript tweening is routine. you can code tweens yourself using setInterval() or onEnterFrame loops, you can use the flash Tween class (see the components section in the help files) or you can use one of several tween classes made by others that are superior to flash'es Tween class. tweenlite is my favorite.
alpha is a property, not a component. properties can be assigned using variables.
actionscript tweening is routine. you can code tweens yourself using setInterval() or onEnterFrame loops, you can use the flash Tween class (see the components section in the help files) or you can use one of several tween classes made by others that are superior to flash'es Tween class. tweenlite is my favorite.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Beginner
,
/t5/animate-discussions/motion-tween-and-actionscript-color-change/m-p/94464#M244043
Nov 11, 2008
Nov 11, 2008
Copy link to clipboard
Copied
Thank you very much for your time kglad, however I managed to
find a workaround for the problem by simply converting the symbol
into a symbol again. It seems that only tweens in the immediate
parent are affected, so the new symbol can be tweened normally
while the original symbol is still affected by the actionscript.

Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
LATEST
/t5/animate-discussions/motion-tween-and-actionscript-color-change/m-p/94465#M244044
Nov 11, 2008
Nov 11, 2008
Copy link to clipboard
Copied
you're welcome.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

