Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. Access of possibly undefined property isKeyJump through a reference with static type Function.
  2.  
  3. public static var isKeyRight:Boolean = false;
  4.  
  5. public function Cont()
  6. {
  7. Cont.isKeyRight = false;
  8. ... }
  9.  
  10. if (standing && Cont.isKeyJump) vacc = _jumpAcc;
  11.  
  12. package {
  13.  
  14. import flash.display.MovieClip;
  15. import flash.events.Event;
  16.  
  17. public class PersonnagePrincipal extends Physical {
  18.  
  19. //INITIALISATION
  20. ...
  21.  
  22. //CONSTRUCTOR
  23. public function PersonnagePrincipal(life:Number = 100, focus:Number = 100, lifeMax:Number = 100, focusMax:Number = 100)
  24. {
  25. super();
  26. ...
  27. }
  28.  
  29. // GET & SET
  30. public function set life(life:Number):void { _life = (life > lifeMax) ? lifeMax : life; }
  31. ...
  32.  
  33.  
  34. // UPDATE
  35. override public function update(event:Event)
  36. {
  37. move_physical();
  38.  
  39. if (standing && Cont.isKeyJump) vacc = _jumpAcc;
  40. ...
  41.  
  42. package {
  43.  
  44. import flash.events.Event;
  45. import flash.events.KeyboardEvent;
  46. import flash.ui.Keyboard;
  47. import flash.display.MovieClip;
  48. import flash.utils.*;
  49.  
  50. public class Cont extends MovieClip
  51. {
  52. // Key codes
  53. public static var isKeyRight:Boolean;
  54. public static var isKeyJump:Boolean;
  55. ...
  56.  
  57. //CONSTRUCTOR
  58. public function Cont()
  59. {
  60. Cont.isKeyRight = false;
  61. Cont.isKeyJump = false;
  62. ...
  63.  
  64. if (stage) { init(); }
  65. else { this.addEventListener(Event.ADDED_TO_STAGE, init); }
  66. }
  67.  
  68. //POST-CONSTRUCTOR
  69. private function init(e:Event=null)
  70. {
  71. this.removeEventListener(Event.ADDED_TO_STAGE, init);
  72. ...
  73. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement