I have main A and a component B in my program.
In main I display B with no data with id ="D". when I click a button form main A, result is calculated and transfer to component B.
In B have a function C to display data.
at the beginning, I declared C as public static, I can call C in main A but it didn't know D.
What do I have to do?
you can remove static and call this function D.C() Or call B.C() if you save function as static.
I can't call B.C because it didn't recongnize the id D ( id of canvas used to display data) in component B.
I used Appication.application.B.C it dont work too
static function you can call from any place.
B should be the name of your component (name of the file *.as or *.mxml)