Home » Archive

Articles in the ActionScript 3.0 Category

ActionScript 3.0, Flash CS4, XML »

[11 Mar 2010 | No Comment | ]
Looping through each XMLNode and each attributes within Node:

In this tutorial we are going to iterate through node in a XML. Intead of using direct approach of getting the XML Length(); We are going to use indirect approach to loop through the XML.
Here we are going to use For each statement and iterate through the nodes to access information intead of using index values.
Here is XMLManager class to load XML without pain.
Before proceeding we must know the difference between XML and XMLList.
XML:
XML is a single or collection of XMLNodes with in a rootnode.
XML example:

Note:
Here the root node …

ActionScript 3.0, Flash CS4, Flex »

[24 Feb 2010 | No Comment | ]
To use Flex SWC files in Flash CS4

Now we can use the SWC files created for Flex applications in Flash.
Just we need to add the SWC to Flash compiler. Follow the steps to use Flex SWC files in Flash development.
1. Open new File Flash CS4.
2. Select File > Publish Settings or Press Ctrl + Shift + F12, Publish Settings window will Popup.
3. Click on Settings… and Select Library path

4. Click on Plus Symbol to add SWC path or File.

5. Copy and Paste the Flex SWC files Path.
For example:C:\Program Files\Adobe\Adobe Flash Builder Beta 2\sdks\4.0.0\frameworks\libs
Thats it …

ActionScript 3.0, Flex, RED5 »

[23 Feb 2010 | No Comment | ]
Create First Java Application in Red5 Server

Last we have seen how to Install/Setup Red5 Server. If you dont have the Red5 Setup in your system click here.
In this tutorial we are going to see how to make new Red5 Project.
Before trying this tutorial, make sure the Red5 Server and its sample runs.
Type http://127.0.0.1:5080/ in address bar of your browser and you will see the page below.

Next we will see how to setup server-side code in Eclipse.
Download and install Eclipse for Java EE.
1. Create new Java Project in Eclipse. delete the src folder
2. Create WEB-INF folder …

AIR, ActionScript 2.0, ActionScript 3.0, Design, Flash CS4, Flex »

[16 Dec 2009 | No Comment | ]
Free Flash/Flex Preloaders

Preloaders are much needed for Flash/Flex RIA’s.
Here some of the free preloader animations created by me this morning.

Idea of preloader is indicating the user that some assets are being loaded, and making them to wait.
But we should keep in mind that the user may lost their patience, so keeping the Flash assets filesize minimal is much important while making Flash websites or Flash applications.

ActionScript 3.0 »

[15 Dec 2009 | One Comment | ]
FluidHtml + searchable Flash

FluidHtml is a text-based markup language (like HTML) that lets you dynamically generate fully searchable Flash content. This is an extraordinarily powerful idea. It means that anyone can build fully searchable, highly animated websites, ads, media players and 3D animations quickly and easily.

When we set out to build FluidHtml, we had four basic goals in mind:
1. Address the search and deeplinking problems of FlashÂ… so we can use Flash for websites.
2. Development, operation and support of RIAs should be ordinary, intuitive and consistent with the normal, best practices …

ActionScript 3.0, Flash CS4, Flex, Javascript »

[14 Dec 2009 | No Comment | ]
Dynamic Stage resize + AS3

Changing the size of flash document from Javascript will be handy in many situations like creating Flash widgets like

News scroller
Flash Banners

..
In this article we are going to create that effect.
First we need to import necessary classes.
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.display.MovieClip;
The next step is to align the stage to TOP LEFT and scalemode to no scale.
Means we are aligning the stage to topleft even if we resize it and not scaling the contents on resize
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
The final step is to add Event listener for stage resize
stage.addEventListener(Event.RESIZE, handleResize);
function handleResize(e:Event):void
{
//The …

AIR, ActionScript 3.0, Flash CS4, Flex »

[13 Dec 2009 | No Comment | ]
FlexPMD to audit AS3/Flex source

Now we can create optimized Actionscript and flex code. Adobe has released FlexPMD to audit Actionscript (AS3) or Flex source.
FlexPMD uses a part of PMD, which used to analyse Java sources.
FlexPMD detects unused codes(like functions variables), inefficient code, complex loops..
FlexPMD can be invoked from
* The command line
* Maven
* Ant
* Automator on Mac OS X
* Eclipse new
* TextMate on Mac OS X new
* …

ActionScript 3.0, Flash CS4, Javascript »

[8 Dec 2009 | No Comment | ]
Remove/Hide right click + actionscript

Finally the default menu items from the Flash player can be removed.
Since when I started working in Flash, was thinking is there any option, but finally it came into action.
Now the developer can use this Code to hide the default right click menu in Flash through actionscript and javascript together.
The flash file(SWF) should be embedded inside a HTML page with the javascript file called.
But one sad new is that this will not work with opera browser.
Game developer and RIA – Rich internet Application can leverage this functionalit to hide/remove the …

ActionScript 3.0, Papervision »

[25 Nov 2009 | 4 Comments | ]
Best Papervision 3D gallery With source

Papervion 3d have full filled the dream of Flash developers, to create graphics in 3D space. Now its posible with Flash player 10.
There are number of projects built using papervion 3D thats spread across the web.
I like to point some of the papervison 3D gallery with source, that us
publicreative:
http://lab.publicreative.com/2009/01/pv3d-page-flip-with-as3dmod-and-effects/
designscripting:
http://www.designscripting.com/2008/12/05/3d-cube-gallery-as3-papervision/
f6design:
http://f6design.com/journal/2007/07/30/papervision-3d/
flashmoto:
http://www.flashmoto.com/blog/flash-galleries/papervision3d-flash-gallery-tutorial/
These galleries are inspirational designs of how to use paperviosion3D.
Click to download papervision3D classes
Papervion 3D have full filled the dream of Flash developers, to create graphics in 3D space. Now its posible with Flash player 10.
There are number of projects built using …

ActionScript 3.0, Design »

[25 Nov 2009 | No Comment | ]
Proximity effect for Icons/Images

This is a kind of effect long back I have seen on a website and recreated for my portfolio site. But unfortunately the harddisk got crashed and lost the files. Today I have seen the same in theflashblog website and recreated the same with minimal code for the designers use.
I made the code so simple to make this useful for beginners also.
Menu can be use to display Images, Works in portfolio sites.
This is a kind of effect that long back I have seen on a website and recreated for my …