views:

29

answers:

2

I am using a titleWindow as a container for a popup (flex 3.5). I want to set the title of the window using a variable. Any idea, how do we do that?

A: 

titleWindow.title = "myTitle"

PeZ
+3  A: 

What is the type of your variable? Also, do you want to set this in ActionScript or MXML?

If you want to set it in MXML, just do:

<mx:TitleWindow title="{myVariable}" />

In ActionScript its just:

titleWindow.title = myVariable;

If your variable is not a String, you'll need to call toString() prior to setting it.

clownbaby