Guest User

Untitled

a guest
Jun 18th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. ErrorReportingEnable=1 TraceOutputFileEnable=1 MaxWarnings=50
  2.  
  3. ~/.macromedia/Flash_Player/Logs/flashlog.txt
  4.  
  5. tail ~/.macromedia/Flash_Player/Logs/flashlog.txt -f
  6.  
  7. /* import ExternalInterface package */
  8. import flash.external.*;
  9.  
  10. /* Create a movieclip for the alert. Set an arbitrary (but very high) number for the depth
  11. * since we want the alert in front of everything else.
  12. */
  13. var alert = this.createEmptyMovieClip("alert", 32000);
  14. /* Create the alert textfield */
  15. var output_txt = alert.createTextField("output_txt", 1, 0, 0, 300, 200);
  16. output_txt.background = true;
  17. output_txt.backgroundColor = 0xEFEFEF;
  18. output_txt.selectable = false;
  19. /* Set up drag behaviour */
  20. alert.onPress = function()
  21. {
  22. this.startDrag();
  23. }
  24. alert.onMouseUp = function()
  25. {
  26. stopDrag();
  27. }
  28.  
  29. /* I was using a button to text EI. You don't need to. */
  30. testEI_btn.onPress = function()
  31. {
  32. output_txt.text = (ExternalInterface.available);
  33. }
  34.  
  35. var output_txt:TextField = new TextField();
  36. addChild(output_txt);
  37. output_txt.text = (String(ExternalInterface.available));
  38.  
  39. var alert:Sprite = new Sprite();
  40. var output_txt:TextField = new TextField();
  41. output_txt.background = true;
  42. output_txt.backgroundColor = 0xEFEFEF;
  43. output_txt.selectable = false;
  44. output_txt.width = 300;
  45. output_txt.height = 300;
  46. alert.addChild(output_txt);
  47. addChild(alert);
  48.  
  49. alert.addEventListener(MouseEvent.MOUSE_DOWN, drag);
  50. alert.addEventListener(MouseEvent.MOUSE_UP, stopdrag);
  51.  
  52. output_txt.text = (String(ExternalInterface.available));
  53.  
  54. function drag(e:MouseEvent):void
  55. {
  56. var alert:Sprite = e.currentTarget as Sprite;
  57. alert.startDrag();
  58. }
  59.  
  60. function stopdrag(e:MouseEvent):void
  61. {
  62. var alert:Sprite = e.currentTarget as Sprite;
  63. alert.stopDrag();
  64. }
Add Comment
Please, Sign In to add comment