Bellow you can find a list tags and their attributes that are supported by flash player (and also by flex framework). This list applies to TextArea, TextFields and other controls that are html enabled. Anchor tag (<a>) Creates a hypertext link. href target Bold tag (<b>) Renders text as bold. Break tag (<br>) Creates a line break in the text field. Font tag (<font>) Specifies [...]
Do you want to develop applications more quickly, write cleaner code, and use external sources as the data that drives your applications? Kris Hadlock explains how to create an ActionScript component for Flex by using XML as a data source to offer reusability in your Flex applications. Read Tutorial and download support files [...]
In the past days I had to write a small app in AIR and one of the problems I came across was the saving of preferences locally. I needed to be able to read/write a file on the local file system. After some digging I found the answer and decided to make a small tutorial [...]
If you use Combo boxes to display options in some cases you may want to display options that are containing more than a few words. Maybe you want to know how a user arrived on your flex application and you want him to select from some complex options, but in the same time you don't [...]
When I started getting a hang of new stuff introduced in AS3, I got to notice that it has done away with a bunch of commands that were available in AS2. One of these missing commands included “Key.isDown” and added too that there were simply no key objects in AS3. Instead it has an alternative [...]
Here are a couple of minor but very useful updates contributed by the Papervision user community. The first is from Paul Neave; thanks to him we now have a new cylinder primitive. He’s added two parameters to the constructor that specify whether you have a top and bottom face, in other words, you can now [...]
Often we notice that in our zeal to develop appealing web sites and RIA that look perky we may end up designing pages that take inordinately long to upload. Often stylish web pages necessitate the usage of a variety of object including images which take a serious toll on the memory. ActionScript provides developers with [...]
You can monitor your memory usage/leaking with System.totalMemory property. This way you can see how memory is used, where leaks are and you can optimize those parts that are eating too much memory. In simple words use System.totalMemory as bellow (in KB): var memoryUsedInKb:Number= Number(System.totalMemory/1024).toFixed(2); I used it to show the used memory in different units: bytes, Kilobytes, [...]
Today I went to Colin Moock’s ActionScript 3.0 tour here in Sydney. The venue was the SMC Conference and function centre at 66 Goulburn St. It’s just around the corner from the office. Colin was a great presenter and quite amusing. Even after letting us know that he couldn’t go to sleep after 3am in [...]
Web designer are always looking for means to makes their sites eye catchy and thereby videos and movie clips etc are often placed to jazz things up. To make them look millions buck, ActionScript3 gives the leverage to play around .Be it videos or sound files or movie clips, flash files, we need mechanism to [...]

Last time I wrote about Top Down parsing, a technique for parsing that can be easilly implemented manually using function recursion.

Today it is time to talk about one of the other ways of parsing, called Bottom Up parsing. This technique try to find the most important units first and then, based on a language grammar and a set of rules, try to infer higher order structures starting from them. Bottom Up parsers are the common output of Parser Generators (you can find a good comparison of parser generators here) as they are easier to generate automatically then recursive parser because they can be implemented using sets of tables and simple state based machines.

Writing down manually a bottom up parser is quite a tedious task and require quite a lot of time; moreover, this kind of parsers are difficult to maintain and are usually not really expandable or portable. This is why for my tests I decided to port bYacc (a parser generator that usually generates C code) and edit it so it generates ActionScript code starting from Yacc-compatible input grammars. Having this kind of tool makes things a lot easier, because maintaining a grammar (that usually is composed by a few lines) is less time expensive than working with the generated code (that usually is many lines long).
I will not release today the port because actually I had not time to make sure it is bugfree and I've only a working version for Mac, but I plan to release it shortly if you will ever need it for your own tasks. My goal for today was to compare the speed of the parser I wrote with an automatically generated bottom up parser, to see which is the faster approach.

I created a bottom up parser which is able to execute the same expressions accepted by the expression evaluator I wrote last time. There are anyways some differences that - as you will probably and hopefully understand in the future - that make those parsers really different. Some will be disussed shortly here.
To do that I created a Yacc grammar and some support classes.
The parser grammar is really simple and really readable:

%{

%}

%token NUMBER SYMBOL
%left '+' '-'
%left '*' '/'
%left NEG

