--- In [email protected], "criptopus" <sd_br...@...> wrote:
>
> I have an array of Video Players (yes video players, if people set up more 
> than one in the CMS why should I deny them the luxury).
> 
> I have just opened a preview window and there they are and they play lovely, 
> just when I click the cross to close the TitleWindow they are displayed in I 
> would like to stop them all playing.
> 
> Fortunately or unfortunately I have references to the custom players in an 
> array I was going to make public so that the calling program that opened the 
> pop up could close all those that where playing.
> 
> The the problem, don't seem to be able to make an array public, it will let 
> me define it as public but it does not like me referencing it.

What you're probably experiencing (though "doesn't like me referencing it" is 
SO vague this is just a guess) is that the default data binding Flex sets up 
for you when you use {} notation does not fire when an element of an array 
changes.  Instead, it will only fire if the entire array changes.  This is why 
God invented the ArrayCollection.

You have several choices if this is, in fact, your problem:

1) Switch to an AC
2) Manually dispatch a property change event for the array that is a property 
of the object.
3) Replace the entire array object with a different array object with your 
desired values every time.

Check out this preso for more information 
http://tv.adobe.com/watch/360flex-conference/diving-in-the-data-binding-waters-by-michael-labriola/

HTH;

Amy

Reply via email to