package rainbowPackage;

import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Timer;
import java.util.TimerTask;

import javax.imageio.ImageIO;

import org.jcodec.api.awt.AWTSequenceEncoder;
import org.jcodec.common.io.NIOUtils;
import org.jcodec.common.io.SeekableByteChannel;

/*import java.io.*;

import org.jcodec.api.SequenceEncoder;
import org.jcodec.api.SequenceEncoder.*;
import org.jcodec.api.awt.*;
import org.jcodec.api.awt.AWTSequenceEncoder.*;
import org.jcodec.common.Codec;
import org.jcodec.common.Format;
import org.jcodec.common.model.Rational;
import org.jcodec.scale.AWTUtil;
import org.jcodec.api.*;
import java.nio.channels.*; // */ 
//import java.nio.channels.SeekableByteChannel;
//import org.jcodec.*;//Keep For .mp4 Video Creation

import java.awt.*;
//import java.awt.image.*;

import javafx.application.Platform;
//import javafx.application.Platform;
import javafx.embed.swing.SwingFXUtils;
//import javafx.event.EventHandler;
import javafx.scene.control.Label;
import javafx.scene.*;
import javafx.scene.image.*;
import javafx.scene.image.Image;
//import javafx.scene.control.Dialog.*;
import javafx.scene.control.Control.*;
//import javafx.scene.input.MouseEvent;
import javafx.scene.layout.StackPane;
import javafx.scene.paint.Color;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Screen;
import javafx.stage.Stage;
//import javafx.collections.ObservableList;
//import rainbowPackage.RainbowSoftColorCodesSets.BuddhismSchemeSet;

public class RainbowVideo
{
	double sliderInterval = 100;
	Diagnostics diagnostics = null;
	RainbowSoftColor color = new RainbowSoftColor( new double[]{0,0,0,1} );//????????????????????????????
	RainbowPattern2D pattern2D = new RainbowPattern2D( new double[]{0,0,0,1} );
	RainbowPattern2D pattern2DArray[] = { new RainbowPattern2D( new double[]{0,0,0,1} ), new RainbowPattern2D( new double[]{0,0,0,1} ), new RainbowPattern2D( new double[]{0,0,0,1} ), new RainbowPattern2D( new double[]{0,0,0,1} ), new RainbowPattern2D( new double[]{0,0,0,1} ),  };
	RainbowSoft2D rainbowSoft2D = new RainbowSoft2D( new double[]{0,0,0,1} );
	TransparencySlider transparencySlider = new TransparencySlider( new double[]{0,0,0,1} );
	RainbowSoftColor rainbowSoftColor = new RainbowSoftColor( new double[]{0,0,0,1} );
	Color tempFXColor = Color.BLACK;
	BufferedImage bImage = null;
	AWTSequenceEncoder encoder;
	Stage tertiaryStage;
	Image tertiaryBasisImage;
	Image tertiaryBackgroundBasisImage;
	Image tertiaryCurrentBrowserImage;
	WebEngine thirdBrowserEngine;
	WebView thirdBrowser;
	StackPane thirdStackPane;
	Scene thirdScene;
	Screen thirdScreen;
	Label thirdStateLabel;
	File thirdFile;
	File thirdJavaScriptFile;
	File thirdXSliderFile;
	Thread tertiaryThread;
	boolean tertiaryIsFullScreened;
	Image tertiaryBackupWorkAroundImage;
	double tertiaryXslider = 0;
	double videoFrameQuantity = 7;
	double startingPoint = 0;
	double videoSequenceLoopQuantity;
	double videoSplittingQuantity = 1;
	double gradientExpontierMultiplier = 4.;
	double tertiaryBackgroundBasisImageWidth;
	double tertiaryBackgroundBasisImageHeight;
	double numberOfScrollFrames;
	SeekableByteChannel tertiaryVideoOut;

	Camera camera;
	WritableImage tertiaryWritableImage;
	PixelReader tertiaryCurrentBrowserImagePR;
	PixelReader tertiaryBrowserTransitionImagePR;
	PixelWriter tertiaryCurrentBrowserImagePW;
	PixelReader tertiaryBackUpWorkAroundImagePR;
	PixelReader tertiaryBackgroundBasisImagePR;
	PixelReader tertiaryBasisImagePR;
	PixelWriter tertiaryPW;
	PixelWriter tertiaryBrowserPW;
	ImageView tertiaryCurrentBrowserImageView, tertiaryCurrentTransitionBrowserImageView, tertiaryBackupWorkAroundImageView, tertiaryBasisImageView, tertiaryBackgroundBasisImageView;
	WritableImage tertiaryBufferPictureForWritableImage, tertiaryBufferPictureForBrowser, tertiaryBrowserWritableImage, tertiaryBufferPictureForTransitionWritableBrowserImage;

	Parent tertiaryRoot;

	public RainbowVideo ( Stage TertiaryStage, Image TertiaryBasisImage, Image TertiaryBackgroundBasisImage, Image TertiaryCurrentBrowserImage, Image TertiaryBackupWorkAroundImage,
			WebEngine ThirdBrowserEngine, WebView ThirdBrowser, StackPane ThirdStackPane, Scene ThirdScene, Screen ThirdScreen, Label ThirdStateLabel, File ThirdFile, File ThirdJavaScriptFile,
			File ThirdXSliderFile, Thread TertiaryThread, SeekableByteChannel TertiaryVideoOut, WritableImage TertiaryWritableImage, WritableImage TertiaryBufferPictureForWritableImage,
			WritableImage TertiaryBrowserWritableImage,	WritableImage TertiaryBufferPictureForBrowser, PixelReader TertiaryCurrentBrowserImagePR, PixelReader TertiaryBrowserTransitionImagePR,
			PixelReader TertiaryBackUpWorkAroundImagePR, PixelReader TertiaryBackgroundBasisImagePR, PixelReader TertiaryBasisImagePR, PixelWriter TertiaryPW, PixelWriter TertiaryBrowserPW,
			ImageView TertiaryCurrentBrowserImageView, ImageView TertiaryCurrentTransitionBrowserImageView, ImageView TertiaryBackupWorkAroundImageView, ImageView TertiaryBasisImageView,
			ImageView TertiaryBackgroundBasisImageView,	boolean TertiaryIsFullScreened, double VideoFrameQuantity, double StartingPoint, double VideoSequenceLoopQuantity,
			double TertiaryBackgroundBasisImageWidth, double TertiaryBackgroundBasisImageHeight, double NumberOfScrollFrames, Parent TertiaryRoot )
	{
		tertiaryStage = TertiaryStage;
		tertiaryBasisImage = TertiaryBasisImage;
		tertiaryBackgroundBasisImage = TertiaryBackgroundBasisImage;
		tertiaryCurrentBrowserImage = TertiaryCurrentBrowserImage;
		thirdBrowserEngine = ThirdBrowserEngine;
		thirdBrowser = ThirdBrowser;
		thirdStackPane = ThirdStackPane;
		thirdScene = ThirdScene;
		thirdScreen = ThirdScreen;
		thirdStateLabel = ThirdStateLabel;
		thirdFile = ThirdFile;
		thirdJavaScriptFile = ThirdJavaScriptFile;
		thirdXSliderFile = ThirdXSliderFile;
		tertiaryThread = TertiaryThread;
		tertiaryIsFullScreened = TertiaryIsFullScreened;
		tertiaryBackupWorkAroundImage = TertiaryBackupWorkAroundImage;
		videoFrameQuantity = VideoFrameQuantity;
		startingPoint = StartingPoint;
		videoSequenceLoopQuantity = VideoSequenceLoopQuantity;
		tertiaryVideoOut = TertiaryVideoOut;

		tertiaryWritableImage = TertiaryWritableImage;
		tertiaryCurrentBrowserImagePR = TertiaryCurrentBrowserImagePR;
		tertiaryBrowserTransitionImagePR = TertiaryBrowserTransitionImagePR;
		tertiaryBackUpWorkAroundImagePR = TertiaryBackUpWorkAroundImagePR;
		tertiaryBackgroundBasisImagePR = TertiaryBackgroundBasisImagePR;
		tertiaryBasisImagePR = TertiaryBasisImagePR;
		tertiaryPW = TertiaryPW;
		tertiaryBrowserPW = TertiaryBrowserPW;
		tertiaryCurrentBrowserImageView = TertiaryCurrentBrowserImageView;
		tertiaryCurrentTransitionBrowserImageView = TertiaryCurrentTransitionBrowserImageView;
		tertiaryBackupWorkAroundImageView = TertiaryBackupWorkAroundImageView;
		tertiaryBasisImageView = TertiaryBasisImageView;
		tertiaryBackgroundBasisImageView = TertiaryBackgroundBasisImageView;
		
		tertiaryBufferPictureForWritableImage = TertiaryBufferPictureForWritableImage;
		tertiaryBrowserWritableImage = TertiaryBrowserWritableImage;
		tertiaryBufferPictureForBrowser = TertiaryBufferPictureForBrowser;
		

		tertiaryBackgroundBasisImageWidth = TertiaryBackgroundBasisImageWidth;
		tertiaryBackgroundBasisImageHeight = TertiaryBackgroundBasisImageHeight;

		tertiaryRoot = TertiaryRoot;

		numberOfScrollFrames = NumberOfScrollFrames;

		diagnostics = new Diagnostics( thirdScreen.getBounds() );

		sliderInterval = videoSequenceLoopQuantity / videoFrameQuantity;
		//thirdScene = new Scene[(int)(videoFrameQuantity * ( videoSequenceLoopQuantity - startingPoint ) / videoSequenceLoopQuantity + 1 )];
		try { tertiaryVideoOut = NIOUtils.writableFileChannel( thirdFile.getPath() ); }
		catch (IOException e) {}

	}

