Arul's Blog On Multimedia, Flash MX, Director And Dreamweaver MX
Recent Entries | Guest Book | QuickView | XML-RSS feed | My Profile | Home
::: About this Blog :::
Welcome to Arul's Blog!
Weblog on Multimedia,
Macromedia Flash MX Flash MX
Macromedia Director Shockwave Studio 8.51 Director
Macromedia Dreamweaver MX Dreamweaver MX
View my profile And me :)
Here I'm going to share my views, opinions and code with you all.

::: Services :::

:. ActionScript Highlighting
:. AS Highlighter v2 new!


::: ActionScript :::
:. toString
:. skipCache
:. getWords
:. getDateFromString
:. colorUtils
:. XMLNode-transformTags
:. Object-copyProperties
:. Object-clone

::: ActionScript 2 :::
:. XMLHighlighter
:. PriorityQueue

::: Archives :::
[September 2002]
[October 2002]
[November 2002]
[December 2002]
[January 2003]
[February 2003]
[March 2003]
[April 2003]
[May 2003]
[June 2003]
[July 2003]
[September 2003]
[October 2003]
[December 2003]
[January 2004]
[February 2004]
[March 2004]
[April 2004]
[May 2004]
[June 2004]
[July 2004]
[December 2004]
[January 2005]
[February 2005]
[March 2005]
[May 2005]
[June 2005]
[July 2005]
[August 2005]
[June 2006]
[July 2006]
[November 2006]
[December 2006]
[January 2007]

::: Time Zone :::
All Times on this blog are
GMT + 5:30 Hours
(Indian Standard Time)

::: Flash Resources :::
:. Flash Components
:. Were-Here Forum
:. Digital Illusion
:. Flashmove Forum
:. Flash Goddess
:. Prototypes
:. Actionscript Toolbox
:. UltraShock
:. Chattyfig
:. Full as a Goog
:. Flog

::: Flashers :::
:. Mike Chambers
:. Greg Burch
:. Branden Hall
:. Samuel Wan
:. Stuart Schoneveld
:. Guy Watson
:. Robin Debreuil
:. Mario Klingemann
:. Moises
:. Aral Balkan
:. Peter Hall
:. Josh Dura
:. Alessandro
:. Brajeshwar
:. Nik Khilnani

::: Small Print :::

© Copyright 2002
R.Arul Kumaran

[Made with Blogger]


Wednesday, January 26, 2005

Update.Arul's Blog: Quick Blog Viewer version 3.0 released.

I'm very happy to launch Quick Blog Viewer version 3.0, It is Mail Client kind of interface for my blog.

It is also a show case of what we can do in flash using XML, localSharedObject, Flash MX 04 Components, and CellRenderer API. Have a look and Kindly pass on your comments.

posted by Arul | link | ^top | next> | add comment
Wednesday, January 26, 2005

Demo.Flash MX: New RIA Interface for my blog.

Quick Blog Viewer v3 is a Flash based RIA for my blog. Now you can keep track of the posts easily, find out what is new since your last visit, flag your favorite posts.

It's interface should explain how. Check it out at http://www.shockwave-india.com/blog/quickview/

Don't forget to right click on the grid after selecting something ;)

posted by Arul | link |<prev. | ^top | next> | comments [1]
Monday, January 24, 2005

Examples.Flash MX: XML and V2 Tree Example 2: Open/Close All.

Lets enhance the last example by adding two buttons to open and close all tree nodes

Add the following code to the first frame
function openOrCloseAll (x, open:Boolean) {
        if (tree.getIsBranch (x)) {
                tree.setIsOpen (x, open, false, false);
        }
        for (var i = 0; i < x.childNodes.length; i++) {
                if (x.childNodes[i].nodeType == 1) {
                        arguments.callee (x.childNodes[i], open);
                }
        }
        return x;
}

Add two push button (v2) components to the document and label them "Open All" and "Close All"

write the following code for "Open All" button
on (click) {
        _parent.openOrCloseAll (_parent.sample_xml.firstChild, true);
}

write the following code for "Close All" button
on (click) {
        _parent.openOrCloseAll (_parent.sample_xml.firstChild, false);
}
It is very important to pass the firstChild instead of the xml itself for "Close All" otherwise tree root node itself will be closed (there will be no visible tree nodes)

posted by Arul | link |<prev. | ^top | next> | add comment
Thursday, January 20, 2005

Examples.Flash MX: XML and V2 Tree Example 1.

Rendering XML using Tree component is very simple, because in Flash MX 2004, V2 Tree component is based on XML.

Lets explore the possible ways to visualize sample.xml in the coming examples.

Create a new document in Flash MX 04, drag and drop a tree component and name it as "tree"

Write the following code in the first frame
import mx.controls.Tree;
var tree:Tree;
var sample_xml:XML = new XML();
sample_xml.ignoreWhite = true;
sample_xml.onLoad = function(done) {
        if (done) {
                tree.dataProvider = this;
        }
};
sample_xml.load('sample.xml');
This will result in something similar to the following image
Tree Screenshot
What is wrong here? By default tree component looks for the label attribute to display the nodes. Since it is not present in the given xml it renders this junk text.

Lets fix this by placing a simple label function as shown below
import mx.controls.Tree;
var tree:Tree;
//icon function is added here
tree.labelFunction = function(node) {
        return node.nodeType == 1 ? node.nodeName : node.nodeValue;
};
var sample_xml:XML = new XML();
sample_xml.ignoreWhite = true;
sample_xml.onLoad = function(done) {
        if (done) {
                tree.dataProvider = this;
        }
};
sample_xml.load('sample.xml');

here is the resulting tree
Tree Screenshot

posted by Arul | link |<prev. | ^top | next> | comments [1]

footnote:-
Also check the recent entries and feel free to add your comments. I need your comments to improve this blog