# \[AS3\] One out of three Tweens not working

**URL:** <https://forum.kirupa.com/t/as3-one-out-of-three-tweens-not-working/296408>\
**Category:** flash\
**Created:** [September 14, 2009, 7:30pm UTC](https://forum.kirupa.com/t/as3-one-out-of-three-tweens-not-working/296408 "2009-09-14T19:30:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![serius](https://avatars.discourse-cdn.com/v4/letter/s/67e7ee/32.png) [@serius](https://forum.kirupa.com/u/serius)\
**Post date:** [September 14, 2009, 7:30pm UTC](https://forum.kirupa.com/t/as3-one-out-of-three-tweens-not-working/296408/1 "2009-09-14T19:30:14Z")

</div>

Hello,  
I am a beginner in Flash and just trying to make a little image gallery with some eye candy.  
The following code is a part of my script (with unnecessary things removed). At the bottom there are three Tweens to enlarge and fade-in the newly created image.

My problem is that only two of these tweens are working. If I comment out one of the tweens the other two work, but as it is right now the “scaleX”-Tween does not work.

```
 ActionScript Code:
 [LEFT][COLOR=#000000] **var** [/COLOR] xmlRequest:URLRequest=[COLOR=#000000] **new** [/COLOR] URLRequest[COLOR=#000000]([/COLOR][COLOR=#ff0000]"imageData.xml"[/COLOR][COLOR=#000000])[/COLOR];

```

[COLOR=#000000] **var** [/COLOR] xmlLoader:URLLoader=[COLOR=#000000] **new** [/COLOR] URLLoaderCOLOR=#000000[/COLOR];  
[COLOR=#000000] **var** [/COLOR] imgData:[COLOR=#0000ff]XML[/COLOR];

[COLOR=#000000] **var** [/COLOR] imageLoader:Loader;  
[COLOR=#000000] **var** [/COLOR] rawImage:[COLOR=#0000ff]String[/COLOR];

xmlLoader.[COLOR=#000080]addEventListener[/COLOR][COLOR=#000000]([/COLOR]Event.[COLOR=#000080]COMPLETE[/COLOR], xmlLoaded[COLOR=#000000])[/COLOR];

[COLOR=#000000] **function** [/COLOR] xmlLoadedCOLOR=#000000[/COLOR]:[COLOR=#0000ff]void[/COLOR] [COLOR=#000000]{[/COLOR]  
imgData=[COLOR=#000000] **new** [/COLOR] [COLOR=#0000ff]XML[/COLOR]COLOR=#000000[/COLOR];  
rawImage=imgData.[COLOR=#000080]image[/COLOR][COLOR=#000000][[/COLOR][COLOR=#000080]0[/COLOR][COLOR=#000000]][/COLOR].[COLOR=#000080]imgURL[/COLOR];  
imageLoader=[COLOR=#000000] **new** [/COLOR] Loader;  
imageLoader.[COLOR=#0000ff]load[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000] **new** [/COLOR] URLRequestCOLOR=#000000[/COLOR][COLOR=#000000])[/COLOR];

```
     [COLOR=#000000] **var** [/COLOR] h=imgData.[COLOR=#000080]image[/COLOR][COLOR=#000000][[/COLOR][COLOR=#000080]0[/COLOR][COLOR=#000000]][/COLOR].[COLOR=#000080]imgHeight[/COLOR];
     [COLOR=#000000] **var** [/COLOR] w=imgData.[COLOR=#000080]image[/COLOR][COLOR=#000000][[/COLOR][COLOR=#000080]0[/COLOR][COLOR=#000000]][/COLOR].[COLOR=#000080]imgWidth[/COLOR];

     canvas_mc.[COLOR=#000080]addChild[/COLOR][COLOR=#000000]([/COLOR]imageLoader[COLOR=#000000])[/COLOR];
   
     [COLOR=#000000] **var** [/COLOR] tween1:Tween=[COLOR=#000000] **new** [/COLOR] Tween[COLOR=#000000]([/COLOR]canvas_mc, [COLOR=#ff0000]"alpha"[/COLOR], Regular.[COLOR=#000080]easeOut[/COLOR], [COLOR=#000080]0[/COLOR], [COLOR=#000080]1[/COLOR], [COLOR=#000080]4[/COLOR], [COLOR=#000000] **true** [/COLOR][COLOR=#000000])[/COLOR];
     [COLOR=#000000] **var** [/COLOR] tween2:Tween=[COLOR=#000000] **new** [/COLOR] Tween[COLOR=#000000]([/COLOR]canvas_mc, [COLOR=#ff0000]"scaleX"[/COLOR], Regular.[COLOR=#000080]easeOut[/COLOR], [COLOR=#000080]0[/COLOR], [COLOR=#000080]1[/COLOR], [COLOR=#000080]4[/COLOR], [COLOR=#000000] **true** [/COLOR][COLOR=#000000])[/COLOR];
     [COLOR=#000000] **var** [/COLOR] tween3:Tween=[COLOR=#000000] **new** [/COLOR] Tween[COLOR=#000000]([/COLOR]canvas_mc, [COLOR=#ff0000]"scaleY"[/COLOR], Regular.[COLOR=#000080]easeOut[/COLOR], [COLOR=#000080]0[/COLOR], [COLOR=#000080]1[/COLOR], [COLOR=#000080]4[/COLOR], [COLOR=#000000] **true** [/COLOR][COLOR=#000000])[/COLOR];

```

[COLOR=#000000]}[/COLOR]  
[/LEFT]

Does anyone know why and how I can fix this? I’d appreciate some help 😛

PS: The script is kind of messed up… can’t format it. Sorry about that.
