Motion tween and actionscript color change

This is a discussion on Motion tween and actionscript color change within the Macromedia Flash forums in Adobe Tools category; Hello, I'm rather new to flash and actionscript, having been introduced to Flash MX recently. Everything was flowing smoothly until recently. 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: http://www.newmoongames.org/tweenproblem.fla This problem has me totally stumped, as actions such as stop() and gotoAndPlay() in ...

Go Back   Application Development Forum > Adobe Tools > Macromedia Flash

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 11-11-2008, 03:51 AM
puck6633
Guest
 
Default Motion tween and actionscript color change

Hello, I'm rather new to flash and actionscript, having been introduced to
Flash MX recently. Everything was flowing smoothly until recently. 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:
http://www.newmoongames.org/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!

Reply With Quote
  #2  
Old 11-11-2008, 01:04 PM
kglad
Guest
 
Default Re: Motion tween and actionscript color change

you can't combine timeline tweening and actionscript tweening. use all one or all of the other.
Reply With Quote
  #3  
Old 11-11-2008, 02:04 PM
puck6633
Guest
 
Default Re: Motion tween and actionscript color change

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 one based on a
variable. Correct me if I'm wrong, but I don't believe the flash itnerface
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.

Reply With Quote
  #4  
Old 11-11-2008, 03:13 PM
kglad
Guest
 
Default Re: Motion tween and actionscript color change

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.

Reply With Quote
  #5  
Old 11-11-2008, 03:18 PM
puck6633
Guest
 
Default Re: Motion tween and actionscript color change

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. :grin;

Reply With Quote
  #6  
Old 11-11-2008, 03:39 PM
kglad
Guest
 
Default Re: Motion tween and actionscript color change

you're welcome.
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 12:58 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.