Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 17th, 2012  |  syntax: None  |  size: 1.20 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. AS3 TypeError: Error #1009
  2. TypeError: Error #1009: Cannot access a property or method of a null object reference.
  3. at fl.transitions::Tween/setPosition()
  4. at fl.transitions::Tween/set position()
  5. at fl.transitions::Tween()
  6. at Portfolio_fla::MainTimeline/about_btnOut()
  7.        
  8. import flash.events.MouseEvent;
  9. import fl.transitions.Tween;
  10. import fl.transitions.easing.*;
  11. import fl.transitions.TweenEvent;
  12.  
  13. about_btn.buttonMode = true;
  14. about_btn.mouseChildren = false;
  15. about_btn.alpha = 0.3;
  16. about_btn.addEventListener(MouseEvent.MOUSE_OVER, about_btnOver);
  17. function about_btnOver(event:MouseEvent):void
  18. {
  19.     var AboutAlphaOver:Tween = new Tween(about_btn,"alpha",Regular.easeIn,0.3,1,0.1,true);
  20. }
  21. about_btn.addEventListener(MouseEvent.MOUSE_OUT, about_btnOut);
  22. function about_btnOut(event:MouseEvent):void
  23. {
  24.     var AboutAlphaOut:Tween = new Tween(about_btn,"alpha",Regular.easeIn,1,0.3,0.1,true);
  25. }
  26. about_btn.addEventListener(MouseEvent.CLICK, about_btnClick);
  27. function about_btnClick(event:MouseEvent):void
  28. {
  29.     gotoAndPlay(1,"About");
  30. }
  31.        
  32. var AboutAlphaOut:Tween = new Tween(about_btn,"alpha",Regular.easeIn,1,0.3,0.1,true);
  33.        
  34. var AboutAlphaOut:Tween = new Tween(event.currentTarget,"alpha",Regular.easeIn,1,0.3,0.1,true);