Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 12414 lines (10854 sloc) 487 KB
package {
import flash.display.MovieClip;
import flash.net.*; //fix this later
import flash.events.*;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.display.Sprite;
import flash.display.DisplayObject;
import ascb.display.DraggableSprite;
import ascb.util.NumberUtilities;
import flash.geom.Point;
import flash.filters.DropShadowFilter;
import fl.controls.TextArea;
import fl.controls.Button;
import fl.controls.RadioButton;
import fl.controls.RadioButtonGroup;
import fl.controls.ComboBox;
import fl.controls.CheckBox;
import fl.controls.Slider;
import fl.events.SliderEvent;
import fl.controls.Label;
//import net.eriksjodin.arduino.Arduino;
//import net.eriksjodin.arduino.events.ArduinoEvent;
import flash.display.Sprite;
/*import sk.prasa.webapis.picasa.events.PicasaDataEvent;
import sk.prasa.webapis.picasa.PicasaResponder;
import sk.prasa.webapis.picasa.PicasaService;*/
import flash.display.Loader;
import fl.video.FLVPlayback;
import fl.video.MetadataEvent;
import fl.video.CuePointType;
import fl.video.IVPEvent;
import fl.video.VideoEvent;
import flash.display.*;
import flash.events.TimerEvent;
import flash.utils.*;
import flash.system.fscommand;
import flash.ui.Mouse;
import flash.media.Sound;
import flash.text.Font;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.AntiAliasType;
import flash.text.TextFormat;
import flash.text.*;
import flash.errors.*;
import flash.events.ErrorEvent;
import flash.errors.IOError;
import flash.events.IOErrorEvent;
import flash.events.ProgressEvent;
import flash.net.Socket ;
import flash.utils.ByteArray;
import com.dynamicflash.util.Base64;
import MJPEG; //ip camera class for MJPEG
import flash.filesystem.*;
import flash.filesystem.File;
import flash.filesystem.FileStream;
import flash.filesystem.FileMode;
import flash.events.InvokeEvent;
import flash.desktop.NativeApplication;
import flash.system.Capabilities;
import flash.net.URLRequest;
import flash.net.URLVariables;
import flash.events.NetStatusEvent;
import flash.events.HTTPStatusEvent;
//import flash.errors.IOError;
//import flash.events.IOErrorEvent;
import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.events.NetStatusEvent;
import flash.events.HTTPStatusEvent;
import flash.net.*;
import com.yahoo.astra.fl.managers.AlertManager;
import flash.media.Video;
import flash.media.Camera;
import flash.utils.Timer;
import flash.events.TimerEvent;
import flash.display.Graphics;
import flash.display.BitmapData;
import flash.display.Bitmap;
import flash.display.Sprite;
import com.swfjunkie.tweetr.Tweetr;
import com.swfjunkie.tweetr.oauth.OAuth;
import com.swfjunkie.tweetr.oauth.events.OAuthEvent;
import flash.display.Sprite;
import flash.geom.Rectangle;
import flash.html.HTMLLoader;
import flash.display.NativeMenu;
import flash.display.NativeMenuItem;
import flash.display.NativeWindow;
public class configure extends MovieClip {
private var xmlLoader:URLLoader;
private var WeatherLoader:URLLoader;
private var PicasaLoader:URLLoader;
private var stockLoader:URLLoader;
private var stockLoaderInitial:URLLoader;
private var num_stocks:int;
private var stockPriceChange:Number = 0;
private var mirror_mode:String;
private var mode_select:String;
private var hardware_mode_select:String;
private var initial_hardware_mode_select_value:int;
private var initial_door_value:int;
private var initial_side_window_value:int;
private var initial_front_window_value:int;
private var initial_idol_value:int;
private var hardware_mode_select_value:int;
private var initial_values_done:int=0;
private var idle_start_playing:int=0;
private var idle_end_seek_flag:int=0;
private var door_value:int;
private var first_time:int=1;
private var weather_first_time:int=1;
private var side_window_value:int;
private var front_window_value:int;
private var idol_value:int;
private var doorcamFlag:int = 0;
private var idle_videos;
private var video_resolution:String;
private var reg_code;
private var full_screen;
private var video_scaling_factor:Number;
private var new_video_scaling:Number;
private var new_picture_scaling:Number;
private var x_position:Number;
private var y_position:Number;
private var video_rotation:Number;
private var myVidx_original:Number;
private var myVidy_original:Number;
private var stock_text_x_original:Number;
private var stock_text_y_original:Number;
private var weather_text_x_original:Number;
private var weather_text_y_original:Number;
private var alcohol_results_text_x_original:Number;
private var alcohol_results_text_y_original:Number;
private var weather_image_x_original:Number;
private var weather_image_y_original:Number;
private var beer_image_x_original:Number;
private var beer_image_y_original:Number;
private var twitterbird_image_x_original:Number;
private var twitterbird_image_y_original:Number;
private var frame_x_original:Number;
private var frame_y_original:Number;
private var lip1_x_original:Number;
private var lip1_y_original:Number;
private var weather_text_rotation_original:Number;
private var stock_text_rotation_original:Number;
private var weather_image_rotation_original:Number;
private var beer_image_rotation_original:Number;
private var twitterbird_image_rotation_original:Number;
private var frame_rotation_original:Number;
private var lip1_rotation_original:Number;
private var webcamvideo : Video;
private var webcamfound:int = 0;
private var webcam_on;
private var webcamvideo_x:Number;
private var webcamvideo_y:Number;
private var webcamvideo_rotation:Number;
private var webcamvideo_scale:Number;
// private var webcam_x:Number; //not used
// private var webcam_y:Number;
// private var webcam_rotate:Number;
// private var webcam_scale:Number;
private var webcam_width:Number;
private var webcam_height:Number;
private var webcam_fps:Number;
private var stand_alone:String;
private var stand_alone_weather:String;
private var stand_alone_stock:String;
private var display_mode_preset:int;
private var admin_flag:int = 0;
private var proximity_sensor_on;
private var digital_switches;
private var switch1;
private var switch2;
private var switch3;
private var switch4;
private var switch5;
private var switch6;
private var LED_mode;
private var analog_sensors;
private var analog_input1;
private var analog_input2;
private var analog_input3;
private var proximity_sensor_trigger1_distance_lower;
private var proximity_sensor_trigger1_distance_upper;
private var proximity_sensor_trigger1_time;
private var proximity_sensor_trigger2_distance;
private var proximity_flag=0;
private var proximity_counter = 0;
private var proximity1_do_not_play_again = 0;
private var proximity_flag3 = 0;
private var x10_on_off_flag = 0;
private var picasa_positioning_flag:int = 0;
private var atmega:String;
private var stock_good_threshold:Number;
private var stock_bad_threshold:Number;
private var pictLdr:Loader = new Loader();
private var Frame_Loader:Loader = new Loader();
private var Beer_Loader:Loader = new Loader();
private var TwitterBird_Loader:Loader = new Loader();
private var weather_zip:String;
private var weather_reading:String;
private var weather_display:String;
private var forecast_cutoff:String;
private var stock_string:String;
private var myXML:XML = new XML();
private var myXMLold:XML = new XML();
private var file:File = new File();
private var file2:File = new File();
private var file3:File = new File();
private var PhotoSaveDir:File = new File();
private var photoboothOverlayImagePath:File = new File();
private var photoboothLogoPath:File = new File();
private var filestream:FileStream = new FileStream();
private var newXMLStr:String;
private var URLModeString:String;
private var URLHubGraphic:String;
private var flashPlayerVersion:String = Capabilities.version;
private var osArray:Array = flashPlayerVersion.split(' ');
private var osType:String = osArray[0]; //The operating system: WIN, MAC, LNX
private var versionArray:Array = osArray[1].split(',');//The player versions. 9,0,115,0
private var majorVersion:Number = parseInt(versionArray[0]);
private var majorRevision:Number = parseInt(versionArray[1]);
private var minorVersion:Number = parseInt(versionArray[2]);
private var minorRevision:Number = parseInt(versionArray[3]);
private var myTimer:Timer = new Timer(3000, 1);
private var doorcamLoadTimer:Timer = new Timer(1000, 1);
private var doorcamTimer:Timer = new Timer(1000, 1);
//private var index_selected:int;
private var startingLocation:Point;
private var Stockdyntext:Sprite = new Sprite();
private var AlcoholResultsdyntext:Sprite = new Sprite();
private var Weatherdyntext:Sprite = new Sprite();
private var WeatherdynImage:MovieClip = new MovieClip();
private var BeerdynImage:MovieClip = new MovieClip();
private var TwitterBirddynImage:MovieClip = new MovieClip();
private var FramedynImage:MovieClip = new MovieClip();
private var Lip1dynImage:MovieClip = new MovieClip();
private var lipsync_clip:String;
private var verbose:String;
private var idle_clip:String;
private var idle_dup_clip:String;
private var proximity1_clip:String;
private var proximity2_clip:String;
private var touch1_clip:String;
private var weather_good_clip:String;
private var weather_ok_clip:String;
private var weather_rain_clip:String;
private var no_internet_clip:String;
private var stock_up_clip:String;
private var stock_no_change_clip:String;
private var stock_down_clip:String;
private var doorbell_clip:String;
private var phone_clip:String;
private var video1_clip:String;
private var video2_clip:String;
private var video3_clip:String;
private var video4_clip:String;
private var proximity3_clip:String;
private var x10_on_clip:String;
private var x10_off_clip:String;
private var idle_clipp:String;
private var idle_dup_clipp:String;
private var proximity1_clipp:String;
private var proximity2_clipp:String;
private var touch1_clipp:String;
private var weather_good_clipp:String;
private var weather_ok_clipp:String;
private var weather_rain_clipp:String;
private var no_internet_clipp:String;
private var stock_up_clipp:String;
private var stock_no_change_clipp:String;
private var stock_down_clipp:String;
private var doorbell_clipp:String;
private var phone_clipp:String;
private var video1_clipp:String;
private var video2_clipp:String;
private var video3_clipp:String;
private var video4_clipp:String;
private var proximity3_clipp:String;
private var x10_on_clipp:String;
private var x10_off_clipp:String;
private var idle_cliph:String;
private var idle_dup_cliph:String;
private var proximity1_cliph:String;
private var proximity2_cliph:String;
private var touch1_cliph:String;
private var weather_good_cliph:String;
private var weather_ok_cliph:String;
private var weather_rain_cliph:String;
private var no_internet_cliph:String;
private var stock_up_cliph:String;
private var stock_no_change_cliph:String;
private var stock_down_cliph:String;
private var doorbell_cliph:String;
private var phone_cliph:String;
private var video1_cliph:String;
private var video2_cliph:String;
private var video3_cliph:String;
private var video4_cliph:String;
private var proximity3_cliph:String;
private var x10_on_cliph:String;
private var x10_off_cliph:String;
private var idle_clippi:String;
private var idle_dup_clippi:String;
private var proximity1_clippi:String;
private var proximity2_clippi:String;
private var touch1_clippi:String;
private var weather_good_clippi:String;
private var weather_ok_clippi:String;
private var weather_rain_clippi:String;
private var no_internet_clippi:String;
private var stock_up_clippi:String;
private var stock_no_change_clippi:String;
private var stock_down_clippi:String;
private var doorbell_clippi:String;
private var phone_clippi:String;
private var video1_clippi:String;
private var video2_clippi:String;
private var video3_clippi:String;
private var video4_clippi:String;
private var proximity3_clippi:String;
private var x10_on_clippi:String;
private var x10_off_clippi:String;
private var idle_clipi:String;
private var idle_dup_clipi:String;
private var proximity1_clipi:String;
private var proximity2_clipi:String;
private var touch1_clipi:String;
private var weather_good_clipi:String;
private var weather_ok_clipi:String;
private var weather_rain_clipi:String;
private var no_internet_clipi:String;
private var stock_up_clipi:String;
private var stock_no_change_clipi:String;
private var stock_down_clipi:String;
private var doorbell_clipi:String;
private var phone_clipi:String;
private var video1_clipi:String;
private var video2_clipi:String;
private var video3_clipi:String;
private var video4_clipi:String;
private var proximity3_clipi:String;
private var x10_on_clipi:String;
private var x10_off_clipi:String;
private var radio_first = 1;
//**************************************************
private var index_selected:int;
private var mode_selected:int;
private var stock_counter:int=0; //the total number of stocks
private var first_stock:int=0;
private var temp_stock_array:Array = new Array(); //used as a temp holder for the stocks
private var com_port;
private var weather_code;
private var weather_high:int;
private var good_weather_threshold:int;
private var x10_commands;
///**** arduino delays ********************
private var startup_delay:int;
private var find_arduino_delay:int; ///the delay from socket connected to requesting firmware
//private var first_video_play_delay:int; /// because the first init routine must not play until after firmware found
///****************************************
///******* Picture Frame Variables **********
private var google_id:String;
private var picasa_album_id:String;
private var slide_delay:int;
private var slide_delay_seconds:int;
private var imageArray:Array = new Array();
private var imageTimer:Timer;
private var i:int = 0;
private var URLString:String ;
private var SlideShowRunning:int = 0;
private var SlideShowStarted:int = 0;
private var PicasaLoaded:int = 0;
private var picture_x_position:Number;
private var picture_y_position:Number;
private var picture_rotation:Number;
private var picture_scale:Number;
private var display_breathalyzer_text;
private var display_stock_text;
private var display_weather_text;
private var display_weather_image;
private var display_frame;
private var display_webcamvideo;
private var picAURLRequest:URLRequest = new URLRequest;
private var picA1URLRequest:URLRequest = new URLRequest;
private var picBURLRequest:URLRequest = new URLRequest;
private var picAImageLoader:Loader = new Loader();
private var picA1ImageLoader:Loader = new Loader();
private var picBImageLoader:Loader = new Loader();
private var picAurl:String;
private var picA1url:String;
private var picBurl:String;
//private var picABitmapData:BitmapData = new BitmapData();
private var picABitmapData:BitmapData;
private var picA1BitmapData:BitmapData;
private var picA:Bitmap = new Bitmap;
private var picA1:Bitmap = new Bitmap;
private var picBBitmapData:BitmapData;
private var picB:Bitmap = new Bitmap;
private var picATimer:Timer;
private var picBTimer:Timer;
private var delayTimer:Timer;
private var num_images:int;
private var LEDOffFlag:int=1;
private var FirstProxVideoPlaying:int=0;
private var LEDTimer:Timer = new Timer(100, 1); //timer for the LEDs to blink with proximity sensor matches
private var LEDTimerOff:Timer = new Timer(100, 1); //timer for the LEDs to blink with proximity sensor matches
private var ModeSelectTimer:Timer = new Timer(500, 1); //timer for the LEDs to blink with proximity sensor matches
private var Touch1Timer:Timer = new Timer(3000,1);
private var Touch2Timer:Timer = new Timer(3000,1);
private var Touch3Timer:Timer = new Timer(3000,1);
private var Touch1PressedTimer:Timer = new Timer(100,1);
private var Touch2PressedTimer:Timer = new Timer(100,1);
private var Touch3PressedTimer:Timer = new Timer(100,1);
private var StockDisplayTextTimer:Timer = new Timer(1100,1);
private var WeatherDisplayTextTimer:Timer = new Timer(1100,1);
private var StockDisplayTextTimer5s:Timer = new Timer(5000,1);
private var WeatherDisplayTextTimer5s:Timer = new Timer(5000,1);
private var WeatherForecastText:String;
//private var doorcamLoadTimer:Timer;
private var x10_in_progress:int=0;
private var x10_counter:int=0;
//********** x-10 packet timers **********
private var x10_sleep_initial:Timer = new Timer(1,1);
private var x10_sleep35:Timer = new Timer(35,1);
private var x10_done1:Timer = new Timer(1,1);
private var x10_done2:Timer = new Timer(1,1);
private var x10_sleep1000:Timer = new Timer(1000,1);
private var touch_counter:int=0;
private var video_playing:int=0; //flag that tells me if a sensor video (not idle) is currently playing, onclip done resets it
private var x10_array:Array; //x10 byte array
private var x10_house1:String;
private var x10_house2:String;
private var x10_house3:String;
private var x10_house4:String;
private var x10_unit1:String;
private var x10_unit2:String;
private var x10_unit3:String;
private var x10_unit4:String;
private var x10_address1:String;
private var x10_address2:String;
private var x10_address3:String;
private var x10_address4:String;
private var x10_last:String;
private var X10_ON_ARRAY:Array;
private var X10_OFF_ARRAY:Array;
private var X10_BRIGHT_ARRAY:Array;
private var X10_DIM_ARRAY:Array;
private var character_change_sound_princess:Sound;
private var character_change_sound_pirate:Sound;
private var character_change_sound_halloween:Sound;
private var character_change_sound_insult:Sound;
private var myFont:Font = new MyriadFont(); //used for stock text
private var StockTextFormat:TextFormat = new TextFormat(); //this is the formatter for the stock_display field
private var WeatherTextFormat:TextFormat = new TextFormat(); //this is the formatter for the weather_display field
private var ProximityTextFormat:TextFormat = new TextFormat(); //this is the formatter for the weather_display field
private var LabelTextFormat:TextFormat = new TextFormat();
private var AlertTextFormat:TextFormat = new TextFormat();
private var InstructionsTextFormat:TextFormat = new TextFormat();
private var VersionTextFormat:TextFormat = new TextFormat();
private var stock_display:TextField = new TextField();
private var version_text:TextField = new TextField();
private var weather_display2:TextField = new TextField();
private var proximity_readout:TextField = new TextField();
private var tweetr:Tweetr;
private var oauth:OAuth;
private var htmlLoader:HTMLLoader;
private var doorcam:MJPEG;
private var doorcam_on;
private var doorcam_host;
private var doorcam_path;
private var doorcam_path_selectable:String;
private var doorcam_port;
private var doorcam_x:Number;
private var doorcam_y:Number;
private var doorcam_rotate:Number;
private var doorcam_scale:Number;
private var doorcamWidth:Number;
private var doorcamHeight:Number;
private var doorcamMaskingShape:Shape;
private var doorcam_username:String;
private var doorcam_password:String;
private var doorcam_width:Number;
private var doorcam_height:Number;
private var doorcam_timer:Number;
private var doorcam_video_x:Number;
private var doorcam_video_y:Number;
private var doorcam_video_scale:Number;
private var new_doorcam_video_scaling:Number;
private var ipcamera_selected:int;
private var thoughts_image_x:Number;
private var thoughts_image_y:Number;
private var thoughts_image_rotate:Number;
private var thoughts_image_scale:Number;
private var thoughtsLoader:Loader = new Loader();
private var thoughts_image:Bitmap;
private var thoughts_bitmapdata:BitmapData;
private var screen_mode:String;
private var weather_image:Bitmap = new Bitmap();
private var beer_image:Bitmap = new Bitmap();
private var twitterbird_image:Bitmap = new Bitmap();
private var weather_image_movie_clip : MovieClip;
private var weather_images_url:String;
private var beer_image_movie_clip : MovieClip;
private var beer_images_url:String;
private var twitterbird_image_movie_clip : MovieClip;
private var twitterbird_images_url:String;
private var stock_text_x:Number;
private var stock_text_y:Number;
private var stock_text_fontsize:Number;
private var stock_text_rotation:Number;
private var alcohol_results_text_x:Number;
private var alcohol_results_text_y:Number;
private var alcohol_results_text_fontsize:Number;
private var alcohol_results_text_rotation:Number;
private var weather_text_x:Number;
private var weather_text_y:Number;
private var weather_text_fontsize:Number;
private var weather_text_rotation:Number;
private var weather_image_x:Number;
private var weather_image_y:Number;
private var weather_image_rotation:Number;
private var weather_image_scale:Number;
private var beer_image_x:Number;
private var beer_image_y:Number;
private var beer_image_rotation:Number;
private var beer_image_scale:Number;
private var twitterbird_image_x:Number;
private var twitterbird_image_y:Number;
private var twitterbird_image_rotation:Number;
private var twitterbird_image_scale:Number;
private var frame:Bitmap = new Bitmap();
private var frame_movie_clip : MovieClip;
private var frames_url:String;
private var frame_x:Number;
private var frame_y:Number;
private var frame_rotation:Number;
private var frame_scale:Number;
///****** lipsync lip vars **********
private var Lip1_Loader:Loader = new Loader();
//private var lip1:Loader = new Loader();
private var lip1_url:String;
private var lip1_request:URLRequest;
private var lip1:Bitmap = new Bitmap();
//private var frame_movie_clip : MovieClip;
private var lip1_x:Number;
private var lip1_y:Number;
private var lip1_rotation:Number;
private var lip1_scale:Number;
//*************************************
private var selected_frame_index:int;
//private var frame_path:String;
private var frame_selected:String;
private var radiotext:TextFormat = new TextFormat();
private var editing_mode:String;
private var square:Sprite = new Sprite();
private var black_square:Sprite = new Sprite();
private var ScreenOrientationFlag:int = 0;
//private var responder:PicasaResponder = new PicasaResponder();
private var frameLoader:Loader = new Loader();
//private var frame:Bitmap;
private var frame_bitmapdata:BitmapData;
private var frame_image_x:Number;
private var frame_image_y:Number;
private var frame_image_rotate:Number;
private var frame_image_scale:Number;
private var myVid_bigger:Button = new Button();
private var myVid_smaller:Button = new Button();
private var move_upButton:Button = new Button();
private var move_leftButton:Button = new Button();
private var move_rightButton:Button = new Button();
private var move_downButton:Button = new Button();
private var SaveButton:Button = new Button();
private var goBackMain:Button = new Button();
private var BrowseAudioButton:Button = new Button();
private var weathertext_check:CheckBox = new CheckBox();
private var weathergraphic_check:CheckBox = new CheckBox();
private var webcamgraphic_check:CheckBox = new CheckBox();
private var webcamvideo_check:CheckBox = new CheckBox();
private var stocktext_check:CheckBox = new CheckBox();
private var AlcoholResults_check:CheckBox = new CheckBox();
private var Tweet_Breathalyzer_Value_check:CheckBox = new CheckBox();
private var Display_Breathalyzer_Value_check:CheckBox = new CheckBox();
private var BreathalyzerNoSwitch_check:CheckBox = new CheckBox();
private var instructions:TextField = new TextField();
private var myVid:FLVPlayback = new FLVPlayback();
private var myVid2:FLVPlayback = new FLVPlayback(); //for doorcam video
private var pic:UILoader = new UILoader();
private var doorcamedit_radio_character:RadioButton = new RadioButton;
private var doorcamedit_radio_doorcam:RadioButton = new RadioButton;
private var doorcamedit_radio_thoughts:RadioButton = new RadioButton;
private var positioningedit_radio_character:RadioButton = new RadioButton;
private var positioningedit_radio_stockText:RadioButton = new RadioButton;
private var positioningedit_radio_weatherText:RadioButton = new RadioButton;
private var positioningedit_radio_weatherImage:RadioButton = new RadioButton;
private var positioningedit_radio_webcamImage:RadioButton = new RadioButton;
private var positioningedit_radio_beerImage:RadioButton = new RadioButton;
private var positioningedit_radio_lipsync:RadioButton = new RadioButton;
private var positioningedit_radio_twitterbird:RadioButton = new RadioButton;
private var positioningedit_radio_webcamvideo:RadioButton = new RadioButton;
private var positioningedit_radio_AlcoholResults:RadioButton = new RadioButton;
private var tts_feature_radio_on:RadioButton = new RadioButton;
private var tts_feature_radio_off:RadioButton = new RadioButton;
private var tts_engine_voicerss:RadioButton = new RadioButton;
private var tts_engine_yakitome:RadioButton = new RadioButton;
private var photobooth_printing_radio_on:RadioButton = new RadioButton;
private var photobooth_printing_radio_off:RadioButton = new RadioButton;
private var tts_url:TextField = new TextField();
private var TTS_languages_dropdown:ComboBox = new ComboBox(); //dropdown
private var proximity1_tts:TextField = new TextField();
private var proximity2_tts:TextField = new TextField();
private var proximity3_tts:TextField = new TextField();
private var weather_good_tts:TextField = new TextField();
private var weather_ok_tts:TextField = new TextField();
private var weather_rain_tts:TextField = new TextField();
private var no_internet_tts:TextField = new TextField();
private var stock_up_tts:TextField = new TextField();
private var stock_no_change_tts:TextField = new TextField();
private var stock_down_tts:TextField = new TextField();
private var doorbell_tts:TextField = new TextField();
private var x10_on_tts:TextField = new TextField();
private var x10_off_tts:TextField = new TextField();
private var drink1_tts:TextField = new TextField();
private var drink2_tts:TextField = new TextField();
private var drink3_tts:TextField = new TextField();
private var drink4_tts:TextField = new TextField();
private var drink1_tweet:TextField = new TextField();
private var drink2_tweet:TextField = new TextField();
private var drink3_tweet:TextField = new TextField();
private var drink4_tweet:TextField = new TextField();
private var blow_tts:TextField = new TextField();
private var wait_tts:TextField = new TextField();
private var warning_tts:TextField = new TextField();
private var TTSTextFormat:TextFormat = new TextFormat;
private var HomeTextFormat:TextFormat = new TextFormat;
private var photobooth_printing_check:CheckBox = new CheckBox();
private var photobooth_promptprint_check:CheckBox = new CheckBox();
private var photobooth_save_check:CheckBox = new CheckBox();
private var photobooth_x10_check:CheckBox = new CheckBox();
private var photobooth_leds_check:CheckBox = new CheckBox();
private var photobooth_kinect_check:CheckBox = new CheckBox();
private var photoboothProofPreview_check:CheckBox = new CheckBox();
private var photoboothFacialRecognitionTrigger_check:CheckBox = new CheckBox();
private var photobooth_PaperSize_dropdown:ComboBox = new ComboBox();
private var photobooth_PrintCopies_label:Label = new Label();
private var photobooth_PrintCopiesValue_label:Label = new Label();
private var photobooth_SaveFolder_label:Label = new Label();
private var photobooth_SaveFolderPath_label:Label = new Label();
private var photobooth_x10HouseCode_label:Label = new Label();
private var photobooth_x10UnitCode_label:Label = new Label();
private var photobooth_WebcamResolution_label:Label = new Label();
private var photobooth_WebcamResolution_dropdown:ComboBox = new ComboBox(); //webcam resolution dropdown
private var photobooth_WebcamFPS_label:Label = new Label();
private var photobooth_CountDownFrom_label:Label = new Label();
private var photobooth_ShotDelay_label:Label = new Label();
private var photobooth_PhotoPreviewDuration_label:Label = new Label();
private var photobooth_ProofPreviewDuration_label:Label = new Label();
private var photobooth_WebcamFPSValue_label:Label = new Label();
private var photobooth_CountDownFromValue_label:Label = new Label();
private var photobooth_ShotDelayValue_label:Label = new Label();
private var photobooth_PhotoPreviewDurationValue_label:Label = new Label();
private var photobooth_ProofPreviewDurationValue_label:Label = new Label();
private var photobooth_PrintingInfo_label:Label = new Label();
private var photobooth_BackgroundImage_label:Label = new Label();
private var photobooth_BackgroundImagePath_label:Label = new Label();
private var photobooth_BackgroundImage_check:CheckBox = new CheckBox();
private var photobooth_StartupText_label:Label = new Label();
private var photobooth_PaperSize_label:Label = new Label();
private var photobooth_StartupText_textarea:TextField = new TextField();
private var photobooth_LogoImage_label:Label = new Label();
private var photobooth_LogoImagePath_label:Label = new Label();
private var photobooth_LogoImage_check:CheckBox = new CheckBox();
private var photobooth_PrintCopies_slider:Slider = new Slider();
private var photobooth_WebcamFPS_slider:Slider = new Slider();
private var photobooth_CountDownFrom_slider:Slider = new Slider();
private var photobooth_ShotDelay_slider:Slider = new Slider();
private var photobooth_PhotoPreviewDuration_slider:Slider = new Slider();
private var photobooth_ProofPreviewDuration_slider:Slider = new Slider();
/*
photobooth_printing_check
photobooth_promptprint_check
photobooth_save_check
photobooth_x10_check
photobooth_leds_check
photobooth_kinect_check
photoboothProofPreview_check
photobooth_PaperSize
photobooth_PrintCopies_label
photobooth_PrintCopiesValue_label
photobooth_SaveFolder_label
photobooth_SaveFolderPath_label
photobooth_x10HouseCode_label
photobooth_x10UnitCode_label
photobooth_WebcamResolution_label
photobooth_WebcamResolution_dropdown
photobooth_WebcamFPS_label
photobooth_CountDownFrom_label
photobooth_ShotDelay_label
photobooth_PhotoPreviewDuration_label
photobooth_ProofPreviewDuration_label
photobooth_WebcamFPSValue_label
photobooth_CountDownFromValue_label
photobooth_ShotDelayValue_label
photobooth_PhotoPreviewDurationValue_label
photobooth_ProofPreviewDurationValue_label
photobooth_PrintCopies_slider
photobooth_WebcamFPS_slider
photobooth_CountDownFrom_slider
photobooth_ShotDelay_slider
photobooth_PhotoPreviewDuration_slider
photobooth_ProofPreviewDuration_slider
*/
//private var photobooth_videoQuality:TextField = new TextField();
private var photobooth_videoQuality:Slider = new Slider();
private var photobooth_videoQuality_sliderlabel:Label = new Label();
private var photobooth_videoWidth:TextField = new TextField();
private var photobooth_videoHeight:TextField = new TextField();
private var photobooth_fps:TextField = new TextField();
private var photobooth_countdown:TextField = new TextField();
private var photobooth_print_copies:TextField = new TextField();
private var photoboothShotDelay:TextField = new TextField();
private var photoboothGalleryTimer:TextField = new TextField();
private var photoboothProofDisplayTime:TextField = new TextField();
private var photobooth_videoQuality_label:TextField = new TextField();
private var photobooth_videoWidth_label:TextField = new TextField();
private var photobooth_videoHeight_label:TextField = new TextField();
private var photobooth_fps_label:TextField = new TextField();
private var photobooth_countdown_label:TextField = new TextField();
private var photobooth_print_copies_label:TextField = new TextField();
private var photoboothShotDelay_label:TextField = new TextField();
private var photoboothGalleryTimer_label:TextField = new TextField();
private var photoboothProofDisplayTime_label:TextField = new TextField();
private var tts_feature_label:TextField = new TextField(); //radio button
private var tts_url_label:TextField = new TextField();
private var tts_language_label:TextField = new TextField();
private var tts_engine_label:TextField = new TextField();
private var custom_audio_path_label:TextField = new TextField(); //drop down
private var proximity1_tts_label:TextField = new TextField();
private var proximity2_tts_label:TextField = new TextField();
private var proximity3_tts_label:TextField = new TextField();
private var weather_good_tts_label:TextField = new TextField();
private var weather_ok_tts_label:TextField = new TextField();
private var weather_rain_tts_label:TextField = new TextField();
private var no_internet_tts_label:TextField = new TextField();
private var stock_up_tts_label:TextField = new TextField();
private var stock_no_change_tts_label:TextField = new TextField();
private var stock_down_tts_label:TextField = new TextField();
private var doorbell_tts_label:TextField = new TextField();
private var x10_on_tts_label:TextField = new TextField();
private var x10_off_tts_label:TextField = new TextField();
private var drink1_tts_label:TextField = new TextField();
private var drink2_tts_label:TextField = new TextField();
private var drink3_tts_label:TextField = new TextField();
private var drink4_tts_label:TextField = new TextField();
private var tts_instructions:TextField = new TextField;
private var blow_tts_label:TextField = new TextField();
private var wait_tts_label:TextField = new TextField();
private var warning_tts_label:TextField = new TextField();
private var drink1_tweet_label:TextField = new TextField();
private var drink2_tweet_label:TextField = new TextField();
private var drink3_tweet_label:TextField = new TextField();
private var drink4_tweet_label:TextField = new TextField();
private var tts_api_key:TextField = new TextField();
private var tts_api_key_label:TextField = new TextField();
private var tts_api_keyYakitome:TextField = new TextField();
private var tts_api_key_labelYakitome:TextField = new TextField();
private var TTSTextLabelFormat:TextFormat = new TextFormat;
private var photoboothTextLabelFormat:TextFormat = new TextFormat;
private var BlueTextLabelFormat:TextFormat = new TextFormat;
private var TTS_Screen_Label:TextField = new TextField();
private var TTS_Screen_LabelFormat:TextFormat = new TextFormat;
private var photobooth_Screen_Label:TextField = new TextField();
private var photobooth_Screen_LabelFormat:TextFormat = new TextFormat;
private var alcohol_baseline_text:TextField = new TextField();
private var alcohol_level1_text:TextField = new TextField();
private var alcohol_level2_text:TextField = new TextField();
private var alcohol_level3_text:TextField = new TextField();
private var alcohol_baseline_difference_allowance_text:TextField = new TextField();
private var alcohol_countdown_text:TextField = new TextField();
private var AlcoholTextFormat:TextFormat = new TextFormat;
private var AlcoholResultsFormat:TextFormat = new TextFormat(); //this is the formatter for the startup text field
private var AlcoholResults:TextField = new TextField;
private var positioning_instructions:TextField = new TextField;
private var alcohol_baseline_label:TextField = new TextField();
private var alcohol_level1_label:TextField = new TextField();
private var alcohol_level2_label:TextField = new TextField();
private var alcohol_level3_label:TextField = new TextField();
private var alcohol_baseline_difference_allowance_label:TextField = new TextField();
private var alcohol_countdown_label:TextField = new TextField();
private var AlcoholTextLabelFormat:TextFormat = new TextFormat;
private var alcohol_help_button:Button = new Button();
private var Breathalyzer_Label:TextField = new TextField();
private var Breathalyzer_LabelFormat:TextFormat = new TextFormat;
private var Breathalyzer_WarningLabel:TextField = new TextField();
private var Breathalyzer_WarningLabelFormat:TextFormat = new TextFormat;
private var mode_rbg:RadioButtonGroup = new RadioButtonGroup("mode_rbg");
private var fullscreen_rbg:RadioButtonGroup = new RadioButtonGroup("fullscreen_rbg");
private var doorcamedit_rbg:RadioButtonGroup = new RadioButtonGroup("doorcamedit_rbg");
private var positioningedit_rbg:RadioButtonGroup = new RadioButtonGroup("positioningedit_rbg");
private var screenMode_rbg:RadioButtonGroup = new RadioButtonGroup("screenMode_rbg");
private var prox2beforeprox1_rbg:RadioButtonGroup = new RadioButtonGroup("prox2beforeprox1_rbg");
private var video_resolution_rbg:RadioButtonGroup = new RadioButtonGroup("video_resolution_rbg");
private var LEDmode_rbg:RadioButtonGroup = new RadioButtonGroup("LEDmode_rbg");
private var twitter_rbg:RadioButtonGroup = new RadioButtonGroup("twitter_rbg");
private var twitter_mode_rbg:RadioButtonGroup = new RadioButtonGroup("twitter_mode_rbg");
private var AlcoholResults_readout_rbg:RadioButtonGroup = new RadioButtonGroup("AlcoholResults_readout_rbg");
private var TTS_rbg:RadioButtonGroup = new RadioButtonGroup("TTS_rbg");
private var TTS_rbg_engine:RadioButtonGroup = new RadioButtonGroup("TTS_rbg_engine");
private var photobooth_printing_rbg:RadioButtonGroup = new RadioButtonGroup("photobooth_printing_rbg");
private var frame_rbg:RadioButtonGroup = new RadioButtonGroup("frame_rbg");
private var webcamvideo_rbg:RadioButtonGroup = new RadioButtonGroup("webcamvideo_rbg");
private var lipsync_checkbox:CheckBox = new CheckBox();
private var homepath:String;
private var custom_audio_path:String;
private var internet:int=0;
private var fileMenu:NativeMenuItem;
///******************************************
//var service : PicasaService = new PicasaService();
//// ***************************************////
public function configure():void {
// *********************************************************
// Load the XML config file
NativeApplication.nativeApplication.addEventListener(InvokeEvent.INVOKE, onInvoke); //event that the program was launched, load the mirror.xml
//service.imgmax = "1600"; // 1600 largest size possible to use from Picasa
//service.thumbsize = "64c"; // not used
//stage.align = StageAlign.TOP_LEFT;
//stage.scaleMode = StageScaleMode.NO_SCALE;
//var window:NativeWindow = stage.nativeWindow;
//window.maximize();
if (NativeWindow.supportsMenu){
stage.nativeWindow.menu = new NativeMenu();
stage.nativeWindow.menu.addEventListener(Event.SELECT, selectCommandMenu);
fileMenu = stage.nativeWindow.menu.addItem(new NativeMenuItem("Configure Additional Items"));
fileMenu.submenu = createFileMenu();
}
if (NativeApplication.supportsMenu){
NativeApplication.nativeApplication.menu.addEventListener(Event.SELECT, selectCommandMenu);
fileMenu = NativeApplication.nativeApplication.menu.addItem(new NativeMenuItem("Configure Additional Items"));
fileMenu.submenu = createFileMenu();
}
} // end mirror function *************************************
private function createFileMenu():NativeMenu {
var fileMenu:NativeMenu = new NativeMenu();
fileMenu.addEventListener(Event.SELECT, selectCommandMenu);
//goBackMainScreen);
var viewmodeCommand:NativeMenuItem = fileMenu.addItem(new NativeMenuItem("Adjust Character Size and Positioning"));
viewmodeCommand.addEventListener(Event.SELECT, PositioningScreenButtonEvent);
/* var PicasaCommand:NativeMenuItem = fileMenu.addItem(new NativeMenuItem("Picasa Slide Show Size and Positioning"));
PicasaCommand.addEventListener(Event.SELECT, PositioningScreenPicasaButtonEvent); */
var photoboothCommand:NativeMenuItem = fileMenu.addItem(new NativeMenuItem("Photobooth"));
photoboothCommand.addEventListener(Event.SELECT, photoboothButtonEvent);
var breathalyzerCommand:NativeMenuItem = fileMenu.addItem(new NativeMenuItem("Breathalyzer Calibration and Settings"));
breathalyzerCommand.addEventListener(Event.SELECT, BreathalyzerButtonEvent);
//var customaudioCommand:NativeMenuItem = fileMenu.addItem(new NativeMenuItem("Custom Audio and Text to Speech Mode"));
var customaudioCommand:NativeMenuItem = fileMenu.addItem(new NativeMenuItem("Text to Speech & Custom Audio Mode"));
customaudioCommand.addEventListener(Event.SELECT, TTSButtonEvent);
var doorcamCommand:NativeMenuItem = fileMenu.addItem(new NativeMenuItem("Doorcam (IP Camera Required)"));
doorcamCommand.addEventListener(Event.SELECT, PositioningScreenDoorcamButtonEvent);
return fileMenu;
}
private function selectCommand(event:Event):void {
trace("Selected command: " + event.target.label);
}
private function selectCommandMenu(event:Event):void {
if (event.currentTarget.parent != null) {
var menuItem:NativeMenuItem =
findItemForMenu(NativeMenu(event.currentTarget));
if (menuItem != null) {
trace("Select event for \"" +
event.target.label +
"\" command handled by menu: " +
menuItem.label);
}
} else {
trace("Select event for \"" +
event.target.label +
"\" command handled by root menu.");
}
}
private function findItemForMenu(menu:NativeMenu):NativeMenuItem {
for each (var item:NativeMenuItem in menu.parent.items) {
if (item != null) {
if (item.submenu == menu) {
return item;
}
}
}
return null;
}
private function onInvoke(invokeEvent:InvokeEvent):void {
if (invokeEvent.currentDirectory != null)
{
trace("path before change " + invokeEvent.currentDirectory.nativePath);
PhotoSaveDir = File.documentsDirectory; //this is used later for the photobooth path
PhotoSaveDir = PhotoSaveDir.resolvePath("diymagicmirror-settings/Photobooth/Photos");
switch (osType) {
case "MAC":
file = File.documentsDirectory; //the user dir, my documnets/%username in windows or /users/%username on mac
file = file.resolvePath("diymagicmirror-settings/mirrorconfig.xml"); //now see if the config file is there
if (file.exists == false) { //if not, then create it for the first time in the user directory
CreateConfig(); //call the routine to create the XML file for the first time
}
file2 = File.desktopDirectory;
file2 = file2.resolvePath("../../../Applications/DIY Magic Mirror/mirror.app/Contents/Resources/");
homepath =String(file2.nativePath) + "/";
break;
case "WIN":
file = File.documentsDirectory; //the user dir, my documnets/%username in windows or /users/%username on mac
file = file.resolvePath("diymagicmirror-settings/mirrorconfig.xml"); //now see if the config file is there
if (file.exists == false) { //if not, then create it for the first time in the user directory
CreateConfig(); //call the routine to create the XML file for the first time
}
file3 = file3 = File.desktopDirectory;
file3 = file3.resolvePath("../../../Program Files/DIY Magic Mirror/mirror/mirror.exe");
file2 = File.desktopDirectory;
file2 = file2.resolvePath("../../../Program Files/DIY Magic Mirror/mirror/");
if (file3.exists == false) { //if still false, then must be 64-bit
file2 = File.desktopDirectory;
file2 = file2.resolvePath("../../../Program Files (x86)/DIY Magic Mirror/mirror/");
}
homepath = String(file2.nativePath) + "/";
break;
case "LNX":
file = File.documentsDirectory; //the user dir, my documnets/%username in windows or /users/%username on mac
file = file.resolvePath("diymagicmirror-settings/mirrorconfig.xml"); //now see if the config file is there
if (file.exists == false) { //if not, then create it for the first time in the user directory
CreateConfig(); //call the routine to create the XML file for the first time
}
file2 = File.desktopDirectory;
file2 = file2.resolvePath("../../../opt/DIY Magic Mirror/mirror/share");
homepath =String(file2.nativePath) + "/";
break;
default:
output.text = "Unable to detect OS";
trace ("Unable to detect OS");
file = File.documentsDirectory; //the user dir, my documnets/%username in windows or /users/%username on mac
file = file.resolvePath("diymagicmirror-settings/mirrorconfig.xml"); //now see if the config file is there
if (file.exists == false) { //if not, then create it for the first time in the user directory
CreateConfig(); //call the routine to create the XML file for the first time
}
file3 = file3 = File.desktopDirectory;
file3 = file3.resolvePath("../../../Program Files/DIY Magic Mirror/mirror/mirror.exe");
file2 = File.desktopDirectory;
file2 = file2.resolvePath("../../../Program Files/DIY Magic Mirror/mirror/");
if (file3.exists == false) { //if still false, then must be 64-bit
file2 = File.desktopDirectory;
file2 = file2.resolvePath("../../../Program Files (x86)/DIY Magic Mirror/mirror/");
}
homepath = String(file2.nativePath) + "/";
break;
} //end switch
//********* let's check for Internet connectivity************
var loader:URLLoader = new URLLoader();
configureListeners(loader);
var request:URLRequest = new URLRequest("http://www.google.com");
try {
loader.load(request);
} catch (error:Error) {
trace("Unable to load requested document.");
}
//**************************************************************
RunMirror(); //now that we have the path to mirror.xml, continue
}
else
{
//file = file.resolvePath("../../../Program Files/DIY Magic Mirror/mirror.xml");
trace("mirrorconfig.xml missing from DIY Magic Mirror directory");
}
}
private function configureListeners(dispatcher:IEventDispatcher):void {
dispatcher.addEventListener(Event.COMPLETE, completeHandler);
dispatcher.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
}
private function completeHandler(event:Event):void {
var loader:URLLoader = URLLoader(event.target);
trace("completeHandler: " + loader.data);
trace("have internet");
internet = 1;
}
private function ioErrorHandler(event:IOErrorEvent):void {
trace("ioErrorHandler: " + event);
trace("no internet");
internet = 0;
}
//public function RunMirror(event:Event):void { //triggered after config file loaded
public function RunMirror():void { //triggered after config file loaded
trace ("internet value: " + internet);
trace(file.exists); // true
if (file.exists == false) {
output.text = "mirrorconfig.xml is missing";
}
AlertTextFormat.color = 0x000000; //black
AlertTextFormat.font = myFont.fontName;
AlertTextFormat.size = 30; //70 default
AlertManager.overlayAlpha = .8;
AlertManager.maxWidth = 800;
AlertManager.hasDropShadow = true;
AlertManager.setMessageBoxStyle("textFormat", AlertTextFormat);
filestream.open(file, FileMode.READ); //open the file and close it
myXML = XML(filestream.readUTFBytes(filestream.bytesAvailable));
filestream.close();
//now let's check and make sure the config file corresponds to the version this code is expecting and if not, let's create a new one
//use this later when a new config XML needs to be created on the fly
if (Number(myXML.version) < 7.8) { //this means user's config file was old and needs to be updated but we'll also save the user's settings so they don't have to re-type
AlertManager.createAlert(this, "Your configuration file was an older version and has been updated, your current settings have been maintained");
//before blowing the file away, let's read it into another XML so we have a record of the old settings
filestream.open(file, FileMode.READ);
myXMLold = XML(filestream.readUTFBytes(filestream.bytesAvailable));
filestream.close();
CreateConfig(); //create the the new myXML file and then over-write it with the old settings
filestream.open(file, FileMode.READ); //read the myXML file
myXML = XML(filestream.readUTFBytes(filestream.bytesAvailable));
filestream.close();
//switch6 and alcohol sensor settings were added in v4
//now take the old values from myXMLold and over-write them into the new myXML
if (myXMLold.mirror_mode != undefined) { myXML.mirror_mode = myXMLold.mirror_mode; }
if (myXMLold.verbose != undefined) { myXML.verbose = myXMLold.verbose; }
if (myXMLold.screen_mode != undefined) { myXML.screen_mode = myXMLold.screen_mode; }
if (myXMLold.idle_videos != undefined) { myXML.idle_videos = myXMLold.idle_videos; }
if (myXMLold.video_resolution != undefined) { myXML.video_resolution = myXMLold.video_resolution; }
if (myXMLold.digital_switches != undefined) { myXML.digital_switches = myXMLold.digital_switches; }
if (myXMLold.switch1 != undefined) { myXML.switch1 = myXMLold.switch1; }
if (myXMLold.switch2 != undefined) { myXML.switch2 = myXMLold.switch2; }
if (myXMLold.switch3 != undefined) { myXML.switch3 = myXMLold.switch3; }
if (myXMLold.switch4 != undefined) { myXML.switch4 = myXMLold.switch4; }
if (myXMLold.switch5 != undefined) { myXML.switch5 = myXMLold.switch5; }
if (myXMLold.switch6 != undefined) { myXML.switch6 = myXMLold.switch6; }
if (myXMLold.debounce != undefined) { myXML.debounce = myXMLold.debounce; }
if (myXMLold.debounce1 != undefined) { myXML.debounce1 = myXMLold.debounce1; }
if (myXMLold.debounce2 != undefined) { myXML.debounce2 = myXMLold.debounce2; }
if (myXMLold.switch1_trigger != undefined) { myXML.switch1_trigger = myXMLold.switch1_trigger; }
if (myXMLold.switch2_trigger != undefined) { myXML.switch2_trigger = myXMLold.switch2_trigger; }
if (myXMLold.switch3_trigger != undefined) { myXML.switch3_trigger = myXMLold.switch3_trigger; }
if (myXMLold.switch4_trigger != undefined) { myXML.switch4_trigger = myXMLold.switch4_trigger; }
if (myXMLold.switch5_trigger != undefined) { myXML.switch5_trigger = myXMLold.switch5_trigger; }
if (myXMLold.switch6_trigger != undefined) { myXML.switch6_trigger = myXMLold.switch6_trigger; }
if (myXMLold.digital2_video1 != undefined) { myXML.digital2_video1 = myXMLold.digital2_video1; }
if (myXMLold.digital3_video2 != undefined) { myXML.digital3_video2 = myXMLold.digital3_video2; }
if (myXMLold.digital5_video3 != undefined) { myXML.digital5_video3 = myXMLold.digital5_video3; }
if (myXMLold.quiz_mode != undefined) { myXML.quiz_mode = myXMLold.quiz_mode; }
if (myXMLold.quiz_correctanswer != undefined) { myXML.quiz_correctanswer = myXMLold.quiz_correctanswer; }
if (myXMLold.quiz_timer != undefined) { myXML.quiz_timer = myXMLold.quiz_timer; }
if (myXMLold.video_interrupts != undefined) { myXML.video_interrupts = myXMLold.video_interrupts; }
if (myXMLold.x10_commands != undefined) { myXML.x10_commands = myXMLold.x10_commands; }
if (myXMLold.x10_house1 != undefined) { myXML.x10_house1 = myXMLold.x10_house1; }
if (myXMLold.x10_house2 != undefined) { myXML.x10_house2 = myXMLold.x10_house2; }
if (myXMLold.x10_house3 != undefined) { myXML.x10_house3 = myXMLold.x10_house3; }
if (myXMLold.x10_house4 != undefined) { myXML.x10_house4 = myXMLold.x10_house4; }
if (myXMLold.x10_unit1 != undefined) { myXML.x10_unit1 = myXMLold.x10_unit1; }
if (myXMLold.x10_unit2 != undefined) { myXML.x10_unit2 = myXMLold.x10_unit2; }
if (myXMLold.x10_unit3 != undefined) { myXML.x10_unit3 = myXMLold.x10_unit3; }
if (myXMLold.x10_unit4 != undefined) { myXML.x10_unit4 = myXMLold.x10_unit4; }
if (myXMLold.x10_wait != undefined) { myXML.x10_wait = myXMLold.x10_wait; }
if (myXMLold.x10_resends != undefined) { myXML.x10_resends = myXMLold.x10_resends; }
if (myXMLold.proximity_sensor_on != undefined) { myXML.proximity_sensor_on = myXMLold.proximity_sensor_on; }
if (myXMLold.analog_input1 != undefined) { myXML.analog_input1 = myXMLold.analog_input1; }
if (myXMLold.analog_input2 != undefined) { myXML.analog_input2 = myXMLold.analog_input2; }
if (myXMLold.analog_input3 != undefined) { myXML.analog_input3 = myXMLold.analog_input3; }
if (myXMLold.analog1_video1 != undefined) { myXML.analog1_video1 = myXMLold.analog1_video1; }
if (myXMLold.analog2_video2 != undefined) { myXML.analog2_video2 = myXMLold.analog2_video2; }
if (myXMLold.analog3_video3 != undefined) { myXML.analog3_video3 = myXMLold.analog3_video3; }
if (myXMLold.analog3_prox != undefined) { myXML.analog3_prox = myXMLold.analog3_prox; }
if (myXMLold.digital1_prox != undefined) { myXML.digital1_prox = myXMLold.digital1_prox; }
if (myXMLold.hardware_mode_select != undefined) { myXML.hardware_mode_select = myXMLold.hardware_mode_select; }
if (myXMLold.proximity_sensor_trigger1_distance_lower != undefined) { myXML.proximity_sensor_trigger1_distance_lower = myXMLold.proximity_sensor_trigger1_distance_lower; }
if (myXMLold.proximity_sensor_trigger1_distance_upper != undefined) { myXML.proximity_sensor_trigger1_distance_upper = myXMLold.proximity_sensor_trigger1_distance_upper; }
if (myXMLold.proximity_sensor_trigger1_time != undefined) { myXML.proximity_sensor_trigger1_time = myXMLold.proximity_sensor_trigger1_time; }
if (myXMLold.proximity_sensor_trigger2_distance_lower != undefined) { myXML.proximity_sensor_trigger2_distance_lower = myXMLold.proximity_sensor_trigger2_distance_lower; }
if (myXMLold.proximity_sensor_trigger2_distance_upper != undefined) { myXML.proximity_sensor_trigger2_distance_upper = myXMLold.proximity_sensor_trigger2_distance_upper; }
if (myXMLold.proximity_sensor_trigger2_time != undefined) { myXML.proximity_sensor_trigger2_time = myXMLold.proximity_sensor_trigger2_time; }
if (myXMLold.proximity_sensor_trigger2_distance != undefined ) { myXML.proximity_sensor_trigger2_distance = myXMLold.proximity_sensor_trigger2_distance; }
if (myXMLold.prox2_before_prox1 != undefined) { myXML.prox2_before_prox1 = myXMLold.prox2_before_prox1; }
if (myXMLold.stock_good_threshold != undefined) { myXML.stock_good_threshold = myXMLold.stock_good_threshold; }
if (myXMLold.stock_bad_threshold != undefined) { myXML.stock_bad_threshold = myXMLold.stock_bad_threshold; }
if (myXMLold.no_resize != undefined) { myXML.no_resize = myXMLold.no_resize; }
if (myXMLold.video_scaling_factor != undefined) { myXML.video_scaling_factor = myXMLold.video_scaling_factor; }
if (myXMLold.x_position != undefined) { myXML.x_position = myXMLold.x_position; }
if (myXMLold.y_position != undefined) { myXML.y_position = myXMLold.y_position; }
if (myXMLold.video_rotation != undefined) { myXML.video_rotation = myXMLold.video_rotation; }
if (myXMLold.com_port != undefined) { myXML.com_port = myXMLold.com_port; }
if (myXMLold.startup_delay != undefined) { myXML.startup_delay = myXMLold.startup_delay; }
if (myXMLold.reg_code != undefined) { myXML.reg_code = myXMLold.reg_code; }
if (myXMLold.weather_zip != undefined) { myXML.weather_zip = myXMLold.weather_zip; }
if (myXMLold.weather_woeid != undefined) { myXML.weather_woeid = myXMLold.weather_woeid; }
if (myXMLold.weather_reading != undefined) { myXML.weather_reading = myXMLold.weather_reading; }
if (myXMLold.weather_display != undefined) { myXML.weather_display = myXMLold.weather_display; }
if (myXMLold.forecast_cutoff != undefined) { myXML.forecast_cutoff = myXMLold.forecast_cutoff; }
if (myXMLold.good_weather_threshold != undefined) { myXML.good_weather_threshold = myXMLold.good_weather_threshold; }
if (myXMLold.display_breathalyzer_text != undefined) { myXML.display_breathalyzer_text = myXMLold.display_breathalyzer_text; }
if (myXMLold.display_stock_text != undefined) { myXML.display_stock_text = myXMLold.display_stock_text; }
if (myXMLold.display_weather_text != undefined) { myXML.display_weather_text = myXMLold.display_weather_text; }
if (myXMLold.display_weather_image != undefined) { myXML.display_weather_image = myXMLold.display_weather_image; }
if (myXMLold.weather_images_url != undefined) { myXML.weather_images_url = myXMLold.weather_images_url; }
if (myXMLold.alcohol_results_text_x != undefined) { myXML.alcohol_results_text_x = myXMLold.alcohol_results_text_x; }
if (myXMLold.alcohol_results_text_y != undefined) { myXML.alcohol_results_text_y = myXMLold.alcohol_results_text_y; }
if (myXMLold.alcohol_results_text_fontsize != undefined) { myXML.alcohol_results_text_fontsize = myXMLold.alcohol_results_text_fontsize; }
if (myXMLold.alcohol_results_text_rotation != undefined) { myXML.alcohol_results_text_rotation = myXMLold.alcohol_results_text_rotation; }
if (myXMLold.stock_text_x != undefined) { myXML.stock_text_x = myXMLold.stock_text_x; }
if (myXMLold.stock_text_y != undefined) { myXML.stock_text_y = myXMLold.stock_text_y; }
if (myXMLold.stock_text_fontsize != undefined) { myXML.stock_text_fontsize = myXMLold.stock_text_fontsize; }
if (myXMLold.stock_text_rotation != undefined) { myXML.stock_text_rotation = myXMLold.stock_text_rotation; }
if (myXMLold.weather_text_x != undefined) { myXML.weather_text_x = myXMLold.weather_text_x; }
if (myXMLold.weather_text_y != undefined) { myXML.weather_text_y = myXMLold.weather_text_y; }
if (myXMLold.weather_text_fontsize != undefined) { myXML.weather_text_fontsize = myXMLold.weather_text_fontsize; }
if (myXMLold.weather_text_rotation != undefined) { myXML.weather_text_rotation = myXMLold.weather_text_rotation; }
if (myXMLold.weather_image_x != undefined) { myXML.weather_image_x = myXMLold.weather_image_x; }
if (myXMLold.weather_image_y != undefined) { myXML.weather_image_y = myXMLold.weather_image_y; }
if (myXMLold.weather_image_rotation != undefined) { myXML.weather_image_rotation = myXMLold.weather_image_rotation; }
if (myXMLold.weather_image_scale != undefined) { myXML.weather_image_scale = myXMLold.weather_image_scale; }
if (myXMLold.doorcam_on != undefined) { myXML.doorcam_on = myXMLold.doorcam_on; }
if (myXMLold.doorcam_host != undefined) { myXML.doorcam_host = myXMLold.doorcam_host; }
if (myXMLold.doorcam_path != undefined) { myXML.doorcam_path = myXMLold.doorcam_path; }
if (myXMLold.doorcam_make != undefined) { myXML.doorcam_make = myXMLold.doorcam_make; }
if (myXMLold.doorcam_port != undefined) { myXML.doorcam_port = myXMLold.doorcam_port; }
if (myXMLold.doorcam_x != undefined) { myXML.doorcam_x = myXMLold.doorcam_x; }
if (myXMLold.doorcam_y != undefined) { myXML.doorcam_y = myXMLold.doorcam_y; }
if (myXMLold.doorcam_rotate != undefined) { myXML.doorcam_rotate = myXMLold.doorcam_rotate; }
if (myXMLold.doorcam_scale != undefined) { myXML.doorcam_scale = myXMLold.doorcam_scale; }
if (myXMLold.doorcam_username != undefined) { myXML.doorcam_username = myXMLold.doorcam_username; }
if (myXMLold.doorcam_password != undefined) { myXML.doorcam_password = myXMLold.doorcam_password; }
if (myXMLold.doorcam_width != undefined) { myXML.doorcam_width = myXMLold.doorcam_width; }
if (myXMLold.doorcam_height != undefined) { myXML.doorcam_height = myXMLold.doorcam_height; }
if (myXMLold.doorcam_timer != undefined) { myXML.doorcam_timer = myXMLold.doorcam_timer; }
if (myXMLold.doorcam_video_x != undefined) { myXML.doorcam_video_x = myXMLold.doorcam_video_x; }
if (myXMLold.doorcam_video_y != undefined) { myXML.doorcam_video_y = myXMLold.doorcam_video_y; }
if (myXMLold.doorcam_video_scale != undefined) { myXML.doorcam_video_scale = myXMLold.doorcam_video_scale; }
if (myXMLold.webcam_on != undefined) { myXML.webcam_on = myXMLold.webcam_on; }
if (myXMLold.webcam_width != undefined) { myXML.webcam_width = myXMLold.webcam_width; }
if (myXMLold.webcam_height != undefined) { myXML.webcam_height = myXMLold.webcam_height; }
if (myXMLold.webcam_fps != undefined) { myXML.webcam_fps = myXMLold.webcam_fps; }
if (myXMLold.faceDetectInterval != undefined) { myXML.faceDetectInterval = myXMLold.faceDetectInterval; }
if (myXMLold.noFaceTimeout != undefined) { myXML.noFaceTimeout = myXMLold.noFaceTimeout; }
if (myXMLold.faceDetectrectColor != undefined) { myXML.faceDetectrectColor = myXMLold.faceDetectrectColor; }
if (myXMLold.webcam_x != undefined) { myXML.webcam_x = myXMLold.webcam_x; }
if (myXMLold.webcam_y != undefined) { myXML.webcam_y = myXMLold.webcam_y; }
if (myXMLold.webcam_rotation != undefined) { myXML.webcam_rotation = myXMLold.webcam_rotation; }
if (myXMLold.webcam_scale != undefined) { myXML.webcam_scale = myXMLold.webcam_scale; }
if (myXMLold.webcamStealth != undefined) { myXML.webcamStealth = myXMLold.webcamStealth; }
if (myXMLold.frame != undefined) { myXML.frame = myXMLold.frame; }
if (myXMLold.frame_x != undefined) { myXML.frame_x = myXMLold.frame_x; }
if (myXMLold.frame_y != undefined) { myXML.frame_y = myXMLold.frame_y; }
if (myXMLold.frame_rotation != undefined) { myXML.frame_rotation = myXMLold.frame_rotation; }
if (myXMLold.frame_scale != undefined) { myXML.frame_scale = myXMLold.frame_scale; }
if (myXMLold.frame_selected != undefined) { myXML.frame_selected = myXMLold.frame_selected; }
if (myXMLold.frame_selected_index != undefined) { myXML.frame_selected_index = myXMLold.frame_selected_index; }
if (myXMLold.stand_alone != undefined) { myXML.stand_alone = myXMLold.stand_alone; }
if (myXMLold.stand_alone_weather != undefined) { myXML.stand_alone_weather = myXMLold.stand_alone_weather; }
if (myXMLold.stand_alone_stock != undefined) { myXML.stand_alone_stock = myXMLold.stand_alone_stock; }
if (myXMLold.doorcam_video_y != undefined) { myXML.doorcam_video_y = myXMLold.doorcam_video_y; }
if (myXMLold.doorcam_video_scale != undefined) { myXML.doorcam_video_scale = myXMLold.doorcam_video_scale; }
if (myXMLold.doorcam_video_y != undefined) { myXML.doorcam_video_y = myXMLold.doorcam_video_y; }
if (myXMLold.doorcam_video_scale != undefined) { myXML.doorcam_video_scale = myXMLold.doorcam_video_scale; }
if (myXMLold.thoughts_image_x != undefined) { myXML.thoughts_image_x = myXMLold.thoughts_image_x; }
if (myXMLold.thoughts_image_y != undefined) { myXML.thoughts_image_y = myXMLold.thoughts_image_y; }
if (myXMLold.thoughts_image_rotate != undefined) { myXML.thoughts_image_rotate = myXMLold.thoughts_image_rotate; }
if (myXMLold.thoughts_image_scale != undefined) { myXML.thoughts_image_scale = myXMLold.thoughts_image_scale; }
if (myXMLold.picasa_insteadofphotobooth != undefined) { myXML.picasa_insteadofphotobooth = myXMLold.picasa_insteadofphotobooth; }
if (myXMLold.photobooth_printing != undefined) { myXML.photobooth_printing = myXMLold.photobooth_printing; }
if (myXMLold.photobooth_promptprint != undefined) { myXML.photobooth_promptprint = myXMLold.photobooth_promptprint; }
if (myXMLold.photobooth_papersize != undefined) { myXML.photobooth_papersize = myXMLold.photobooth_papersize; }
if (myXMLold.photobooth_printorientation != undefined) { myXML.photobooth_printorientation = myXMLold.photobooth_printorientation; }
if (myXMLold.photobooth_scaling != undefined) { myXML.photobooth_scaling = myXMLold.photobooth_scaling; }
if (myXMLold.photobooth_logo != undefined) { myXML.photobooth_logo = myXMLold.photobooth_logo; }
if (myXMLold.photobooth_logoPath != undefined) { myXML.photobooth_logoPath = myXMLold.photobooth_logoPath; }
if (myXMLold.photobooth_logo_x != undefined) { myXML.photobooth_logo_x = myXMLold.photobooth_logo_x; }
if (myXMLold.photobooth_logo_y != undefined) { myXML.photobooth_logo_y = myXMLold.photobooth_logo_y; }
if (myXMLold.photobooth_keyboardtrigger != undefined) { myXML.photobooth_keyboardtrigger = myXMLold.photobooth_keyboardtrigger; }
if (myXMLold.photobooth_backgroundimage != undefined) { myXML.photobooth_backgroundimage = myXMLold.photobooth_backgroundimage; }
if (myXMLold.photobooth_backdropimage != undefined) { myXML.photobooth_backdropimage = myXMLold.photobooth_backdropimage; }
if (myXMLold.photobooth_backgroundboxes != undefined) { myXML.photobooth_backgroundboxes = myXMLold.photobooth_backgroundboxes; }
if (myXMLold.photobooth_countdownimage != undefined) { myXML.photobooth_countdownimage = myXMLold.photobooth_countdownimage; }
if (myXMLold.photobooth_backgroundcustomimage != undefined) { myXML.photobooth_backgroundcustomimage = myXMLold.photobooth_backgroundcustomimage; }
if (myXMLold.photobooth_backgroundcustomimagepath != undefined) { myXML.photobooth_backgroundcustomimagepath = myXMLold.photobooth_backgroundcustomimagepath; }
if (myXMLold.photobooth_backgroundcustomimage_x != undefined) { myXML.photobooth_backgroundcustomimage_x = myXMLold.photobooth_backgroundcustomimage_x; }
if (myXMLold.photobooth_backgroundcustomimage_y != undefined) { myXML.photobooth_backgroundcustomimage_y = myXMLold.photobooth_backgroundcustomimage_y; }
if (myXMLold.photobooth_startuptext != undefined) { myXML.photobooth_startuptext = myXMLold.photobooth_startuptext; }
if (myXMLold.photobooth_save != undefined) { myXML.photobooth_save = myXMLold.photobooth_save; }
if (myXMLold.photobooth_fullres_save != undefined) { myXML.photobooth_fullres_save = myXMLold.photobooth_fullres_save; }
if (myXMLold.photobooth_savefolder != undefined) { myXML.photobooth_savefolder = myXMLold.photobooth_savefolder; }
if (myXMLold.photobooth_x10 != undefined) { myXML.photobooth_x10 = myXMLold.photobooth_x10; }
if (myXMLold.photobooth_leds != undefined) { myXML.photobooth_leds = myXMLold.photobooth_leds; }
if (myXMLold.photobooth_kinect != undefined) { myXML.photobooth_kinect = myXMLold.photobooth_kinect; }
if (myXMLold.photobooth_hidemouse != undefined) { myXML.photobooth_hidemouse = myXMLold.photobooth_hidemouse; }
if (myXMLold.photobooth_videoBandwidth != undefined) { myXML.photobooth_videoBandwidth = myXMLold.photobooth_videoBandwidth; }
if (myXMLold.photobooth_videoQuality != undefined) { myXML.photobooth_videoQuality = myXMLold.photobooth_videoQuality; }
if (myXMLold.photobooth_videoWidth != undefined) { myXML.photobooth_videoWidth = myXMLold.photobooth_videoWidth; }
if (myXMLold.photobooth_videoHeight != undefined) { myXML.photobooth_videoHeight = myXMLold.photobooth_videoHeight; }
if (myXMLold.photobooth_webcam_x != undefined) { myXML.photobooth_webcam_x = myXMLold.photobooth_webcam_x; }
if (myXMLold.photobooth_webcam_y != undefined) { myXML.photobooth_webcam_y = myXMLold.photobooth_webcam_y; }
if (myXMLold.photobooth_webcam_width != undefined) { myXML.photobooth_webcam_width = myXMLold.photobooth_webcam_width; }
if (myXMLold.photobooth_webcam_height != undefined) { myXML.photobooth_webcam_height = myXMLold.photobooth_webcam_height; }
if (myXMLold.photobooth_fps != undefined) { myXML.photobooth_fps = myXMLold.photobooth_fps; }
if (myXMLold.photobooth_countdown != undefined) { myXML.photobooth_countdown = myXMLold.photobooth_countdown; }
if (myXMLold.photobooth_print_copies != undefined) { myXML.photobooth_print_copies = myXMLold.photobooth_print_copies; }
if (myXMLold.photoboothShotDelay != undefined) { myXML.photoboothShotDelay = myXMLold.photoboothShotDelay; }
if (myXMLold.photoboothFlashDuration != undefined) { myXML.photoboothFlashDuration = myXMLold.photoboothFlashDuration; }
if (myXMLold.photoboothDelayAfterCameraSound != undefined) { myXML.photoboothDelayAfterCameraSound = myXMLold.photoboothDelayAfterCameraSound; }
if (myXMLold.photoboothPleaseWaitTimer1 != undefined) { myXML.photoboothPleaseWaitTimer1 = myXMLold.photoboothPleaseWaitTimer1; }
if (myXMLold.photoboothPreGalleryTimer != undefined) { myXML.photoboothPreGalleryTimer = myXMLold.photoboothPreGalleryTimer; }
if (myXMLold.photoboothGalleryTimer != undefined) { myXML.photoboothGalleryTimer = myXMLold.photoboothGalleryTimer; }
if (myXMLold.photoboothProofPreview != undefined) { myXML.photoboothProofPreview = myXMLold.photoboothProofPreview; }
if (myXMLold.photoboothProofDisplayTime != undefined) { myXML.photoboothProofDisplayTime = myXMLold.photoboothProofDisplayTime; }
if (myXMLold.photoboothThanksBoxTimer != undefined) { myXML.photoboothThanksBoxTimer = myXMLold.photoboothThanksBoxTimer; }
if (myXMLold.photobooth_beepSound != undefined) { myXML.photobooth_beepSound = myXMLold.photobooth_beepSound; }
if (myXMLold.photobooth_cameraSound != undefined) { myXML.photobooth_cameraSound = myXMLold.photobooth_cameraSound; }
if (myXMLold.photobooth_developingfilmSound != undefined) { myXML.photobooth_developingfilmSound = myXMLold.photobooth_developingfilmSound; }
if (myXMLold.photobooth_IntroSoundPathp != undefined) { myXML.photobooth_IntroSoundPathp = myXMLold.photobooth_IntroSoundPathp; }
if (myXMLold.photobooth_getReadySoundPathp != undefined) { myXML.photobooth_getReadySoundPathp = myXMLold.photobooth_getReadySoundPathp; }
if (myXMLold.photobooth_pic2SoundPathp != undefined) { myXML.photobooth_pic2SoundPathp = myXMLold.photobooth_pic2SoundPathp; }
if (myXMLold.photobooth_pic3SoundPathp != undefined) { myXML.photobooth_pic3SoundPathp = myXMLold.photobooth_pic3SoundPathp; }
if (myXMLold.photobooth_pic4SoundPathp != undefined) { myXML.photobooth_pic4SoundPathp = myXMLold.photobooth_pic4SoundPathp; }
if (myXMLold.photobooth_developingSoundPathp != undefined) { myXML.photobooth_developingSoundPathp = myXMLold.photobooth_developingSoundPathp; }
if (myXMLold.photobooth_thanksSoundPathp != undefined) { myXML.photobooth_thanksSoundPathp = myXMLold.photobooth_thanksSoundPathp; }
if (myXMLold.photobooth_IntroSoundPathh != undefined) { myXML.photobooth_IntroSoundPathh = myXMLold.photobooth_IntroSoundPathh; }
if (myXMLold.photobooth_getReadySoundPathh != undefined) { myXML.photobooth_getReadySoundPathh = myXMLold.photobooth_getReadySoundPathh; }
if (myXMLold.photobooth_pic2SoundPathh != undefined) { myXML.photobooth_pic2SoundPathh = myXMLold.photobooth_pic2SoundPathh; }
if (myXMLold.photobooth_pic3SoundPathh != undefined) { myXML.photobooth_pic3SoundPathh = myXMLold.photobooth_pic3SoundPathh; }
if (myXMLold.photobooth_pic4SoundPathh != undefined) { myXML.photobooth_pic4SoundPathh = myXMLold.photobooth_pic4SoundPathh; }
if (myXMLold.photobooth_developingSoundPathh != undefined) { myXML.photobooth_developingSoundPathh = myXMLold.photobooth_developingSoundPathh; }
if (myXMLold.photobooth_thanksSoundPathh != undefined) { myXML.photobooth_thanksSoundPathh = myXMLold.photobooth_thanksSoundPathh; }
if (myXMLold.photobooth_IntroSoundPathpi != undefined) { myXML.photobooth_IntroSoundPathpi = myXMLold.photobooth_IntroSoundPathpi; }
if (myXMLold.photobooth_getReadySoundPathpi != undefined) { myXML.photobooth_getReadySoundPathpi = myXMLold.photobooth_getReadySoundPathpi; }
if (myXMLold.photobooth_pic2SoundPathpi != undefined) { myXML.photobooth_pic2SoundPathpi = myXMLold.photobooth_pic2SoundPathpi; }
if (myXMLold.photobooth_pic3SoundPathpi != undefined) { myXML.photobooth_pic3SoundPathpi = myXMLold.photobooth_pic3SoundPathpi; }
if (myXMLold.photobooth_pic4SoundPathpi != undefined) { myXML.photobooth_pic4SoundPathpi = myXMLold.photobooth_pic4SoundPathpi; }
if (myXMLold.photobooth_developingSoundPathpi != undefined) { myXML.photobooth_developingSoundPathpi = myXMLold.photobooth_developingSoundPathpi; }
if (myXMLold.photobooth_thanksSoundPathpi != undefined) { myXML.photobooth_thanksSoundPathpi = myXMLold.photobooth_thanksSoundPathpi; }
if (myXMLold.photobooth_IntroSoundPathi != undefined) { myXML.photobooth_IntroSoundPathi = myXMLold.photobooth_IntroSoundPathi; }
if (myXMLold.photobooth_getReadySoundPathi != undefined) { myXML.photobooth_getReadySoundPathi = myXMLold.photobooth_getReadySoundPathi; }
if (myXMLold.photobooth_pic2SoundPathi != undefined) { myXML.photobooth_pic2SoundPathi = myXMLold.photobooth_pic2SoundPathi; }
if (myXMLold.photobooth_pic3SoundPathi != undefined) { myXML.photobooth_pic3SoundPathi = myXMLold.photobooth_pic3SoundPathi; }
if (myXMLold.photobooth_pic4SoundPathi != undefined) { myXML.photobooth_pic4SoundPathi = myXMLold.photobooth_pic4SoundPathi; }
if (myXMLold.photobooth_developingSoundPathi != undefined) { myXML.photobooth_developingSoundPathi = myXMLold.photobooth_developingSoundPathi; }
if (myXMLold.photobooth_thanksSoundPathi != undefined) { myXML.photobooth_thanksSoundPathi = myXMLold.photobooth_thanksSoundPathi; }
if (myXMLold.photobooth_facialRecognitionTrigger != undefined) { myXML.photobooth_facialRecognitionTrigger = myXMLold.photobooth_facialRecognitionTrigger; }
if (myXMLold.photobooth_facialRecognitionDelay != undefined) { myXML.photobooth_facialRecognitionDelay = myXMLold.photobooth_facialRecognitionDelay; }
if (myXMLold.custom_audio != undefined) { myXML.custom_audio = myXMLold.custom_audio; }
if (myXMLold.lipsync_feature != undefined) { myXML.lipsync_feature = myXMLold.lipsync_feature; }
if (myXMLold.lipsync_interval != undefined) { myXML.lipsync_interval = myXMLold.lipsync_interval; }
if (myXMLold.lipsync_x != undefined) { myXML.lipsync_x = myXMLold.lipsync_x; }
if (myXMLold.lipsync_y != undefined) { myXML.lipsync_y = myXMLold.lipsync_y; }
if (myXMLold.lipsync_rotation != undefined) { myXML.lipsync_rotation = myXMLold.lipsync_rotation; }
if (myXMLold.lipsync_clip != undefined) { myXML.lipsync_clip = myXMLold.lipsync_clip; }
if (myXMLold.lipsync_scale != undefined) { myXML.lipsync_scale = myXMLold.lipsync_scale; }
if (myXMLold.twitter_feature != undefined) { myXML.twitter_feature = myXMLold.twitter_feature; }
if (myXMLold.twitter_mode != undefined) { myXML.twitter_mode = myXMLold.twitter_mode; }
if (myXMLold.twitter_username != undefined) { myXML.twitter_username = myXMLold.twitter_username; }
if (myXMLold.twitter_serviceHost != undefined) { myXML.twitter_serviceHost = myXMLold.twitter_serviceHost; }
if (myXMLold.twitter_oauthToken != undefined) { myXML.twitter_oauthToken = myXMLold.twitter_oauthToken; }
if (myXMLold.twitter_oauthTokenSecret != undefined) { myXML.twitter_oauthTokenSecret = myXMLold.twitter_oauthTokenSecret; }
if (myXMLold.twitter_authenticated != undefined) { myXML.twitter_authenticated = myXMLold.twitter_authenticated; }
if (myXMLold.twitter_drink1 != undefined) { myXML.twitter_drink1 = myXMLold.twitter_drink1; }
if (myXMLold.twitter_drink2 != undefined) { myXML.twitter_drink2 = myXMLold.twitter_drink2; }
if (myXMLold.twitter_drink3 != undefined) { myXML.twitter_drink3 = myXMLold.twitter_drink3; }
if (myXMLold.twitter_drink4 != undefined) { myXML.twitter_drink4 = myXMLold.twitter_drink4; }
if (myXMLold.twitter_frequency != undefined) { myXML.twitter_frequency = myXMLold.twitter_frequency; }
if (myXMLold.twitter_my_tweets_only != undefined) { myXML.twitter_my_tweets_only = myXMLold.twitter_my_tweets_only; }
if (myXMLold.twitter_search_term != undefined) { myXML.twitter_search_term = myXMLold.twitter_search_term; }
if (myXMLold.twitter_do_not_speak_search_term != undefined) { myXML.twitter_do_not_speak_search_term = myXMLold.twitter_do_not_speak_search_term; }
if (myXMLold.twitter_breathalyzer != undefined) { myXML.twitter_breathalyzer = myXMLold.twitter_breathalyzer; }
if (myXMLold.twitter_breathalyzer_value != undefined) { myXML.twitter_breathalyzer_value = myXMLold.twitter_breathalyzer_value; }
if (myXMLold.tts_feature != undefined) { myXML.tts_feature = myXMLold.tts_feature; }
if (myXMLold.tts_avatar != undefined) { myXML.tts_avatar = myXMLold.tts_avatar; }
if (myXMLold.tts_language != undefined) { myXML.tts_language = myXMLold.tts_language; }
if (myXMLold.proximity1_tts != undefined) { myXML.proximity1_tts = myXMLold.proximity1_tts; }
if (myXMLold.proximity2_tts != undefined) { myXML.proximity2_tts = myXMLold.proximity2_tts; }
if (myXMLold.proximity3_tts != undefined) { myXML.proximity3_tts = myXMLold.proximity3_tts; }
if (myXMLold.weather_good_tts != undefined) { myXML.weather_good_tts = myXMLold.weather_good_tts; }
if (myXMLold.weather_ok_tts != undefined) { myXML.weather_ok_tts = myXMLold.weather_ok_tts; }
if (myXMLold.weather_rain_tts != undefined) { myXML.weather_rain_tts = myXMLold.weather_rain_tts; }
if (myXMLold.no_internet_tts != undefined) { myXML.no_internet_tts = myXMLold.no_internet_tts; }
if (myXMLold.stock_up_tts != undefined) { myXML.stock_up_tts = myXMLold.stock_up_tts; }
if (myXMLold.stock_no_change_tts != undefined) { myXML.stock_no_change_tts = myXMLold.stock_no_change_tts; }
if (myXMLold.stock_down_tts != undefined) { myXML.stock_down_tts = myXMLold.stock_down_tts; }
if (myXMLold.doorbell_tts != undefined) { myXML.doorbell_tts = myXMLold.doorbell_tts; }
if (myXMLold.x10_on_tts != undefined) { myXML.x10_on_tts = myXMLold.x10_on_tts; }
if (myXMLold.x10_off_tts != undefined) { myXML.x10_off_tts = myXMLold.x10_off_tts; }
if (myXMLold.drink1_tts != undefined) { myXML.drink1_tts = myXMLold.drink1_tts; }
if (myXMLold.drink2_tts != undefined) { myXML.drink2_tts = myXMLold.drink2_tts; }
if (myXMLold.drink3_tts != undefined) { myXML.drink3_tts = myXMLold.drink3_tts; }
if (myXMLold.drink4_tts != undefined) { myXML.drink4_tts = myXMLold.drink4_tts; }
if (myXMLold.blow_tts != undefined) { myXML.blow_tts = myXMLold.blow_tts; }
if (myXMLold.wait_tts != undefined) { myXML.wait_tts = myXMLold.wait_tts; }
if (myXMLold.warning_tts != undefined) { myXML.warning_tts = myXMLold.warning_tts; }
if (myXMLold.google_id != undefined) { myXML.google_id = myXMLold.google_id; }
if (myXMLold.picasa_album_id != undefined) { myXML.picasa_album_id = myXMLold.picasa_album_id; }
if (myXMLold.picasa_album_name != undefined) { myXML.picasa_album_name = myXMLold.picasa_album_name; }
if (myXMLold.picasa_album_url != undefined) { myXML.picasa_album_url = myXMLold.picasa_album_url; }
if (myXMLold.slide_delay != undefined) { myXML.slide_delay = myXMLold.slide_delay; }
if (myXMLold.slideshow_restart_switch != undefined) { myXML.slideshow_restart_switch = myXMLold.slideshow_restart_switch; }
if (myXMLold.picture_x_position != undefined) { myXML.picture_x_position = myXMLold.picture_x_position; }
if (myXMLold.picture_y_position != undefined) { myXML.picture_y_position = myXMLold.picture_y_position; }
if (myXMLold.picture_rotation != undefined) { myXML.picture_rotation = myXMLold.picture_rotation; }
if (myXMLold.picture_scale != undefined) { myXML.picture_scale = myXMLold.picture_scale; }
if (myXMLold.doorbell_delay != undefined) { myXML.doorbell_delay = myXMLold.doorbell_delay; }
if (myXMLold.board_version != undefined) { myXML.board_version = myXMLold.board_version; }
if (myXMLold.atmega != undefined) { myXML.atmega = myXMLold.atmega; }
if (myXMLold.branding != undefined) { myXML.branding = myXMLold.branding; }
if (myXMLold.stocks != undefined) { myXML.stocks = myXMLold.stocks; }
if (myXMLold.alcohol_sensor != undefined) { myXML.alcohol_sensor = myXMLold.alcohol_sensor; }
if (myXMLold.alcohol_no_switch != undefined) { myXML.alcohol_no_switch = myXMLold.alcohol_no_switch; }
if (myXMLold.alcohol_no_switch_interval != undefined) { myXML.alcohol_no_switch_interval = myXMLold.alcohol_no_switch_interval; }
if (myXMLold.alcohol_no_switch_trigger_delta != undefined) { myXML.alcohol_no_switch_trigger_delta = myXMLold.alcohol_no_switch_trigger_delta; }
if (myXMLold.alcohol_baseline != undefined) { myXML.alcohol_baseline = myXMLold.alcohol_baseline; }
if (myXMLold.alcohol_baseline_difference_allowance != undefined) { myXML.alcohol_baseline_difference_allowance = myXMLold.alcohol_baseline_difference_allowance; }
if (myXMLold.alcohol_level1 != undefined) { myXML.alcohol_level1 = myXMLold.alcohol_level1; }
if (myXMLold.alcohol_level2 != undefined) { myXML.alcohol_level2 = myXMLold.alcohol_level2; }
if (myXMLold.alcohol_level3 != undefined) { myXML.alcohol_level3 = myXMLold.alcohol_level3; }
if (myXMLold.alcohol_countdown != undefined) { myXML.alcohol_countdown = myXMLold.alcohol_countdown; }
if (myXMLold.alcohol_text_duration != undefined) { myXML.alcohol_text_duration = myXMLold.alcohol_text_duration; }
if (myXMLold.alcohol_display_value != undefined) { myXML.alcohol_display_value = myXMLold.alcohol_display_value; }
if (myXMLold.beer_image_x != undefined) { myXML.beer_image_x = myXMLold.beer_image_x; }
if (myXMLold.beer_image_y != undefined) { myXML.beer_image_y = myXMLold.beer_image_y; }
if (myXMLold.beer_image_rotation != undefined) { myXML.beer_image_rotation = myXMLold.beer_image_rotation; }
if (myXMLold.beer_image_scale != undefined) { myXML.beer_image_scale = myXMLold.beer_image_scale; }
if (myXMLold.beer_images_url != undefined) { myXML.beer_images_url = myXMLold.beer_images_url; }
if (myXMLold.twitterbird_image_x != undefined) { myXML.twitterbird_image_x = myXMLold.twitterbird_image_x; }
if (myXMLold.twitterbird_image_y != undefined) { myXML.twitterbird_image_y = myXMLold.twitterbird_image_y; }
if (myXMLold.twitterbird_image_rotation != undefined) { myXML.twitterbird_image_rotation = myXMLold.twitterbird_image_rotation; }
if (myXMLold.twitterbird_image_scale != undefined) { myXML.twitterbird_image_scale = myXMLold.twitterbird_image_scale; }
if (myXMLold.twitterbird_images_url != undefined) { myXML.twitterbird_images_url = myXMLold.twitterbird_images_url; }
if (myXMLold.LED_mode != undefined) { myXML.LED_mode = myXMLold.LED_mode; }
if (myXMLold.avatar_image_x != undefined) { myXML.avatar_image_x = myXMLold.avatar_image_x; }
if (myXMLold.avatar_image_y != undefined) { myXML.avatar_image_y = myXMLold.avatar_image_y; }
if (myXMLold.avatar_image_rotate != undefined) { myXML.avatar_image_rotate = myXMLold.avatar_image_rotate; }
if (myXMLold.avatar_image_scale != undefined) { myXML.avatar_image_scale = myXMLold.avatar_image_scale; }
if (myXMLold.twitter_feature != undefined) { myXML.twitter_feature = myXMLold.twitter_feature; }
if (myXMLold.twitter_mode != undefined) { myXML.twitter_mode = myXMLold.twitter_mode; }
if (myXMLold.twitter_username != undefined) { myXML.twitter_username = myXMLold.twitter_username; }
if (myXMLold.twitter_password != undefined) { myXML.twitter_password = myXMLold.twitter_password; }
if (myXMLold.twitter_frequency != undefined) { myXML.twitter_frequency = myXMLold.twitter_frequency; }
if (myXMLold.twitter_my_tweets_only != undefined) { myXML.twitter_my_tweets_only = myXMLold.twitter_my_tweets_only; }
if (myXMLold.twitter_search_term != undefined) { myXML.twitter_search_term = myXMLold.twitter_search_term; }
if (myXMLold.twitter_do_not_speak_search_term != undefined) { myXML.twitter_do_not_speak_search_term = myXMLold.twitter_do_not_speak_search_term; }
if (myXMLold.tts_feature != undefined) { myXML.tts_feature = myXMLold.tts_feature; }
if (myXMLold.tts_avatar != undefined) { myXML.tts_avatar = myXMLold.tts_avatar; }
if (myXMLold.tts_charlimit != undefined) { myXML.tts_charlimit = myXMLold.tts_charlimit; }
if (myXMLold.tts_url != undefined) { myXML.tts_url = myXMLold.tts_url; }
if (myXMLold.tts_language != undefined) { myXML.tts_language = myXMLold.tts_language; }
if (myXMLold.tts_sendheader != undefined) { myXML.tts_sendheader = myXMLold.tts_sendheader; }
if (myXMLold.tts_headername != undefined) { myXML.tts_headername = myXMLold.tts_headername; }
if (myXMLold.tts_headervalue != undefined) { myXML.tts_headervalue = myXMLold.tts_headervalue; }
if (myXMLold.ttsrss_url != undefined) { myXML.ttsrss_url = myXMLold.ttsrss_url; }
if (myXMLold.ttsrss_apikey != undefined) { myXML.ttsrss_apikey = myXMLold.ttsrss_apikey; }
if (myXMLold.ttsrss_language != undefined) { myXML.ttsrss_language = myXMLold.ttsrss_language; }
if (myXMLold.ttsrss_mp3samplerate != undefined) { myXML.ttsrss_mp3samplerate = myXMLold.ttsrss_mp3samplerate; }
if (myXMLold.tts_engine != undefined) { myXML.tts_engine = myXMLold.tts_engine; }
if (myXMLold.ttsyakitome_resturl != undefined) { myXML.ttsyakitome_resturl = myXMLold.ttsyakitome_resturl; }
if (myXMLold.ttsyakitome_audiourl != undefined) { myXML.ttsyakitome_audiourl = myXMLold.ttsyakitome_audiourl; }
if (myXMLold.ttsyakitome_api_key != undefined) { myXML.ttsyakitome_api_key = myXMLold.ttsyakitome_api_key; }
if (myXMLold.ttsyakitome_voice != undefined) { myXML.ttsyakitome_voice = myXMLold.ttsyakitome_voice; }
if (myXMLold.ttsyakitome_speed != undefined) { myXML.ttsyakitome_speed = myXMLold.ttsyakitome_speed; }
if (myXMLold.proximity1_tts != undefined) { myXML.proximity1_tts = myXMLold.proximity1_tts; }
if (myXMLold.proximity2_tts != undefined) { myXML.proximity2_tts = myXMLold.proximity2_tts; }
if (myXMLold.proximity3_tts != undefined) { myXML.proximity3_tts = myXMLold.proximity3_tts; }
if (myXMLold.weather_good_tts != undefined) { myXML.weather_good_tts = myXMLold.weather_good_tts; }
if (myXMLold.weather_ok_tts != undefined) { myXML.weather_ok_tts = myXMLold.weather_ok_tts; }
if (myXMLold.weather_rain_tts != undefined) { myXML.weather_rain_tts = myXMLold.weather_rain_tts; }
if (myXMLold.no_internet_tts != undefined) { myXML.no_internet_tts = myXMLold.no_internet_tts; }
if (myXMLold.stock_up_tts != undefined) { myXML.stock_up_tts = myXMLold.stock_up_tts; }
if (myXMLold.stock_no_change_tts != undefined) { myXML.stock_no_change_tts = myXMLold.stock_no_change_tts; }
if (myXMLold.stock_down_tts != undefined) { myXML.stock_down_tts = myXMLold.stock_down_tts; }
if (myXMLold.doorbell_tts != undefined) { myXML.doorbell_tts = myXMLold.doorbell_tts; }
if (myXMLold.x10_on_tts != undefined) { myXML.x10_on_tts = myXMLold.x10_on_tts; }
if (myXMLold.x10_off_tts != undefined) { myXML.x10_off_tts = myXMLold.x10_off_tts; }
if (myXMLold.drink1_tts != undefined) { myXML.drink1_tts = myXMLold.drink1_tts; }
if (myXMLold.drink2_tts != undefined) { myXML.drink2_tts = myXMLold.drink2_tts; }
if (myXMLold.drink3_tts != undefined) { myXML.drink3_tts = myXMLold.drink3_tts; }
if (myXMLold.drink4_tts != undefined) { myXML.drink4_tts = myXMLold.drink4_tts; }
if (myXMLold.blow_tts != undefined) { myXML.blow_tts = myXMLold.blow_tts; }
if (myXMLold.wait_tts != undefined) { myXML.wait_tts = myXMLold.wait_tts; }
if (myXMLold.warning_tts != undefined) { myXML.warning_tts = myXMLold.warning_tts; }
//had to add this because the Twitter keys were changed as of version 6.2 and need to over-write existing keys
myXML.twitter_consumerKey = "UqwagrMLQEwGsBfmxzxg";
myXML.twitter_consumerSecret = "uvEa0gbwFoPlUTrhirhhK0OATpLG7mXqeDSZvZ0UtI";
myXML.faceDetectInterval = "3000";
//now save myXML
var newXMLStr2:String = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + myXML.toXMLString();
try {
filestream.open(file, FileMode.WRITE);
filestream.writeUTFBytes(newXMLStr2);
} catch (error:IOError) {
output.text = "IMPORTANT!!! Settings were not saved, re-start this program and Run as Administrator";
AlertManager.createAlert(this, "IMPORTANT!!! Settings were not saved, please re-start this program and Run as Administrator and then you will be able to Save");
admin_flag = 1;
}
filestream.close();
}
var registered:int = 0;
startup_delay = myXML.startup_delay;
google_id = myXML.google_id;
picasa_album_id = myXML.picasa_album_id;
slide_delay = myXML.slide_delay;
slide_delay_seconds = slide_delay * 1000;
picture_x_position = myXML.picture_x_position;
picture_y_position = myXML.picture_y_position;
picture_rotation = myXML.picture_rotation;
picture_scale = myXML.picture_scale;
//Stage.showMenu = false;
//var responder : PicasaResponder = service.photos.list(google_id, picasa_album_id);
//responder = service.photos.list(google_id, picasa_album_id);
//responder.addEventListener(PicasaDataEvent.DATA, onGetAlbumsComplete);
//**************************************
video_resolution = myXML.video_resolution;
com_port = myXML.com_port;
idle_videos = myXML.idle_videos;
reg_code = myXML.reg_code;
mirror_mode = myXML.mirror_mode; //sets princess, halloween, pirate, or insult mode
trace (mirror_mode);
verbose = myXML.verbose; //sets verbose mode if yes
video_scaling_factor = myXML.video_scaling_factor; //sets the video scaling factor
x_position = myXML.x_position;
y_position = myXML.y_position;
video_rotation = myXML.video_rotation;
hardware_mode_select = myXML.hardware_mode_select; // if on, then set the mode from hardware, i,e. keypad, will need a pot with three settings, then use analog input
full_screen = myXML.full_screen; //full screen mode
find_arduino_delay = myXML.find_arduino_delay;
digital_switches = myXML.digital_switches;
switch1 = myXML.switch1;
switch2 = myXML.switch2;
switch3 = myXML.switch3;
switch4 = myXML.switch4;
switch5 = myXML.switch5;
switch6 = myXML.switch6;
LED_mode = myXML.LED_mode;
analog_input1 = myXML.analog_input1;
analog_input2 = myXML.analog_input2;
analog_input3 = myXML.analog_input3;
proximity_sensor_on = myXML.proximity_sensor_on;
proximity_sensor_trigger1_distance_lower = myXML.proximity_sensor_trigger1_distance_lower;
proximity_sensor_trigger1_distance_upper = myXML.proximity_sensor_trigger1_distance_upper;
proximity_sensor_trigger1_time = myXML.proximity_sensor_trigger1_time;
proximity_sensor_trigger2_distance = myXML.proximity_sensor_trigger2_distance;
stock_good_threshold = Number(myXML.stock_good_threshold);
stock_bad_threshold = Number(myXML.stock_bad_threshold);
weather_display = myXML.wather_display;
forecast_cutoff = myXML.forecast_cutoff;
x10_commands = myXML.x10_commands;
screen_mode = myXML.screen_mode;
display_breathalyzer_text = myXML.display_breathalyzer_text;
display_stock_text = myXML.display_stock_text;
display_weather_text = myXML.display_weather_text;
display_weather_image = myXML.display_weather_image;
display_frame = myXML.frame;
display_webcamvideo = myXML.webcam_on;
weather_images_url = myXML.weather_images_url;
beer_images_url = myXML.beer_images_url;
twitterbird_images_url = myXML.twitterbird_images_url;
stock_text_x = myXML.stock_text_x;
stock_text_y = myXML.stock_text_y;
stock_text_fontsize = myXML.stock_text_fontsize;
stock_text_rotation = myXML.stock_text_rotation;
alcohol_results_text_x = myXML.alcohol_results_text_x;
alcohol_results_text_y = myXML.alcohol_results_text_y;
alcohol_results_text_fontsize = myXML.alcohol_results_text_fontsize;
alcohol_results_text_rotation = myXML.alcohol_results_text_rotation;
weather_text_x = myXML.weather_text_x;
weather_text_y = myXML.weather_text_y;
weather_text_fontsize = myXML.weather_text_fontsize;
weather_text_rotation = myXML.weather_text_rotation;
weather_image_x = myXML.weather_image_x;
weather_image_y = myXML.weather_image_y;
weather_image_rotation = myXML.weather_image_rotation;
weather_image_scale = myXML.weather_image_scale;
beer_image_x = myXML.beer_image_x;
beer_image_y = myXML.beer_image_y;
beer_image_rotation = myXML.beer_image_rotation;
beer_image_scale = myXML.beer_image_scale;
twitterbird_image_x = myXML.twitterbird_image_x;
twitterbird_image_y = myXML.twitterbird_image_y;
twitterbird_image_rotation = myXML.twitterbird_image_rotation;
twitterbird_image_scale = myXML.twitterbird_image_scale;
frame_x = myXML.frame_x;
frame_y = myXML.frame_y;
frame_rotation = myXML.frame_rotation;
frame_scale = myXML.frame_scale;
frame_selected = myXML.frame_selected;
lip1_x = myXML.lipsync_x;
lip1_y = myXML.lipsync_y;
lip1_rotation = myXML.lipsync_rotation;
lip1_scale = myXML.lipsync_scale;
webcamvideo_x = myXML.webcam_x;
webcamvideo_y = myXML.webcam_y;
webcamvideo_rotation = myXML.webcam_rotation;
webcamvideo_scale = myXML.webcam_scale;
doorcam_on = myXML.doorcam_on;
doorcam_host = myXML.doorcam_host;
doorcam_path = myXML.doorcam_path;
doorcam_port = myXML.doorcam_port;
doorcam_x = myXML.doorcam_x; //the doorcam ip cam video, not the doorcam character
doorcam_y = myXML.doorcam_y;
doorcam_rotate = myXML.doorcam_rotate;
doorcam_scale = myXML.doorcam_scale;
doorcam_username = myXML.doorcam_username;
doorcam_password = myXML.doorcam_password;
doorcam_width = myXML.doorcam_width;
doorcam_height= myXML.doorcam_height;
doorcam_timer = myXML.doorcam_timer;
doorcam_video_x = myXML.doorcam_video_x; //the doorcam character (reduced in size)
doorcam_video_y= myXML.doorcam_video_y;
doorcam_video_scale = myXML.doorcam_video_scale;
thoughts_image_x = myXML.thoughts_image_x;
thoughts_image_y = myXML.thoughts_image_y;
thoughts_image_rotate = myXML.thoughts_image_rotate;
thoughts_image_scale = myXML.thoughts_image_scale;
webcam_on = myXML.webcam_on;
webcam_width = myXML.webcam_width;
webcam_height = myXML.webcam_height;
webcam_fps = myXML.webcam_fps;
picasa_id_input.text = myXML.google_id;
google_id = myXML.google_id;
album_url.text = myXML.picasa_album_url;
album_id.text = myXML.picasa_album_id;
album_name.text = myXML.picasa_album_name;
// if (myXML.webcam_on == "on") {
//_setupCamera();
// }
//if (internet == 1) {
// if (picasa_id_input.text != "") {
// var album_responder : PicasaResponder = service.albums.list(google_id);
// album_responder.addEventListener(PicasaDataEvent.DATA, RefreshAlbums);
// album_responder.addEventListener(ErrorEvent.ERROR, AlbumLoadError);
// album_responder.addEventListener(HTTPStatusEvent.HTTP_STATUS, onHTTPStatus);
// }
//
// if (album_url.text != "") { //if the URL is not blank, then show album thumbnail
// URLString = album_url.text;
// AlbumThumb.source = URLString;
// }
//
// AlbumRefreshButton.addEventListener(MouseEvent.CLICK, RefreshAlbumsButtonClicked);
//
//pic.visible = false;
weather_zip = myXML.weather_zip; //sets zip code for the weather
weather_reading = myXML.weather_reading;
good_weather_threshold = myXML.good_weather_threshold;
////*** this we only have to do once since the stocks cannot be dynamically changed after the program has started
var stockArray:Array = new Array();
var i:int = 0;
for each (var item:XML in myXML.stocks.symbol)
{
stockArray.push(myXML.stocks.symbol[i]);
i++;
}
num_stocks = stockArray.length;
stock_string = stockArray.join("+");
trace (stock_string);
////*****************************************************************
stockLoader = new URLLoader();
stockLoader.addEventListener(Event.COMPLETE, stockLoaded);
WeatherLoader = new URLLoader();
WeatherLoader.addEventListener(Event.COMPLETE, WeatherXMLLoaded);
pictLdr.contentLoaderInfo.addEventListener(Event.COMPLETE,imgLoaded);
Frame_Loader.contentLoaderInfo.addEventListener(Event.COMPLETE,FrameImageLoaded);
Beer_Loader.contentLoaderInfo.addEventListener(Event.COMPLETE,BeerImageLoaded);
TwitterBird_Loader.contentLoaderInfo.addEventListener(Event.COMPLETE,TwitterBirdImageLoaded);
Lip1_Loader.contentLoaderInfo.addEventListener(Event.COMPLETE,Lip1ImageLoaded);
//io/network event handlers in case a problem loading URL *****
stockLoader.addEventListener(IOErrorEvent.IO_ERROR, stockLoaderioErrorHandler);
WeatherLoader.addEventListener(IOErrorEvent.IO_ERROR, WeatherLoaderioErrorHandler);
pictLdr.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, pictLdrioErrorHandler);
Frame_Loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, Frame_LoaderioErrorHandler);
Beer_Loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, Beer_LoaderioErrorHandler);
TwitterBird_Loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, TwitterBird_LoaderioErrorHandler);
Lip1_Loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, Lip1_LoaderioErrorHandler);
//*************************************************************
myVid_bigger.addEventListener(MouseEvent.CLICK,myVid_bigger_event);
myVid_smaller.addEventListener(MouseEvent.CLICK,myVid_smaller_event);
////if (internet == 1) {
// AlbumRefreshButton.addEventListener(MouseEvent.CLICK, RefreshAlbumsButtonClicked);
// combo.addEventListener(Event.CHANGE, AlbumChanged);
////}
analog1_radio_on.addEventListener(Event.CHANGE, Analog1Changed);
analog2_radio_on.addEventListener(Event.CHANGE, Analog2Changed);
analog3_radio_on.addEventListener(Event.CHANGE, Analog3Changed);
switch1_radio_on.addEventListener(Event.CHANGE, Digital1Changed);
switch2_radio_on.addEventListener(Event.CHANGE, Digital2Changed);
switch3_radio_on.addEventListener(Event.CHANGE, Digital3Changed);
switch4_radio_on.addEventListener(Event.CHANGE, Digital4Changed);
switch5_radio_on.addEventListener(Event.CHANGE, Digital5Changed);
quiz_mode_check.addEventListener(Event.CHANGE, QuizModeCheckChanged);
no_resize_check.addEventListener(Event.CHANGE, NoResizeCheckChanged);
photoboothProofPreview_check.addEventListener(Event.CHANGE, photoboothProofPreview_checkChanged);
photobooth_printing_check.addEventListener(Event.CHANGE, photobooth_printing_checkChanged);
mirror_mode_input.addEventListener(Event.CHANGE, CharacterChanged);
twitter_mode_rbg.addEventListener(Event.CHANGE, TwitterModeChanged);
//positioningedit_radio_lipsync.addEventListener(Event.CHANGE, TwitterModeChanged);
myVid.addEventListener(MetadataEvent.CUE_POINT , NavigationCuePoints);
myVid.addEventListener(Event.COMPLETE, onClipDone); // call the idle loop when a clip has finished playing
myVid.addEventListener(fl.video.VideoEvent.SEEKED, onSeekedEvent); // Listen for seeked event
myVid2.addEventListener(Event.COMPLETE, onClipDone);
var delay_temp = (startup_delay * 1000) + 2000; //at least 10s delay from when the sensors kick in, can make longer through startup delay in config program
var minuteTimer:Timer = new Timer(delay_temp, 1); //one time timer to set a delay before the analog sensors kick in
minuteTimer.addEventListener(TimerEvent.TIMER_COMPLETE, secondDelayTimer);
minuteTimer.start();
updates_button.addEventListener(MouseEvent.CLICK,updates);
alcohol_help_button.addEventListener(MouseEvent.CLICK,alcohol_help_buttonEvent);
twitterAuthButton.addEventListener(MouseEvent.CLICK,twitterOauthEvent);
//let the user know if the twitter authentication has already happened
if (myXML.twitter_authenticated == "yes") {
twitterAuthButton.label = "Change Twitter Account";
twitter_username_input.text = myXML.twitter_username;
}
else {
twitterAuthButton.label = "Link Twitter Account";
twitter_username_input.text = "";
}
StockDisplayTextTimer.addEventListener(TimerEvent.TIMER_COMPLETE, StockDisplayTextTimerEvent);
WeatherDisplayTextTimer.addEventListener(TimerEvent.TIMER_COMPLETE, WeatherDisplayTextTimerEvent);
StockDisplayTextTimer5s.addEventListener(TimerEvent.TIMER_COMPLETE, StockDisplayTextTimerEvent5s);
WeatherDisplayTextTimer5s.addEventListener(TimerEvent.TIMER_COMPLETE, WeatherDisplayTextTimerEvent5s);
// doorcamLoadTimer.addEventListener(TimerEvent.TIMER_COMPLETE, doorcamLoaded);
SaveButton.addEventListener(MouseEvent.CLICK, saveValue);
myTimer.addEventListener(TimerEvent.TIMER, ClearOutputText);
Stockdyntext.addEventListener(MouseEvent.MOUSE_DOWN, pickupStockText);
Stockdyntext.addEventListener(MouseEvent.MOUSE_UP, placeStockText);
AlcoholResultsdyntext.addEventListener(MouseEvent.MOUSE_DOWN, pickupAlcoholResultsText);
AlcoholResultsdyntext.addEventListener(MouseEvent.MOUSE_UP, placeAlcoholResultsText);
//myVid.addEventListener( MouseEvent.MOUSE_DOWN, pickup ); //for drag and drop
//myVid.addEventListener( MouseEvent.MOUSE_UP, place );
WeatherdynImage.addEventListener(MouseEvent.MOUSE_DOWN, pickupWeatherImage);
WeatherdynImage.addEventListener(MouseEvent.MOUSE_UP, placeWeatherImage);
BeerdynImage.addEventListener(MouseEvent.MOUSE_DOWN, pickupBeerImage);
BeerdynImage.addEventListener(MouseEvent.MOUSE_UP, placeBeerImage);
TwitterBirddynImage.addEventListener(MouseEvent.MOUSE_DOWN, pickupTwitterBirdImage);
TwitterBirddynImage.addEventListener(MouseEvent.MOUSE_UP, placeTwitterBirdImage);
FramedynImage.addEventListener(MouseEvent.MOUSE_DOWN, pickupWebcamImage);
FramedynImage.addEventListener(MouseEvent.MOUSE_UP, placeWebcamImage);
Lip1dynImage.addEventListener(MouseEvent.MOUSE_DOWN, pickupLip1Image);
Lip1dynImage.addEventListener(MouseEvent.MOUSE_UP, placeLip1Image);
Weatherdyntext.addEventListener(MouseEvent.MOUSE_DOWN, pickupWeatherText);
Weatherdyntext.addEventListener(MouseEvent.MOUSE_UP, placeWeatherText);
move_leftButton.addEventListener(MouseEvent.CLICK, move_leftButtonEvent);
move_rightButton.addEventListener(MouseEvent.CLICK, move_rightButtonEvent);
move_upButton.addEventListener(MouseEvent.CLICK, move_upButtonEvent);
move_downButton.addEventListener(MouseEvent.CLICK, move_downButtonEvent);
PositioningScreenButton.addEventListener(MouseEvent.CLICK, PositioningScreenButtonEvent);
PositioningScreenPicasaButton.addEventListener(MouseEvent.CLICK, PositioningScreenPicasaButtonEvent);
PositioningScreenDoorcamButton.addEventListener(MouseEvent.CLICK, PositioningScreenDoorcamButtonEvent);
goBackMain.addEventListener(MouseEvent.CLICK, goBackMainScreen);
BrowseAudioButton.addEventListener(MouseEvent.CLICK, browse_custom_audio_event);
BreathalyzerButton.addEventListener(MouseEvent.CLICK, BreathalyzerButtonEvent);
TTSButton.addEventListener(MouseEvent.CLICK, TTSButtonEvent);
photoboothButton.addEventListener(MouseEvent.CLICK, photoboothButtonEvent);
doorcamTimer = new Timer(doorcam_timer,1);
doorcamTimer.addEventListener(TimerEvent.TIMER_COMPLETE, doorcamTimerEvent);
thoughtsLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,thoughtsLoaded);
var imagePath = homepath + "images/thoughts.png";
thoughtsLoader.load(new URLRequest("file:///"+imagePath));
Frame_Loader.load(new URLRequest("file:///" + homepath + frame_selected)); //load it for the first time, it may be loaded again if the user changes from the dropdown box
Beer_Loader.load(new URLRequest("file:///" + homepath + "images/beer_icon.png")); //load it for the
TwitterBird_Loader.load(new URLRequest("file:///" + homepath + "images/twitter_bird.png")); //load it for the
Lip1_Loader.load(new URLRequest("file:///" + homepath + "images/lip1.png")); //load it for the first time, it may be loaded again if the user changes from the dropdown box
//lip1_url = homepath + "images/lip1.png";
// lip1_request =new URLRequest(lip1_url);
// lip1.load(lip1_request);
// lip1.contentLoaderInfo.addEventListener(Event.COMPLETE, lip1Loaded);
mode_select = mirror_mode;
stockUpdate();
weatherUpdate();
BuildMainUI();
initial_values();
BuildPositionUI();
BuildUI();
weather_display2.visible = false;
stock_display.visible = false;
weather_image.visible = false;
beer_image.visible = false;
twitterbird_image.visible = false;
frame.visible = false;
black_square.visible = false;
editing_mode = "main";
ipcamera_dropdown.addEventListener(Event.CHANGE, ipcamera_change_event);
doorcamedit_rbg.addEventListener(Event.CHANGE, doorcamedit_rbg_event);
//webcamvideo_rbg.addEventListener(Event.CHANGE, webcamvideoChanged);
webcamStealthCheck.addEventListener(Event.CHANGE, webcamStealthCheckChanged);
display_mode_input.addEventListener(Event.CHANGE, DisplayModeChanged); //this needs to be after buildUI because we don't want to overwrite any user customizable settings, only overwrite once someone clicks
frame_input.addEventListener(Event.CHANGE, FrameChanged); //this needs to be after buildUI because we don't want to overwrite any user customizable settings, only overwrite once someone clicks
positioningedit_rbg.addEventListener(Event.CHANGE, PositioningRadioChanged);
TTS_rbg_engine.addEventListener(Event.CHANGE, TTSEngineChanged);
} // ********end RunMirror initMediaPlayer function ***********
// wait for arduino to init and get data before calling the video select routines
private function BuildMainUI():void { //one time initial
radiotext.color = 0xFFFFFF;
radiotext.font = "Arial";
radiotext.size = 12;
LabelTextFormat.font = "Arial";
LabelTextFormat.size = "12";
LabelTextFormat.color = 0xFFFFFF;
VersionTextFormat.font = "Arial";
VersionTextFormat.size = "14";
VersionTextFormat.color = 0x000000;
///**********Alcohol text ************************
AlcoholTextFormat.font = myFont.fontName;
AlcoholTextFormat.size = 45;
//AlcoholTextFormat.color = 0x000000; //black
AlcoholTextFormat.color = 0x3333ff; //blue
AlcoholTextLabelFormat.font = myFont.fontName;
AlcoholTextLabelFormat.size = 30;
AlcoholTextLabelFormat.color = 0xFFFFFF; //white
Breathalyzer_LabelFormat.font = myFont.fontName;
Breathalyzer_LabelFormat.size = 40;
Breathalyzer_LabelFormat.color = 0xFFFFFF; //white
Breathalyzer_WarningLabelFormat.font = myFont.fontName;
Breathalyzer_WarningLabelFormat.size = 15;
Breathalyzer_WarningLabelFormat.color = 0xFF0033; //white
TTSTextFormat.font = myFont.fontName;
TTSTextFormat.size = 14;
TTSTextFormat.color = 0x000000;
HomeTextFormat.font = "Arial";
HomeTextFormat.size = 11;
HomeTextFormat.color = 0x000000; //black
TTSTextLabelFormat.font = myFont.fontName;
TTSTextLabelFormat.size = 14;
TTSTextLabelFormat.color = 0xFFFFFF; //white
photoboothTextLabelFormat.font = myFont.fontName;
photoboothTextLabelFormat.size = 14;
photoboothTextLabelFormat.color = 0xFFFFFF; //white
BlueTextLabelFormat.font = myFont.fontName;
BlueTextLabelFormat.size = 14;
BlueTextLabelFormat.color = 0x0000FF; //blue
TTS_Screen_LabelFormat.font = myFont.fontName;
TTS_Screen_LabelFormat.size = 20;
TTS_Screen_LabelFormat.color = 0xFFFFFF; //white
photobooth_Screen_LabelFormat.font = myFont.fontName;
photobooth_Screen_LabelFormat.size = 36;
photobooth_Screen_LabelFormat.color = 0xFFFFFF; //white
Breathalyzer_Label.embedFonts = true;
Breathalyzer_Label.antiAliasType = AntiAliasType.ADVANCED;
Breathalyzer_Label.defaultTextFormat = Breathalyzer_LabelFormat;
Breathalyzer_Label.x = 50;
Breathalyzer_Label.y = 20;
Breathalyzer_Label.width = 600;
Breathalyzer_Label.height = 60;
Breathalyzer_Label.text = "BREATHALYZER CALIBRATION";
addChild(Breathalyzer_Label);
Breathalyzer_Label.visible = false;
Breathalyzer_WarningLabel.embedFonts = true;
Breathalyzer_WarningLabel.antiAliasType = AntiAliasType.ADVANCED;
Breathalyzer_WarningLabel.defaultTextFormat = Breathalyzer_WarningLabelFormat;
Breathalyzer_WarningLabel.x = 50;
Breathalyzer_WarningLabel.y = 90;
Breathalyzer_WarningLabel.width = 1000;
Breathalyzer_WarningLabel.height = 60;
Breathalyzer_WarningLabel.text = "THE MAGIC MIRROR BREATHALYZER IS NOT A PROFESSIONAL BREATHALYZER AND SHOULD BE USED FOR NOVELTY PURPOSES ONLY";
addChild(Breathalyzer_WarningLabel);
Breathalyzer_WarningLabel.visible = false;
alcohol_baseline_text.embedFonts = true;
alcohol_baseline_text.selectable = true;
alcohol_baseline_text.type = TextFieldType.INPUT;
alcohol_baseline_text.background = true;
alcohol_baseline_text.backgroundColor = 0xFFFFFF; //white
alcohol_baseline_text.restrict = "0-9";
alcohol_baseline_text.antiAliasType = AntiAliasType.ADVANCED;
alcohol_baseline_text.defaultTextFormat = AlcoholTextFormat;
alcohol_baseline_text.x = 600;
alcohol_baseline_text.y = 130;
alcohol_baseline_text.width = 104;
alcohol_baseline_text.height = 60;
alcohol_baseline_text.text = myXML.alcohol_baseline;
addChild(alcohol_baseline_text);
alcohol_baseline_text.visible = false;
alcohol_baseline_difference_allowance_text.embedFonts = true;
alcohol_baseline_difference_allowance_text.selectable = true;
alcohol_baseline_difference_allowance_text.type = TextFieldType.INPUT;
alcohol_baseline_difference_allowance_text.background = true;
alcohol_baseline_difference_allowance_text.backgroundColor = 0xFFFFFF; //white
alcohol_baseline_difference_allowance_text.restrict = "0-9";
alcohol_baseline_difference_allowance_text.antiAliasType = AntiAliasType.ADVANCED;
alcohol_baseline_difference_allowance_text.defaultTextFormat = AlcoholTextFormat;
alcohol_baseline_difference_allowance_text.x = 600;
alcohol_baseline_difference_allowance_text.y = 200;
alcohol_baseline_difference_allowance_text.width = 104;
alcohol_baseline_difference_allowance_text.height = 60;
alcohol_baseline_difference_allowance_text.text = myXML.alcohol_baseline_difference_allowance;
addChild(alcohol_baseline_difference_allowance_text);
alcohol_baseline_difference_allowance_text.visible = false;
alcohol_level1_text.embedFonts = true;
alcohol_level1_text.selectable = true;
alcohol_level1_text.type = TextFieldType.INPUT;
alcohol_level1_text.background = true;
alcohol_level1_text.backgroundColor = 0xFFFFFF; //white
alcohol_level1_text.restrict = "0-9";
alcohol_level1_text.antiAliasType = AntiAliasType.ADVANCED;
alcohol_level1_text.defaultTextFormat = AlcoholTextFormat;
alcohol_level1_text.x = 600;
alcohol_level1_text.y = 270;
alcohol_level1_text.width = 104;
alcohol_level1_text.height = 60;
alcohol_level1_text.text = myXML.alcohol_level1;
addChild(alcohol_level1_text);
alcohol_level1_text.visible = false;
alcohol_level2_text.embedFonts = true;
alcohol_level2_text.selectable = true;
alcohol_level2_text.type = TextFieldType.INPUT;
alcohol_level2_text.background = true;
alcohol_level2_text.backgroundColor = 0xFFFFFF; //white
alcohol_level2_text.restrict = "0-9";
alcohol_level2_text.antiAliasType = AntiAliasType.ADVANCED;
alcohol_level2_text.defaultTextFormat = AlcoholTextFormat;
alcohol_level2_text.x = 600;
alcohol_level2_text.y = 340;
alcohol_level2_text.width = 104;
alcohol_level2_text.height = 60;
alcohol_level2_text.text = myXML.alcohol_level2;
addChild(alcohol_level2_text);
alcohol_level2_text.visible = false;
alcohol_level3_text.embedFonts = true;
alcohol_level3_text.selectable = true;
alcohol_level3_text.type = TextFieldType.INPUT;
alcohol_level3_text.background = true;
alcohol_level3_text.backgroundColor = 0xFFFFFF; //white
alcohol_level3_text.restrict = "0-9";
alcohol_level3_text.antiAliasType = AntiAliasType.ADVANCED;
alcohol_level3_text.defaultTextFormat = AlcoholTextFormat;
alcohol_level3_text.x = 600;
alcohol_level3_text.y = 410;
alcohol_level3_text.width = 104;
alcohol_level3_text.height = 60;
alcohol_level3_text.text = myXML.alcohol_level3;
addChild(alcohol_level3_text);
alcohol_level3_text.visible = false;
alcohol_countdown_text.embedFonts = true;
alcohol_countdown_text.selectable = true;
alcohol_countdown_text.type = TextFieldType.INPUT;
alcohol_countdown_text.background = true;
alcohol_countdown_text.backgroundColor = 0xFFFFFF; //white
alcohol_countdown_text.restrict = "0-9";
alcohol_countdown_text.antiAliasType = AntiAliasType.ADVANCED;
alcohol_countdown_text.defaultTextFormat = AlcoholTextFormat;
alcohol_countdown_text.x = 600;
alcohol_countdown_text.y = 480;
alcohol_countdown_text.width = 104;
alcohol_countdown_text.height = 60;
alcohol_countdown_text.text = myXML.alcohol_countdown;
addChild(alcohol_countdown_text);
alcohol_countdown_text.visible = false;
alcohol_baseline_label.embedFonts = true;
alcohol_baseline_label.antiAliasType = AntiAliasType.ADVANCED;
alcohol_baseline_label.defaultTextFormat = AlcoholTextLabelFormat;
alcohol_baseline_label.x = 50;
alcohol_baseline_label.y = 130;
alcohol_baseline_label.width = 500;
alcohol_baseline_label.height = 60;
alcohol_baseline_label.text = "Baseline Idle Value";
addChild(alcohol_baseline_label);
alcohol_baseline_label.visible = false;
alcohol_baseline_difference_allowance_label.embedFonts = true;
alcohol_baseline_difference_allowance_label.antiAliasType = AntiAliasType.ADVANCED;
alcohol_baseline_difference_allowance_label.defaultTextFormat = AlcoholTextLabelFormat;
alcohol_baseline_difference_allowance_label.x = 50;
alcohol_baseline_difference_allowance_label.y = 200;
alcohol_baseline_difference_allowance_label.width = 500;
alcohol_baseline_difference_allowance_label.height = 60;
alcohol_baseline_difference_allowance_label.text = " Difference Allowance";
addChild(alcohol_baseline_difference_allowance_label);
alcohol_baseline_difference_allowance_label.visible = false;
alcohol_level1_label.embedFonts = true;
alcohol_level1_label.antiAliasType = AntiAliasType.ADVANCED;
alcohol_level1_label.defaultTextFormat = AlcoholTextLabelFormat;
alcohol_level1_label.x = 50;
alcohol_level1_label.y = 270;
alcohol_level1_label.width = 500;
alcohol_level1_label.height = 60;
alcohol_level1_label.text = "Few Drinks Offset";
addChild(alcohol_level1_label);
alcohol_level1_label.visible = false;
alcohol_level2_label.embedFonts = true;
alcohol_level2_label.antiAliasType = AntiAliasType.ADVANCED;
alcohol_level2_label.defaultTextFormat = AlcoholTextLabelFormat;
alcohol_level2_label.x = 50;
alcohol_level2_label.y = 340;
alcohol_level2_label.width = 500;
alcohol_level2_label.height = 60;
alcohol_level2_label.text = "Buzzed Offset";
addChild(alcohol_level2_label);
alcohol_level2_label.visible = false;
alcohol_level3_label.embedFonts = true;
alcohol_level3_label.antiAliasType = AntiAliasType.ADVANCED;
alcohol_level3_label.defaultTextFormat = AlcoholTextLabelFormat;
alcohol_level3_label.x = 50;
alcohol_level3_label.y = 410;
alcohol_level3_label.width = 500;
alcohol_level3_label.height = 60;
alcohol_level3_label.text = "Flat Out Drunk Offset";
addChild(alcohol_level3_label);
alcohol_level3_label.visible = false;
alcohol_countdown_label.embedFonts = true;
alcohol_countdown_label.antiAliasType = AntiAliasType.ADVANCED;
alcohol_countdown_label.defaultTextFormat = AlcoholTextLabelFormat;
alcohol_countdown_label.x = 50;
alcohol_countdown_label.y = 480;
alcohol_countdown_label.width = 500;
alcohol_countdown_label.height = 60;
alcohol_countdown_label.text = "Countdown (Seconds)";
addChild(alcohol_countdown_label);
alcohol_countdown_label.visible = false;
drink1_tweet_label.embedFonts = true;
drink1_tweet_label.antiAliasType = AntiAliasType.ADVANCED;
drink1_tweet_label.defaultTextFormat = TTSTextLabelFormat;
drink1_tweet_label.x = 50;
drink1_tweet_label.y = 560;
drink1_tweet_label.width = 200;
drink1_tweet_label.height = 18;
drink1_tweet_label.text = "Tweet to send for No Drinks";
addChild(drink1_tweet_label);
drink1_tweet_label.visible = false;
drink1_tweet.embedFonts = true;
drink1_tweet.selectable = true;
drink1_tweet.type = TextFieldType.INPUT;
drink1_tweet.background = true;
drink1_tweet.backgroundColor = 0xFFFFFF; //white
drink1_tweet.maxChars = 140;
drink1_tweet.antiAliasType = AntiAliasType.ADVANCED;
drink1_tweet.defaultTextFormat = TTSTextFormat;
drink1_tweet.x = 300;
drink1_tweet.y = 560;
drink1_tweet.width = 700;
drink1_tweet.height = 18;
drink1_tweet.text = myXML.twitter_drink1;
addChild(drink1_tweet);
drink1_tweet.visible = false;
drink2_tweet_label.embedFonts = true;
drink2_tweet_label.antiAliasType = AntiAliasType.ADVANCED;
drink2_tweet_label.defaultTextFormat = TTSTextLabelFormat;
drink2_tweet_label.x = 50;
drink2_tweet_label.y = 580;
drink2_tweet_label.width = 200;
drink2_tweet_label.height = 18;
drink2_tweet_label.text = "Tweet to send for a Few Drinks";
addChild(drink2_tweet_label);
drink2_tweet_label.visible = false;
drink2_tweet.embedFonts = true;
drink2_tweet.selectable = true;
drink2_tweet.type = TextFieldType.INPUT;
drink2_tweet.background = true;
drink2_tweet.backgroundColor = 0xFFFFFF; //white
drink2_tweet.maxChars = 140;
drink2_tweet.antiAliasType = AntiAliasType.ADVANCED;
drink2_tweet.defaultTextFormat = TTSTextFormat;
drink2_tweet.x = 300;
drink2_tweet.y = 580;
drink2_tweet.width = 700;
drink2_tweet.height = 18;
drink2_tweet.text = myXML.twitter_drink2;
addChild(drink2_tweet);
drink2_tweet.visible = false;
drink3_tweet_label.embedFonts = true;
drink3_tweet_label.antiAliasType = AntiAliasType.ADVANCED;
drink3_tweet_label.defaultTextFormat = TTSTextLabelFormat;
drink3_tweet_label.x = 50;
drink3_tweet_label.y = 600;
drink3_tweet_label.width = 200;
drink3_tweet_label.height = 18;
drink3_tweet_label.text = "Tweet to send for Buzzed";
addChild(drink3_tweet_label);
drink3_tweet_label.visible = false;
drink3_tweet.embedFonts = true;
drink3_tweet.selectable = true;
drink3_tweet.type = TextFieldType.INPUT;
drink3_tweet.background = true;
drink3_tweet.backgroundColor = 0xFFFFFF; //white
drink3_tweet.maxChars = 140;
drink3_tweet.antiAliasType = AntiAliasType.ADVANCED;
drink3_tweet.defaultTextFormat = TTSTextFormat;
drink3_tweet.x = 300;
drink3_tweet.y = 600;
drink3_tweet.width = 700;
drink3_tweet.height = 18;
drink3_tweet.text = myXML.twitter_drink3;
addChild(drink3_tweet);
drink3_tweet.visible = false;
drink4_tweet_label.embedFonts = true;
drink4_tweet_label.antiAliasType = AntiAliasType.ADVANCED;
drink4_tweet_label.defaultTextFormat = TTSTextLabelFormat;
drink4_tweet_label.x = 50;
drink4_tweet_label.y = 620;
drink4_tweet_label.width = 200;
drink4_tweet_label.height = 18;
drink4_tweet_label.text = "Tweet to send for Drunk";
addChild(drink4_tweet_label);
drink4_tweet_label.visible = false;
drink4_tweet.embedFonts = true;
drink4_tweet.selectable = true;
drink4_tweet.type = TextFieldType.INPUT;
drink4_tweet.background = true;
drink4_tweet.backgroundColor = 0xFFFFFF; //white
drink4_tweet.maxChars = 140;
drink4_tweet.antiAliasType = AntiAliasType.ADVANCED;
drink4_tweet.defaultTextFormat = TTSTextFormat;
drink4_tweet.x = 300;
drink4_tweet.y = 620;
drink4_tweet.width = 700;
drink4_tweet.height = 18;
drink4_tweet.text = myXML.twitter_drink4;
addChild(drink4_tweet);
drink4_tweet.visible = false;
Tweet_Breathalyzer_Value_check.x = 50;
Tweet_Breathalyzer_Value_check.y = 640;
Tweet_Breathalyzer_Value_check.width = 100;
Tweet_Breathalyzer_Value_check.height = 22;
Tweet_Breathalyzer_Value_check.textField.autoSize = TextFieldAutoSize.LEFT;
Tweet_Breathalyzer_Value_check.setStyle("textFormat", radiotext);
Tweet_Breathalyzer_Value_check.label = "Append Alcohol Level Reading to Tweet";
addChild(Tweet_Breathalyzer_Value_check);
Tweet_Breathalyzer_Value_check.visible = false;
Display_Breathalyzer_Value_check.x = 850.6;
Display_Breathalyzer_Value_check.y = 140;
Display_Breathalyzer_Value_check.width = 180;
Display_Breathalyzer_Value_check.height = 22;
Display_Breathalyzer_Value_check.textField.autoSize = TextFieldAutoSize.LEFT;
Display_Breathalyzer_Value_check.setStyle("textFormat", HomeTextFormat);
Display_Breathalyzer_Value_check.label = "Display Alcohol Reading";
addChild(Display_Breathalyzer_Value_check);
BreathalyzerNoSwitch_check.x = 50;
BreathalyzerNoSwitch_check.y = 660;
BreathalyzerNoSwitch_check.width = 100;
BreathalyzerNoSwitch_check.height = 22;
BreathalyzerNoSwitch_check.textField.autoSize = TextFieldAutoSize.LEFT;
BreathalyzerNoSwitch_check.setStyle("textFormat", radiotext);
BreathalyzerNoSwitch_check.label = "Breathalyzer can go off also without Switch 5 trigger";
addChild(BreathalyzerNoSwitch_check);
BreathalyzerNoSwitch_check.visible = false;
alcohol_help_button.x = 670;
alcohol_help_button.y = 10;
alcohol_help_button.width = 200;
alcohol_help_button.height = 60;
alcohol_help_button.label = "Breathalyzer Calibration Help";
addChild(alcohol_help_button);
alcohol_help_button.visible = false;
TTS_Screen_Label.embedFonts = true;
TTS_Screen_Label.antiAliasType = AntiAliasType.ADVANCED;
TTS_Screen_Label.defaultTextFormat = TTS_Screen_LabelFormat;
TTS_Screen_Label.x = 10;
TTS_Screen_Label.y = 10;
TTS_Screen_Label.width = 600;
TTS_Screen_Label.height = 22;
TTS_Screen_Label.text = "Custom Audio (MP3) & Text to Speech Settings";
TTS_Screen_Label.text = "Custom Audio (MP3)";
//TTS_Screen_Label.text = "Text to Speech Settings";
addChild(TTS_Screen_Label);
TTS_Screen_Label.visible = false;
photobooth_Screen_Label.embedFonts = true;
photobooth_Screen_Label.antiAliasType = AntiAliasType.ADVANCED;
photobooth_Screen_Label.defaultTextFormat = photobooth_Screen_LabelFormat;
photobooth_Screen_Label.x = 77.50;
photobooth_Screen_Label.y = 55;
photobooth_Screen_Label.width = 500;
photobooth_Screen_Label.height = 40;
photobooth_Screen_Label.text = "Photobooth Settings";
addChild(photobooth_Screen_Label);
photobooth_Screen_Label.visible = false;
tts_feature_label.embedFonts = true;
tts_feature_label.antiAliasType = AntiAliasType.ADVANCED;
tts_feature_label.defaultTextFormat = TTSTextLabelFormat;
tts_feature_label.x = 10;
tts_feature_label.y = 40;
tts_feature_label.width = 200;
tts_feature_label.height = 18;
tts_feature_label.text = "Text to Speech (TTS)"; //this title no longer used
addChild(tts_feature_label);
tts_feature_label.visible = false;
tts_url_label.embedFonts = true;
tts_url_label.antiAliasType = AntiAliasType.ADVANCED;
tts_url_label.defaultTextFormat = TTSTextLabelFormat;
tts_url_label.x = 10;
tts_url_label.y = 70;
tts_url_label.width = 200;
tts_url_label.height = 18;
tts_url_label.text = "TTS Web Service URL";
addChild(tts_url_label);
tts_url_label.visible = false;
tts_url.embedFonts = true;
tts_url.selectable = true;
tts_url.type = TextFieldType.INPUT;
tts_url.background = true;
tts_url.backgroundColor = 0xFFFFFF; //white
tts_url.antiAliasType = AntiAliasType.ADVANCED;
tts_url.defaultTextFormat = TTSTextFormat;
tts_url.x = 200;
tts_url.y = 70;
tts_url.width = 600;
tts_url.height = 18;
tts_url.text = myXML.tts_url;
addChild(tts_url);
tts_url.visible = false;
tts_engine_label.embedFonts = true;
tts_engine_label.antiAliasType = AntiAliasType.ADVANCED;
tts_engine_label.defaultTextFormat = TTSTextLabelFormat;
tts_engine_label.x = 10;
tts_engine_label.y = 60;
tts_engine_label.width = 100;
tts_engine_label.height = 18;
tts_engine_label.text = "TTS Engine";
addChild(tts_engine_label);
tts_engine_label.visible = false;
tts_language_label.embedFonts = true;
tts_language_label.antiAliasType = AntiAliasType.ADVANCED;
tts_language_label.defaultTextFormat = TTSTextLabelFormat;
tts_language_label.x = 10;
tts_language_label.y = 80;
tts_language_label.width = 200;
tts_language_label.height = 18;
tts_language_label.text = "TTS Language";
addChild(tts_language_label);
tts_language_label.visible = false;
TTS_languages_dropdown.dropdownWidth = 210;
TTS_languages_dropdown.width = 200;
TTS_languages_dropdown.x = 200;
TTS_languages_dropdown.y = 80;
//TTS_languages_dropdown.prompt = "Select Language";
//TTS_languages_dropdown.addEventListener(Event.CHANGE, changeHandler);
addChild(TTS_languages_dropdown);
TTS_languages_dropdown.visible = false;
tts_api_key_label.embedFonts = true; //to do
tts_api_key_label.antiAliasType = AntiAliasType.ADVANCED;
tts_api_key_label.defaultTextFormat = TTSTextLabelFormat;
tts_api_key_label.x = 10;
tts_api_key_label.y = 125;
tts_api_key_label.width = 200;
tts_api_key_label.height = 18;
tts_api_key_label.text = "Voice RSS API Key";
addChild(tts_api_key_label);
tts_api_key_label.visible = false;
tts_api_key.embedFonts = true;
tts_api_key.selectable = true;
tts_api_key.type = TextFieldType.INPUT;
tts_api_key.background = true;
tts_api_key.backgroundColor = 0xFFFFFF; //white
tts_api_key.maxChars = 100;
tts_api_key.antiAliasType = AntiAliasType.ADVANCED;
tts_api_key.defaultTextFormat = TTSTextFormat;
tts_api_key.x = 200;
tts_api_key.y = 125;
tts_api_key.width = 250;
tts_api_key.height = 18;
tts_api_key.text = myXML.ttsrss_apikey;
addChild(tts_api_key);
tts_api_key.visible = false;
tts_api_key_labelYakitome.embedFonts = true; //to do
tts_api_key_labelYakitome.antiAliasType = AntiAliasType.ADVANCED;
tts_api_key_labelYakitome.defaultTextFormat = TTSTextLabelFormat;
tts_api_key_labelYakitome.x = 480;
tts_api_key_labelYakitome.y = 125;
tts_api_key_labelYakitome.width = 170;
tts_api_key_labelYakitome.height = 18;
tts_api_key_labelYakitome.text = "Yakitome API Key";
addChild(tts_api_key_labelYakitome);
tts_api_key_labelYakitome.visible = false;
tts_api_keyYakitome.embedFonts = true;
tts_api_keyYakitome.selectable = true;
tts_api_keyYakitome.type = TextFieldType.INPUT;
tts_api_keyYakitome.background = true;
tts_api_keyYakitome.backgroundColor = 0xFFFFFF; //white
tts_api_keyYakitome.maxChars = 100;
tts_api_keyYakitome.antiAliasType = AntiAliasType.ADVANCED;
tts_api_keyYakitome.defaultTextFormat = TTSTextFormat;
tts_api_keyYakitome.x = 620;
tts_api_keyYakitome.y = 125;
tts_api_keyYakitome.width = 240;
tts_api_keyYakitome.height = 18;
tts_api_keyYakitome.text = myXML.ttsyakitome_api_key;
addChild(tts_api_keyYakitome);
tts_api_keyYakitome.visible = false;
proximity1_tts_label.embedFonts = true;
proximity1_tts_label.antiAliasType = AntiAliasType.ADVANCED;
proximity1_tts_label.defaultTextFormat = TTSTextLabelFormat;
proximity1_tts_label.x = 10;
proximity1_tts_label.y = 150;
proximity1_tts_label.width = 200;
proximity1_tts_label.height = 18;
proximity1_tts_label.text = "Proximity 1 Response";
addChild(proximity1_tts_label);
proximity1_tts_label.visible = false;
proximity1_tts.embedFonts = true;
proximity1_tts.selectable = true;
proximity1_tts.type = TextFieldType.INPUT;
proximity1_tts.background = true;
proximity1_tts.backgroundColor = 0xFFFFFF; //white
proximity1_tts.maxChars = 100;
proximity1_tts.antiAliasType = AntiAliasType.ADVANCED;
proximity1_tts.defaultTextFormat = TTSTextFormat;
proximity1_tts.x = 200;
proximity1_tts.y = 150;
proximity1_tts.width = 800;
proximity1_tts.height = 18;
proximity1_tts.text = myXML.proximity1_tts;
addChild(proximity1_tts);
proximity1_tts.visible = false;
proximity2_tts_label.embedFonts = true;
proximity2_tts_label.antiAliasType = AntiAliasType.ADVANCED;
proximity2_tts_label.defaultTextFormat = TTSTextLabelFormat;
proximity2_tts_label.x = 10;
proximity2_tts_label.y = 170;
proximity2_tts_label.width = 200;
proximity2_tts_label.height = 18;
proximity2_tts_label.text = "Proximity 2 Response";
addChild(proximity2_tts_label);
proximity2_tts_label.visible = false;
proximity2_tts.embedFonts = true;
proximity2_tts.selectable = true;
proximity2_tts.type = TextFieldType.INPUT;
proximity2_tts.background = true;
proximity2_tts.backgroundColor = 0xFFFFFF; //white
proximity2_tts.maxChars = 100;
proximity2_tts.antiAliasType = AntiAliasType.ADVANCED;
proximity2_tts.defaultTextFormat = TTSTextFormat;
proximity2_tts.x = 200;
proximity2_tts.y = 170;
proximity2_tts.width = 800;
proximity2_tts.height = 18;
proximity2_tts.text = myXML.proximity2_tts;
addChild(proximity2_tts);
proximity2_tts.visible = false;
proximity3_tts_label.embedFonts = true;
proximity3_tts_label.antiAliasType = AntiAliasType.ADVANCED;
proximity3_tts_label.defaultTextFormat = TTSTextLabelFormat;
proximity3_tts_label.x = 10;
proximity3_tts_label.y = 190;
proximity3_tts_label.width = 200;
proximity3_tts_label.height = 18;
proximity3_tts_label.text = "Proximity 3 Response";
addChild(proximity3_tts_label);
proximity3_tts_label.visible = false;
proximity3_tts.embedFonts = true;
proximity3_tts.selectable = true;
proximity3_tts.type = TextFieldType.INPUT;
proximity3_tts.background = true;
proximity3_tts.backgroundColor = 0xFFFFFF; //white
proximity3_tts.maxChars = 100;
proximity3_tts.antiAliasType = AntiAliasType.ADVANCED;
proximity3_tts.defaultTextFormat = TTSTextFormat;
proximity3_tts.x = 200;
proximity3_tts.y = 190;
proximity3_tts.width = 800;
proximity3_tts.height = 18;
proximity3_tts.text = myXML.proximity3_tts;
addChild(proximity3_tts);
proximity3_tts.visible = false;
weather_good_tts_label.embedFonts = true;
weather_good_tts_label.antiAliasType = AntiAliasType.ADVANCED;
weather_good_tts_label.defaultTextFormat = TTSTextLabelFormat;
weather_good_tts_label.x = 10;
weather_good_tts_label.y = 210;
weather_good_tts_label.width = 200;
weather_good_tts_label.height = 18;
weather_good_tts_label.text = "Weather Good Day";
addChild(weather_good_tts_label);
weather_good_tts_label.visible = false;
weather_good_tts.embedFonts = true;
weather_good_tts.selectable = true;
weather_good_tts.type = TextFieldType.INPUT;
weather_good_tts.background = true;
weather_good_tts.backgroundColor = 0xFFFFFF; //white
weather_good_tts.maxChars = 60;
weather_good_tts.antiAliasType = AntiAliasType.ADVANCED;
weather_good_tts.defaultTextFormat = TTSTextFormat;
weather_good_tts.x = 200;
weather_good_tts.y = 210;
weather_good_tts.width = 800;
weather_good_tts.height = 18;
weather_good_tts.text = myXML.weather_good_tts;
addChild(weather_good_tts);
weather_good_tts.visible = false;
weather_ok_tts_label.embedFonts = true;
weather_ok_tts_label.antiAliasType = AntiAliasType.ADVANCED;
weather_ok_tts_label.defaultTextFormat = TTSTextLabelFormat;
weather_ok_tts_label.x = 10;
weather_ok_tts_label.y = 230;
weather_ok_tts_label.width = 200;
weather_ok_tts_label.height = 18;
weather_ok_tts_label.text = "Weather OK Day";
addChild(weather_ok_tts_label);
weather_ok_tts_label.visible = false;
weather_ok_tts.embedFonts = true;
weather_ok_tts.selectable = true;
weather_ok_tts.type = TextFieldType.INPUT;
weather_ok_tts.background = true;
weather_ok_tts.backgroundColor = 0xFFFFFF; //white
weather_ok_tts.maxChars = 60;
weather_ok_tts.antiAliasType = AntiAliasType.ADVANCED;
weather_ok_tts.defaultTextFormat = TTSTextFormat;
weather_ok_tts.x = 200;
weather_ok_tts.y = 230;
weather_ok_tts.width = 800;
weather_ok_tts.height = 18;
weather_ok_tts.text = myXML.weather_ok_tts;
addChild(weather_ok_tts);
weather_ok_tts.visible = false;
weather_rain_tts_label.embedFonts = true;
weather_rain_tts_label.antiAliasType = AntiAliasType.ADVANCED;
weather_rain_tts_label.defaultTextFormat = TTSTextLabelFormat;
weather_rain_tts_label.x = 10;
weather_rain_tts_label.y = 250;
weather_rain_tts_label.width = 200;
weather_rain_tts_label.height = 18;
weather_rain_tts_label.text = "Weather Raindy Day";
addChild(weather_rain_tts_label);
weather_rain_tts_label.visible = false;
weather_rain_tts.embedFonts = true;
weather_rain_tts.selectable = true;
weather_rain_tts.type = TextFieldType.INPUT;
weather_rain_tts.background = true;
weather_rain_tts.backgroundColor = 0xFFFFFF; //white
weather_rain_tts.maxChars = 60;
weather_rain_tts.antiAliasType = AntiAliasType.ADVANCED;
weather_rain_tts.defaultTextFormat = TTSTextFormat;
weather_rain_tts.x = 200;
weather_rain_tts.y = 250;
weather_rain_tts.width = 800;
weather_rain_tts.height = 18;
weather_rain_tts.text = myXML.weather_rain_tts;
addChild(weather_rain_tts);
weather_rain_tts.visible = false;
no_internet_tts_label.embedFonts = true;
no_internet_tts_label.antiAliasType = AntiAliasType.ADVANCED;
no_internet_tts_label.defaultTextFormat = TTSTextLabelFormat;
no_internet_tts_label.x = 10;
no_internet_tts_label.y = 270;
no_internet_tts_label.width = 200;
no_internet_tts_label.height = 18;
no_internet_tts_label.text = "No Internet";
addChild(no_internet_tts_label);
no_internet_tts_label.visible = false;
no_internet_tts.embedFonts = true;
no_internet_tts.selectable = true;
no_internet_tts.type = TextFieldType.INPUT;
no_internet_tts.background = true;
no_internet_tts.backgroundColor = 0xFFFFFF; //white
no_internet_tts.maxChars = 100;
no_internet_tts.antiAliasType = AntiAliasType.ADVANCED;
no_internet_tts.defaultTextFormat = TTSTextFormat;
no_internet_tts.x = 200;
no_internet_tts.y = 270;
no_internet_tts.width = 800;
no_internet_tts.height = 18;
no_internet_tts.text = myXML.no_internet_tts;
addChild(no_internet_tts);
no_internet_tts.visible = false;
stock_up_tts_label.embedFonts = true;
stock_up_tts_label.antiAliasType = AntiAliasType.ADVANCED;
stock_up_tts_label.defaultTextFormat = TTSTextLabelFormat;
stock_up_tts_label.x = 10;
stock_up_tts_label.y = 290;
stock_up_tts_label.width = 200;
stock_up_tts_label.height = 18;
stock_up_tts_label.text = "Stocks Up";
addChild(stock_up_tts_label);
stock_up_tts_label.visible = false;
stock_up_tts.embedFonts = true;
stock_up_tts.selectable = true;
stock_up_tts.type = TextFieldType.INPUT;
stock_up_tts.background = true;
stock_up_tts.backgroundColor = 0xFFFFFF; //white
stock_up_tts.maxChars = 90;
stock_up_tts.antiAliasType = AntiAliasType.ADVANCED;
stock_up_tts.defaultTextFormat = TTSTextFormat;
stock_up_tts.x = 200;
stock_up_tts.y = 290;
stock_up_tts.width = 800;
stock_up_tts.height = 18;
stock_up_tts.text = myXML.stock_up_tts;
addChild(stock_up_tts);
stock_up_tts.visible = false;
stock_no_change_tts_label.embedFonts = true;
stock_no_change_tts_label.antiAliasType = AntiAliasType.ADVANCED;
stock_no_change_tts_label.defaultTextFormat = TTSTextLabelFormat;
stock_no_change_tts_label.x = 10;
stock_no_change_tts_label.y = 310;
stock_no_change_tts_label.width = 200;
stock_no_change_tts_label.height = 18;
stock_no_change_tts_label.text = "Stocks Little Change";
addChild(stock_no_change_tts_label);
stock_no_change_tts_label.visible = false;
stock_no_change_tts.embedFonts = true;
stock_no_change_tts.selectable = true;
stock_no_change_tts.type = TextFieldType.INPUT;
stock_no_change_tts.background = true;
stock_no_change_tts.backgroundColor = 0xFFFFFF; //white
stock_no_change_tts.maxChars = 90;
stock_no_change_tts.antiAliasType = AntiAliasType.ADVANCED;
stock_no_change_tts.defaultTextFormat = TTSTextFormat;
stock_no_change_tts.x = 200;
stock_no_change_tts.y = 310;
stock_no_change_tts.width = 800;
stock_no_change_tts.height = 18;
stock_no_change_tts.text = myXML.stock_no_change_tts;
addChild(stock_no_change_tts);
stock_no_change_tts.visible = false;
stock_down_tts_label.embedFonts = true;
stock_down_tts_label.antiAliasType = AntiAliasType.ADVANCED;
stock_down_tts_label.defaultTextFormat = TTSTextLabelFormat;
stock_down_tts_label.x = 10;
stock_down_tts_label.y = 330;
stock_down_tts_label.width = 200;
stock_down_tts_label.height = 18;
stock_down_tts_label.text = "Stocks Down";
addChild(stock_down_tts_label);
stock_down_tts_label.visible = false;
stock_down_tts.embedFonts = true;
stock_down_tts.selectable = true;
stock_down_tts.type = TextFieldType.INPUT;
stock_down_tts.background = true;
stock_down_tts.backgroundColor = 0xFFFFFF; //white
stock_down_tts.maxChars = 90;
stock_down_tts.antiAliasType = AntiAliasType.ADVANCED;
stock_down_tts.defaultTextFormat = TTSTextFormat;
stock_down_tts.x = 200;
stock_down_tts.y = 330;
stock_down_tts.width = 800;
stock_down_tts.height = 18;
stock_down_tts.text = myXML.stock_down_tts;
addChild(stock_down_tts);
stock_down_tts.visible = false;
doorbell_tts_label.embedFonts = true;
doorbell_tts_label.antiAliasType = AntiAliasType.ADVANCED;
doorbell_tts_label.defaultTextFormat = TTSTextLabelFormat;
doorbell_tts_label.x = 10;
doorbell_tts_label.y = 350;
doorbell_tts_label.width = 200;
doorbell_tts_label.height = 18;
doorbell_tts_label.text = "Doorbell";
addChild(doorbell_tts_label);
doorbell_tts_label.visible = false;
doorbell_tts.embedFonts = true;
doorbell_tts.selectable = true;
doorbell_tts.type = TextFieldType.INPUT;
doorbell_tts.background = true;
doorbell_tts.backgroundColor = 0xFFFFFF; //white
doorbell_tts.maxChars = 100;
doorbell_tts.antiAliasType = AntiAliasType.ADVANCED;
doorbell_tts.defaultTextFormat = TTSTextFormat;
doorbell_tts.x = 200;
doorbell_tts.y = 350;
doorbell_tts.width = 800;
doorbell_tts.height = 18;
doorbell_tts.text = myXML.doorbell_tts;
addChild(doorbell_tts);
doorbell_tts.visible = false;
x10_on_tts_label.embedFonts = true;
x10_on_tts_label.antiAliasType = AntiAliasType.ADVANCED;
x10_on_tts_label.defaultTextFormat = TTSTextLabelFormat;
x10_on_tts_label.x = 10;
x10_on_tts_label.y = 370;
x10_on_tts_label.width = 200;
x10_on_tts_label.height = 18;
x10_on_tts_label.text = "X-10 ON Command";
addChild(x10_on_tts_label);
x10_on_tts_label.visible = false;
x10_on_tts.embedFonts = true;
x10_on_tts.selectable = true;
x10_on_tts.type = TextFieldType.INPUT;
x10_on_tts.background = true;
x10_on_tts.backgroundColor = 0xFFFFFF; //white
x10_on_tts.maxChars = 100;
x10_on_tts.antiAliasType = AntiAliasType.ADVANCED;
x10_on_tts.defaultTextFormat = TTSTextFormat;
x10_on_tts.x = 200;
x10_on_tts.y = 370;
x10_on_tts.width = 800;
x10_on_tts.height = 18;
x10_on_tts.text = myXML.x10_on_tts;
addChild(x10_on_tts);
x10_on_tts.visible = false;
x10_off_tts_label.embedFonts = true;
x10_off_tts_label.antiAliasType = AntiAliasType.ADVANCED;
x10_off_tts_label.defaultTextFormat = TTSTextLabelFormat;
x10_off_tts_label.x = 10;
x10_off_tts_label.y = 390;
x10_off_tts_label.width = 200;
x10_off_tts_label.height = 18;
x10_off_tts_label.text = "X-10 OFF Command";
addChild(x10_off_tts_label);
x10_off_tts_label.visible = false;
x10_off_tts.embedFonts = true;
x10_off_tts.selectable = true;
x10_off_tts.type = TextFieldType.INPUT;
x10_off_tts.background = true;
x10_off_tts.backgroundColor = 0xFFFFFF; //white
x10_off_tts.maxChars = 100;
x10_off_tts.antiAliasType = AntiAliasType.ADVANCED;
x10_off_tts.defaultTextFormat = TTSTextFormat;
x10_off_tts.x = 200;
x10_off_tts.y = 390;
x10_off_tts.width = 800;
x10_off_tts.height = 18;
x10_off_tts.text = myXML.x10_off_tts;
addChild(x10_off_tts);
x10_off_tts.visible = false;
drink1_tts_label.embedFonts = true;
drink1_tts_label.antiAliasType = AntiAliasType.ADVANCED;
drink1_tts_label.defaultTextFormat = TTSTextLabelFormat;
drink1_tts_label.x = 10;
drink1_tts_label.y = 410;
drink1_tts_label.width = 200;
drink1_tts_label.height = 18;
drink1_tts_label.text = "Breathalyzer No Drinks";
addChild(drink1_tts_label);
drink1_tts_label.visible = false;
drink1_tts.embedFonts = true;
drink1_tts.selectable = true;
drink1_tts.type = TextFieldType.INPUT;
drink1_tts.background = true;
drink1_tts.backgroundColor = 0xFFFFFF; //white
drink1_tts.maxChars = 100;
drink1_tts.antiAliasType = AntiAliasType.ADVANCED;
drink1_tts.defaultTextFormat = TTSTextFormat;
drink1_tts.x = 200;
drink1_tts.y = 410;
drink1_tts.width = 800;
drink1_tts.height = 18;
drink1_tts.text = myXML.drink1_tts;
addChild(drink1_tts);
drink1_tts.visible = false;
drink2_tts_label.embedFonts = true;
drink2_tts_label.antiAliasType = AntiAliasType.ADVANCED;
drink2_tts_label.defaultTextFormat = TTSTextLabelFormat;
drink2_tts_label.x = 10;
drink2_tts_label.y = 430;
drink2_tts_label.width = 200;
drink2_tts_label.height = 18;
drink2_tts_label.text = "Breathalyzer A Few Drinks";
addChild(drink2_tts_label);
drink2_tts_label.visible = false;
drink2_tts.embedFonts = true;
drink2_tts.selectable = true;
drink2_tts.type = TextFieldType.INPUT;
drink2_tts.background = true;
drink2_tts.backgroundColor = 0xFFFFFF; //white<