Posts

Flash file uploader with progress bar

Download fileUploadFlashWorkshop.zip, 515 KB(Flash CS5 professional) ActionScript Code: /******************************** Developed by Anil kumar N D anilkumarnd@gmail.com Flash Professional CS5 ActionScript 3.0 14 February 2011 *********************************/ package { import flash.display.MovieClip; import flash.net.FileReference; import flash.events.*; import flash.net.URLRequest; import flash.net.URLVariables; public class upload extends MovieClip { private var _file:FileReference; /******************************************************************************* Default constructor ********************************************************************************/ public function upload() { this.addEventListener(Event.ENTER_FRAME,fn_enterFrameHandler); } /******************************************************************************* This function is a ENTER_FRAME event handler of "this" input IN_Event : Event ***********************************************

Sending Email from Flash using PHP

Download mailFromFlash.zip, 958 KB(Flash CS4 professional) ActionScript Code: /************************************** Developed by Anil kumar N D anilkumarnd@gmail.com http://flash-workshop.blogspot.com/ http://flash-workshop.com/ Flash CS4 professional ActionScript 3.0 07 July,2010 **************************************/ package { import flash.display.MovieClip; import flash.net.URLLoader; import flash.net.URLRequest; import flash.net.URLRequestMethod; import flash.net.URLVariables; import flash.events.Event; import flash.events.MouseEvent; public class main extends MovieClip{ private var ldr_receive:URLLoader; private var ldr_send:URLLoader; private var url_variables:URLVariables; private var urlRequest:URLRequest; /*********************************************************************************************** Default constructor ************************************************************************************************/

Guestbook in Flash with AS3, MySQL and PHP

Download AS3_MySQL_GuestBook.zip, 915 KB(Flash CS4 professional) ActionScript Code: /************************************** Developed by Anil kumar N D anilkumarnd@gmail.com http://flash-workshop.blogspot.com/ http://flash-workshop.com/ Flash CS4 professional ActionScript 3.0 06 July,2010 **************************************/ package { import flash.display.MovieClip; import flash.net.URLLoader; import flash.net.URLRequest; import flash.net.URLRequestMethod; import flash.net.URLVariables; import flash.events.Event; import flash.events.MouseEvent; public class main extends MovieClip{ private var ldr_receive:URLLoader; private var ldr_send:URLLoader; private var url_variables:URLVariables; private var xml_obj:XML; private var int_counter:int; private var urlRequest:URLRequest; /*********************************************************************************************** Default constructor *******************************

Control a car (MovieClip) with arrow keys for games, ActionScript 3.0

Download car.zip, 496 KB(Flash CS4 professional) ActionScript Code: /************************************** Developed by Anil kumar N D anilkumarnd@gmail.com http://flash-workshop.blogspot.com/ Flash CS4 professional ActionScript 3.0 29 April,2010 **************************************/ package { import flash.display.MovieClip; import flash.events.KeyboardEvent; import flash.events.Event; public class car extends MovieClip { /*********************************************************************************************** Default constructor ************************************************************************************************/ public function car():void { stage.frameRate = 30; mc_car.left = false; mc_car.up = false; mc_car.right = false; mc_car.down = false; mc_car.xFactor = 0; mc_car.yFactor = 0; mc_car.speed = 3; stage.addEventListener(KeyboardEvent.KEY_DOWN,fn_keyDownHandler); stage.addEventListener(KeyboardEvent.KEY_UP,fn_keyUpHandler);

Flash CS3 XML Menu, ActionScript 3.0

Download XMLmenu.zip, 9 KB (Flash CS3 professional) ActionScript Code: /************************************** Developed by Anil kumar N D anilkumarnd@gmail.com Flash CS4 professional ActionScript 3.0 14 October,2009 http://flash-workshop.blogspot.com/ **************************************/ package { import flash.display.MovieClip; import flash.net.URLLoader; import flash.net.URLRequest; import flash.events.Event; import flash.text.TextField; import flash.text.TextFieldAutoSize; import flash.events.MouseEvent; public class xmlMenu extends MovieClip { private var mc_menuHolder:MovieClip; private var xml_Object:XML; private var ldr_loader:URLLoader; private var uin_i:uint; private var txt_status:TextField; private var arr_menuItem:Array; private var unt_currentID:uint; private var mc_currentMenu:MovieClip; /*********************************************************************************************** Default constructor ********************************************

Simple Flash Analog Clock - AS3

Download clock.zip, 11 KB (Flash CS3|CS4 professional) ActionScript Code: // Developed by Anil kumar N D // anilkumarnd@gmail.com // ActionScript 3.0 // 28-August-2009 // http://flash-workshop.blogspot.com/ package { import flash.display.MovieClip; import flash.events.Event; import flash.text.TextField; import flash.text.TextFieldAutoSize; import flash.text.TextFormat; public class clock extends MovieClip { var mc_hourHand:MovieClip; var mc_minHand:MovieClip; var mc_secHand:MovieClip; var dte_currentDate:Date = new Date(); var num_hour:Number; public function clock():void { numbers(); this.graphics.lineStyle(15,0xFF9900); this.graphics.drawCircle(stage.stageWidth/2,stage.stageHeight/2,stage.stageWidth/2-10); mc_hourHand=drawLine(100,12); addChild(mc_hourHand); mc_hourHand.x=stage.stageWidth/2; mc_hourHand.y=stage.stageHeight/2; mc_minHand=drawLine(140,8); addChild(mc_minHand); mc_minHand.x=stage.stageWidth/2; mc_minHand.y=stage.

AS3 - Access objects from external SWF files

Download accessExternalSwf.zip, 25 KB (Flash CS4 professional) loadSWFs.as ActionScript Code: // Developed by Anil kumar N D // anilkumarnd@gmail.com // ActionScript 3.0 // 30-April-2009 // http://flash-workshop.blogspot.com/ package { import flash.display.MovieClip; import flash.display.Shape; import flash.net.URLRequest; import flash.display.Loader; import flash.events.ProgressEvent; import flash.events.Event; import flash.text.TextField; import flash.text.TextFieldAutoSize; import flash.events.MouseEvent; public class loadSWFs extends MovieClip { var shp_mainLine:Shape; var shp_statusLine:Shape; var txt_status:TextField; var mc_loadedMovieClip:MovieClip = new MovieClip();   public function loadSWFs():void { mc_access.buttonMode=true; mc_pass.buttonMode=true; mc_access.mouseChildren=false; mc_pass.mouseChildren=false; mc_load.mouseChildren=false; mc_load.buttonMode=true; mc_access.visible = false; mc_pass.visible