	public BufferedImage Runner ()
	{		
		bImage = null;
		//try { encoder = new AWTSequenceEncoder(tertiaryVideoOut, Rational.R(25, 1));}
		//catch(IOException ie) { ie.printStackTrace(); }

		/*tertiaryStage.setMaxWidth(thirdScreen.getBounds().getWidth());
		tertiaryStage.setMaxHeight(thirdScreen.getBounds().getHeight());
		tertiaryStage.setMinWidth(thirdScreen.getBounds().getWidth());
		tertiaryStage.setMaxHeight(thirdScreen.getBounds().getHeight());
		tertiaryStage.setWidth(thirdScreen.getBounds().getWidth());
		tertiaryStage.setMaxHeight(thirdScreen.getBounds().getHeight());*/

		try { encoder = AWTSequenceEncoder.create25Fps(thirdFile);}
		catch(IOException ie) { ie.printStackTrace(); }
		try { tertiaryThread.sleep(5000);
		} catch (InterruptedException e) {
			System.out.println("Interrupted.");
		}// */
		tertiaryStage.setFullScreen(tertiaryIsFullScreened);
		try { tertiaryThread.sleep(300);
		} catch (InterruptedException e) {
			System.out.println("Interrupted.");
		}// */
		thirdBrowser.setPrefSize( tertiaryStage.getWidth(), tertiaryStage.getHeight() );
		try { tertiaryThread.sleep(4000);
		} catch (InterruptedException e) {
			System.out.println("Interrupted.");
		}// */
		//tertiaryStage.setScene(thirdScene[(int)( videoFrameQuantity * ( tertiaryXslider - startingPoint ) / videoSequenceLoopQuantity )]);
		//tertiaryStage.setFullScreen(tertiaryIsFullScreened);
		/*if ( tertiaryIsFullScreened == false )
		{
			tertiaryStage.setWidth(666);
			tertiaryStage.setHeight(888);
			tertiaryStage.setFullScreen(false);
			tertiaryStage.show();
		}// */
		System.out.println("Worked Till After Full Screen Enforcement");

		/*tertiaryStage.setResizable(true);
		tertiaryStage.setFullScreen(false);
		tertiaryStage.setHeight(1080);
		tertiaryStage.setWidth(1920);
		tertiaryStage.setResizable(false);
		tertiaryStage.show();// */
		try { tertiaryThread.sleep(2000);
		} catch (InterruptedException e) {
			System.out.println("Interrupted.");
		}// */
		tertiaryStage.show();// */ Above Paragraph For FwaLogoSpalsh
		try { tertiaryThread.sleep(3500);
		} catch (InterruptedException e) {
			System.out.println("Interrupted.");
		}// */
		/*try { tertiaryThread.sleep(8000);
		} catch (InterruptedException e) {
			System.out.println("Interrupted.");
		}
		System.out.println("Worked Till After Full Screen Wait");// */
		Dimension HalfedDim = new Dimension( 960, 540 );
		Dimension Dim = new Dimension ( (int)tertiaryStage.getWidth(), (int)tertiaryStage.getHeight() );// -48 ); // - 40.  -40
		HalfedDim.width = Math.round( (int)(tertiaryStage.getWidth() / 2));
		HalfedDim.height = Math.round( (int)(tertiaryStage.getHeight() / 2));
		//Dimension Dim = new Dimension ( (int)thirdScreen.getBounds().getWidth() , (int)thirdScreen.getBounds().getHeight() - 40 );
		//HalfedDim.width = Math.round( (int)thirdScreen.getBounds().getWidth() / 2 );
		//HalfedDim.height = Math.round( (int)thirdScreen.getBounds().getHeight() / 2 );
		double halfSreenDiagionalLength = Math.pow(Math.pow( HalfedDim.getWidth(), 2) + Math.pow( HalfedDim.getHeight(), 2), 0.5);
		double xScaleFactor = Dim.width / tertiaryBackgroundBasisImageWidth;
		double yScaleFactor = Dim.height / tertiaryBackgroundBasisImageHeight;

		//Getting 3D Viewing To Work		
		ImageView tertiaryImageView = new ImageView();
		SnapshotParameters snapshotParameters = new SnapshotParameters();
		//tertiaryImageView.setImage(tertiaryWritableImage);
		//tertiaryCurrentBrowserImageView.setImage(tertiaryCurrentBrowserImage);
		//tertiaryBackupWorkAroundImageView.setImage(tertiaryBackupWorkAroundImage);
		//tertiaryBackgroundBasisImageView.setImage(tertiaryBackgroundBasisImage);
		//tertiaryBasisImageView.setImage(tertiaryBasisImage);
		
		//tertiaryCurrentBrowserImageView.setImage( thirdBrowser.snapshot( snapshotParameters, tertiaryBufferPictureForWritableBrowserImage ) );
		//tertiaryBufferPictureForWritableBrowserImage = tertiaryWritableBrowserImage;
		
		
		
		
		
		//tertiaryWritableBrowserImage = (WritableImage) tertiaryCurrentBrowserImageView.getImage();//Makes Bleeding Browser Effect
		//tertiaryCurrentBrowserImageView.setImage( thirdBrowser.snapshot( snapshotParameters, tertiaryBufferPictureForWritableBrowserImage ) );
		//tertiaryCurrentBrowserImageView.setImage( thirdBrowser.snapshot( snapshotParameters, tertiaryBufferPictureForWritableBrowserImage ) );
		//tertiaryBrowserWritableImage= thirdBrowser.snapshot( snapshotParameters, tertiaryBufferPictureForBrowser );
		//tertiaryBufferPictureForBrowser = tertiaryBrowserWritableImage;// = (WritableImage) tertiaryCurrentBrowserImageView.getImage();
		//tertiaryCurrentBrowserImageView.setImage( tertiaryBrowserWritableImage );
		tertiaryWritableImage = tertiaryBasisImageView.snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);
		tertiaryBufferPictureForWritableImage = tertiaryWritableImage;
		tertiaryImageView.setImage(tertiaryWritableImage);
		int xEarly = 0, yEarly = 0;
		//thirdStackPane.getChildren().add( tertiaryImageView );
		thirdStackPane.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryCurrentTransitionBrowserImageView, tertiaryBackgroundBasisImageView, tertiaryBasisImageView, tertiaryImageView );
		//tertiaryCurrentBrowserImagePR = tertiaryWritableBrowserImage.getPixelReader();
		tertiaryCurrentBrowserImagePW = tertiaryBrowserWritableImage.getPixelWriter();
		tertiaryPW = tertiaryWritableImage.getPixelWriter();
		/*tertiaryBasisImagePR = tertiaryBasisImageView.getImage().getPixelReader();
		//tertiaryBackgroundBasisImagePR = tertiaryBackgroundBasisImageView.getImage().getPixelReader();
		//tertiaryCurrentBrowserImagePR = tertiaryBackupWorkAroundImageView.getImage().getPixelReader();//tertiaryCurrentBrowserImageView.getImage().getPixelReader();
		//PixelReader tertiaryCurrentBrowserImagePR = tertiaryCurrentBrowserImage.getPixelReader();//FOR BROWSER TO TURN ON YOU NEED THIS !!!!!!! */
		/*tertiaryImageView.autosize();
		tertiaryCurrentBrowserImageView.autosize();
		tertiaryBackupWorkAroundImageView.autosize();
		tertiaryBasisImageView.autosize();
		tertiaryBackgroundBasisImageView.autosize(); // */
		//"FullDisplay", "BackgroundToBasisFullDisplay", "FullDisplayNoTextShownAtAll", "TextDisplayAndBrowser", "TextDisplayAndBrowserBlackShowingBackground" "FullDisplayBasisText", "FullDisplayBackgroundToBasisNoTextShownAtAll", "BackgroundToBasisFullDisplayBasisText", "FullDisplayBasisBackround", "FullDisplayBackroundToBasis", "FullDisplayBasisOnly", "FullDisplayBackroundToBasisOnly", "BasisBackroundDisplayOnly", "BackroundToBasisOnly", "TextDisplayOnly", "BasisTextDisplayOnly", "BasisTextDisplayOnWhite", "BasisTextDisplayOnBlack", "NoDisplay", "BlackScreen"
		String typeOfDisplay = "FullDisplay";//"BasisTextDisplayOnWhite";//"BasisTextDisplayOnly";//"FullDisplay";//
		boolean invertBasisFromBackground = true, reversalOfBackgroundEffectsMaster = true, nextStepColorTooSimilarEffect = true;//invertBasisFromBackground = true For CGI Level Production Until Threading ReAccess For Future JavaFX Eclipse IDE Developments
		Color initialColorContrastingChoice = VibrantColors.NeonGreen.ToFXColor(), colorTooSimilarReplacementColor = VibrantColors.SkyBlue.ToFXColor();
		double colorDifference = 164;
		int lengthOfColorBar = 0;
		TransparencySlider buddhismBlackBlue0 = new TransparencySlider( new double [] {0., 0., 1., 1.} );
		for (xEarly = 0; xEarly < Dim.width; xEarly++)
			if ( tertiaryBasisImagePR.getColor( xEarly, HalfedDim.height ).getOpacity() == buddhismBlackBlue0.ToFXColor().getOpacity() &&
			tertiaryBasisImagePR.getColor( xEarly, HalfedDim.height ).getRed() == buddhismBlackBlue0.ToFXColor().getRed() &&
			tertiaryBasisImagePR.getColor( xEarly, HalfedDim.height ).getGreen() == buddhismBlackBlue0.ToFXColor().getGreen() &&
			tertiaryBasisImagePR.getColor( xEarly, HalfedDim.height ).getBlue() == buddhismBlackBlue0.ToFXColor().getBlue() )
				lengthOfColorBar++;
		System.out.println("lengthOfColorBar: " + lengthOfColorBar);
		tertiaryXslider = 0;
		System.out.println("tertiaryXslider: " + tertiaryXslider);
		//tertiaryXslider = 3301.2077096635903;//FOR TESTING END ANOMOLYS ONLY

		//thirdStackPane[0] = new StackPane();
		System.out.println("Showing Frame 0");
		//thirdStackPane[(int)( videoFrameQuantity * ( tertiaryXslider - startingPoint ) / videoSequenceLoopQuantity ) + 1].getChildren().add(browser);
		//thirdStackPane[(int)( videoFrameQuantity * ( tertiaryXslider - startingPoint ) / videoSequenceLoopQuantity ) + 1].getChildren().remove(0);
		if (tertiaryRoot == null) {
			throw new RuntimeException("Could not find " + tertiaryRoot.toString()); }
		//camera may Be Needed
		////thirdScene[0].getCamera().snapshot(snapshotParameters, tertiaryWritableImage);
		//thirdScene[0].setRoot(tertiaryRoot);
		//tertiaryStage.show();// !!!!! Uncomment To Show Video !!!!!
		thirdScene = new Scene(thirdStackPane);
		tertiaryStage.setScene(thirdScene);
		System.out.println(Dim);
		//tertiaryStage.setFullScreen(tertiaryIsFullScreened);// ASDF !!!! HERE ! Important For Full Screened

		try { tertiaryThread.sleep(3000);
		} catch (InterruptedException e) {
			System.out.println("Interrupted.");
		}// */

		tertiaryStage.show(); // !!!!! Uncomment To Show Video !!!!!
		//tertiaryStage.setFullScreen(tertiaryIsFullScreened);// Important For Full Screened
		//thirdScene = new Scene(tertiaryRoot);
		bImage = SwingFXUtils.fromFXImage(thirdScene.snapshot( tertiaryWritableImage ), bImage );

		try {
			File outputFile = new File("C:/TestImage-1.png");
			ImageIO.write(bImage, "png", outputFile);
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
		//Above Getting 3D Viewing To Work  
		try { tertiaryThread.sleep(1000);
		} catch (InterruptedException e) {
			System.out.println("Interrupted.");
		}// */
		//tertiaryXslider = videoSequenceLoopQuantity * 3 / 4;//Custom Beggining Frame Reference Viable Uncommented Alone
		//tertiaryXslider = 1582 * sliderInterval;//Usefull For Setting Frame To Start For When It Finishes Change videoSequenceLoopQuantity
		tertiaryCurrentBrowserImageView.setImage( thirdBrowser.snapshot( snapshotParameters, tertiaryBufferPictureForBrowser ) );
		tertiaryCurrentBrowserImage = tertiaryCurrentBrowserImageView.getImage();
		tertiaryCurrentBrowserImagePR = tertiaryCurrentBrowserImage.getPixelReader();
		tertiaryCurrentTransitionBrowserImageView.setImage(tertiaryCurrentBrowserImage);
		tertiaryBrowserWritableImage = tertiaryBufferPictureForBrowser;
		tertiaryBrowserTransitionImagePR = tertiaryCurrentBrowserImagePR;
		tertiaryBrowserPW = tertiaryBrowserWritableImage.getPixelWriter();
		Platform.runLater( () -> { try { tertiaryThread.sleep(2489);
		} catch (InterruptedException e) {
			System.out.println("Interrupted.");
		} } ) ;// */
		tertiaryStage.show();
		Platform.runLater( () -> { try { tertiaryThread.sleep(4879);
		} catch (InterruptedException e) {
			System.out.println("Interrupted.");
		} } ) ;// */
		while ( tertiaryXslider < videoSequenceLoopQuantity )//videoSequenceLoopQuantity )//fullScrollCycle / 4000 )// For Scrolling; tertiaryXslider < fullScrollCycle / 4000 . For MagiElite: videoSequenceLoopQuantity / 10)//for (tertiaryXslider = 0; tertiaryXslider <= 0.175979734764 * cy; tertiaryXslider++)
		{//0.175979734764 *
			//if ( tertiaryXslider > -1 && tertiaryXslider <= 1 || tertiaryXslider > 1730 && tertiaryXslider <= 1731 || tertiaryXslider > 3460 && tertiaryXslider <= 3461 || tertiaryXslider > 5190 && tertiaryXslider <= 5191 || tertiaryXslider > 6920 && tertiaryXslider <= 6921 )
			//{
			//}
			/*Platform.runLater( () -> { tertiaryCurrentBrowserImageView.setImage( thirdBrowser.snapshot( snapshotParameters, tertiaryBufferPicture ) );
									   tertiaryCurrentBrowserImage = tertiaryCurrentBrowserImageView.getImage();
									   tertiaryCurrentBrowserImagePR = tertiaryCurrentBrowserImage.getPixelReader(); } );// */
			/*tertiaryStage.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>()
			{
				@Override
				public void handle(MouseEvent event) 
				{
					System.exit(0);
				}
			});
			try { tertiaryThread.sleep(44);
			} catch (InterruptedException e) {
				System.out.println("Interrupted.");
			}// */

			//tertiaryStage.setX(0);
			//tertiaryStage.setY(0);

			//tertiaryStage.setTitle("Simple3D FX");
			//tertiaryStage.setScene(thirdScene[0]);
			//tertiaryStage.setWidth(800);
			//tertiaryStage.setHeight(650);
			//tertiaryStage.show();

			//ObservableList<Node> CurrentPanes = thirdStackPane[(int)( videoFrameQuantity * ( tertiaryXslider - startingPoint ) / videoSequenceLoopQuantity ) + 1].getChildren();

			//bImage = SwingFXUtils.fromFXImage(thirdScene[0].snapshot( tertiaryWritableImage ), bImage );


			/*try { tertiaryThread.sleep(4000);
			} catch (InterruptedException e) {
				System.out.println("Interrupted.");
			}// */

			//System.out.println("Worked Till After 0.044 s third Wait");
			//tertiaryStage.setScene(thirdScene[(int)( videoFrameQuantity * ( tertiaryXslider - startingPoint ) / videoSequenceLoopQuantity ) + 1]);


			//thirdStackPane.getChildren().remove(tertiaryImageView);
			System.out.println("Got To Primary for Statement");
			//Platform.runLater( () -> {
			for ( int x = 0; x < Dim.width; x++) //Dim.width; x++)//Comment Out Here For Circular Rainbow
			{
				for ( int y = 0; y < Dim.height; y++)
				{
					//try {
					//diagnostics.ColorTooSimilar( x, y, tertiaryXslider * thirdScreen.getBounds().getWidth() / videoSequenceLoopQuantity );
					//diagnostics.ColorSlider( x, y, tertiaryXslider * thirdScreen.getBounds().getWidth() / videoSequenceLoopQuantity, 6 * tertiaryXslider / videoSequenceLoopQuantity, (int)( tertiaryXslider / sliderInterval ) );
					//diagnostics.TransparencySlider( x, y, tertiaryXslider * thirdScreen.getBounds().getWidth() / videoSequenceLoopQuantity, 6 * tertiaryXslider / videoSequenceLoopQuantity, (int)( tertiaryXslider / sliderInterval ), .5, 1 );	
					//diagnostics.RainbowSoftColor( x, y, tertiaryXslider * thirdScreen.getBounds().getWidth() / videoSequenceLoopQuantity, 6 * tertiaryXslider / videoSequenceLoopQuantity, (int)( tertiaryXslider / sliderInterval ), VibrantColorCombos.ImperialFXcolors, VibrantColorCombos.ImperialColorsNum, 0, 1 );
					/*videoSplittingQuantity = 4;

					if ( tertiaryXslider < videoSequenceLoopQuantity / videoSplittingQuantity )
						diagnostics.ColorTooSimilar( x, y, tertiaryXslider * thirdScreen.getBounds().getWidth() * videoSplittingQuantity / videoSequenceLoopQuantity );
					else if ( tertiaryXslider < 2 * videoSequenceLoopQuantity / videoSplittingQuantity )
						diagnostics.ColorSlider( x, y, tertiaryXslider * thirdScreen.getBounds().getWidth() * videoSplittingQuantity / videoSequenceLoopQuantity, 6 * ( tertiaryXslider - videoSequenceLoopQuantity / videoSplittingQuantity ) * videoSplittingQuantity / videoSequenceLoopQuantity, (int)( Math.pow( 2, gradientExpontierMultiplier * ( tertiaryXslider - videoSequenceLoopQuantity / videoSplittingQuantity ) * videoSplittingQuantity / videoFrameQuantity ) - 1 ) );
					else if ( tertiaryXslider < 3 * videoSequenceLoopQuantity / videoSplittingQuantity )
						diagnostics.TransparencySlider( x, y, tertiaryXslider * thirdScreen.getBounds().getWidth() * videoSplittingQuantity / videoSequenceLoopQuantity, 6 * ( tertiaryXslider - 2 * videoSequenceLoopQuantity / videoSplittingQuantity ) * videoSplittingQuantity / videoSequenceLoopQuantity, (int)( Math.pow( 2, gradientExpontierMultiplier * ( tertiaryXslider - 2 * videoSequenceLoopQuantity / videoSplittingQuantity ) * videoSplittingQuantity / videoFrameQuantity ) - 1 ), .5, 1 );
					else
						diagnostics.RainbowSoftColor( x, y, tertiaryXslider * thirdScreen.getBounds().getWidth() * videoSplittingQuantity / videoSequenceLoopQuantity, 6 * ( tertiaryXslider - 3 * videoSequenceLoopQuantity  / videoSplittingQuantity ) * videoSplittingQuantity / videoSequenceLoopQuantity, (int)( Math.pow( 2, gradientExpontierMultiplier * ( tertiaryXslider - 3 * videoSequenceLoopQuantity / videoSplittingQuantity ) * videoSplittingQuantity / videoFrameQuantity ) - 1 ), VibrantColorCombos.ImperialFXcolors, VibrantColorCombos.ImperialColorsNum, 0, 1 );// */

					/*videoSplittingQuantity = 9;
					if ( tertiaryXslider < videoSequenceLoopQuantity / videoSplittingQuantity )
						diagnostics.RainbowPattern2D( x, y, tertiaryXslider * thirdScreen.getBounds().getWidth() * videoSplittingQuantity / videoSequenceLoopQuantity, 6 * ( tertiaryXslider - 3 * videoSequenceLoopQuantity  / videoSplittingQuantity ) * videoSplittingQuantity / videoSequenceLoopQuantity, (int)Math.pow( 2, ( tertiaryXslider - 3 * videoSequenceLoopQuantity / videoSplittingQuantity ) * videoSplittingQuantity / ( sliderInterval * videoFrameQuantity ) ), VibrantColorCombos.ImperialFXcolors, 0, 1 );
					else if ( tertiaryXslider < 2 * videoSequenceLoopQuantity / videoSplittingQuantity )
						diagnostics.RainbowPattern2D( x, y, tertiaryXslider * thirdScreen.getBounds().getWidth() * videoSplittingQuantity / videoSequenceLoopQuantity, 6 * ( tertiaryXslider - 3 * videoSequenceLoopQuantity  / videoSplittingQuantity ) * videoSplittingQuantity / videoSequenceLoopQuantity, (int)Math.pow( 2, ( tertiaryXslider - 3 * videoSequenceLoopQuantity / videoSplittingQuantity ) * videoSplittingQuantity / ( sliderInterval * videoFrameQuantity ) ), VibrantColorCombos.ImperialFXcolors, 0, 1 );
					else if ( tertiaryXslider < 3 * videoSequenceLoopQuantity / videoSplittingQuantity )
						diagnostics.RainbowPattern2D( x, y, tertiaryXslider * thirdScreen.getBounds().getWidth() * videoSplittingQuantity / videoSequenceLoopQuantity, 6 * ( tertiaryXslider - 3 * videoSequenceLoopQuantity  / videoSplittingQuantity ) * videoSplittingQuantity / videoSequenceLoopQuantity, (int)Math.pow( 2, ( tertiaryXslider - 3 * videoSequenceLoopQuantity / videoSplittingQuantity ) * videoSplittingQuantity / ( sliderInterval * videoFrameQuantity ) ), VibrantColorCombos.ImperialFXcolors, 0, 1 );
					else //9 ifs Needed
						diagnostics.RainbowPattern2D( x, y, tertiaryXslider * thirdScreen.getBounds().getWidth() * videoSplittingQuantity / videoSequenceLoopQuantity, 6 * ( tertiaryXslider - 3 * videoSequenceLoopQuantity  / videoSplittingQuantity ) * videoSplittingQuantity / videoSequenceLoopQuantity, (int)Math.pow( 2, ( tertiaryXslider - 3 * videoSequenceLoopQuantity / videoSplittingQuantity ) * videoSplittingQuantity / ( sliderInterval * videoFrameQuantity ) ), VibrantColorCombos.ImperialFXcolors, 0, 1 );// */

					//} catch (IndexOutOfBoundsException e) { System.out.println("Index Out Of Bounds In Diagnostics." + e); }
					//tertiaryPW.setColor( x, y, diagnostics.ToFXColor() );
					//4444
					//LocationOfStillMovement & LocationOfColorMovement MUST BE SYNCED!!!!!!!!
					//pattern2D.SimpleCustomColor( thirdScreen.getBounds().getWidth() / imperialFXcolors.length, 0., tertiaryXslider * thirdScreen.getBounds().getWidth() / videoSequenceLoopQuantity,  x - HalfedDim.width, thirdScreen.getBounds().getWidth() / 2., imperialFXcolors );

					//pattern2D.SimpleRainbow( thirdScreen.getBounds().getWidth(), 0., - tertiaryXslider * thirdScreen.getBounds().getWidth() / videoSequenceLoopQuantity,  x, thirdScreen.getBounds().getWidth() );
					//pattern2D.SimpleRainbowReverse( thirdScreen.getBounds().getWidth(), 0., - tertiaryXslider * thirdScreen.getBounds().getWidth() / videoSequenceLoopQuantity,  x, thirdScreen.getBounds().getWidth() );
					//pattern2D.SimpleCustomColor( thirdScreen.getBounds().getWidth(), 0., - tertiaryXslider * thirdScreen.getBounds().getWidth() / videoSequenceLoopQuantity,  x, thirdScreen.getBounds().getWidth(), VibrantColorCombos.ImperialFXcolors );
					///gradientExpontierMultiplier = 7;
					//pattern2D.SimpleRainbow( thirdScreen.getBounds().getWidth(), 0., - tertiaryXslider * thirdScreen.getBounds().getWidth() / videoSequenceLoopQuantity,  x, thirdScreen.getBounds().getWidth(), 1, (int)( Math.pow( 2, gradientExpontierMultiplier * tertiaryXslider * videoSplittingQuantity / videoFrameQuantity ) - 1 ), 1, 1, true );
					//pattern2D.SimpleCustomColor( thirdScreen.getBounds().getWidth(), 0., - tertiaryXslider * thirdScreen.getBounds().getWidth() / videoSequenceLoopQuantity,  x, thirdScreen.getBounds().getWidth(), 1, (int)( Math.pow( 2, gradientExpontierMultiplier * tertiaryXslider * videoSplittingQuantity / videoFrameQuantity ) - 1 ), VibrantColorCombos.ImperialFXcolors, 1, 1, true );
					//color.RainbowSoftColorRainbowTransparencyFunctionAdjusted( thirdScreen.getBounds().getWidth(), x - tertiaryXslider * thirdScreen.getBounds().getWidth() / videoSequenceLoopQuantity, 1, (int)( Math.pow( 2, gradientExpontierMultiplier * tertiaryXslider * videoSplittingQuantity / videoFrameQuantity ) - 1 ), 1, 1 );
					//pattern2D.SimpleRainbow( thirdScreen.getBounds().getWidth(), 0., 12. * tertiaryXslider * thirdScreen.getBounds().getWidth() / videoSequenceLoopQuantity,  x, thirdScreen.getBounds().getWidth() / 6. );
					//pattern2D.SimpleRainbow( thirdScreen.getBounds().getWidth() / 3., 0., tertiaryXslider * thirdScreen.getBounds().getWidth() / videoSequenceLoopQuantity,  x, thirdScreen.getBounds().getWidth() );
					//pattern2D.SimpleRainbow( - thirdScreen.getBounds().getWidth(), 0., tertiaryXslider * thirdScreen.getBounds().getWidth() / videoSequenceLoopQuantity,  x, - thirdScreen.getBounds().getWidth() );
					//pattern2D.SimpleRainbow( - thirdScreen.getBounds().getWidth(), 0., tertiaryXslider * thirdScreen.getBounds().getWidth() / videoSequenceLoopQuantity,  x, thirdScreen.getBounds().getWidth() );
					//pattern2D.SimpleRainbow( thirdScreen.getBounds().getWidth(), 0., tertiaryXslider * thirdScreen.getBounds().getWidth() / videoSequenceLoopQuantity,  x, - thirdScreen.getBounds().getWidth() );
					//pattern2D.SimpleCustomColor( thirdScreen.getBounds().getWidth(), 0., tertiaryXslider * thirdScreen.getBounds().getWidth() / videoSequenceLoopQuantity,  x, thirdScreen.getBounds().getWidth(), VibrantColorCombos.RainbowFXcolorsWNeonGreenCenter );

					//pattern2D.SimpleRainbow( - thirdScreen.getBounds().getWidth(), 0, 12 * tertiaryXslider * thirdScreen.getBounds().getWidth() / videoSequenceLoopQuantity, x, thirdScreen.getBounds().getWidth() / 6. );
					//pattern2D.SimpleRainbow( - thirdScreen.getBounds().getWidth(), 0, 12. * tertiaryXslider * thirdScreen.getBounds().getWidth() / videoSequenceLoopQuantity, x, - thirdScreen.getBounds().getWidth() / 6. );

					//Screen Bounds Not In Alignment Yet Because Not Full Screened
					//pattern2D.RainbowDiskVaryated( thirdScreen.getBounds().getHeight() / 4., 0, tertiaryXslider * thirdScreen.getBounds().getHeight() / videoSequenceLoopQuantity / 4.,  x - HalfedDim.width, y - HalfedDim.height, thirdScreen.getBounds().getHeight() / 4., false );
					//pattern2D.RainbowDiskVaryated( thirdScreen.getBounds().getHeight() / 4., 0, tertiaryXslider * thirdScreen.getBounds().getHeight() / videoSequenceLoopQuantity / 4.,  x - HalfedDim.width, y - HalfedDim.height, thirdScreen.getBounds().getHeight() / 24., false );
					//pattern2D.RainbowDiskVaryated( thirdScreen.getBounds().getHeight() / 12., 0, tertiaryXslider * thirdScreen.getBounds().getHeight() / videoSequenceLoopQuantity / 4.,  x - HalfedDim.width, y - HalfedDim.height, thirdScreen.getBounds().getHeight() / 4., false );

					//pattern2D.SimpleRainbow( thirdScreen.getBounds().getWidth() / 7, 0, tertiaryXslider * thirdScreen.getBounds().getHeight() / videoSequenceLoopQuantity,  x - HalfedDim.width, thirdScreen.getBounds().getWidth() / 2 );// - Locaition Flips Rainbow Like Reverse Without Green Being Replaced By Pink
					//BuildMepattern2D.RainbowDiskVaryated( thirdScreen.getBounds().getHeight() / 7, 0, tertiaryXslider * thirdScreen.getBounds().getHeight() / videoSequenceLoopQuantity / 2,  x - HalfedDim.width, y - HalfedDim.height, thirdScreen.getBounds().getHeight() / 2, false );//May Not Be Synced Properly To Show 1 Clock Rotation Must Be Properly Relative Factoring
					//pattern2D.RainbowDiskVaryated( thirdScreen.getBounds().getHeight() / 7, 0, tertiaryXslider * thirdScreen.getBounds().getHeight() / videoSequenceLoopQuantity / 2,  x - HalfedDim.width, y - HalfedDim.height, thirdScreen.getBounds().getHeight() / 2, false );//May Not Be Synced Properly To Show 1 Clock Rotation Must Be Properly Relative Factoring
					////pattern2D.RainbowDiskVaryated( thirdScreen.getBounds().getHeight() / 4, - tertiaryXslider * thirdScreen.getBounds().getHeight() / videoSequenceLoopQuantity / 4, - tertiaryXslider * thirdScreen.getBounds().getHeight() / videoSequenceLoopQuantity / 4,  x - HalfedDim.width, y - HalfedDim.height, thirdScreen.getBounds().getHeight() / 4, false );
					//pattern2D.RainbowDiskVaryated( thirdScreen.getBounds().getHeight() / 14, 0, tertiaryXslider * thirdScreen.getBounds().getHeight() / videoSequenceLoopQuantity / 2 ,  x - HalfedDim.width, y - HalfedDim.height, thirdScreen.getBounds().getHeight() / 14, false );//May Not Be Synced Properly To Show 1 Clock Rotation Must Be Properly Relative Factoring

					//pattern2D.RainbowDiskVaryated( thirdScreen.getBounds().getHeight() / 4., 0, tertiaryXslider * thirdScreen.getBounds().getHeight() / videoSequenceLoopQuantity / 4.,  x - HalfedDim.width, y - HalfedDim.height, thirdScreen.getBounds().getHeight() / 4., VibrantColorCombos.ImperialFXcolors, false );//For HumanityFront.com
					//pattern2D.RainbowDiskVaryated( thirdScreen.getBounds().getHeight() / 4., 0, tertiaryXslider * thirdScreen.getBounds().getHeight() / videoSequenceLoopQuantity / 4.,  x - HalfedDim.width, y - HalfedDim.height, thirdScreen.getBounds().getHeight() / 4., false );//For HumanityFront.com Flashing
					//pattern2D.RainbowDiskVaryated( thirdScreen.getBounds().getHeight() / 4., 0, tertiaryXslider * thirdScreen.getBounds().getHeight() / videoSequenceLoopQuantity / 4.,  x - HalfedDim.width, y - HalfedDim.height, thirdScreen.getBounds().getHeight() / 4., VibrantColorCombos.HalloweenFXcolors, false );

					//double ringSize = 0.175979734764;
					//pattern2D.RainbowRingVaryated( ringSize * Dim.height / 2., 0, ( tertiaryXslider + 6. * ringSize * Dim.height )* ringSize * Dim.height / ( 2. * videoSequenceLoopQuantity ),  x - Dim.width / 2., y - Dim.height / 2. + 1., ringSize * Dim.height / 2., (1. - ringSize ) * Dim.height / 2. - .5, Dim.height / 2., VibrantColorCombos.RainbowFXcolorsWNeonGreenCenterReverse, false );
					//pattern2D.RainbowRingVaryated( thirdScreen.getBounds().getHeight() / 8., 0, tertiaryXslider * thirdScreen.getBounds().getHeight() / thirdScreen.getBounds().getHeight() / 8.,  x - HalfedDim.width, y - HalfedDim.height, thirdScreen.getBounds().getHeight() / 8., 6 * thirdScreen.getBounds().getHeight() / 8., thirdScreen.getBounds().getHeight(), VibrantColorCombos.RainbowFXcolorsWNeonGreenCenter, false );// *

					tertiaryPW.setColor( x, y, rainbowSoft2D.RainbowClock( 2 * Math.PI, 2 * Math.PI * tertiaryXslider / videoSequenceLoopQuantity, 2 * Math.PI * tertiaryXslider / videoSequenceLoopQuantity,  x, y, 2 * Math.PI, false, 1., 2147483647, 1., 1., true, tertiaryCurrentBrowserImagePR, tertiaryCurrentBrowserImagePW, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, reversalOfBackgroundEffectsMaster, nextStepColorTooSimilarEffect ) );//Simple Double Slider 1 Rotation Rainbow Clock With Browser Support And For Below Block////////
				


					//pattern2D.RainbowClockVaryated( videoSequenceLoopQuantity / 2., 0, tertiaryXslider * videoSequenceLoopQuantity * 4,  x - HalfedDim.width, y - HalfedDim.height, videoSequenceLoopQuantity / 2., false );
					//pattern2D.RainbowClockVaryated( videoSequenceLoopQuantity / 2., 0, tertiaryXslider * videoSequenceLoopQuantity * 4,  x - HalfedDim.width, y - HalfedDim.height, videoSequenceLoopQuantity / 2., halfSreenDiagionalLength, false );
					//pattern2D.RainbowClockVaryated( Math.PI / 2., Math.PI * - tertiaryXslider / videoSequenceLoopQuantity + Math.PI, 0, x - HalfedDim.width, y - HalfedDim.height, Math.PI / 2., false );
					//pattern2D.RainbowClockVaryated( Math.PI / 2., Math.PI * - tertiaryXslider / videoSequenceLoopQuantity + Math.PI, - 2. * tertiaryXslider / videoSequenceLoopQuantity, x - HalfedDim.width, y - HalfedDim.height, Math.PI / 2., false );

					//pattern2D.RainbowClockVaryated( Math.PI / 2.5, 0, - ( 12. * Math.PI * tertiaryXslider / videoSequenceLoopQuantity ) / 5. + 3 * Math.PI / 15, x - HalfedDim.width, y - HalfedDim.height, Math.PI / 15., false );//MUST BE RADIALLY SYNCED
					//pattern2D.RainbowClockVaryated( Math.PI / 7.5, 0, - ( 4. * Math.PI * tertiaryXslider / videoSequenceLoopQuantity ) / 5. + 7.5 * Math.PI / 7.5, x - HalfedDim.width, y - HalfedDim.height, Math.PI / 2.5, false );
					//pattern2D.RainbowClockVaryated( Math.PI / 2.5, - ( 12. * Math.PI * tertiaryXslider / videoSequenceLoopQuantity ) / 5. + 3 * Math.PI / 15, 0, x - HalfedDim.width, y - HalfedDim.height, Math.PI / 15., false );//MUST BE RADIALLY SYNCED
					//pattern2D.RainbowClockVaryated( Math.PI / 7.5, - ( 4. * Math.PI * tertiaryXslider / videoSequenceLoopQuantity ) / 5. + 7.5 * Math.PI / 7.5, 0, x - HalfedDim.width, y - HalfedDim.height, Math.PI / 2.5, false );
					//SYNC Loc RADIALLY LIKEABOVE With LocOColMv//pattern2D.RainbowClockVaryated( Math.PI / 2.5, ( 12. * Math.PI * tertiaryXslider / videoSequenceLoopQuantity ) / 5. + Math.PI, ( 6. * Math.PI * tertiaryXslider / videoSequenceLoopQuantity ) / 5., x - HalfedDim.width, y - HalfedDim.height, Math.PI / 15., false );
					//pattern2D.RainbowClockVaryated( Math.PI / 7.5, ( 4. * Math.PI * tertiaryXslider / videoSequenceLoopQuantity ) / 5. + Math.PI, - ( 3.5 * Math.PI * tertiaryXslider / videoSequenceLoopQuantity ) / 5., x - HalfedDim.width, y - HalfedDim.height, Math.PI / 2.5, false );

					//1st Check Over All 36 Functions To Check To Make Sure They Will Acesess The Right Function In The End

					//Tests For All SliderFormulates In RainbowPattern2D
					//MovingColors
					//pattern2D.RainbowClockVaryated( Math.PI / 2., 0, Math.PI * ( tertiaryXslider / videoSequenceLoopQuantity ) / 2., x - HalfedDim.width, y - HalfedDim.height, Math.PI / 2., false );//1
					//pattern2D.RainbowClockVaryated( Math.PI / 2.5, 0, 12. * Math.PI * tertiaryXslider / videoSequenceLoopQuantity / 2.5, x - HalfedDim.width, y - HalfedDim.height, Math.PI / 15., false );//RainbowSegment//2//!!!!!{Potential BUG Caused By Patent Terrorists Here}?LocationOfColorMovement Must Be - For Rainbow Clock To Work Properly As A Natural Consequence Of Things
					//pattern2D.RainbowClockVaryated( Math.PI / 7.5, 0, Math.PI * tertiaryXslider / videoSequenceLoopQuantity / 2.5, x - HalfedDim.width, y - HalfedDim.height, Math.PI / 2.5, false );//3//RainbowRibbon
					//MovingColors Negatives
					//pattern2D.RainbowClockVaryated( - Math.PI / 2., 0, Math.PI * ( tertiaryXslider / videoSequenceLoopQuantity ) / 2., x - HalfedDim.width, y - HalfedDim.height, - Math.PI / 2., false );//4//Remember 2 * 180 degrees, 2 * Math.PI So Half The Divisor And Add Math.PI To Location To Make Into Clock Make tertiaryXslider -tertiaryXslider To Reverse Spinning Direction
					//pattern2D.RainbowClockVaryated( - Math.PI / 2., 0, Math.PI * ( tertiaryXslider / videoSequenceLoopQuantity ) / 2., x - HalfedDim.width, y - HalfedDim.height, Math.PI / 2., false );//5
					//pattern2D.RainbowClockVaryated( Math.PI / 2., 0, Math.PI * ( tertiaryXslider / videoSequenceLoopQuantity ) / 2., x - HalfedDim.width, y - HalfedDim.height, - Math.PI / 2., false );//6
					//pattern2D.RainbowClockVaryated( - Math.PI / 2.5, 0, 12. * Math.PI * ( tertiaryXslider / videoSequenceLoopQuantity ) / 2.5, x - HalfedDim.width, y - HalfedDim.height, - Math.PI / 15., false );//7
					//pattern2D.RainbowClockVaryated( - Math.PI / 2.5, 0, 12. * Math.PI * ( tertiaryXslider / videoSequenceLoopQuantity ) / 2.5, x - HalfedDim.width, y - HalfedDim.height, Math.PI / 15., false );//8
					//pattern2D.RainbowClockVaryated( Math.PI / 2.5, 0, 12. * Math.PI * ( tertiaryXslider / videoSequenceLoopQuantity ) / 2.5, x - HalfedDim.width, y - HalfedDim.height, - Math.PI / 15., false );//9
					//pattern2D.RainbowClockVaryated( - Math.PI / 7.5, 0, Math.PI * ( tertiaryXslider / videoSequenceLoopQuantity ) / 2.5,  x - HalfedDim.width, y - HalfedDim.height, - Math.PI / 2.5, false );//10
					//pattern2D.RainbowClockVaryated( - Math.PI / 7.5, 0, Math.PI * ( tertiaryXslider / videoSequenceLoopQuantity ) / 2.5,  x - HalfedDim.width, y - HalfedDim.height, Math.PI / 2.5, false );//11
					//pattern2D.RainbowClockVaryated( Math.PI / 7.5, 0, Math.PI * ( tertiaryXslider / videoSequenceLoopQuantity ) / 2.5, x - HalfedDim.width, y - HalfedDim.height, - Math.PI / 2.5, false );//12
					//TransitionSlider
					//pattern2D.RainbowClockVaryated( Math.PI / 2., Math.PI * ( tertiaryXslider / videoSequenceLoopQuantity ) / 2., 0, x - HalfedDim.width, y - HalfedDim.height, Math.PI / 2., false );//13 //Does Something Slightly Different Than Expected That May Become Something New But NM I Think It Is Doing What Is Supposed To Do But Save Things When You Get It Back To This Or This When You Get This To That.
					//pattern2D.RainbowClockVaryated( Math.PI / 2.5, 12. * Math.PI * tertiaryXslider / videoSequenceLoopQuantity / 2.5, 0, x - HalfedDim.width, y - HalfedDim.height, Math.PI / 15., false );//14
					//pattern2D.RainbowClockVaryated( Math.PI / 7.5, Math.PI * tertiaryXslider / videoSequenceLoopQuantity / 2.5 + 7.5 * Math.PI / 7.5, 0, x - HalfedDim.width, y - HalfedDim.height, Math.PI / 2.5, false );//15

					//After Doing 3 Main DoubleSliders Stop Here And Wait For Diagnostics [9 ++] 3X[-~-] To Test!!

					//TransitionSlider Negatives
					//pattern2D.RainbowClockVaryated( - Math.PI / 2., Math.PI * ( tertiaryXslider / videoSequenceLoopQuantity ) / 2, 0, x - HalfedDim.width, y - HalfedDim.height, - Math.PI / 2., false );//16
					//pattern2D.RainbowClockVaryated( - Math.PI / 2., Math.PI * ( tertiaryXslider / videoSequenceLoopQuantity ) / 2, 0, x - HalfedDim.width, y - HalfedDim.height, Math.PI / 2., false );//17
					//pattern2D.RainbowClockVaryated( Math.PI / 2., Math.PI * ( tertiaryXslider / videoSequenceLoopQuantity ) / 2, 0, x - HalfedDim.width, y - HalfedDim.height, - Math.PI / 2., false );//18
					//pattern2D.RainbowClockVaryated( - Math.PI / 2.5, 12. * Math.PI * ( tertiaryXslider / videoSequenceLoopQuantity ) / 2.5, 0, x - HalfedDim.width, y - HalfedDim.height, - Math.PI / 15., false );//19
					//pattern2D.RainbowClockVaryated( - Math.PI / 2.5, 12. * Math.PI * ( tertiaryXslider / videoSequenceLoopQuantity ) / 2.5, 0, x - HalfedDim.width, y - HalfedDim.height, Math.PI / 15., false );//20
					//pattern2D.RainbowClockVaryated( Math.PI / 2.5, 12. * Math.PI * ( tertiaryXslider / videoSequenceLoopQuantity ) / 2.5, 0, x - HalfedDim.width, y - HalfedDim.height, - Math.PI / 15., false );//21
					//pattern2D.RainbowClockVaryated( - Math.PI / 7.5, Math.PI * ( tertiaryXslider / videoSequenceLoopQuantity ) / 2.5, 0,  x - HalfedDim.width, y - HalfedDim.height, - Math.PI / 2.5, false );//22
					//pattern2D.RainbowClockVaryated( - Math.PI / 7.5, Math.PI * ( tertiaryXslider / videoSequenceLoopQuantity ) / 2.5, 0,  x - HalfedDim.width, y - HalfedDim.height, Math.PI / 2.5., false );//23
					//pattern2D.RainbowClockVaryated( Math.PI / 7.5, Math.PI * ( tertiaryXslider / videoSequenceLoopQuantity ) / 2.5, 0, x - HalfedDim.width, y - HalfedDim.height, - Math.PI / 2.5, false );//24
					//DoubleSlider
					//pattern2D.RainbowClockVaryated( Math.PI / 2., Math.PI * ( tertiaryXslider / videoSequenceLoopQuantity ) / 2., - Math.PI * ( - tertiaryXslider / videoSequenceLoopQuantity ) / 2., x - HalfedDim.width, y - HalfedDim.height, Math.PI / 2., false );//25 //Save Any Changes To Under Functions To Preserve These Beauties
					//pattern2D.RainbowClockVaryated( Math.PI / 2.5, - 6. * Math.PI * tertiaryXslider / videoSequenceLoopQuantity / 5., ( 12. * Math.PI * tertiaryXslider / videoSequenceLoopQuantity ) / 5., x - HalfedDim.width, y - HalfedDim.height, Math.PI / 15., false );//26
					//pattern2D.RainbowClockVaryated( Math.PI / 7.5, 3. * Math.PI * tertiaryXslider / videoSequenceLoopQuantity / 5., ( 4. * Math.PI * tertiaryXslider / videoSequenceLoopQuantity ) / 5., x - HalfedDim.width, y - HalfedDim.height, Math.PI / 2.5, false );//27
					//DoubleSlider Negatives
					//pattern2D.RainbowClockVaryated( - Math.PI / 2., Math.PI * ( tertiaryXslider / videoSequenceLoopQuantity ) / 2., - Math.PI * ( - tertiaryXslider / videoSequenceLoopQuantity ) / 2., x - HalfedDim.width, y - HalfedDim.height, - Math.PI / 2., false );//28
					//pattern2D.RainbowClockVaryated( - Math.PI / 2., Math.PI * ( tertiaryXslider / videoSequenceLoopQuantity ) / 2., - Math.PI * ( - tertiaryXslider / videoSequenceLoopQuantity ) / 2., x - HalfedDim.width, y - HalfedDim.height, Math.PI / 2., false );//29
					//pattern2D.RainbowClockVaryated( Math.PI / 2., Math.PI * ( tertiaryXslider / videoSequenceLoopQuantity ) / 2., - Math.PI * ( - tertiaryXslider / videoSequenceLoopQuantity ) / 2., x - HalfedDim.width, y - HalfedDim.height, - Math.PI / 2., false );//30
					//pattern2D.RainbowClockVaryated( - Math.PI / 2.5, - 6. * Math.PI * tertiaryXslider / videoSequenceLoopQuantity / 5., ( 12. * Math.PI * tertiaryXslider / videoSequenceLoopQuantity ) / 5., x - HalfedDim.width, y - HalfedDim.height, - Math.PI / 15., false );//31
					//pattern2D.RainbowClockVaryated( - Math.PI / 2.5, - 6. * Math.PI * tertiaryXslider / videoSequenceLoopQuantity / 5., ( 12. * Math.PI * tertiaryXslider / videoSequenceLoopQuantity ) / 5., x - HalfedDim.width, y - HalfedDim.height, Math.PI / 15., false );//32
					//pattern2D.RainbowClockVaryated( Math.PI / 2.5, - 6. * Math.PI * tertiaryXslider / videoSequenceLoopQuantity / 5., ( 12. * Math.PI * tertiaryXslider / videoSequenceLoopQuantity ) / 5., x - HalfedDim.width, y - HalfedDim.height, - Math.PI / 15., false );//33
					//pattern2D.RainbowClockVaryated( - Math.PI / 7.5, 3. * Math.PI * tertiaryXslider / videoSequenceLoopQuantity / 5., ( 4. * Math.PI * tertiaryXslider / videoSequenceLoopQuantity ) / 5., x - HalfedDim.width, y - HalfedDim.height, - Math.PI / 2.5, false );//34
					//pattern2D.RainbowClockVaryated( - Math.PI / 7.5, 3. * Math.PI * tertiaryXslider / videoSequenceLoopQuantity / 5., ( 4. * Math.PI * tertiaryXslider / videoSequenceLoopQuantity ) / 5., x - HalfedDim.width, y - HalfedDim.height, Math.PI / 2.5., false );//35
					//pattern2D.RainbowClockVaryated( Math.PI / 7.5, 3. * Math.PI * tertiaryXslider / videoSequenceLoopQuantity / 5., ( 4. * Math.PI * tertiaryXslider / videoSequenceLoopQuantity ) / 5., x - HalfedDim.width, y - HalfedDim.height, - Math.PI / 2.5, false );//36

					//tertiaryPW.setColor( x, y, pattern2D.RainbowSpiralVaryated( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, ( x - HalfedDim.width ) / 3., ( y - HalfedDim.height ) / 3., videoSequenceLoopQuantity, 24.6, 1., halfSreenDiagionalLength, false ) );
					//pattern2D.RainbowSpiralVaryated( videoSequenceLoopQuantity, 0, tertiaryXslider, ( x - HalfedDim.width ) / 3., ( y - HalfedDim.height ) / 3., videoSequenceLoopQuantity, 24.6, 1., halfSreenDiagionalLength, false );
					//pattern2D.RainbowSpiralVaryated( videoSequenceLoopQuantity / 3, tertiaryXslider, -tertiaryXslider, ( x - HalfedDim.width ) / 3., ( y - HalfedDim.height ) / 3., videoSequenceLoopQuantity, 24.6, 1., halfSreenDiagionalLength, false );
					//pattern2D.RainbowSpiralVaryated( videoSequenceLoopQuantity, 6 * tertiaryXslider, -6 * tertiaryXslider, ( x - HalfedDim.width ) / 3., ( y - HalfedDim.height ) / 3., videoSequenceLoopQuantity / 6, 24.6, 1., halfSreenDiagionalLength, false );

					//BAD pattern2D.RainbowClockVaryated( 90, 0, - tertiaryXslider * 360 / videoSequenceLoopQuantity,  x - HalfedDim.width, y - HalfedDim.height, 90, 3, 180, false );//BAD
					//pattern2D.RainbowSpiralVaryated( videoSequenceLoopQuantity, 0, tertiaryXslider, ( x - HalfedDim.width ) / 3., ( y - HalfedDim.height ) / 3., videoSequenceLoopQuantity, 24.6, 1, halfSreenDiagionalLength, false );//For Proper Rainbow Hypnosis Spiral
					//pattern2D.RainbowSpiralVaryated( videoSequenceLoopQuantity, 0, tertiaryXslider, ( x - HalfedDim.width ) / 10., ( y - HalfedDim.height ) / 10., videoSequenceLoopQuantity, 144, 10, halfSreenDiagionalLength, false );//For Proper Rainbow Rainbow Shrunken
					//pattern2D.RainbowSpiralVaryated( videoSequenceLoopQuantity * 6, 0, tertiaryXslider * 6, ( x - HalfedDim.width ) / 6., ( y - HalfedDim.height ) / 6., videoSequenceLoopQuantity, 88.8, 4, halfSreenDiagionalLength, false );//For Segment View
					//pattern2D.RainbowSpiralVaryated( videoSequenceLoopQuantity, 0, tertiaryXslider * 3, ( x - HalfedDim.width ) / 6., ( y - HalfedDim.height ) / 6., videoSequenceLoopQuantity * 3, 66.6, 3, halfSreenDiagionalLength, false );//For View Of More Length Than 1 Segment, Values Must Be Mulitples Of Eachother Somehow 3 In This Instance
					//pattern2D.RainbowSpiralVaryated( videoSequenceLoopQuantity, 0, tertiaryXslider, ( x - HalfedDim.width ) / 1., ( y - HalfedDim.height ) / 1., videoSequenceLoopQuantity, 999, 1680, halfSreenDiagionalLength, false );//For Proper Rainbow PsychaHypnotic
					//pattern2D.RainbowSpiralVaryated( videoSequenceLoopQuantity, 0, tertiaryXslider, ( x - HalfedDim.width ) / 10., ( y - HalfedDim.height ) / 10., videoSequenceLoopQuantity, 999, 1680, halfSreenDiagionalLength, false );//For Strange Rainbow PsychaHypnotic

					//pattern2D.RainbowSpiralVaryated( videoSequenceLoopQuantity, tertiaryXslider * 3, tertiaryXslider * 3, ( x - HalfedDim.width ) / 6., ( y - HalfedDim.height ) / 6., videoSequenceLoopQuantity * 3, 66.6, 3, halfSreenDiagionalLength, false );
					///pattern2D.RainbowSpiralVaryated( videoSequenceLoopQuantity, tertiaryXslider * 6., tertiaryXslider * 6., ( x - HalfedDim.width ) / 6., ( y - HalfedDim.height ) / 6., videoSequenceLoopQuantity / 6., 66.6, 3, halfSreenDiagionalLength, false );

					//System.out.println("x: " + x +" y: " + y + " tertiaryXslider: " + tertiaryXslider);
					//pattern2D.RainbowSpiralVaryated( videoSequenceLoopQuantity, 0, tertiaryXslider / Math.pow ( 1.003, tertiaryXslider ), ( x - HalfedDim.width ) / Math.pow( 1.004, tertiaryXslider ), ( y - HalfedDim.height ) / Math.pow( 1.004, tertiaryXslider ), videoSequenceLoopQuantity, 999, 1680, halfSreenDiagionalLength, false );//For Proper Rainbow PsychaHypnotic //Unknown Anomaly Like Shrunken Tangent Determining Disk Being Scanned By My Cybertron Steel 9600 Computer And Shows Atoms That Cannot Become More Resolute At The Present Time Or Ever!?
					/*double cheapFractalAdjustedtertiaryXslider = tertiaryXslider * 480 / videoSequenceLoopQuantity;//For Cheap Varyated Fractal Imperial
					double tertiaryXsliderBackAndFourth = cheapFractalAdjustedtertiaryXslider;
					if ( cheapFractalAdjustedtertiaryXslider < 240 )//For Fractal
						tertiaryXsliderBackAndFourth = cheapFractalAdjustedtertiaryXslider;//For Fractal
					else//For Fractal
						tertiaryXsliderBackAndFourth = 480 - cheapFractalAdjustedtertiaryXslider;//
					//System.out.println("x: " + x +" y: " + y + " cheapFractalAdjustedtertiaryXslider: " + cheapFractalAdjustedtertiaryXslider);
					//pattern2D.RainbowCheapFractalVaryated( thirdScreen.getBounds().getWidth(), 24 * cheapFractalAdjustedtertiaryXslider, tertiaryXsliderBackAndFourth,  x, y - HalfedDim.height, thirdScreen.getBounds().getWidth(), thirdScreen.getBounds().getWidth(), VibrantColorCombos.RainbowFXcolorsReverseNoPink, false );//Good Double Slider Vibrant Version Imperial
					//pattern2D.RainbowCheapFractalVaryated( thirdScreen.getBounds().getWidth(), 0, tertiaryXsliderBackAndFourth,  x, y - HalfedDim.height, thirdScreen.getBounds().getWidth(), thirdScreen.getBounds().getWidth(), false );//Good Vibrant Version
					//pattern2D.RainbowCheapFractalVaryated( thirdScreen.getBounds().getWidth(), 0, tertiaryXsliderBackAndFourth,  x, y - HalfedDim.height, thirdScreen.getBounds().getWidth() / 6, thirdScreen.getBounds().getWidth(), false );//Rainbow Segment Version
					//pattern2D.RainbowCheapFractalVaryated( thirdScreen.getBounds().getWidth() / 3, 0, tertiaryXsliderBackAndFourth,  x, y - HalfedDim.height, thirdScreen.getBounds().getWidth(), thirdScreen.getBounds().getWidth(), false );//Rainbow With Even Ends Of 1 Color */
					//System.out.println("x: " + x +" y: " + y);
					//rainbowSoft2D.MagiElite( videoSequenceLoopQuantity, tertiaryXslider, 0., videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, 24.6, 1., halfSreenDiagionalLength, false, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR, tertiaryBackgroundBasisImagePR, tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, nextStepColorTooSimilarEffect );
					//rainbowSoft2D.Buddhism( videoSequenceLoopQuantity, tertiaryXslider, 0., sliderInterval, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, (double)lengthOfColorBar, 24.6, 1., 1.14,        1.       , halfSreenDiagionalLength, false, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR, tertiaryBackgroundBasisImagePR, tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, VibrantColors.NeonGreen.ToFXColor(), colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, nextStepColorTooSimilarEffect, false );
					///rainbowSoft2D.Buddhism( videoSequenceLoopQuantity, tertiaryXslider, 0., sliderInterval, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, (double)lengthOfColorBar, 24.6, 1., 1.14, 4., halfSreenDiagionalLength, false, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR, tertiaryBackgroundBasisImagePR, tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, VibrantColors.NeonGreen.ToFXColor(), colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, nextStepColorTooSimilarEffect, false );
					//public Color Buddhism(double ColorsFactor, double LocationOfStillMovement, double LocationOfColorMovement, double SliderInterval, double FullSliderRunThrough, int x, int y, double RepeatFactor, double LengthOfColorBar, double SpiralFactor, double NumberOfSpirals, double SuckInExponentialness, double SuckInDivisor, double HalfSreenDiagionalLength, boolean Reversed, double BrightnessMultiplyer, int Gradations, double OpacityBefore, double OpacityAfter, boolean Adjusted, PixelReader BasisPR, PixelReader BackgroundBasisPR, PixelReader BrowserPR, Dimension Dim, String TypeOfDisplay, Color InitialColorContrastingChoice, Color ColorTooSimilarReplacementColor, double ColorDifference, boolean InvertBasisFromBackground, boolean ReversalOfBackgroundEffectsMaster, boolean NextStepColorTooSimilarEffect )
					//tertiaryPW.setColor( x, y, tertiaryBasisImagePR.getColor( x, y ) );
					//////tertiaryPW.setColor( x, y, pattern2D.ToFXColor() );//////
					//tertiaryPW.setColor( x, y, color.ToFXColor() );
					///tertiaryPW.setColor( x, y, rainbowSoft2D.ToFXColor() );///
					//tertiaryPW.setColor( x, y, rainbowSoft2D.FwaLogoSplash( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, halfSreenDiagionalLength, false, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR, tertiaryBackgroundBasisImagePR, tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, reversalOfBackgroundEffectsMaster, nextStepColorTooSimilarEffect ) );
					//tertiaryPW.setColor( x, y, rainbowSoft2D.FwaLogoSplash( 96. * tertiaryXslider - videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity / 3., (int)x, (int)y, videoSequenceLoopQuantity, halfSreenDiagionalLength, false, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR, tertiaryBackgroundBasisImagePR, tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, reversalOfBackgroundEffectsMaster, nextStepColorTooSimilarEffect ) );
					////tertiaryPW.setColor( x, y, rainbowSoft2D.FwaFlagLogoSplash( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, halfSreenDiagionalLength, xScaleFactor, yScaleFactor, false, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR, tertiaryBackgroundBasisImagePR, tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, reversalOfBackgroundEffectsMaster, nextStepColorTooSimilarEffect ) );////
					//tertiaryPW.setColor( x, y, rainbowSoft2D.FwaFlagLogoSplash( 96. * tertiaryXslider - videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity / 3., (int)x, (int)y, videoSequenceLoopQuantity, halfSreenDiagionalLength, false, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR, tertiaryBackgroundBasisImagePR, tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, reversalOfBackgroundEffectsMaster, nextStepColorTooSimilarEffect ) );
					/*if ( tertiaryXslider < videoSequenceLoopQuantity / 2. )
						tertiaryPW.setColor( x, y, rainbowSoft2D.FwaLogoSplash( 2. * ( tertiaryXslider - 1.001 * videoSequenceLoopQuantity / 4. ), tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity / 2., (int)x, (int)y, videoSequenceLoopQuantity, halfSreenDiagionalLength, false, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR, tertiaryBackgroundBasisImagePR, tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, reversalOfBackgroundEffectsMaster, nextStepColorTooSimilarEffect ) );
					else
						tertiaryPW.setColor( x, y, rainbowSoft2D.FwaLogoSplash( -tertiaryXslider + 1.001 * videoSequenceLoopQuantity / 2., tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity / 2., (int)x, (int)y, videoSequenceLoopQuantity, halfSreenDiagionalLength, false, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR, tertiaryBackgroundBasisImagePR, tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, reversalOfBackgroundEffectsMaster, nextStepColorTooSimilarEffect ) ); // */
					////tertiaryPW.setColor( x, y, rainbowSoft2D.MagiElite( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, 24.6, 88.8, 1., halfSreenDiagionalLength, false, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR, tertiaryBackgroundBasisImagePR, tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, reversalOfBackgroundEffectsMaster, nextStepColorTooSimilarEffect ) );//For SciMagOrderMagiElite.png Color-Coded Varyaterd Rainbow/Color Production With Octagonal Jew Star With Pentagram In Center, Make Sure To Choose Correct BackgroundBasis Image Too////
					/*if ( tertiaryXslider < videoSequenceLoopQuantity / 16. )
						tertiaryPW.setColor( x, y, rainbowSoft2D.MagiElite( 112. * tertiaryXslider - videoSequenceLoopQuantity, 0, tertiaryXslider, videoSequenceLoopQuantity / 8., (int)x, (int)y, videoSequenceLoopQuantity, 24.6, 88.8, 1., halfSreenDiagionalLength, false, 1., (int)( videoFrameQuantity / 80. - tertiaryXslider / ( sliderInterval * 5. ) ), 1., 1., false, tertiaryBasisImagePR, tertiaryBackgroundBasisImagePR, tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, reversalOfBackgroundEffectsMaster, nextStepColorTooSimilarEffect ) );
					else if ( tertiaryXslider < videoSequenceLoopQuantity / 8. )
						tertiaryPW.setColor( x, y, rainbowSoft2D.MagiElite( 112. * ( tertiaryXslider - videoSequenceLoopQuantity / 16. ) - 6. * videoSequenceLoopQuantity, 0, tertiaryXslider, videoSequenceLoopQuantity / 8., (int)x, (int)y, videoSequenceLoopQuantity, 24.6, 88.8, 1., halfSreenDiagionalLength, false, 1., 0, 1., 1., false, tertiaryBasisImagePR, tertiaryBackgroundBasisImagePR, tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, reversalOfBackgroundEffectsMaster, nextStepColorTooSimilarEffect ) );
					else if ( tertiaryXslider < videoSequenceLoopQuantity * 3. / 8. )//For Blocky To Graduated To Imperial MagiElite
						tertiaryPW.setColor( x, y, rainbowSoft2D.MagiElite( videoSequenceLoopQuantity, 0, tertiaryXslider, videoSequenceLoopQuantity / 4., (int)x, (int)y, videoSequenceLoopQuantity, 24.6, 88.8, 1., halfSreenDiagionalLength, false, 1., (int)( tertiaryXslider / ( sliderInterval * 25. ) ), 1., 1., false, tertiaryBasisImagePR, tertiaryBackgroundBasisImagePR, tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, reversalOfBackgroundEffectsMaster, nextStepColorTooSimilarEffect ) );
					else if ( tertiaryXslider < videoSequenceLoopQuantity * 5. / 8. )
						tertiaryPW.setColor( x, y, rainbowSoft2D.MagiElite( videoSequenceLoopQuantity, 0, tertiaryXslider, videoSequenceLoopQuantity / 4., (int)x, (int)y, videoSequenceLoopQuantity, 24.6, 88.8, 1., halfSreenDiagionalLength, false, 1., (int)( tertiaryXslider / ( sliderInterval * 25. ) ), 1., 1., false, tertiaryBasisImagePR, tertiaryBackgroundBasisImagePR, tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, reversalOfBackgroundEffectsMaster, nextStepColorTooSimilarEffect ) );
					else if ( tertiaryXslider < videoSequenceLoopQuantity * 3. / 4. )
						tertiaryPW.setColor( x, y, rainbowSoft2D.MagiElite( videoSequenceLoopQuantity - 16. * ( tertiaryXslider - 5.0001 / 8. * videoSequenceLoopQuantity ), 0, tertiaryXslider, videoSequenceLoopQuantity / 8., (int)x, (int)y, videoSequenceLoopQuantity, 24.6, 88.8, 1., halfSreenDiagionalLength, false, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR, tertiaryBackgroundBasisImagePR, tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, reversalOfBackgroundEffectsMaster, nextStepColorTooSimilarEffect ) );
					else
						tertiaryPW.setColor( x, y, rainbowSoft2D.MagiElite( -videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity / 4., (int)x, (int)y, videoSequenceLoopQuantity, 24.6, 88.8, 1., halfSreenDiagionalLength, false, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR, tertiaryBackgroundBasisImagePR, tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, reversalOfBackgroundEffectsMaster, nextStepColorTooSimilarEffect ) );// */
					////tertiaryPW.setColor( x, y, rainbowSoft2D.MagiElite( -videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, 24.6, 88.8, 1., halfSreenDiagionalLength, false, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR, tertiaryBackgroundBasisImagePR, tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, reversalOfBackgroundEffectsMaster, nextStepColorTooSimilarEffect ) );
					//tertiaryPW.setColor( x, y, rainbowSoft2D.Buddhism( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, sliderInterval, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, lengthOfColorBar, 24.6, 1., 1.014, 1.00000000,  halfSreenDiagionalLength, false, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR, tertiaryBackgroundBasisImagePR, tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, reversalOfBackgroundEffectsMaster, nextStepColorTooSimilarEffect ) );// Don't Change Object To It To Make This Work Because It Could Be ARGB Or RGB
					//tertiaryPW.setColor( x, y, rainbowSoft2D.RainbowVideoTest( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, 24.6, 1., halfSreenDiagionalLength, false, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR, tertiaryBackgroundBasisImagePR, tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, reversalOfBackgroundEffectsMaster, nextStepColorTooSimilarEffect ) );
				}
			}
			//});
			Platform.runLater( () -> { try { tertiaryThread.sleep(11111);
			} catch (InterruptedException e) {
				System.out.println("Interrupted.");
			} } ) ;// */
			System.out.println("(int)( videoFrameQuantity * ( tertiaryXslider - startingPoint ) / videoSequenceLoopQuantity ) + 1 = " + (int)( videoFrameQuantity * ( tertiaryXslider - startingPoint ) / videoSequenceLoopQuantity ) + 1);
			//tertiaryImageView.setImage(tertiaryWritableImage);

			//tertiaryStage.show();

			Platform.runLater( () -> tertiaryImageView.setImage(tertiaryWritableImage));
			/*try { tertiaryThread.sleep(1000);
			} catch (InterruptedException e) {
				System.out.println("Interrupted.");
			}// */
			//thirdStackPane.getChildren().add(tertiaryImageView);
			//thirdStackPane[(int)( videoFrameQuantity * ( tertiaryXslider - startingPoint ) / videoSequenceLoopQuantity ) + 1] = new StackPane();
			//thirdStackPane[(int)( videoFrameQuantity * ( tertiaryXslider - startingPoint ) / videoSequenceLoopQuantity ) + 1].getChildren().add(browser);
			//thirdStackPane[(int)( videoFrameQuantity * ( tertiaryXslider - startingPoint ) / videoSequenceLoopQuantity ) + 1].getChildren().remove(0);
			//thirdStackPane[(int)( videoFrameQuantity * ( tertiaryXslider - startingPoint ) / videoSequenceLoopQuantity ) + 1].getChildren().add(tertiaryImageView);
			//End Of tertiaryXslider Loop For .3db Video Production .3da Should Be For Abstract 3-D Video Compression .3dc Should For Degraded 3-D Video Compression .3dm Should Be For Standard 3D Videos
			//.3dv Should Be For 3-D Virtual Environment Integration And Interoperability With 2-D Pictures And Video And Interactive Audio Management.
			//thirdScene[(int)( videoFrameQuantity * ( tertiaryXslider - startingPoint ) / videoSequenceLoopQuantity ) + 1] = new Scene(tertiaryRoot);//Each A 3D Image
			//thirdScene[(int)( videoFrameQuantity * ( tertiaryXslider - startingPoint ) / videoSequenceLoopQuantity ) + 1].getCamera().snapshot(snapshotParameters, tertiaryWritableImage);
			//thirdScene[(int)( videoFrameQuantity * ( tertiaryXslider - startingPoint ) / videoSequenceLoopQuantity ) + 1] = new Scene(tertiaryRoot, Dim.width, Dim.height, Color.BLACK);
			//thirdScene[(int)( videoFrameQuantity * ( tertiaryXslider - startingPoint ) / videoSequenceLoopQuantity ) + 1].setRoot(tertiaryRoot);
			//thirdScene[(int)( videoFrameQuantity * ( tertiaryXslider - startingPoint ) / videoSequenceLoopQuantity ) + 1] = new Scene( thirdStackPane[4] );
			//thirdScene = new Scene( thirdStackPane[4] );
			//tertiaryStage.setScene( thirdScene );
			//tertiaryStage.setScene(thirdScene[(int)( videoFrameQuantity * ( tertiaryXslider - startingPoint ) / videoSequenceLoopQuantity ) + 1]);
			//thirdStackPane[4].getScene().snapshot(tertiaryBufferPicture);
			//BAD tertiaryCurrentBrowserImage = thirdStackPane[(int)( videoFrameQuantity * ( tertiaryXslider - startingPoint ) / videoSequenceLoopQuantity ) + 1].getScene().snapshot(tertiaryBufferPicture);// !!!!! Uncomment To Show Video !!!!!
			//tertiaryStage.setScene(thirdScene[(int)( videoFrameQuantity * ( tertiaryXslider - startingPoint ) / videoSequenceLoopQuantity + 1 )]);
			try { tertiaryThread.sleep(1050);
			} catch (InterruptedException e) {
				System.out.println("Interrupted.");
			}// */

			System.out.println(Dim);

			//tertiaryStage.setFullScreen(tertiaryIsFullScreened);// ASDF !!!! HERE ! Important For Full Screened
			Platform.runLater( () -> tertiaryStage.show() ); // !!!!! Uncomment To Show Video !!!!!
			//tertiaryStage.setFullScreen(tertiaryIsFullScreened);// Important For Full Screened
			//bImage = SwingFXUtils.fromFXImage(thirdScene[(int)( videoFrameQuantity * ( tertiaryXslider - startingPoint ) / videoSequenceLoopQuantity ) + 1].snapshot( tertiaryWritableImage ), bImage );
			//bImage = SwingFXUtils.fromFXImage(thirdScene[(int)( videoFrameQuantity * ( tertiaryXslider - startingPoint ) / videoSequenceLoopQuantity ) + 1].snapshot( tertiaryWritableImage ), bImage );
			bImage = SwingFXUtils.fromFXImage(thirdScene.snapshot( tertiaryWritableImage ), bImage );

			if ( tertiaryXslider < 1 && tertiaryXslider > -1 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
			{
				try {
					File outputFile = new File("C:/TestImage00.png");
					ImageIO.write(bImage, "png", outputFile);
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			else
				if ( tertiaryXslider > 288 && tertiaryXslider <= 289 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
				{
					try {
						File outputFile = new File("C:/TestImage01.png");
						ImageIO.write(bImage, "png", outputFile);
					} catch (IOException e) {
						throw new RuntimeException(e);
					}
				}
				else
					if ( tertiaryXslider > 576 && tertiaryXslider <= 577 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
					{
						try {
							File outputFile = new File("C:/TestImage02.png");
							ImageIO.write(bImage, "png", outputFile);
						} catch (IOException e) {
							throw new RuntimeException(e);
						}
					}
					else
						if ( tertiaryXslider > 864 && tertiaryXslider <= 866 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
						{//428 && tertiaryXslider <= 429 For 1/24th Intervals Instead Of 1/7 Like One Line Above
							try {
								File outputFile = new File("C:/TestImage03.png");
								ImageIO.write(bImage, "png", outputFile);
							} catch (IOException e) {
								throw new RuntimeException(e);
							}
						}
						else
							if ( tertiaryXslider > 1153 && tertiaryXslider <= 1154 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
							{
								try {
									File outputFile = new File("C:/TestImage04.png");
									ImageIO.write(bImage, "png", outputFile);
								} catch (IOException e) {
									throw new RuntimeException(e);
								}
							}
							else
								if ( tertiaryXslider > 1441 && tertiaryXslider <= 1442 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
								{
									try {
										File outputFile = new File("C:/TestImage05.png");
										ImageIO.write(bImage, "png", outputFile);
									} catch (IOException e) {
										throw new RuntimeException(e);
									}
								}
								else
									if ( tertiaryXslider > 1730 && tertiaryXslider <= 1731 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
									{
										/*try { tertiaryThread.sleep(8888);
										} catch (InterruptedException e) {
											System.out.println("Interrupted.");
										}// */
										try {
											File outputFile = new File("C:/TestImage06.png");
											ImageIO.write(bImage, "png", outputFile);
										} catch (IOException e) {
											throw new RuntimeException(e);
										}
									}
									else
										if ( tertiaryXslider > 2018 && tertiaryXslider <= 2019 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
										{
											try {
												File outputFile = new File("C:/TestImage07.png");
												ImageIO.write(bImage, "png", outputFile);
											} catch (IOException e) {
												throw new RuntimeException(e);
											}
										}
										else
											if ( tertiaryXslider > 2306 && tertiaryXslider <= 2307 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
											{
												try {
													File outputFile = new File("C:/TestImage08.png");
													ImageIO.write(bImage, "png", outputFile);
												} catch (IOException e) {
													throw new RuntimeException(e);
												}
											}
											else
												if ( tertiaryXslider > 2595 && tertiaryXslider <= 2596 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
												{
													try {
														File outputFile = new File("C:/TestImage09.png");
														ImageIO.write(bImage, "png", outputFile);
													} catch (IOException e) {
														throw new RuntimeException(e);
													}
												}
												else
													if ( tertiaryXslider > 2883 && tertiaryXslider <= 2884 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
													{
														try {
															File outputFile = new File("C:/TestImage10.png");
															ImageIO.write(bImage, "png", outputFile);
														} catch (IOException e) {
															throw new RuntimeException(e);
														}
													}
													else
														if ( tertiaryXslider > 3171 && tertiaryXslider <= 3173 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
														{
															try {
																File outputFile = new File("C:/TestImage11.png");
																ImageIO.write(bImage, "png", outputFile);
															} catch (IOException e) {
																throw new RuntimeException(e);
															}
														}
														else
															if ( tertiaryXslider > 3460 && tertiaryXslider <= 3461 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
															{
																/*try { tertiaryThread.sleep(8888);
																} catch (InterruptedException e) {
																	System.out.println("Interrupted.");
																}// */
																try {
																	File outputFile = new File("C:/TestImage12.png");
																	ImageIO.write(bImage, "png", outputFile);
																} catch (IOException e) {
																	throw new RuntimeException(e);
																}
															}
															else
																if ( tertiaryXslider > 3748 && tertiaryXslider <= 3749 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																{
																	try {
																		File outputFile = new File("C:/TestImage13.png");
																		ImageIO.write(bImage, "png", outputFile);
																	} catch (IOException e) {
																		throw new RuntimeException(e);
																	}
																}
																else
																	if ( tertiaryXslider > 4036 && tertiaryXslider <= 4038 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																	{
																		try {
																			File outputFile = new File("C:/TestImage14.png");
																			ImageIO.write(bImage, "png", outputFile);
																		} catch (IOException e) {
																			throw new RuntimeException(e);
																		}
																	}
																	else
																		if ( tertiaryXslider > 4325 && tertiaryXslider <= 4326 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																		{
																			try {
																				File outputFile = new File("C:/TestImage15.png");
																				ImageIO.write(bImage, "png", outputFile);
																			} catch (IOException e) {
																				throw new RuntimeException(e);
																			}
																		}
																		else
																			if ( tertiaryXslider > 4613 && tertiaryXslider <= 4614 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																			{
																				try {
																					File outputFile = new File("C:/TestImage16.png");
																					ImageIO.write(bImage, "png", outputFile);
																				} catch (IOException e) {
																					throw new RuntimeException(e);
																				}
																			}
																			else
																				if ( tertiaryXslider > 4902 && tertiaryXslider <= 4903 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																				{
																					try {
																						File outputFile = new File("C:/TestImage17.png");
																						ImageIO.write(bImage, "png", outputFile);
																					} catch (IOException e) {
																						throw new RuntimeException(e);
																					}
																				}
																				else
																					if ( tertiaryXslider > 5190 && tertiaryXslider <= 5191 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																					{
																						/*try { tertiaryThread.sleep(8888);
																						} catch (InterruptedException e) {
																							System.out.println("Interrupted.");
																						}// */
																						try {
																							File outputFile = new File("C:/TestImage18.png");
																							ImageIO.write(bImage, "png", outputFile);
																						} catch (IOException e) {
																							throw new RuntimeException(e);
																						}
																					}
																					else
																						if ( tertiaryXslider > 5478 && tertiaryXslider <= 5479 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																						{
																							try {
																								File outputFile = new File("C:/TestImage19.png");
																								ImageIO.write(bImage, "png", outputFile);
																							} catch (IOException e) {
																								throw new RuntimeException(e);
																							}
																						}
																						else
																							if ( tertiaryXslider > 5767 && tertiaryXslider <= 5768 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																							{
																								try {
																									File outputFile = new File("C:/TestImage20.png");
																									ImageIO.write(bImage, "png", outputFile);
																								} catch (IOException e) {
																									throw new RuntimeException(e);
																								}
																							}
																							else
																								if ( tertiaryXslider > 6055 && tertiaryXslider <= 6056 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																								{
																									try {
																										File outputFile = new File("C:/TestImage21.png");
																										ImageIO.write(bImage, "png", outputFile);
																									} catch (IOException e) {
																										throw new RuntimeException(e);
																									}
																								}
																								else
																									if ( tertiaryXslider > 6343 && tertiaryXslider <= 6344 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																									{
																										try {
																											File outputFile = new File("C:/TestImage22.png");
																											ImageIO.write(bImage, "png", outputFile);
																										} catch (IOException e) {
																											throw new RuntimeException(e);
																										}
																									}
																									else
																										if ( tertiaryXslider > 6632 && tertiaryXslider <= 6633 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																										{
																											try {
																												File outputFile = new File("C:/TestImage23.png");
																												ImageIO.write(bImage, "png", outputFile);
																											} catch (IOException e) {
																												throw new RuntimeException(e);
																											}
																										}
																										else
																											if ( tertiaryXslider > 6920 && tertiaryXslider <= 6921 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																											{
																												/*try { tertiaryThread.sleep(8888);
																												} catch (InterruptedException e) {
																													System.out.println("Interrupted.");
																												}// */
																												try {
																													File outputFile = new File("C:/TestImage24.png");
																													ImageIO.write(bImage, "png", outputFile);
																												} catch (IOException e) {
																													throw new RuntimeException(e);
																												}
																											}// */
			try { tertiaryThread.sleep(777);
			} catch (InterruptedException e) {
				System.out.println("Interrupted.");
			}// */
			try {
				//System.out.println( "bImage Height: " + bImage.getHeight() );
				encoder.encodeImage( bImage );
				//encoder.encodeImage( bImage.getSubimage( 0, 0, 666, 888 ) );
			}
			catch(IOException ie) { ie.printStackTrace(); }
			System.out.println("Finished Encoding Frame: " + (int)Math.round( ( videoFrameQuantity * ( tertiaryXslider - startingPoint ) / videoSequenceLoopQuantity ) + 1 ) );

			if ( tertiaryXslider != 0 &&  tertiaryXslider / ( sliderInterval * numberOfScrollFrames ) - Math.floor( tertiaryXslider / ( sliderInterval * numberOfScrollFrames ) ) < .0001)//interval * 11->Twice + (int)(tertiaryXslider / ( interval * 11 )) + " );\r\n" + 
			{
				try ( PrintWriter printWriterOut = new PrintWriter(thirdXSliderFile.getPath() ) )
				{
					printWriterOut.println("+" + tertiaryXslider + "d");
					printWriterOut.close();
				}
				catch(IOException ie) { ie.printStackTrace(); }// */
				try ( PrintWriter printWriterOut = new PrintWriter(thirdJavaScriptFile.getPath() ) )
				{
					printWriterOut.println("function scrollContinuously( timeInterval )\r\n" + 
							"{\r\n" + 
							"	timeInterval = 444;\r\n" + 
							"	window.setInterval( scrollWin, timeInterval );\r\n" + 
							"}\r\n" + 
							"function scrollWin()\r\n" + 
							"{\r\n" + 
							"    window.scrollBy( 0, 100 )\\r\\n" +
							"}");
					printWriterOut.close();
				}
				catch(IOException ie) { ie.printStackTrace(); }// */
				//scrollHappened = true;
			}
			/*if (scrollHappened)
		{
			scrollHappened = false;
			//thirdBrowserEngine.executeScript(script);
			thirdBrowserEngine.load( "http://www.pixies.zone/PixiesTest%20-%20Copy%20(3).html" );
			thirdBrowserEngine.reload();
			return;
		}// */ //System.out.println(thirdJavaScriptFile.toString());
			//thirdBrowser.getEngine().load("file:///C:/Users/AllAV/Desktop/FWA%20Website/pixies.zone/PixiesTest%20-%20Copy%20(2).html");

			//fullScreened = tertiaryStage.isFullScreen();

			/*thirdScene[(int)( videoFrameQuantity * ( tertiaryXslider - startingPoint ) / videoSequenceLoopQuantity ) + 1].setOnKeyReleased(new EventHandler<KeyEvent>()
	{
		@Override
		public void handle(KeyEvent event)
		{
			if ( event.isAltDown() == true)
			{
				switch (event.getCode())
				{
				case ENTER: tertiaryStage.setFullScreen(!tertiaryStage.isFullScreen()); break;
				}
			}
		}
	});// */
			try { tertiaryThread.sleep(666);
			} catch (InterruptedException e) {
				System.out.println("Interrupted.");
			}// */
			System.out.println("tertiaryXslider: " + tertiaryXslider);
			tertiaryXslider = tertiaryXslider + sliderInterval;
			//System.out.println(Dim);
			/*try { tertiaryThread.sleep(2500);
			} catch (InterruptedException e) {
				System.out.println("Interrupted.");
			}
			tertiaryStage.show();
			//Platform.runLater(tertiaryThread);// */
		}
		System.out.println("Main Program Loop Over");
		// Finalize the encoding, i.e. clear the buffers, write the header, etc.
		try {
			encoder.finish();
		}
		catch(IOException ie) { ie.printStackTrace(); }
		finally {
			NIOUtils.closeQuietly(tertiaryVideoOut);
		}
		System.exit(0);
		return bImage;
	}
}