Here the code of the "pixels.php" page[code]<?phperror_reporting(0);/** * Get the width and height of the destination image * from the POST variables and convert them into * integer values */$w = (int)$_POST['width'];$h = (int)$_POST['height'];// create the image with desired width and height$img = imagecreatetruecolor($w, $h);// now fill the image with blank color... Read More »
Now let's take a look at the flash file will use this "PrintScreen" class:[code]import it.sephiroth.mloaderWindowimport it.sephiroth.PrintScreenvar loader:mloaderWindow = this.createClassObject(mloaderWindow, "loader", 10, {_x:-1000, _y:-1000})loader.setStyle("borderColor", 0x006699)// listener which receives the broadcast message// from the PrintScreen classvar listener:Object = new Object();// copy in progress...... Read More »
As you can see in the previous example, once "print" button is pressed a loader window appears counting the percent progress.This is because i used a setInterval function to copy all the pixels. This won't stress your cpu so much..Here the class i use:[code]import flash.display.BitmapData;import flash.geom.Rectangle;import flash.geom.ColorTransform;import flash.geom.Matrix;/** * Little and simple print flash screen c... Read More »