Markus Markus - 1 year ago 117
ActionScript Question

Making class vars available to external itemRenderer classes

I made a custom itemRenderer, and need to access a variable in my Project file (mxml). How can I make my public var available in the custom itemRenderer file?

public function lang_f(trans_short:String):String{
if(outerDocument.language == "de"){
...
}
}


Greetings
Markus

Answer Source

To go along with Constantiner's answer, if you still need to access that variable, you can access the variable in your itemRenderer using outerDocument:

outerDocument.myVariableName