# Dynamic parameters and properties

**URL:** <https://forum.kirupa.com/t/dynamic-parameters-and-properties/325433>\
**Category:** flash\
**Created:** [October 15, 2011, 2:57am UTC](https://forum.kirupa.com/t/dynamic-parameters-and-properties/325433 "2011-10-15T02:57:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GiGaGiG](https://avatars.discourse-cdn.com/v4/letter/g/a88e57/32.png) [@GiGaGiG](https://forum.kirupa.com/u/GiGaGiG)\
**Post date:** [October 15, 2011, 2:57am UTC](https://forum.kirupa.com/t/dynamic-parameters-and-properties/325433/1 "2011-10-15T02:57:21Z")

</div>

Hi everyone!  
I am converting the tweens in a project from the standard Flash tweens to TweenLite/Max, but I have encountered a problem, I mean something I don’t know how to do, or if it is possible to do.  
Let’s see an example:

old tween:

```auto
[COLOR=#008000]new Tween(page1, transitionType, Regular.easeOut, BStart, BEnd, transitionSpeed, true);
[/COLOR]

```

where  
“transitionType” is a String: “x”, “y”, “rotationY” or “alpha”  
“BStart” and “BEnd” are the initial and final values of the tween.

The TweenLite version is:

```auto
[COLOR=#008000]page1.x = BStart;
TweenLite.to(page1, transitionSpeed, {x : BEnd});
[/COLOR]

```

I don’t know how to set the start and end point in the same line of the tween, so I first set the initial coordinate of “page1” and then move it by the tween. Anyway this is not the real problem.  
The problem I stumbled onto is: how do I dynamically set the transitionType for the tween?  
I would need something like

```auto
[COLOR=#008000]page1.[/COLOR][COLOR=#b22222] **#transitionType#** [/COLOR][COLOR=#008000] = BStart;
TweenLite.to(page1, transitionSpeed, {[/COLOR][COLOR=#b22222] **#transitionType#** [/COLOR][COLOR=#008000] : BEnd});
[/COLOR]

```

to avoid to switch between the 4 (and more) possible transitionTypes.

In the first line I could write [COLOR=#008000]page1[transitionType][/COLOR], ok, but if I had [COLOR=#008000]pages[“page”+i][/COLOR] instead of [COLOR=#008000]page1[/COLOR]? I think I should use an alias, right? [COLOR=#008000]pages[“page”+i][transitionType][/COLOR] is totally wrong.

```auto
[COLOR=#008000]var mickey:MovieClip = pages["page"+i];
mickey[transitionType] = BStart;
[/COLOR]

```

I can’t try this now, it is just a guess…  
Anyway… how do I set dynamic parameters and properties? Mumble mumble

Thanks!  
:look:
