public function createPreview(obj:*):BitmapData { var resultShirt:BitmapData = new BitmapData(obj.width, obj.height, false, 0xffffff); var m:Matrix = new Matrix(); var s:Number = resultShirt.height / obj.width; obj.mask = null; m.translate(-obj.width / 2, -obj.height / 2); m.translate(resultShirt.width /
Basic: Papervision3D , Plane and Movieclip Meterail
This is my first Papervision3D. I am starting to learn papervision3d. Download the source if you want to start with Papervision3D:Uh! sorry Blogger not allow to upload . so please let view the very summary code as below:package{ import flash.display.Bitmap; import flash.display.GradientType; import flash.display.Graphics; import flash.display.MovieClip; import flash.display.Sprite;

AS3: Short statements
Call functionthis[shapes[currentShape]]();Meaning:shapes is array of function.exp: shapes[currentShape] = "drawingLine"so it mean drawingLine();Object Namethis['ship' + i]Meaning:this is current object. there object named ship1, ship2, ship3, ship4so in for loop, when i = 2 , it means calling to object shi

Width and Hieght of Rectangle that fill the Area of inner oval

I don't have the detail formula. I just get the answer by experiment drawing Oval and Rectangle. I measure the width of oval and width of rectangle, then I got the answer as below:wRec = wCir / 1.41hRec = hCir / 1.41It is useful when we want to add the textbox area to an oval without make text show out of the ov

View Simulate Download
I think this is useful if we want to test project with preloader. I may want to see how preloader work.In Flash Authoring Tool- Press Ctrl + Enter or Click on Menu Control -> Test Movie.- Once in Test Movie mode, you can watch a simulated download by enabling the Bandwidth Profiler , by Click on Test Movie Window: View -> Bandwidth Profiler- Then click on View -> Simulate Download- You can

AS3 Multiple Field Array - Sort On
var records:Array = new Array();records.push({name:"john", city:"omaha", zip:68144});records.push({name:"john", city:"kansas city", zip:72345});records.push({name:"bob", city:"omaha", zip:94010});for(var i:uint = 0; i < records.length; i++) { trace(records[i].name + ", " + records[i].city);}// Results:// john, omaha// john, kansas city// bob, omahatrace("records.sortOn('name', 'city');");records.sortOn(["name",

AS3: Load fresh XML without Caching.
I found the problem, and I try to found on the internet. Some poster commanded using this:var Randomstr:String = '?somvarname='+random(100);I don't know, but it does not for me. so I use this instead of:var iRequestXML:URLRequest = new URLRequest("images/" + editData); var iLoaderXML:URLLoader = new URLLoader; var iVaXML:URLVariables = new URLVariables; iVaXML.noCach

AS3: Clone or Duplicate Movie
private function cloneDpObj(target:DisplayObject):DisplayObject { // create duplicate var targetClass:Class = Object(target).constructor; trace("targetClass::" + targetClass); var duplicate:DisplayObject = new targetClass(); // duplicate properties duplicate.transform = target.transform; duplicate.filters

AS3 : Basic FLV Player
More resource may check here: http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/media/Video.htmlhttp://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/net/NetConnection.htmlAS3 Simple: package { import flash.display.Sprite; import flash.display.MovieClip; import flash.net.NetConnection; import flash.net.NetStream; import flash.media.Video;

Import Animated Gif to Frame in Photoshop
Make sure QuickTime 7 or later is installed on your computer.It is most likely installed during Adobe Photoshop or Adobe CS3 setup but can also be downloaded and installed from Apple web site.From the File menu, open Import submenu and select Video Frames to Layers… command.The Load dialog box shows up. (This will take more than two seconds the first time but appears immediately afterwards.)Navigate

as3 : Get full homepage url
eg: http://localhost:8080function getHomeURL():String{ var homeURL:String; var port:String = ExternalInterface.call('window.location.port.toString'); var hostname:String = ExternalInterface.call('window.location.hostname.toString'); if(port && port!="") { port = ":" + port; } try { homeURL = ExternalInterface.call('window.location.protocol.toString')

My First AIR App : Facebook Avatar Maker

Facebook Avatar Maker.Click on browse you photo, then your photo appear on app under frame, drag or zoom it to match your need, then click save, don't forget put the (.jpg) after your file name.Next version:- Add more frame style like: Drop water, Heart sign, and moreDownload and Install:- you will need Adobe Air Player to install this app, please get it from http://get.adobe.com/air/ [15.12MB] -

jailbreak iphone/ipod touch 3G MC Model
This is just my note:1- Download BlackRa1n from Blackweather.com or google it2- Download iTune any version and install it on PC.3- Double-click on BlackRa1n , app start, click on make it rain, then wait few second, on screen of ur iphone show BlackRa1n.4- then if you lucky you can see BlackRa1n icon on your iphone, Make sure you connect to internet with WiFi5- touch on BlackRa1n icon to run it. if

PHP Send Copy Mail
Is it possible (I'm sure it must be) for a copy of the same email to be sent to the person who has just filled in the form? $headers .= "Cc: $email\r\n"; Not a big deal, but if you want to hide the fact the email was copied to someone else, you can do the following: $headers .= "Bcc: $email\r\n"; copy from Habtom 's post

Mootool | Native Array Sum Value in Elements
calculatedTotalCost: function (subTotals) { var x = {subValue: 0}; subTotals.each(function(el, i) { if(el.value) { this.subValue+= el.value; } }.bind(x)); var updateTotalCost = x.subValue; this.totalCost.set('text', this.formatCurrency(updateTotalCost.toFixed(2))); this.totalCost.set('value', updateTotalCost);

AS3 Convert MovieClip or Display to BitmapData
var shirtImage:BitmapData = new BitmapData(530, 300); shirtImage.draw(shirtObj); var imagePreview:MovieClip = new MovieClip(); imagePreview.graphics.beginBitmapFill(shirtImage); imagePreview.graphics.drawRect(0, 0, 530, 300); imagePreview.graphics.endFill(); var disableMC:MovieClip = new MovieClip();

AS3 | Crop image
var cropedImage:BitmapData = new BitmapData(positionImage.width, positionImage.height); var matrix:Matrix = new Matrix; var matrixXY:Point = new Point(); var smooth:Boolean = false; var bounds1 = positionImageMasking.getRect(this); var bounds2 = positionImage.getRect(this); matrixXY.x = (bounds1.x - bounds2.x)/positionImageMasking.scaleX;

Flash AS3 | Open local Image
import flash.net.FileReference;public function LocalFileAccessExample():void {var fileRef = new FileReference();fileRef.addEventListener( Event.SELECT, onFileSelect );fileRef.addEventListener( Event.OPEN, onFileOpen );fileRef.browse();}private function onFileSelect( event:Event ):void {var fileRef:FileReference = event.target as FileReference;fileRef.open();}//--------------------- option with filtervar

Apache | Virtual Host Configuration
1- Enable Virtual Host in Apache httpd.confStart->Programs->Apache HTTP Server->Configure Apache Server->Edit the Apache httpd.conf Configuration Fileor goto httpd.conf folder of Apache Installed FolderFind this #Include conf/extra/httpd-vhosts.conf (Ctrl + F, type this, Enter)Then remove # from the lineso it should beInclude conf/extra/httpd-vhosts.conf2- Folder SecurityStill in httpd.confFind

AS3 Retrieve Flash Vars & HTML put Flash (swfObject)
Retrieve Flash Vars---------------------var fileName:String = new String();fileName = root.loaderInfo.parameters.fileNameHTML (swfObject) Flash Vars------------------------------Use swfObject can be download here http://code.google.com/p/swfobject/downloads/list<head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>LandingPage2</title> <script

Flash AS3 | Load External Images in Flash vr.
import flash.net.URLRequest;import flash.display.Loader;import flash.events.Event;import flash.events.ProgressEvent;function startLoad(){var mLoader:Loader = new Loader();var mRequest:URLRequest = new URLRequest(“MouseActions.swf”);mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler);mLoader.load(mRequest);}function

AS3 Flash | Load External XML with urlLoader
AS3===var xmlLoader:URLLoader = new URLLoader();xmlLoader.addEventListener(Event.COMPLETE, showXML);xmlLoader.load(new URLRequest("playlistAS3.xml"));funciton========function showXML(e:Event):void {XML.ignoreWhitespace = true;var songs:XML = new XML(e.target.data);trace(songs.track.length());var i:Number;for (i=0; i < songs.track.length(); i++) {trace(" Name of the song: "+ songs.track[i].title.text());trace("

AS3 | Array
Create Arrayvar myArray:Array = new Array("A", "B", "C");Using element of an Arraytrace(myArray[2]);output is: CAdding element to array1- myArray[3] = "D"; // create element at 3th site of the array2- myArray.push("D"); //create element after the last site of the arrayChanging element of the arraymyArray[3] = "Changed D"(to be contin

Category List
- Actionscript 3 (2)
- Digital Painting (1)
- Life style (1)
- Photoshop (1)
- Sencha Touch (1)
Blog Archive
-
▼
2010
(50)
-
►
March
(12)
- Mootool | Native Array Sum Value in Elements
- Identify Font
- AS3 | Call Javascript Function
- AS3 | Stage no scale
- Flash AS3 | Why buttonMode not working
- AS3 Convert MovieClip or Display to BitmapData
- AS3 | Crop image
- Flash AS3 | Proportion Width and ScaleX
- Wamp & Another Package PHP | Virtual Host
- PHP | Config with Apache 2.2
- Flash AS3 | Open local Image
- Flash AS3 | Remove all child from display object
-
►
February
(9)
- Flash AS3 | Get Actual Width and Hight of Rotated ...
- Flash AS3 | Get Width and Height of Rotated Object
- Apache | Virtual Host Configuration
- AS3 Retrieve Flash Vars & HTML put Flash (swfObject)
- Flash AS3 | XML return value with the name of node
- Flash AS3 | Draw Squar
- Flash AS3 | Change color of movieclip with TINT
- Flash AS3 | Load External Images in Flash vr. 2
- Flash AS3 | Loading External Images in Flash
-
►
January
(8)
- AS3 Flash | Give result to XML variable
- AS3 Flash | Load External XML with urlLoader
- AS3 Flash | Load External XML with urlLoader
- AS3 Flash | Dispatchevent
- AS3 Flash | Automatically Action using Timer Class
- AS3 Flash | Coding Object have shadow effect
- AS3 | Array
- AS3 Flash | Dynamic Textfield autoSize
-
►
March
(12)