PDA

View Full Version : flash bgus in component, part 2


eggnogg
05-08-2003, 09:47 AM
heya ppl

if u red the first part, you'll see that i made some changes to the script...


_parent.processador.setSelectedIndex(_parent.proce ssador.getSelectedItem().data);
_parent.b1 = (_parent.processador.getSelectedItem().data);
_parent.motherboard.setSelectedIndex(_parent.mothe rboard.getSelectedItem().data);
_parent.b2 = (_parent.motherboard.getSelectedItem().data);
_parent.dissipador.setSelectedIndex(_parent.dissip ador.getSelectedItem().data);
_parent.b3 = (_parent.dissipador.getSelectedItem().data);
_parent.memoriaRam.setSelectedIndex(_parent.memori aRam.getSelectedItem().data);
_parent.b4 = (_parent.memoriaRam.getSelectedItem().data);
_parent.discoRigido.setSelectedIndex(_parent.disco Rigido.getSelectedItem().data);
_parent.b5 = (_parent.discoRigido.getSelectedItem().data);
_parent.monitor.setSelectedIndex(_parent.monitor.g etSelectedItem().data);
_parent.b6 = (_parent.monitor.getSelectedItem().data);
_parent.placaGrafica.setSelectedIndex(_parent.plac aGrafica.getSelectedItem().data);
_parent.b7 = (_parent.placaGrafica.getSelectedItem().data);
_parent.placaSom.setSelectedIndex(_parent.placaSom .getSelectedItem().data);
_parent.b8 = (_parent.placaSom.getSelectedItem().data);
_parent.fdd.setSelectedIndex(_parent.fdd.getSelect edItem().data);
_parent.b9 = (_parent.fdd.getSelectedItem().data);
_parent.cdrom.setSelectedIndex(_parent.cdrom.getSe lectedItem().data);
_parent.b10 = (_parent.cdrom.getSelectedItem().data);
_parent.cdrw.setSelectedIndex(_parent.cdrw.getSele ctedItem().data);
_parent.b11 = (_parent.cdrw.getSelectedItem().data);
_parent.dvd.setSelectedIndex(_parent.dvd.getSelect edItem().data);
_parent.b12 = (_parent.dvd.getSelectedItem().data);
_parent.colunas.setSelectedIndex(_parent.colunas.g etSelectedItem().data);
_parent.b13 = (_parent.colunas.getSelectedItem().data);
_parent.teclado.setSelectedIndex(_parent.teclado.g etSelectedItem().data);
_parent.b14 = (_parent.teclado.getSelectedItem().data);
_parent.rato.setSelectedIndex(_parent.rato.getSele ctedItem().data);
_parent.b15 = (_parent.rato.getSelectedItem().data);
_parent.placaRede.setSelectedIndex(_parent.placaRe de.getSelectedItem().data);
_parent.b16 = (_parent.placaRede.getSelectedItem().data);
_parent.caixa.setSelectedIndex(_parent.caixa.getSe lectedItem().data);
_parent.b17 = (_parent.caixa.getSelectedItem().data);
_parent.modemISDN.setSelectedIndex(_parent.modemIS DN.getSelectedItem().data);
_parent.b18 = (_parent.modemISDN.getSelectedItem().data);
_parent.impressora.setSelectedIndex(_parent.impres sora.getSelectedItem().data);
_parent.b19 = (_parent.impressora.getSelectedItem().data);
_parent.scanner.setSelectedIndex(_parent.scanner.g etSelectedItem().data);
_parent.b20 = (_parent.scanner.getSelectedItem().data);
_parent.webcam.setSelectedIndex(_parent.webcam.get SelectedItem().data);
_parent.b21 = (_parent.webcam.getSelectedItem().data);
_parent.softwareSO.setSelectedIndex(_parent.softwa reSO.getSelectedItem().data);
_parent.b22 = (_parent.softwareSO.getSelectedItem().data);
_parent.softwareAV.setSelectedIndex(_parent.softwa reAV.getSelectedItem().data);
_parent.b23 = (_parent.softwareAV.getSelectedItem().data);
_parent.softwareExtra.setSelectedIndex(_parent.sof twareExtra.getSelectedItem().data);
_parent.b24 = (_parent.softwareExtra.getSelectedItem().data);


for those of you who didn't read thefirst part, what this script does is it automaticly sets the selected item from each of the comboBoxes i created (every two lines refers to one comboBox), without clicking on the item, at automaticly retrieves the data of that item into a dynamic text box. processador, motherboard, etc are the components and b1, b2, etc are the dynamic boxes asociated to each component.

this works very well actually, except for the fact that it slows down the process as this piece of code is red every 0.01seconds (i put the frame rate at 100fps so that i could refresh fast!!)

probably functions would be the answer but if anybody has a better idea for this, PLEASE let me know!!

regards, eggnogg :confused: