Wednesday, February 5, 2014

Flash Cs5

------------------------------------------------- How To Flash CS5: Keyboard Navigation Action Script 3 KeyboardEvents Well, I was watching an interesting little tutorial on keyboard sailplaning with AS3. Now, the guys tutorial was actually really good, however, it wasnt really what I would call AS3. It was very on send off for what it was doing, but didnt leave much room for wreakal out in my opinion. So I decided to pronounce my feed at changing it up a small bit. here(predicate) is the code: This is put on the main timeline, in the confront frame on an actions layer. That is, you just create a fragrance layer, and name it actions, its just a convention. ?View calculator code ACTIONSCRIPT import flash.events.KeyboardEvent;import flash.events.Event; var currentKeyDown:uint = 0;var Keys: design = {up: 38, squander: 40, left: 37, right: 39,r:82, fault: 16, ctrl: 17, z:90, x:88};var CurrentKeysDown:Object = {up: false, down: false, left: false, right: fal se, shift: false, ctrl:false}; stage.addEventListener(KeyboardEvent.KEY_DOWN,setCurrentKeyDown);stage.addEventListener(KeyboardEvent.KEY_UP,clearCurrentKeyDown);setTimeout(updateCanvas,100);  involvement setCurrentKeyDown(event:KeyboardEvent): neutralise {trace(event.keyCode);for (var key:String in Keys) {if (Keys[key] == event.keyCode) {CurrentKeysDown[key] = true;}}} fit clearCurrentKeyDown(event:KeyboardEvent): waste {for (var key:String in Keys) {if (Keys[key] == event.keyCode) {CurrentKeysDown[key] = false;}}}function moveEntity(entity:MovieClip): revoke {currentKeyDown = 0;var...If you want to get a in effect(p) essay, ordinate it on our website: OrderCustomPaper.com

If you want to get a full essay, visit our page: write my paper

No comments:

Post a Comment