how to load external image with actionscript 3.0

This post is a simple example for actionscript 3.0 beginners. The bellow actionscript 3.0 code help you to understand how you can load an external image from a url. if any doubt or help please add a comment.

import flash.display.Loader;
var url:String=""
var loader:Loader = new Loader();
loader.load(new URLRequest(url));

open URL with Querystring using actionscript 3.0


this post is not for actionscript masters this is only for those who just started playing with actionscript. this simple example demonstrate how to open a url with querystring HTTP GET method.


var url:String="";
var variables:URLVariables = new URLVariables();
var urlRequest:URLRequest = new URLRequest(url);
navigateToURL(urlRequest, "_blank");

flash actionscript 3.0 change color

bellow is a simple example to change the color of a DisplayObject(MovieClip,Button,Sprite) in flash actionscript 3.0.

// creates a red square
var square:Shape = new Shape();
//fill the square with blue color;
// drow the square, 0, 150, 150);
//add the square to stage
// calling the change color function

//changeColor function
function changeColor(o:DisplayObject,color:Number):void {
//create a new ColorTransform
var newColor:ColorTransform=new ColorTransform();
// set the color property
//assign the new ColorTransform to target DisplayObject

Simple custom event example actionscript 3.0

This is a simple custom Event example I hope this will help actionscript 3.0 bingers to understand how event works in actionscript 3.0. In this example I just created a MouseDown event listener for stage mouse clicks. Clicking the stage will trigger the custom event.

const CUSTOM_EVENT:String='custom_event';
function onMouseClick(e:Event){
dispatchEvent(new Event(CUSTOM_EVENT));
function onCustomevent(e:Event){
display.text="Custom Event Called"

how to post data from actionscript 3.0 to php or sample

this a small example for sending and retrieving data from serverside scripts like php , or any thing

import flash.display.Sprite;

* ...
* @author Anil Mathew
public class Main extends Sprite
public var loader:URLLoader; //url loader
private var _url:String // the url string
private var _req:URLRequest; // url request
public var _vars:URLVariables; // url variables
public function Main():void
if (stage) init();
else addEventListener(Event.ADDED_TO_STAGE, init);

private function init(e:Event = null):void
removeEventListener(Event.ADDED_TO_STAGE, init);
// entry point
_url = "";// url where we need to post the data
_req = new URLRequest(_url);// url request instance
_req.method = URLRequestMethod.POST ; // metheod to use for the request
_vars = new URLVariables();// url variables = "Myname"; // sending name
_vars.age = 21; //sending age
loader = new URLLoader(); //loader instance
loader.load(_req); //loading request
loader.addEventListener(Event.COMPLETE, completeHandler);// event handler for complete event


private function completeHandler(event:Event):void {
trace(; // returned data



web Camera Snapshot flash Actionscript 3.0 Component

i made this component to take snapshot for a community website. i think it's useful so i'm sharing it here. In this version save to server function is disabled but you can do it with takeSnap() method or encodeJpeg(),encodePng();

Small outline About Class


  1. imageFormat jpeg,png
  2. saveType URL,LOCAL
  3. showToolBar true,false
  1. saveImage() Save the image to local or to url according to saveType property
  2. attachCamera(camindex="0") change Camera
  3. takeSnap() Return Bitmap data from camera
  4. encodeJpeg(quality) you can pass the quality 1 to 100 it will return byteArray of jpeg image
  5. encodePng() return png image byteArray

Actionscript 3.0 sample code

var snap:SnapShot=new SnapShot();

Demo Link:


download MXP Component
download SWC component
download Sample FLA

mohanlal on twitter


finally mohanlal @twitter
hope you guys follow him

what is php++


Is there any one know what is PHP++ . I googled for it and don't get any correct information. some of my friend said that it a new php IDE. when i googled for it i get the following informations

  2. PHP++ is an object-oriented version of PHP. Its primary goal is to reduce the amount of code one would need to rewrite for his or her site while maintaining functionality. Its other goals include converting a decent percentage of PHP's base functions into classes.
but there is noting to download and in the sourceforge site and the site saying that it's an inactive project any one here know what it is ?

some institutes in India are offering courses for php ++ is the ??? . see the php++ training institutions
are they just kidding. any one know about this please update me thanks.

PHP developer Cochin |PHP developer Kerala | PHP developer India | Flash developer/programmer Cochin | Flash developer/programmer Kerala | Flash developer/programmer India | web programmer kerala |web programmer Cochin |web programmer India |web developer kerala |Web developer Cochin | Kerala PHP | PHP freelancer| flash actionscript freelancer