Flex Panel and call on jsx file
Posted: Mon Mar 05, 2012 8:05 pm
I am new to the scene and learning to develop PS panels designed in Flex. I am trying to create a simple function in a jsx file that will be called on when clicking a button. Here is what I have that I cannot get to work. I have both the swf file and the jsx file in the proper directory and named the same.
Code: Select allimport com.adobe.csxs.core.CSXSInterface;
protected function jsButton():void {
var result:SyncRequestResult = CSXSInterface.instance.evalScript("sayHello");
}
<mx:Button x="183" y="121" label="Open " width="82" click="jsButton()"/>
from the jsx file
Code: Select allfunction sayHello () {
alert("Hello");
}
Code: Select allimport com.adobe.csxs.core.CSXSInterface;
protected function jsButton():void {
var result:SyncRequestResult = CSXSInterface.instance.evalScript("sayHello");
}
<mx:Button x="183" y="121" label="Open " width="82" click="jsButton()"/>
from the jsx file
Code: Select allfunction sayHello () {
alert("Hello");
}