%%
program
: expr                { Vars.result = $1; }
;

expr
: expr '+' expr       { $$ = $1 + $3; }
| expr '-' expr       { $$ = $1 - $3; }
| expr '*' expr       { $$ = $1 * $3; }
| expr '/' expr       { $$ = $1 / $3; }
| '-' expr %prec NEG  { $$ = -$2; }
| '(' expr ')'        { $$ = $2; }
| SYMBOL '(' expr ')' {
                        if( Vars.SYMBOL_TABLE[ $1 ] )
                        {
                          $$ = Vars.SYMBOL_TABLE[ $1 ]( $3 );
                        } else
                        {
                          trace( "can't find function" );
                        }
                      }
| SYMBOL              { 
                        if( Vars.SYMBOL_TABLE[ $1 ] )
                        {
                          $$ = Vars.SYMBOL_TABLE[ $1 ];
                        } else
                        {
                          trace( "can't find symbol" );
                        }
                      }
| NUMBER              { $$ = yyval; }
;
%%

Continue reading the extended entry to see the results.

You can find at this post of CS54, the source code which let’s you explode and rebuild the same image, using as3 and pv3d 2.0
Among the various AIR applications that have caught my fancy, PixelPerfect stood out for its sleek implementation (pure AS3) and it usability. Essentially it is designed to let you measure the accurate size of entity’s of your desktop. This software lets you take the measure of objects in pixels. It comes with multiple resizable rulers [...]
It seems like I’ve been promising to write this one up ever since November! And now I can finally reveal the official video of the event! Which gives me the perfect excuse to get around to this blog post. So it gives me great pleasure to present Pyro(technics) to the People - The Movie [...]
In today’s internet world, web sites are using more catchy and snazzy videos to gain people’s interest and to capture larger market share. In this process site developers are been troubled to check out the stuff from other servers due to security reasons. As usage of cross border data is often a necessity it is [...]
These days’ sound files are being readily introduced to jazz up the web pages. Once we have the preferred tracks onto our site many of us may be tempted to try our hands at creating visualizations similar to the look and feel of popular media player applications. In order to display such visualizations it is [...]
I don't know if you ever tweened a MovieClip's alpha while this MovieClip contained multiple assets, but I kinda do this all the time (fade in ,fade out being the easiest transition for almost everything). The default way Flash handles this is by changing the alpha of every assets in the containing MovieClip (or Sprite). [...]
A couple of weeks ago Thibault Imbert from ByteArray.org announced that he just finished a book on ActionScript 3. It was supposed to be released by O'Reilly France. However, for different reasons, the editor couldn't publish it. Thibault then decided to release it for free in form of a PDF file! He created a fresh [...]
I just released version 1.33 of The GAE SWF Project and, as tradition would have it, need to head to bed in the next few minutes lest I should expire so I owe you another detailed blog post. The updates in a nutshell: The Yahoo! Astra TabBar component does not show the focusRect when navigating by [...]
Today I created a little game that can be played in the Flash CS3 IDE. It is an extension for Flash CS3 (mxp file) that adds a new panel to the interface. You can access the panel by going to Window > Other Panels > BugZap. The game pretty simple but quite addictive. You move the [...]

Subscribe to Planet Flash

Search

Tags

&lt;head&gt; 3d 3d Flash Actionscript actionscript 3 ActionScript 3.0 Adobe Adobe Air Adobe AIR (Apollo) Adobe Flash Adobe Flex AdobeMAX08 AIR AIR Adobe Integrated Runtime Announcements apollo Art AS2 as3 Asides awards Babble BEA Beautiful Web Books Business Cairngorm ColdFusion Community Components Conference Conferences degrafa design dev Development Events Examples Featured Flash Flash CS3 Flash experiments flash player Flex Flex 3 Flex Builder Flex Builder Development Flex Example FMS Fun Gallery General GeoWeb Google Industry Inspiration iphone Jobs Links linux Marketing MAX MAX 2007 Misc News news & events Off topic Open Source Other Papervision3D Parallax Denigrate Personal photos Photoshop Process Processing Resources RIA Singularity Site News Stuff techmology Technology Tennis Thinking Loud Tips Uncategorized Video Whatever

Blogs

Buttons

Planetarium