<?xml version=“1.0” encoding=“utf-8”?>
<mx:Application xmlns:mx=“http://www.adobe.com/2006/mxml” layout=“vertical” horizontalAlign=“center”>
<mx:Script>
<![CDATA[
[Bindable]
[Embed(source="/assets/images/helpfulDocs.png")]
private var helpDocs:Class;
private function onClickfunc(s:String):void{
trace("string is " + s);
myImage.source = s as Class;
}
]]>
</mx:Script>
<mx:VBox>
<mx:Image id="myImage" />
<mx:Button id="simpleButton" label="provideArray" click="{onClickfunc('helpDocs')}" />
</mx:VBox>
</mx:Application>
============
Q : Is there any way to somehow use the string value of onClickFunc function to use the class object with whom i embed the image . Like with passing “helpDocs” string , can I use that string value some how to access helpDocs:Class ??
Its not possible i guess but just out of curiosity