Another HTML5 Issue

JeffreyDriver

  • *
  • Posts: 2152
When I clicked on my game after pausing and then unpausing it, it freezes.


Uncaught TypeError: Cannot read property 'scrollFactorX' of null
    at com_stencyl_models_Actor.isMouseOver (Actor.hx:3365)
    at Design_174_174_PauseBTN.hx:313
    at com_stencyl_Engine.update (Engine.hx:2516)
    at com_stencyl_Engine.postUpdate (Engine.hx:2803)
    at com_stencyl_Engine.onUpdate (Engine.hx:2795)
    at openfl_events__$EventDispatcher_Listener.f [as callback] (Tools.hx:756)
    at openfl_display_Stage.__dispatchEvent (EventDispatcher.hx:443)
    at openfl_display_Stage.__dispatch (DisplayObject.hx:1237)
    at openfl_display_Stage.__broadcastEvent (Stage.hx:1593)
    at openfl_display_Stage.render (Stage.hx:1434)


I've tracked it down to a 'if mouse is over' block, as if I remove that block, the game doesn't freeze. It's not the blocks wrapped in that as I've stuck that code in without the 'if mouse' and the code will run.

There's also some code in a custom event that if I remove stops the issue. I just can't figure out what the exact problem is. This only occurs in HTML5.
Current Projects:
The Grand Grimoire Chronicles Episode 1 now on Kongregate!.
I always appreciate useful feedback. Thank you.
www.jeffreydriver.co.uk

JeffreyDriver

  • *
  • Posts: 2152
The problem appeared to be the 'mouse is over' block. No idea why.

By replacing that block with some code to manually check if the mouse was over an actor has fixed it.
Current Projects:
The Grand Grimoire Chronicles Episode 1 now on Kongregate!.
I always appreciate useful feedback. Thank you.
www.jeffreydriver.co.uk

Justin

  • *
  • Posts: 4337
Is the BTN Hint actor alive?

For Live Support: Join our discord server and ping me @justin.
I'm most often available between 8am and midnight Japan time. (GMT+9)