• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

ComboBox Used to Change Frames

Explorer ,
Dec 03, 2016 Dec 03, 2016

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?

Views

462

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Dec 09, 2016 Dec 09, 2016

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!

Votes

Translate

Translate
Community Expert ,
Dec 03, 2016 Dec 03, 2016

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 05, 2016 Dec 05, 2016

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 05, 2016 Dec 05, 2016

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 08, 2016 Dec 08, 2016

Copy link to clipboard

Copied

Yeah just tried it same results.  I will redesign to avoid using ComboBoxes to switch frames.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 09, 2016 Dec 09, 2016

Copy link to clipboard

Copied

LATEST

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!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines