Why haXe to SWC is important for Flex/Flash Developers?

I believe that haXe is the right platform for developing api’s and code libraries. Why haXe? If you use just the haXe core libraries. HaXe Can compile to Javascript by generating a single 1.js file Can compile to Flash 6-8 by generating a single  1.swf file Can compile to Flash 9-10 / Tamarin by generating a single  1.swf file generate optimized integer arithmetic autocast when...

Read More

Powerflasher FDT 3.O Review

FDT is an Eclipse based IDE for Actionscript coding. I heard about it a lot but never tried it on my own. When I came to know Nico Zimmerman is about to present in our FUG. I wanted to try it before that so that I can better understand the platform and raise any issues that I come across. FDT is a plugin for eclipse, so I have to install Eclipse first. Since fdt site did not specify or...

Read More

Setting up Flex 2 SDK on Fedora Core 6 – Part 1 – Installing Flash Player 9.

This Visual Guide can help an average windows user to setup flex 2 SDK and start building flex applications in the Linux platform. Part 1 shows how to install both standalone and plugin version of the flash 9 player. Stay tuned for...

Read More

Counting 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 More

XML 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 More

Converting 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 More

Actionscript Syntax Highlighting with SE|PY Editor v.0.9.

Many of you might already be using SE|PY a very special open source actionscript editor available for free. We have to really thank Alessandro Crugnola & Team for all their efforts for giving us such a wonderful tool. Long back I’ve downloaded a early version of SE|PY it used to take time to launch and open a command prompt before launching the Editor which made me to ignore this...

Read More

Updated my ActionScript() function

Arrays and Functions can have other properties attached to it. But my .toString() method and ActionScript() function does not account for it. Now I’ve rewritten the code to include those other properties as well. Also now it takes care of the properties with undefined values. Take a look at the new ActionScript() function here. [UPDATE] included the ActionScript 3 version as well It...

Read More

Unicode escape notations are lost while auto formating ActionScipt!

I found this bug while working on my “content management solutions for languages”, project . If you want to use unicode characters that are not supported by your system’s codepage in your actionscript with out using external ‘.as’ files, the only way is to use Unicode escape notations in the format “\uXXXX” where the 4 digits specified are the UTF...

Read More

Correction to Object.toAS() version 2!

Ampre’s code has a bug in handling Array of strings (refer to my previous post). Since he is just enclosing the result of original Array.toString() with square backets it returns [a,b,10] when it is supposed to return ['a', 'b' ,10]. Just replacing his version of Array.prototype.toString with the following code fixes it. [UPDATE] included the ActionScript 3 version as well It became...

Read More

XML 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 More

XMLNode.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 More

Easy way to highlight the links in flash dynamic text

Yet another transformTags() example. You all know that links in flash text won’t highlight with blue color and underline as it does in browser. If you want to highlight all the links in your dynamic text box you may use the following object as the format object to transformTags to achieve the results as shown below. ActionScript 1.0 ...

Read More

Improved version of Flash Remoting Helper component

I’ve improved the component and now it has the following additional features / improvements. New Features: There is no limitation for the number of parameters. Now you can optionally specify the name of the array to use as the parameters of the remote function (for dynamic values and also for using other data types than string and numbers). You can specify result handler and status...

Read More

Remoting Helper Component

Many Java, .NET and Coldfusion MX developers are now jumping into Flash Remoting. The problem they face when they are not much familiar with actionsript is in testing their server side remoting script. Every time they have to go to the flash developer for testing. To solve this problem I’ve developed a component called RemotingHelper which allows you to define the GatewayUrl, name of the...

Read More

Stripping 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 More

Actionscript Syntax Highlighting with SciTE|Flash

Many of you might already know how handy it is to edit ActionScript with SciTE|Flash, for those who do not know SciTE|Flash is a text editor from BomberStudios for editing ActionScript, free download is available in their website. One of the nice features which attracted me is exporting the script as HTML or RTF, which can be used to syntax highlight actionscript instead of my ActionScript...

Read More

Enabling Flash Links in Director

It’s time for Director again (time for Director MX in fact!). Somebody sent me a mail asking why the getURL functions which are supposed to open the links are failing when we embed the flash movie in director? The reason is simple, both getURL and FSCommand are methods for flash to communicate to the container application. When we embed the flash file in a HTML page Flash plugin for the...

Read More

Flash Studio PRO 1.5 released

Flash Studio is a third party program for creating screen savers and applications out of projector files. The new pro version has some major additions. The updates are massive and unique including enabling joystick control, running applications in hidden windows, and sending email directly from the projector file. A full list of additions can be seen on Flash Studio’s website. The...

Read More

MIT Open Source Courseware!!

If you are interested in developing e-learning content you may find this link useful. MIT is Open Sourcing some of its courses and course content.

Read More

Unable to *continue* with Auto Format!

Beware that auto formatting eats your actionscript some times !!! See the following code for (var i = 0; i<5; i++) { if (i == 2) { continue; } trace(i); //traces 0, 1, 3, 4 (skips 2) } If you apply Auto Format to the code it becomes for (var i = 0; i<5; i++) { if (i == 2) { } trace(i); //traces 0, 1, 2, 3, 4...

Read More

Problem importing sound?

When our flash file becomes big and complex we often face this problem. When we try to import the audio we get “One or more files were not imported because there were problems reading them” even when you are sure that the audio format is flash compatible. Solution? Import the audio into a new blank flash file once done drag the imported audio from this library to your project files...

Read More

Splitting String to Words Array

Now I’m in the process of creating Action Script (or any script) color highlighter in flash. Which can be used in forums to post the ActionScript As and when the user types a property or keyword it will highlight in the specified color. I’m planning to set the .htmlText property every time he types some thing. That is I will find and replace all the keywords with appropriate...

Read More

Working with color HEX & RGB

If you need to convert color values between RGB and HEX you will find the following functions useful. Original post had only ActionScript 1 version and now I have updated it to add ActionScript 3 version as well ActionScript 3.0 ActionScript 1.0 package com.luracast { /** * Set of funtions for handling color values in different format ...

Read More