# Tween in AS doen't read string

**URL:** https://forum.kirupa.com/t/tween-in-as-doent-read-string/211789
**Category:** flash
**Created:** [January 5, 2007, 3:43am UTC](https://forum.kirupa.com/t/tween-in-as-doent-read-string/211789 "2007-01-05T03:43:48Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Jelle](https://avatars.discourse-cdn.com/v4/letter/j/ce73a5/32.png) [@Jelle](https://forum.kirupa.com/u/Jelle)
#### Post date: [January 5, 2007, 3:43am UTC](https://forum.kirupa.com/t/tween-in-as-doent-read-string/211789/1 "2007-01-05T03:43:48Z")

</div>

Hi all

The problem:  
When you push a button, a mc (clip1) starts moving via AS  
That works fine if you type clip1 directly “into the tween”  
But when you do it like this, it fails. But when you trace it, you get “clip1”:  
[INDENT]

```auto
import mx.transitions.Tween;
import mx.transitions.easing.*;

button.onRelease = function(){
   variable = "clip"+1;
   trace(variable);
   var myTween:Tween = new Tween(variable, "_x", Strong.easeOut, 100, 500,1, true);
}

```

[/INDENT]here’s the fla:  
[http://jellebullaert.be/school/vraag.rar](http://jellebullaert.be/school/vraag.rar)

thanks in advance  
Jelle
