Skip to main content

Posts

Showing posts with the label Adobe

Allow full access to a local swf file

To allow full access to a local swf file, you need to follow these steps: Right click on flash player A vertical menu will appear Click on Global settings... A Flash Player Settings Manager will popup Go to Advanced tab Scroll down to Developer Tools section Click on Trusted Location Settings... button A Trusted Location Settings will popup Click on Add... button An Add Site will popup Click on Add Folder... button A Browse For Folder appears Select the required Drive/Folder Click on Ok button Browse For Folder disappears Click on Confirm button Add Site will disappear Click on Close button Trusted Location Settings will disappear Close the Flash Player Settings Manager popup

App: Vcam - video recorder cum player

Here is a video recorder cum player, i.e., named as vcam that I have developed for one of my client. It can be controlled either internally via provided buttons or externally via javascript. Currently it is showcased as internally controlled. So if anybody required similar solution, please drop me a comment/email. To get the recorded video file link, please click on the Publish button after recording. Note: Since the recorded videos didn't got saved for any useful purpose, so it will be deleted automatically after 2 hours from the time of recording.

App: Number Base Converter

This program is a number base converter. It's working is described below: Number (in base a )  à  Change base from base a to b   à   Number (in base b ) or N a   à  Change base  à   N b where, N a = Number (in base a ) N b = Number (in base b ) Enter the input Number & it's Base and enter the ouput Number & it's Base. Then press convert button.

App: Net Connection Checker

I have developed this net connection checker utility tool to check the net connection at real-time. It is of great help while developing or testing FMS or Red5 based application. The user is only required to put the URL of that media server. Note :  FMS stands for Adobe's Flash Media Server RED5 is a name of an open source media server

AS3: Custom Tab-bar Controller

Flash movieclip architecture: <movieclip name="tab_mc"> <frameset> <frame name="normal"> <textfield name="caption" framespan="4"></textfield> <graphics color="#333333"></graphics> </frame> <frame name="over"> <graphics color="#666666"></graphics> </frame> <frame name="down"> <graphics color="#999999"></graphics> </frame> <frame name="disabled"> <graphics color="#333333" alpha="0.7"></graphics> </frame> </frameset> </movieclip> <movieclip name="tabbar_mc"> <frameset> <frame> <movieclip name="tab1" instanceof="{tab_mc}"></movieclip> <movieclip name="tab2" instanceof="{tab_mc}"></movieclip> <m...

AS3: Sliding Toggle Switch like iPhone

