This content has been marked as final. Show 11 replies
OK..........I just changed my publish settings from flash player 7 to flash player 6 and it now works.
SO what is wrong with the above code that is ok in flash 6 but NOT in flash 7??
if accessCode is mis-typed as accesscode, you would be ok in flash 6, but not with later versions.
yeah i thought about that.......but that variable is in an IF/ELSE statement, so if the case was wrong (and I don't believe it is) it would execute the ELSE part and the problem is, it isn't executing the listener AT ALL.
While waiting for a post here, I added a dynamic box that reads Key.getascii (or getCode) and whenever you press a key, that box SHOULD display the value of the key pressed...........it doesn't do that either.
so the variable name above is not the problem.
if your testing your code in the flash test enviroment you need to disable keyboard shortcuts (control/disable keyboard shortcuts).
um...........everything works fine in test mode..........doesnt work in the swf by itself...not sure how disabling those things would fix the swf only mode.
if you're suggesting that it actually doesnt work in test mode either, but appears to because ENTER causes the timeline to advance a frame in test mode, that's not the case, as "wrong" comes before "right" on the timeline and if my hitting enter was advancing the play head in test mode, then i would be seeing the "wrong" data displayed and not the "right".
Like I said before, I have been using this code for years....in Fill-In-The-Blank question models and when it comes to those models, you can't preview them in test mode because of the "enter advancing the playhead" problem. But that situation is not making my present project fail in preview mode - not sure why heh. But AGAIN, if the enter key was advancing the playhead in test mode, my program would not execute correctly in test mode either, but it does.
I verified that the case is correct in the variable name (no change).
I also tried to find this disable keyboard shortcuts in the contol menu? doesnt exist. I did find keyboard shortcuts under edit, but when I try to delete or modify the one for enter to play, it says i can't.
There are NO disable choices in the control drop down menu and THREE enables, non of which have to do with keyboard shortcuts. The only one of these that is on, is enable live preview.
I'm using flash 7 btw.
try the following code and let me know what appears (if anything) in the textfield after pressing enter:
in both preview mode and swf mode
that was flash 7? if so, there's no code problem unless you have a typo of accessCode, right or wrong.
I'm thinking this is one of those undocumented problems......because as you say the code is fine.
For this one project I'm either gonna publish in 6 or add the stupid submit button.
Thanks for the input...........heh you're like the only one who ever answers my posts.
post a link to your fla. i don't believe this is a flash bug.