Keycode Trace Function not outputting all Keycodes

The trace function in this file doesn't output all of the
keycodes on my keyboard. Some letters generate a keycode and others
don't. For instance, "u" outputs 85 but "i" outputs nothing.
Here's the trace function...
trace(event.keyCode);
And here's the rest of the code which is a work in
progress...
package {
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.ui.Keyboard;
public class Velocity3D extends Sprite
private var ball:Ball;
private var xpos:Number = 150;
private var ypos:Number = 0;
private var zpos:Number = 150;
private var vx:Number = 0;
private var vy:Number = 0;
private var vz:Number = 0;
private var friction:Number = .98;
private var fl:Number = 250;
private var vpX:Number = stage.stageWidth / 2;
private var vpY:Number = stage.stageHeight / 2;
private var ballb:Ball;
private var xposb:Number = 130;
private var yposb:Number = 0;
private var zposb:Number = 150;
private var vxb:Number = 0;
private var vyb:Number = 0;
private var vzb:Number = 0;
public function Velocity3D()
init();
private function init():void
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
ball = new Ball(40, 0xff0000);
ballb = new Ball(40, 0xffff00);
addChild(ball);
addChild(ballb);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
private function onEnterFrame(event:Event):void
xpos += vx;
ypos += vy;
zpos += vz;
vx *= friction;
vy *= friction;
vz *= friction;
xposb += vx;
yposb += vy;
zposb += vz;
vxb *= friction;
vyb *= friction;
vzb *= friction;
if(zpos > -fl)
var scale:Number = fl / (fl + zpos);
ball.scaleX = ball.scaleY = scale;
ball.x = vpX + xpos * scale;
ball.y = vpY + ypos * scale;
ball.visible = true;
else
ball.visible = false;
if(zposb > -fl)
var scaleb:Number = fl / (fl + zposb);
ballb.scaleX = ballb.scaleY = scale;
ballb.x = vpX + xpos * scale;
ballb.y = vpY + ypos * scale;
ballb.visible = true;
else
ball.visible = false;
private function onKeyDown(event:KeyboardEvent):void
trace(event.keyCode);
switch(event.keyCode)
case 87 :
vy -= 1;
break;
case Keyboard.NUMPAD_2 :
vy += 1;
break;
case Keyboard.NUMPAD_4 :
vx -= 1;
break;
case Keyboard.NUMPAD_6 :
vx += 1;
break;
case Keyboard.UP :
vz += 1;
break;
case Keyboard.DOWN :
vz -= 1;
break;
case Keyboard.F1: //82
vyb -= 1;
break;
case Keyboard.F2 : //67
vyb += 1;
break;
case Keyboard.F3 : //68
vxb -= 1;
break;
case Keyboard.F4 : //70
vxb += 1;
break;
case Keyboard.F5 : //65
vzb += 1;
break;
case Keyboard.F6 : //90
vzb -= 1;
break;
default :
break;
This is the ball class...
package {
import flash.display.Sprite;
public class Ball extends Sprite {
public var radius:Number;
private var color:uint;
public var vx:Number = 0;
public var vy:Number = 0;
public var mass:Number = 1;
public function Ball(radius:Number=40, color:uint=0xff0000)
this.radius = radius;
this.color = color;
init();
public function init():void {
graphics.beginFill(color);
graphics.drawCircle(0, 0, radius);
graphics.endFill();
}

Okay, when I open the KeyViewer.swf file from the Colin Moock
book when not in Flash. All the keycodes show up when I run the
program. However, when I open the KeyViewer.as file and create a
.fla file in Flash then run the program using Ctrl+Enter, some of
the keycodes don't show up. Same problem as the other program. Why
would a .swf outside of Flash work correctly but the .swf when used
in Flash doesn't? Even the new .swf file that is created when I
press Ctrl+Enters works correctly when I open it outside of Flash.
But when I open it in Flash it doesn't work. Weird.
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.ui.*;
// Displays the keycode and character code for any key
pressed.
public class KeyViewer extends Sprite {
private var keyoutput:TextField;
public function KeyViewer () {
keyoutput = new TextField();
keyoutput.text = "Press any key...";
keyoutput.autoSize = TextFieldAutoSize.LEFT;
keyoutput.border = true;
keyoutput.background = true;
addChild(keyoutput);
stage.addEventListener(KeyboardEvent.KEY_DOWN,
keyDownListener);
private function keyDownListener (e:KeyboardEvent):void {
keyoutput.text = "The key code for the key you pressed is: "
+ e.keyCode + "\n";
keyoutput.appendText("The character code for the key you
pressed is: "
+ e.charCode + "\n");
keyoutput.appendText("The character for the key you pressed
is: "
+ String.fromCharCode(e.charCode));

Similar Messages

  • How come thr trace() function not working now

    Hi,
    All of a sudden, all the trace() functions are not working
    any more. Can anyone remind me what things need to turn on, or what
    kind of software I have to install?
    Thanks.

    You need to configure the mm.cfg file.
    See the Developer's Guide for the details.
    Tracy

  • Backup controlfile to trace does not list all files

    The shop I am currently at had implemented scripted, hot backups for their Oracle 8.1.7.4 databases on Win 2000 servers. The scripts work fine and I have even used some of the backups for recovery and for cloning a database.
    I was recently asked to clone another of the production databases. To clone the database I would need the output from the "backup controlfile to trace". However, when looking at the data files, I found there was one missing! It happens to be a second file associated with the TOOLS tablespace.
    My question is: why doesn't the "backup controlfile to trace" show that datafile?

    Might be, someone add the mentioned file, aftre you trace your controlfile, do it now and see, weathe it's there or not. Also, query 'select name from v$datafile' and compare the result with trace file.
    hare krishna
    Alok

  • PL/SQL not outputting all fields (environment variable?)

    This must be very straightforward.
    I'm getting back to doing some PL/SQL coding after a break of several years. I'm trying to start with something simple & building on that.
    create or replace procedure change_details(
    dirname in varchar2,
    id_filename in varchar2)
    is
    ids_file utl_file.file_type;
    spool_file utl_file.file_type;
    id_var varchar2(400);
    begin
    ids_file:=utl_file.fopen(dirname, id_filename, 'R');
    spool_file:=utl_file.fopen(dirname,'update_names.lst', 'W');
    loop
    begin
    utl_file.get_line (ids_file, id_var);
    utl_file.put_line (spool_file,id_var);
    exception
    when no_data_found then
    exit;
    end;
    end loop;
    utl_file.fclose(ids_file);
    end;
    spool person_ids
    set serveroutput on size 1000000;
    begin
    change_details('/my_directory/anon_cf','ids.lst');
    end;
    spool off
    I've got this code which should read in values from one file & write out to another. What's happening is that I don't get all input fields in the output file.
    More accurately, if the size of the input file is 2048 bytes then I do get all input fields in the output file.
    If there are less than 2048 bytes on input then I get nothing; if there are more than 2048 then I begin to lose
    some fields.
    There must be some environment setting which is affecting this but I don't know what. (I added "set serveroutput"
    hoping for the best but no difference)
    (It's Oracle9i on Solaris 9)
    Can anyone tell me where I'm going wrong? Thanks, Chris

    I think what BluShadow is getting at is that you
    have:
    utl_file.fclose(ids_file);in your code, but no
    utl_file.fclose(spool_file);
    Correct. ;)

  • Trace() function not working

    I am trying to  pass a trace() statement to my console. I know I have to debug the program in order to see trace() statements, but nothing comes up. I get an error after about 60 seconds saying this:
    Failed to connect; session timed out.
    Ensure that:
      1. You compiled your Flash application with debugging on.
      2. You are running the debugger version of Flash Player.
    I think it has something to do with Flash Player. I know I have the debugger version of flash player, but how do I make sure it is running when I debug my application?

    I think I posted this on flexcoders or somewhere before. There are a couple of
    things I found out on google but they did not help ...
    For me what helped (this was a desperate try I found it by accident) was
    deleting the files inside html-templates, creating a new project get the fresh
    html-contents into the old one. Sometimes a machine restart was necessary.
    Hope this might work in your case.
    C

  • 'Find' Function not Catching all Words

    Under MenuBar>Edit>Find>Find>Advanced, when I enter in a word or phrase, the 'Find' feature only identifies 75% - 90% of the occurrences of the entered word or phrase. How do I correct this? Thanks.
    appler505

    Are you sure that there is no 'invisible' character embedded ?
    Seems likely that non-graphic/non-imageable control character(s) in Unicode are the cause, if
    a. control characters are identified and input from the Character Palette such as spacing control characters and joining/non-joining control characters for ligation, or
    b. characters are identified from a non-default keyboard whose key codes generate combining character sequences that don't map to a specific writing system in script.
    But if so, then assigning a spelling dictionary to the selected character string ought to show a lot of red alerts where the spelling dictionary fails sections of the character string, no?
    Another way of working this is to ask the person with the problem to open the Character Palette, insert the cursor in the string of characters, press shift and right arrow once and once only (left arrow once and once only, respectively), press the Advanced icon at lower left, and select Show Character Selected in Application, and see what character is shown. However, this will not work if a combining character sequence is inserted, see previous discussions from time to time since the turn of 2008.
    /hh

  • Trace statements not outputting to console when running in AIR simulator

    I'm using FB 4.7 and the latest AIR SDK beta. When I debug on a device, the console window works properly. I've tried the solution from this thread http://forums.adobe.com/thread/750219?tstart=0 , but it didn't solve the problem. I haven't changed anything about the build configuration. Any ideas?

    I have the same question... I've been trying to get an Adobe AIR HTML app going, but there appears to be no IDE that supports debugging an HTML/JS AIR App, and fdb, which is supposed to be able to debug HTML/JS AIR apps, does not.
    Is HTML/JS still a supported way of developing Adobe AIR apps?  If so, then why aren't issues like this getting some attention?
      -Josh

  • Html App: air.trace() not outputting to console... are Adobe still supporting html apps in AIR?

    Hi
    Just getting up and running
    Mac OS X 10.9. Adoe AIR 3.9. All working fine except air.trace() not outputting anything to the console.
    Bit of googling meant I created a mm.config in ~ with the line:
    ErrorReportingEnable=1
    but still no joy.
    Any other tips for getting this to work or is it just now broken and/or unsupported?
    Are HTML apps wrapped in AIR now legacy technology?

    I have the same question... I've been trying to get an Adobe AIR HTML app going, but there appears to be no IDE that supports debugging an HTML/JS AIR App, and fdb, which is supposed to be able to debug HTML/JS AIR apps, does not.
    Is HTML/JS still a supported way of developing Adobe AIR apps?  If so, then why aren't issues like this getting some attention?
      -Josh

  • I can not see all "Divisions" in BP Rel.--Partner Function Assignment

    Hi,
    When I edit "Partner Function Assignment" in BP reliationship such like BUR011("Employee Responsible"),
    I can not see all "Divisions" in list which I can see in configuration via SPRO-->Customer Relationship Management->Master Data->Orgnizational Management->Division Setting->Define Divisions.
    E.g., in configuration, I can see 7 records of divisions from "001" to "007", but in "Partner Function Assignment" of BP relationship, I can only see "002" to "004".
    Do you know why? Thanks a lot!
    Best regards,
    Long

    hi
    that should not be happening,if they are visible in one client then should be there in another too
    do one things try run  this
    hrbc1_atributes_buffer_update
    it will refresh the buffers of your org structure and then you may be able to add this
    also check the check box where it is mentioned that"object determination should be permitted"
    remember it will run only for once after you run this the check box will be unchecked again
    i guess it may solve your probs
    also try to structure your org structure index
    use t code
    crmd_index_om
    and withtin the object type give O
    and execute
    best regards
    ashish

  • HDMI output to monitor not displaying all colors

    I am trying to use a second monitor on my Satellite S55t-b5152 and am able to get 1920x1080 output from the HDMI port through an adapter to either VGA or DVI into my external monitor, but with either adapter the colors look washed-out and not all the colors that are displayed on the internal monitor show up on the external monitor.  For example the position indicator in scroll bar on some apps shows up on the internal monitor, but disappears when I drag that window onto the external monitor.  I've tried multiple monitors and they all have the same symptom. I've investigated this some on external forums and it seems to be that the HDMI output under some conditions assumes that it is connected to a TV instead of a monitor and it limits the output color range.  On some graphics drivers it is possible to override that assumption and get the full range output from the HDMI port.  I haven't found a way to do that for the graphics driver on the S55t-b5152. Has anyone figured this out?

     
    Satellite S55T-B5152
    through an adapter to either VGA or DVI...
    Just want to comment that I'm not at all surprised that an adapter does not produce true colors. I'm sometimes amazed they work at all.
    Yours is HDMI 2.0 which complicates things still further.

  • Acrobat 9 bug? - Print Pages function does not print all bookmarked pages

    We use the Bookmark Print Pages function to allow for easy printing of sections of large PDFs. All of the pages that should be printed are bookmarked. The bookmarked pages print correctly in Adobe 8, but not in Adobe 9.
    I have put together a javascript workaround, but would prefer a solution that does not require distributing a file to all users.
    I would appreciate any suggestions on other possible workarounds.
    Here is the bug report I submitted to Adobe:
    Concise problem statement: The "Print Pages" function for bookmarks does not print all bookmarked pages in Adobe Reader 9.0 and 9.1. The same bookmarks print properly in Adobe Reader, Standard, and Pro 8.
    Steps to reproduce bug:
    1. Open the Adobe Acrobat SDK JavaScript for Acrobat API Reference PDF (Version 8.1, April 2007) in Adobe Reader 9.0 or 9.1.
    2. View the bookmarks. Right-click on New Features and Changes and choose "Print Pages."
    3. Open the same PDF in Adobe Reader, Standard, or Pro 8. (I used Adobe Professional 8.1.3.)
    4. View the bookmarks. Right-click on New Features and Changes and choose "Print Pages."
    Results and Expected results: Printing from v8 results in 12 pages. Printing from v9 results in 9 pages. Pages 741, 754, and 769 did not print from v9.

    I'm having the same issues.  Using the latest version 9.3.3.  Is this a bug? I tired calling adobe but their CR sounds like 3rd country only.  Anyone can shed a light on this issue?

  • ABAP query output not showing all output fields

    I added a new field group in an existing query and marked them to display in the output list. When I test the output from SQ01 -> InfoSer Query, the output is what I expect. However, if I execute the query itself, it does not show the additional fields I just created.
    I notice that in the Basic List layout design, the new fields are on a new line and not appended to the same line as the output fields before I did the modifications. I already tried to manipulate the output length and positions, but it didn't help. I turned on the ruler to drag the fields in the desired positions, sometimes it works but not for all the fields. Can someone help me please?

    I figured it out already. The maximum width for the report output is 255 only. Switching from graphical query painter, I got the error that some fields were overlapping. Then I recalculated the starting positions of the fields and adjusted their lengths. 

  • The keyboard for my iMac 9, 1 got wet and is not working correctlly. Delete,return, and some other keys not functioning. In all caps including numerals. I've left it to dry for a few days but still will not work. Computer now in Safe boot mode and I c

    The keyboard for my iMac 9, got wet and is not working correctly. Delete ,return, and some other keys not functioning. In all caps including numerals. I've left it to dry for a few days but still will not work. Computer now in Safe boot mode and I can't login due to all caps and numbers being symbols. Is there anything I can do?

    Buy a replacement keyboard. They're only $50-65 USD.
    27" i7 iMac (Mid 2011) refurb, OS X Yo (10.10), Mavs, ML & SL, G4 450 MP w/10.5 & 9.2.2

  • EPSON Artisan 810 a Bi-Function, not Multi-Function, All-In-One

    I was in a local OfficeMax, looking at an *EPSON Artisan 810* all-in-one (Print, Scan. FAX, Copy), which came in a box covered with text and imagery detailing all of the amazing features it has. To my delight, I discovered that it supported OS X, albeit, they note that "some features like sharing memory cards over a network may not be supported". You'd think that would imply that tertiary (or specialty) functions may not work. But, surely, the basic 4 functions would, right?
    It would have been nice if the employees had any kind of a clue with regard to the products they sell. But they don't. So I checked some support forums and the EPSON driver download page (on my phone), and sure enough, they even have Snow Leopard drivers. So I buy the printer and take it home.
    I should have suspected something may be amiss when the installer asked me to enter my administrator password, but the dialog requesting the credentials kept losing focus, making it difficult to type in my password. Yikes.
    I managed to get through the 30-part install (well, it felt like 30 separate, chained installers). The installer vanished, and I had no printer in my "Print and FAX" Preference Pane. Nice.
    So, I add a printer manually, and it did see the EPSON as a Bonjour device. So I jump over to try the scanner, and I get a troubleshooter. After scrounging around the web, I found some advice from a user who discovered that you have to go into the Utilities folder and run an EPSON scanner utility to find and configure the device. ugh. Once I did that, it seemed to work.
    Now, on to the FAX. The preference pane did not see a FAX device anywhere, and the EPSON printer itself has no FAX capabilities. So back to the web. After an hour of searching, nada. And no one even complaining about this apparent "missing" feature. So I hit the manual, and notice that FAXing from a computer is only supported in Windows.
    At this point, I'm not even going to try to get the "Copy" function working.
    OFFICEMAX Knowledgeable Sales Staff: FAIL
    EPSON Customer Support: FAIL
    EPSON Product: FAIL
    EPSON Integrity: FAIL
    So, in summary, this is a bi-function, not a multi-function, device. It prints and scans. They should put this on the box so people know what they're getting (or in this case, not getting). It's a real shame too, because I went with EPSON because Hewlett Packard did something similar with a computer I bought. The machine was billed as a multimedia and entertainment computer, yet, it couldn't play a game that was 5 years old. Do any of these companies have their metaphoric poop together?
    And don't get me started on Lexmark.

    Epson has the (annoying to me) built-in default of numbering each scan; so whatever name you would decide to use, you would still wind up with "mypicture093.jpg" for instance. That is true if you use the Epson Scan software.In any case, if you use that, once you click on "scan", you should get a new pop up window where you can enter the name (called Prefix by Epson) and where to save it. You cannot get rid of the "start number", but you can delete the number once the icon appears on your desktop or in a folder: just click it once and then hit "return" on your keyboard and you can change part of the name or the entire name for that matter.
    If you choose to use the OS built-in app (under System Preferences -> Print & Fax), simply highlight the Artisan 810 and click on Scan and then on "open scanner"; you are then presented with a new window where you can change all sorts of settings incl. the name.

  • The up down arrows on the side of my Hotmail email list do not function, nor does clicking the space above and below the slider bar. These functions work in all other cases. It began with Firefox 3.6 upgrade. Firefox version: 3.6 Operating system: Windows

    The up down arrows on the side of my Hotmail email list do not function, nor does clicking the space above and below the slider bar. These functions work in all other cases. It began with Firefox 3.6 upgrade.
    Firefox version: 3.6 Operating system: Windows XP
    == This happened ==
    Every time Firefox opened
    == After upgrade to Firefox 3.6

    See https://bugzilla.mozilla.org/show_bug.cgi?id=511075 - The arrows of the scrollbars don´t work in hotmail
    Should be fixed in the next release Firefox 3.6.4

Maybe you are looking for