The movieclip format would be like this: <movieclip name="controller_mc" width="200"> <frameset> <frame name="left"> <movieclip name="slider_mc" x="0" width="100"></movieclip> <graphics framespan="2"> <textfield name="caption1">ON</textfield> <textfield name="caption2">OFF</textfield> </graphics> </frame> <frame name="right"> <movieclip name="slider_mc" x="100" width="100"></movieclip> </frame> </frameset> </movieclip> The source code of the class is given below: package engine.ui { import flash.display.MovieClip; import flash.events.MouseEvent; /** * ... * @author Abhishek Kumar */ public class CToggleSwitch { private var Container:MovieClip; private var proceed:Function; private var toggle:...

AS3: Grid Algorithms

Algorithm-1 Is is using horizontal and vertical lines to create grid. public function main(maxRows:int, maxColumns:int):void { var containerWidth:Number = Container.width - 1; var containerHeight:Number = Container.height - 1; var cellWidth:Number = containerWidth / maxRows; var cellHeight:Number = containerHeight / maxColumns; var sprite:Sprite = drawGrid(maxRows, maxColumns, cellWidth, cellHeight, containerWidth, containerHeight); sprite.name = 'grid'; Container.addChild(sprite); } public function destroy():void { Container.removeChild(Container.getChildByName('grid')); } private function drawGrid(rowCount:Number, colCount:Number, rowGap:Number, colGap:Number, rowLen:Number, colLen:Number):Sprite { var sprite:Sprite = new Sprite(); var position:Number; var shapeRow:Shape = new Shape(); for (var i:int = 0; i <= rowCount; i++) { position = rowGap * i; shapeRow = drawLine(position, 0, position, colLen); sprite.addChild(shapeRow); ...

Ways of representing Flash Movieclip architecture as pseudo-code

Way-1: JSON Here is a representation of a Movieclip architecture in JSON format. { movieclip: { name: 'controller_mc', data: { frame: [ { name: 'normal', data: { textfield: { name: 'caption', framespan: '4' }, graphics: { color: '#333333' } } }, { name: 'over', data: { graphics: { color: '#666666' } } }, { name: 'down', data: { graphics: { color: '#999999' } } }, { name: 'disabled', data: { graphics: { color: '#333333', alpha: '0.7' } } } ] } } } The same pseu...

AS3: Custom Button Controller - 2

Here is the pseudo code for the flash application architecture of custom-button movieclip. <movieclip name="controller_mc"> <frameset> <frame name="normal"> <textfield name="caption" framespan="4"></textfield> <graphics color="#333333"></graphics> </frame> <frame name="over"> <graphics color="#666666"></graphics> </frame> <frame name="down"> <graphics color="#999999"></graphics> </frame> <frame name="disabled"> <graphics color="#333333" alpha="0.7"></graphics> </frame> </frameset> </movieclip> The controller class of the custom button. package engine.ui { import flash.display.MovieClip; import flash.events.MouseEvent; /** * ... * @author Abhishek Kumar */ public class CButton { p...

AS3: Custom Button Controller

Here is the pseudo code for the flash application architecture of custom-button movieclip. <movieclip name="controller_mc"> <frameset> <frame name="normal"> <textfield name="caption" framespan="4"></textfield> <graphics color="#333333"></graphics> </frame> <frame name="over"> <graphics color="#666666"></graphics> </frame> <frame name="down"> <graphics color="#999999"></graphics> </frame> <frame name="disabled"> <graphics color="#333333" alpha="0.7"></graphics> </frame> </frameset> </movieclip> The controller class of the custom button. package com.engine { import flash.display.MovieClip; import flash.events.MouseEvent; /** * @file CButton.as * @author Abhishek Kumar */ public class ...

AS3: Custom Dropdown

Here is the code for the custom dropdown component. /** * @file Sample.fla * @author Abhishek Kumar */ import com.engine.CDropdown; import flash.display.MovieClip; var cb:CDropdown = new CDropdown(dropdown_mc, onclick); cb.attachListeners(); function onclick(mc:MovieClip):void { trace(mc.name); } The pseudo code of application (Sample.fla) design architecture. { movieclip: 'dropdown_mc' { movieclip: 'controller' { textfield: 'caption', frames: [up, over, down] } movieclip: 'dropdown' { movieclip: 'item0' { textfield: 'caption', movieclip: 'selected', frames: [up, over, down] } movieclip: 'item1' { textfield: 'caption', movieclip: 'selected', frames: [up, over, down] } movieclip: 'item2' { textfield: 'caption', movieclip: 'selected', frames: [up, over, down] } movieclip: 'item3...

AS3: Data Transporter

A data tansporter class. package engine { /** * @file CTransporter.as * @author Abhishek Kumar */ import engine.CCommunicator; import engine.CTemplate; import engine.CQuery; import engine.CUrl; public class CTransporter { private var oCommunicator:Object; private var oTemplate:Object; /* Ex: * private var oTransporter:Object = new CTransporter(); */ public function CTransporter():void { oCommunicator = new CCommunicator(); oTemplate = new CTemplate(); } /* Ex: * oTransporter.deliver('URL01', true, 'QT001', { Username:'admin', Password:'pass' }, this.receiver); */ public function deliver(iWebService:String, iReturn:Boolean, iQueryName:String, iQueryElement:Object, iReceiver:Function):void { oCommunicator.setUrl(CUrl.WebAppRoot + CUrl[iWebService]); oCommunicator.initialize(); oCommunicator.setProceed(iReceiver); var queryString:String = oTemplate.setInTemplate(CQu...

AS3: Form Verifier

A form verifier class. package engine { /** * @file CFormVerifier.as * @author Abhishek Kumar */ import mx.controls.Alert; public class CFormVerifier { private var formItems:Array; public function CFormVerifier() { formItems = []; } public function push(itemId:int):void { formItems[itemId] = 1; } public function pop(itemId:int):void { formItems[itemId] = 0; } public function check(filledItems:int):Boolean { for (var i:int = 0, sum:int = 0; i

AS3: Form Validator

A form validator class package engine { /** * @file CFormValidator.as * @author Abhishek Kumar */ import mx.controls.Alert; public class CFormValidator { private var formItems:Array; public function CFormValidator() { formItems = []; } private function checkFormId(formId:String):void { if (formItems[formId] == null) formItems[formId] = []; } public function push(formId:String, elementId:Number):void { checkFormId(formId); formItems[formId][elementId] = 1; } public function pop(formId:String, elementId:Number):void { checkFormId(formId); formItems[formId][elementId] = 0; } public function check(formId:String, elementId:Number):Boolean { checkFormId(formId); for (var i:Number = 0, sum:Number = 0; i

AS3: Date-Time Query

A Date-time query methods. package engine { /** * @file CDateTimeQuery.as * @author Abhishek Kumar */ public class CDateTimeQuery { public function CDateTimeQuery() { } public static function isExpired(yyyy:Number, mm:Number, dd:Number):Boolean { var today:Date = new Date(); var expiry:Date = new Date(yyyy, mm - 1, dd); var decision:Boolean = (today > expiry) ? true : false; return (decision); } public static function isValid(year:Number, month:Number, date:Number):Boolean { if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) { return ((date >= 1 && date = 1 && date = 1 && date = 1 && date = 1 && date = 1 && date

AS3: Data-tube ... an evolved concept

A data-tube concept based class. package engine { /** * @file CDataTube.as * @author Abhishek Kumar */ public class CDataTube { public function CDataTube() { } public function manageItem(iCommand:Boolean, iItem:*, iList:*):Array { if (iList == undefined) { iList = []; iList = addItem(iItem, iList); } else iList = (iCommand)? addItem(iItem, iList) : deleteItem(isPresent(iItem, iList), iList); return iList; } private function addItem(iItem:*, iList:Array):Array { iList.push(iItem); return iList; } private function deleteItem(iIndex:int, iList:Array):Array { for (var j:int = iIndex; j

AS3: Cryptography Methods

Few cryptography methods. package engine { /** * @file CCryptography.as * @author Abhishek Kumar */ import com.hurlant.util.Hex; import com.hurlant.util.Base64; public class CCryptography { public function CCryptography() { } public static function encrypt(iMsg:String):String { return Hex.fromString(Base64.encode(XOR(iMsg))); } public static function decrypt(iMsg:String):String { return XOR(Base64.decode(Hex.toString(iMsg))); } private static function XOR(source:String):String { var key:String = "HjRUPxRjRUPxRdVDYFdVDFS0HjRUPxRdVDYF6PkFBK3YlXjc"; var result:String = new String(); for (var i:Number = 0; i (key.length - 1)) { key += key; } result += String.fromCharCode(source.charCodeAt(i) ^ key.charCodeAt(i)); } return result; } } }

AS3: Flex to Web-service Communicator

Here is a flex to web-service communicator. It dispatches a package of data to the server and receives the result in response from the server. package engine { /** * @file CCommunicator.as * @author Abhishek Kumar */ import mx.rpc.http.HTTPService; import com.sephiroth.Serializer; import mx.rpc.events.ResultEvent; import mx.rpc.events.FaultEvent; import mx.controls.Alert; import engine.CUtility; public class CCommunicator { private var communicationAgent:HTTPService; private var communicationUrl:String; private var communicationProceed:Function; /* Ex: * public var oCommunicator:Object = new CCommunicator(); */ public function CCommunicator():void { //trace('CCommunicator'); } /* Ex: * <mx:HTTPService id="transmittingAgent" url="<url-link>" result="oCommunicator.receiveDataFromServer(event);" fault="oCommunicator.handleCommunicationFault(event);" useProxy="false...