eggnogg
05-07-2003, 03:23 PM
heya
i found a bug! probably it's just a script thing but who cares? i do!
I got a comboBox with a few items on the list, in _root.form and a dynamic text box to display the item's price. I had a button that:
on (Click) { _root.form.mcInstance.getSelectedItem().data; }
but i had to change the way the price was showed, so that on ("over item, from drop down list, of component") { _root.form.mcInstance.getSelectedItem().data; }
//so that when i roll the mouse on an item it automaticly returnas the price of it, without having to click any buttons to do so.
.
To do this i just created a new MC inside the form clip to be used as a loop, with two frames. on the first frame i put this code:
_parent.b1 = (_parent.processador.getSelectedItem().data);
//this gets the value of the "selected" item and iquals b1 (which is the dynamic text box's variable) to the selected item's data (price)
...leaving the second frame empty.!This makes the dynamic price text box return the price on the item that the mouse in on, every 0.01 seconds. so far so good? :D
now, the component has the first item set to blank, with "- - -" as the value and "zero" being the data associated. this leads me to The problem! : [u]when i drop down the menu and i put the mouse over an item, the price appears, (cool!) but if i do this and move the mouse out of the component's area and click anywhere on the stage, the menu will go up (drop up!), the item where the mouse was over does'nt stay select ( the top item "- - -" is "auto-selected" ), BUT the price of the previous item i was about to click remains in the dynamic text box, and does NOT update to the data "zero"! :/
summary: if you drop down a D.D. menu, select an item without actually clicking on it, flash recognizes it as being selected, but in reality what the component shows is that it IS NOT selected!!
i dunno what the hell's wrong with this! the script is correct (it works, although there might be a more appropriate script for this) but still, i call that a bug, dont you?!
i hope someone can gimme a hint on a more reliable script for this!
regards,
eggnogg :cool:
i found a bug! probably it's just a script thing but who cares? i do!
I got a comboBox with a few items on the list, in _root.form and a dynamic text box to display the item's price. I had a button that:
on (Click) { _root.form.mcInstance.getSelectedItem().data; }
but i had to change the way the price was showed, so that on ("over item, from drop down list, of component") { _root.form.mcInstance.getSelectedItem().data; }
//so that when i roll the mouse on an item it automaticly returnas the price of it, without having to click any buttons to do so.
.
To do this i just created a new MC inside the form clip to be used as a loop, with two frames. on the first frame i put this code:
_parent.b1 = (_parent.processador.getSelectedItem().data);
//this gets the value of the "selected" item and iquals b1 (which is the dynamic text box's variable) to the selected item's data (price)
...leaving the second frame empty.!This makes the dynamic price text box return the price on the item that the mouse in on, every 0.01 seconds. so far so good? :D
now, the component has the first item set to blank, with "- - -" as the value and "zero" being the data associated. this leads me to The problem! : [u]when i drop down the menu and i put the mouse over an item, the price appears, (cool!) but if i do this and move the mouse out of the component's area and click anywhere on the stage, the menu will go up (drop up!), the item where the mouse was over does'nt stay select ( the top item "- - -" is "auto-selected" ), BUT the price of the previous item i was about to click remains in the dynamic text box, and does NOT update to the data "zero"! :/
summary: if you drop down a D.D. menu, select an item without actually clicking on it, flash recognizes it as being selected, but in reality what the component shows is that it IS NOT selected!!
i dunno what the hell's wrong with this! the script is correct (it works, although there might be a more appropriate script for this) but still, i call that a bug, dont you?!
i hope someone can gimme a hint on a more reliable script for this!
regards,
eggnogg :cool: