tags:

views:

106

answers:

1

hi, i'm new in flex.Here is my problem

<mx:HorizontalList id="horizontalList" height="100" columnCount="6" dataProvider="{arr}">      
 <mx:itemRenderer>
  <mx:Component>
 <mx:Image width="100" height="100" source="../../user/mahedi/weeding/album/{data}"/>
  </mx:Component>
 </mx:itemRenderer>
</mx:HorizontalList>

i want to make source path dynamic. i mean i collected userName and albumName from php and i could print in flex.But when i use in source like this this way source="../../user/{userName}/{albumName}/album/{data}" i fond error. how can i solve that please help me

A: 

How about

source="{'../../user/' + username + '/' + albumName + '/album/' + data}"
Christophe Herreman
Thank you very much for your reply
Mahedi
source="{'../../user/' + username + '/' + albumName + '/album/' + data}".when i set this path the builder also give message access of undifined property userName and same for other.Have any solution
Mahedi
That is because userName is a variable. You need to declare it in your code and assign it a proper value.[Bindable] public var userName:String = "Mahedi";
Christophe Herreman
Thank you very much.
Mahedi