Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/lua/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache flex 如何使源路径动态化_Apache Flex_Flex3 - Fatal编程技术网

Apache flex 如何使源路径动态化

Apache flex 如何使源路径动态化,apache-flex,flex3,Apache Flex,Flex3,我是flex新手。我的问题是: <mx:HorizontalList id="horizontalList" height="100" columnCount="6" dataProvider="{arr}"> <mx:itemRenderer> <mx:Component> <mx:Image width="100" height="100" source="../../user/mahedi/weeding

我是flex新手。我的问题是:

<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>
我想使源路径动态。我的意思是我从php收集用户名和相册名,我可以用flex打印。但当我在源代码中这样使用时:
source=../../user/{userName}/{albumName}/album/{data} 我发现了一个错误。我怎样才能解决这个问题请帮帮我。

怎么样

source="{'../../user/' + username + '/' + albumName + '/album/' + data}"

source=../../user/{userName}/{albumName}/album/{data}当我设置此路径时,生成器为消息提供未定义属性userName的访问权限,其他属性的访问权限相同。是否有任何解决方案source={'../../user/'+userName+'/'+albumName+'/album/'+data}。当我设置此路径时,生成器还为消息提供未定义属性userName的访问权限,对其他属性也是如此。有任何解决方案,因为userName是一个变量。您需要在代码中声明它,并为其指定一个适当的值。[Bindable]公共变量用户名:String=Mahedi;