Copy link to clipboard
Copied
I have a couple of programs where a ComboBox is used to change frames. Mostly it works okay but if the ComboBox is held open and the mouse pointer is moved back and forwards repeatedly over the options (sort of thing you do when Debugging) I get the error:
ypeError: Error #1009: Cannot access a property or method of a null object reference.
at fl.controls::ComboBox/close()
at fl.controls::ComboBox/onListItemUp()
This only happens on ComboBoxes where the options are used to change frames. An example of the code i use is below
CalcCombo.addEventListener(Event.CHANGE, CalcSelectPage);
function CalcSelectPage (event:Event):void
{
if (CalcCombo.selectedItem.label == "FLOW") {
gotoAndStop(3);
}
else if (CalcCombo.selectedItem.label == "EFFICIENCY") {
gotoAndStop(4);
}
else if (CalcCombo.selectedItem.label == "POWER") {
gotoAndStop(2);
}
}
Does anybody know whats going on?
I had a "Eureka" moment and fixed it.
I needed one ComboBox spanning two frames instead of two ComboBoxes now in each frame.
Easy when you know how!
Copy link to clipboard
Copied
there's a bug in animate cc 2017. i think you'll need to create your own combobox or use an earlier version of animate.
Copy link to clipboard
Copied
I tried running it in 2015 R2. Same issue I don't think this is related to a bug with the ComboBox
I think it has something to do with changing frames and then having a ComboBox in the same position in the next frame.
Copy link to clipboard
Copied
create a new fla with your 2015 version and add a combobox and add one or more items to the dataprovider.
test.
any problem?
Copy link to clipboard
Copied
Yeah just tried it same results. I will redesign to avoid using ComboBoxes to switch frames.
Copy link to clipboard
Copied
I had a "Eureka" moment and fixed it.
I needed one ComboBox spanning two frames instead of two ComboBoxes now in each frame.
Easy when you know how!