Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ErrorReportingEnable=1 TraceOutputFileEnable=1 MaxWarnings=50
- ~/.macromedia/Flash_Player/Logs/flashlog.txt
- tail ~/.macromedia/Flash_Player/Logs/flashlog.txt -f
- /* import ExternalInterface package */
- import flash.external.*;
- /* Create a movieclip for the alert. Set an arbitrary (but very high) number for the depth
- * since we want the alert in front of everything else.
- */
- var alert = this.createEmptyMovieClip("alert", 32000);
- /* Create the alert textfield */
- var output_txt = alert.createTextField("output_txt", 1, 0, 0, 300, 200);
- output_txt.background = true;
- output_txt.backgroundColor = 0xEFEFEF;
- output_txt.selectable = false;
- /* Set up drag behaviour */
- alert.onPress = function()
- {
- this.startDrag();
- }
- alert.onMouseUp = function()
- {
- stopDrag();
- }
- /* I was using a button to text EI. You don't need to. */
- testEI_btn.onPress = function()
- {
- output_txt.text = (ExternalInterface.available);
- }
- var output_txt:TextField = new TextField();
- addChild(output_txt);
- output_txt.text = (String(ExternalInterface.available));
- var alert:Sprite = new Sprite();
- var output_txt:TextField = new TextField();
- output_txt.background = true;
- output_txt.backgroundColor = 0xEFEFEF;
- output_txt.selectable = false;
- output_txt.width = 300;
- output_txt.height = 300;
- alert.addChild(output_txt);
- addChild(alert);
- alert.addEventListener(MouseEvent.MOUSE_DOWN, drag);
- alert.addEventListener(MouseEvent.MOUSE_UP, stopdrag);
- output_txt.text = (String(ExternalInterface.available));
- function drag(e:MouseEvent):void
- {
- var alert:Sprite = e.currentTarget as Sprite;
- alert.startDrag();
- }
- function stopdrag(e:MouseEvent):void
- {
- var alert:Sprite = e.currentTarget as Sprite;
- alert.stopDrag();
- }
Add Comment
Please, Sign In to add comment