Question

I have a flex application that dynamically loads swfs and I want to to use a set of color pickers in an external component within the application to determine a color array in the loaded swf.

I figured that I can use a new array of the colorPickers, i.e.

public var colors:Array  = new Array [ cp01.selectedColor, cp02.selectedColor, cp03.selectedColor, cp04.selectedColor, cp05.selectedColor]

Is it possible for the swf to read the Array if it's set up like that? If so what would I put into the swf to get it? If not what do I need to do?

Was it helpful?

Solution

you can create an array of pickers and use it as follows:

    private var pickers:Array  = new Array [ cp01, cp02, cp03, cp04, cp05];
    public function getColorByPickerNumber(n:int):int {
        return pickers[n] ? pickers[n]['selectedColor'] : 0;
    }

you can also use binding

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top