Actionscript 3 从actionscript3访问flex中的图像组件
我在flex中有一个图像组件(mxml文件),如下所示Actionscript 3 从actionscript3访问flex中的图像组件,actionscript-3,apache-flex,Actionscript 3,Apache Flex,我在flex中有一个图像组件(mxml文件),如下所示 <mx:image id="imageID"/> 但是图像没有显示出来 所以我的问题是,我们如何访问actionscript类中mxml页面中声明的图像组件。根据上面的答案判断,您只需要将您的hello\u world类转换为位图: init() { ................. imageID.source = new hello_world() as Bitmap; ....................
<mx:image id="imageID"/>
但是图像没有显示出来
所以我的问题是,我们如何访问actionscript类中mxml页面中声明的图像组件。根据上面的答案判断,您只需要将您的hello\u world
类转换为位图
:
init()
{
.................
imageID.source = new hello_world() as Bitmap;
....................
}
试试这个
imageID.source=hello\u world …还有?你忘了问一个问题,我为你的疏忽道歉。谢谢你指出这个问题@BrianAh,现在我明白了。
init()
{
.................
imageID.source = new hello_world() as Bitmap;
....................
}