Free SWF to XAML Converter.
This should interest any one who wants to get into WPF (Windows Presentation Foundation). What interests me is Michael Swanson’s interview in which he explains SWF file format internals.
Read MoreSolution for using relative paths in swfs to load data.
Only starting from Flash 9 and Actionscript 3 we can reliably use relative path to load data. Let me explain the problem. say for example we have an swf file named ‘Slide.swf’ in a folder ‘Slide001′ folder which loads ‘data.xml’ using the following statement my_xml=new XML(); my_xml.onLoad=function(success){ //process the xml...
Read MoreUsing XMLShortcuts Example.
XML Shortcuts helps to access the XMLNodes with ease. You may read my previous post which compares the XMLShortcuts with XPath from XFactor Studio, XML to Object Prototype, and XMLNode easy access by tatsuo kato Here is a example file, that shows how you can use XMLShortcuts in your MTASC projects. ...
Read MoreCounting number of words in a String.
Here is a simple code to get the word count. To ease up the process, I do not count the words that are not separated by space For Example “Mr.Arul” will still be counted as one word. but it makes sure whitespace is not counted as words Here is the code 1234567891011121314151617181920function wordcount(txt) { if...
Read MoreString.isWhite and String.getWordCount().
This is the same word count function that I showed in the previous post presented in the good old way of adding more properties and methods through the prototype. String object is extened to have isWhite read only property and getWordCount method. 12345678910111213141516171819202122232425262728293031323334String.prototype.addProperty('isWhite', function ()...
Read MoreXML and V2 Tree Example 5 – Limit by Depth.
Lets explore how we can hide nodes beyond the predefined depth from rendering in tree. Before hiding the text nodes, the tree looks like this (as per Example 1) with this XML Start with a blank FLA, add a tree component to stage, name it “tree”, add a text area component name it “textArea” Write the following in the first frame ...
Read MoreXML and V2 Tree Example 4 – Hiding Text Nodes.
Lets explore how we can hide text nodes from rendering in tree. Before hiding the text nodes, the tree looks like this (as per Example 1) with this XML Start with a blank FLA, add a tree component to stage, name it “tree”, add a text area component name it “textArea” Write the following in the first frame ...
Read MoreColorSyntax Extractor now generates XML for Flash based Syntax Highlighter .
I’ve modified my Color Syntax Extractor to include XML for Igor’s Flash Syntax Highlighter, which is a flash based synctax highlighter for actionscript. You can download the tool from here!...
Read MoreXML and V2 Tree Example 3: Tree Search.
Lets enhance the last example by adding search functionality. We need a function that will return the matching nodes as an array. The following function does that for us. Add it to the timeline. 123456789101112131415161718192021222324252627282930313233343536<span style="color: #993300;">function</span> isMatch (s, s2) { ...
Read MoreNew 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 blog/quickview Don’t forget to right click on the grid after selecting something
Read MoreXML 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 1234567891011function openOrCloseAll (x, open:Boolean) { if (tree.getIsBranch (x)) { tree.setIsOpen (x, open, false,...
Read MoreActionscript Syntax Highlighting with SE|PY Editor v.1.0.5.4.
SE|PY has become my favorite actionscript editor these days. It’s default color highlighting scheme is very different from Flash IDE. So I’ve modified it to syntax highlight similar to my actionscript highlighting service 2 and exported the settings using File > Import/Export > Export Settings for your convenience. You may download SEPY_ColorStyle.tar.gz and import it into SEPY...
Read MorePriorityQueue Class
Brandan Hall wrote the PriorityQueue (pQueue) class in “Object Oriented Programming with ActionScript” published by New Riders. I’ve converted that class to ActionScript 2 which you may download from here.
Read MoreActionscript for XML pretty printing and color highlighting . XMLHighlighter class
XMLHighlighter class Availability Flash Player 6 (copy the XMLHighlighter class actionscript file to the same folder as the FLA or to the class path). Description Use the methods and properties of the XMLHighlighter class to generate the html code to generate color highlighted pretty printed XML Method summary for the XMLHighlighter...
Read MoreXML pretty printing and color highlighting .
We used to build many Flash Applications which exports data as XML. How about pretty printing it with colors? Before writing my own code I searched to find any existing code and found this code written by Evgeniy Potapenko in prototype. It does the basic pretty printing part, but it had few problems in handling the text nodes. It adds tabs before text nodes and unlike the native .toString()...
Read MoreConverting Date Strings back to Date.
We all know that trace(new Date()) traces the date as a string that looks like “Mon Jul 12 13:20:09 GMT+0800 2004″ How to convert this String back to Date? There is no built in method, so I’ve written this function to do that. Usage: #include “getDateFromString.as” //sample date in Pacific Daylight Time var str = “Sun Aug 11 17:00:00 GMT-0700...
Read MoreBreeze Presentation on "Taking Sketches into full-blown Flash Animations".
Yesterday we really enjoyed the presentation by Chris Georgenes, one of our Team Macromedia Volunteers. He talks about the minute details of animation. Take a look at his great presentation here. If you like to see the resulting animation of his presentation, take a look at his website. Enjoy ...
Read MorePixel Perfect Drawing Tools for Flash MX04.
So far, whenever in need of pixel accurate graphics in flash, I follow the following steps 1. Enable the snap to pixel option (if not enabled already) 2. Zoom in to see the pixel grid 3. Select Rectangle Tool 4. Select ‘No Color’ for Stroke 5. Draw Pixel Rectangles with the help of snap to pixel The good news is, now we have a better and efficient way to do the same, thanks to Patrick...
Read MoreSolution for skipping files from getting cached by Server and Browser
Cache is a place to store something more or less temporarily. Web pages we’ve visited are stored in our browser’s cache directory on our hard disk. Likewise, ISPs and Web Servers cache web pages which speeds up access times for users, as the page is being read from the cache memory and not downloaded from the actual web site It can become a problem when we are loading external...
Read MoreYet another way to generate reference documents
Philter has developed a parser to parse the flash doc style comments in your actionscript. Using his parser you can generate gModeler XML. You already know that gModeler can generate reference XML. Combining this two tools we are getting complete solution for free. On behalf of all the users let me thank Philter and Grant Skinner for all their...
Read MoreFlash Remoting Using AMF in PHP!
There is an interesting thread in Flash-DB which is discussing the various possibilities of passing data to flash from PHP. The attractive part in that to me is using AMF(Action Message Format – binary format for sending Flash Objects) with PHP. Musicman has come out with this PHP class which can construct the AMF data. Alessandro(sephiroth) has put a sample application using this...
Read MoreXML Pre Processing for handling XML
When we want to handle external Html files as XML, say for example using my transformTags() code, we face the problem of unclosed tags like <br> tag. To fix this problem we can overwrite onData method of XML object as shown below. It basically replaces all <br> tags with <br/> before parsing the XML data [UPDATE] included the ActionScript 3 version as well It became lot...
Read MoreXMLNode.transformTags() Source Code Released!
Wish you all very happy and prosperous New Year 2003! Here is my tiny gift for the new year, transformTags basically allows you to add, remove, and modify tags in any valid XML. You can take a look and download the source code from here! For more usage examples take a look at my previous posts. I will also try to put more examples.
Read MoreStripping HTML Tags using XML
There is a thread going on in flashcoders mailing list about how to stripp the HTML tags in the string. Here is my version to do the same using XML. It can be used to remove specific tags from the given string. Even though we can use flash textField for this purpose (setting the .htmlText property and getting .text property) the following method gives more options and flexibility. [UPDATE]...
Read MoreCreating Dynamic Chart with Flash Charting Components.
Here is the dynamic chart example from my Singapore User group Seminar. 12345678910<ul> <li>Create a text file with the following text and name it <em>chartData1.txt</em>. I'm using &name= value& syntax instead of usual name1=value1&name2=value2 for better readability (LoadVars will ignore the extra...
Read MoreDynamic Tree using FTree Component and .tab file
Here I am going to explain how we can build a dynamic tree using FTree Component that comes with Flash UI Components Set 2. Hierarchical nature of XML makes it more suitable for building Tree Views But I have decided to use simple tab file (Tab delimited text file) which contains the path to build the tree like “root/branch/branchof the branch” and the URL in each line. Take a look at...
Read More

