Button with null graphics context

Bug #1050308 reported by Jean-Baptiste Richardet
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
jeash
New
Undecided
Unassigned

Bug Description

Hi,

I'm using NME to export to HTML5 and I tried adding a SimpleButton to the scene.

I'm loading the button with nme.Assets, I double-check the location of my PNG and I tried :
"var buttonIcon = new jeash.display.Bitmap(nme.installer.Assets.getBitmapData("assets/button_blue_play.png"));
  buttonIcon.name = "buttonIcon";
  this.button = new jeash.display.SimpleButton(buttonIcon,buttonIcon,buttonIcon,buttonIcon);
  this.button.name = "continue";"

But when I load my page, I get "uncaught exception: [SimpleButton name=continue id=NXAA2KKB-JBVJ-HMEX-ERTG-3TJXELFN1XY9] tried to add to stage with null graphics context"

I use an alert to show this.button.upState, and it was buttonIcon.

Where is the missing graphic ?

Thanks

Tags: button graphic
Revision history for this message
Jean-Baptiste Richardet (jbrichardet) wrote :

I just looked up jeash.display.SimpleButton.hx and I noticed there is no override of the function jeashGetGraphics(). So it uses the DisplayObject implementation, which returns always null.

Did I miss something or is it a bug ?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.