- in flash 9, create a new movieclip and add to it a List component.
- create a classe for the movieclip.
- add in the class a constructor with the following content:
myList.dataProvider.addItem({label:"test",data:0}); - run it and expect to see a list with a line "test". But because of some kind of bug, nothing appears in the list.
mardi 12 mai 2009
Thou shall not touch Lists at the Beginning
As strange as it looks like, if you try to access to the dataProvider of a List created in flash from the constructor of a class associated to a movieclip that owns the list, you'll get a bug. In fact, it seems that the dataProvider of the list object is initialized after the constructor of the parent movieclip is executed, meaning that whatever you do with the list or its dataProvider in the constructor will not be shown.
Very simple example:
lundi 11 mai 2009
The List won't listen
Once again I'm fighting with the component List and its dataProvider. For some reason it refuses to do the simplest update when I do a removeAll() or an AddItem() if the script is executed inside a class of the parent movieclip. This just doesn't make sense.
Inscription à :
Articles (Atom)