v68+ keys quite buggy

Monkey Targets Forums/Flash/v68+ keys quite buggy

Goodlookinguy(Posted 2013) [#1]
Update: This was a bug affecting more than Flash and was solved - http://www.monkeycoder.co.nz/Community/posts.php?topic=4863

I'm looking here to see if anyone else has been having the issues I've been experiencing since v68.

These include

- KeyHit acting like KeyDown after 2 updates pass
- I noticed reflection is acting extremely buggy, but this issue may be related to the keys and I just couldn't tell.

If I can get some confirmation that other people are having these issues, that'd be great. That way I can put up a bug report. If on the other hand, these issues aren't happening for you or other people. What version of Flex are you using?

Edit / Extra Notes: I built the same program for both v66 and v68/69. v66 works correctly and v68/69 doesn't, so I don't believe this is a flash player issue.


MikeHart(Posted 2013) [#2]
Which Flex version to you use? Windows, Linux or OSX?


Goodlookinguy(Posted 2013) [#3]
Adobe Flex 4.6, Windows and OSX.

Edit: I see that it's all the way up to 4.9 now. However, how much has changed in mojo that would cause such issues with the keys?


AndroidAndy(Posted 2013) [#4]
I doubt that it is the Flex framework version since trans/mojo don't use the Flex framework. Trans/mojo deal only with AS3 output compiled to swf with the mxmlc compiler. I would suggest using your favorite diff tool ( kdiff ) and compare the .as output on the v66 build with the output on v68/69, you will see the difference very easily and it might just lead you straight to the issue.


AdamRedwoods(Posted 2013) [#5]
do you have sample code so we can test?


Goodlookinguy(Posted 2013) [#6]
Uh...well, here's a bare bones test.

v66: http://nrgs.org/files/flash/keyissue/v66/
v69: http://nrgs.org/files/flash/keyissue/v69/

If you click the space bar it will change the position. However, in v69, the keyhit acts like keydown after a few updates pass.

Import mojo

Function Main:Int()
	New Example()
	Return 0
End

Class Example Extends App
	Method OnCreate()
		SetUpdateRate(30)
	End
	
	Field x:Int, y:Int
	
	Method OnUpdate()
		If KeyHit(KEY_SPACE)
			x = MouseX()
			y = MouseY()
		End
	End
	
	Method OnRender()
		Cls()
		
		SetColor(255, 255, 255)
		DrawCircle(x, y, 5)
	End
End



slenkar(Posted 2013) [#7]
Im using linux with firefox it doesnt happen for me,
i am using an older version of flash with firefox 11.2

Then I tested it on chrome in linux, with the latest flash 11.6 and it still didnt happen


I moved the mouse around the canvas and clicked about 30 times each test


Goodlookinguy(Posted 2013) [#8]
The test was meant to show that KeyHit is registering while a key is being held down. So don't click a bunch of times. Hold down the space bar. In v69, after a few updates the KeyHit will start registering every update.

Edit
This has been tested on multiple machines with the same results.

Mac OS 10.7.5 @ Flash v11.6.602.171
Windows 7 (x64) @ Flash v11.6.602.167 (both a VM and real machine)


MikeHart(Posted 2013) [#9]
Can confirm that it happens on OSX 10.8.2 with Monkey V69 in Flash, HTML5 and GLFW too. I would say it is a bug.


Goodlookinguy(Posted 2013) [#10]
Oh? I'll test HTML5 and GLFW as well when my work system finishes updating (bad timing). I could have sworn the bug only effected flash. I remember building for those platforms and it not being buggy, but maybe I wasn't paying attention to this specific problem.


MikeHart(Posted 2013) [#11]
So are you opening a bug report?


dopeyrulz(Posted 2013) [#12]
Haven't had a chance to fully test yet, but under glfw the keyhit appears to fail as you described.


Goodlookinguy(Posted 2013) [#13]
@MikeHart

Yes, sorry. Lost my connection to the internet when I was going to make the post yesterday because my router is acting up.

Also, I can confirm that GLFW and HTML5 are buggy as well.

Update
This was fixed http://www.monkeycoder.co.nz/Community/posts.php?topic=4863