Category Archives: Macromedia Flex

Query-string in SWF URL is not good idea

Query-string in SWF URL is bad idea because swf would be downloaded again by browser/client instead of being loaded from browser-cache, it happens if URL becomes non-unique due to the presence of changing query-string in different requests.

Browser does cache data for all URL, unless HTTP response headers (for URL or other resources) instruct not to do caching. If URL is different, browser considers it a new requests and downloads the data again instead of consuming from cache.

We can try to avoid or optimize such cases. In past, developers have used the other way by having random (non-unique) query-string in SWF or XML/asset URL to force reloading of asset/resource instead of using the ones from browser-cache. Though, they could have done things by setting right HTTP headers.

I have noticed some websites where swf URL has a query-string i.e. http://yoursite.com/yourapp.swf?var1=somedata, where value of var1 is not constant rather changes? Obvious reason, I want to pass dynamic data most of time hence using query-string instead of hard-coding it in swf itself.

I also noticed some sites which are using SWFObject and still passing data via query-string instead of flashvars using addVariable (..) instance method of SWFObject.

Another place, I again noticed something similar, AVM+ application loads AVM- (SWF 8 or less) application, let’s call it legacy-swf, and passes data via query-string, ok, that is understood there is no other way except writing a light-weight wrapper that uses LocalConnection or query-string approach?

  • It might not be worth writing wrapper in case of small-size legacy-swf but depends, if you are serving to thousands of users, every single HTTP request cost something.
  • If legacy-swf is large enough, it’s worth writing a wrapper that loads the legacy-swf. This way at least legacy-swf would be loaded from browser cache in next session instead of being downloaded again from your server.

This is very basic thing in web-application development, user-experience can be improved by doing these little things. I hope to write some more observations, no matter how stupid/trivial it sounds to me or other programmers. It’s good to post these things in context of flash/flex so beginners, who are not familiar with details of HTTP or other standards, can learn.

Technorati tags: , , , ,

Flash Platform (flex/flash/air/actionscript) blogs from India

I have been maintaining a list of flex/actionscript/air bloggers on flex_india group. I updated the list today and I would be updating it again next week.

It’s nice to see more developers from India are blogging and sharing their knowledge with everyone. There are ( and always have been) very smart and cool developers in India but generally they maintain a low-profile or too busy with work or shy.

Check out the following list, I have used the names of bloggers instead of blog-title because it was for me to do so.

Flex/Flash/AIR bloggers from India

You can bookmark this link.

Technorati tags: , , , ,

ActionScript compiler in ActionScript

Another interesting project from Metal, he has ported ActionScript compiler (which is part of Tamarin project) to an ActionScript 3.0 library.

He is still working on it, however, he has posted a demo and current version of code. I am sure, this would be pretty useful. I remember of reading a thread on flexcoders about creating mock-objects in ActionScript 3.0, eval-project might prove useful there.

Technorati Tags: , ,

TLS 1.0 implementation in ActionScript 3.0

AS3Crypto library now includes (partial) TLS 1.0 implementation, I was also thinking to implement the same for as3httpclient. Now this has been done, I might take a look at code and figure out the possibilities of integrating TLS in as3httpclient.

Thanks to Metal Hurlant for doing all useful/cool projects.

Technorati Tags: , , , ,

initRIA was cool

It was good to be at initRIA, I met many (known or new) people. The event went fine, we had some good sessions. The following list was the agenda:-

  • Data Visualization in Flex – Raghunath Rao, Adobe
  • Flash for Flex developers – Bhavin Padhiyar, SAP
  • RIAjaxified – Rakshith, Adobe
  • Designing RIAs with RC pattern – Yash Mody, TeknoPoint Multimedia
  • Building Live Documents – An online Office suite leveraging RIA technologies by Sumanth Raghavendra and Adarsh Kini, InstaColl
  • Optimizing Flex and AS3 – Mrinal Wadhwa, SAP
  • Developing Flex RIAs with Cairngorm Microarchitecture Debabrata Acharjee, CapGemini
  • Birds of a feather

We had couple of more session and some discussions (on Silverlight, AJAX etc) along with the above listed ones. I enjoyed most of the session, there is always something to learn. The most interesting session was by InstaCol guys, who showed us Live-Documents and also shared their experience with Adobe Flex.

I hope, all the slides/presentations (by everyone) would be uploaded to slideshare (preferably) or somewhere.

Around 130+ people were expected to attend (based on registration count) but it seems some fifty people showed up, which is not bad for something that was planned and organized in such a short time-span.

I feel, this is the first event, in India, which is focussed on the Flash Platform at the same time open for talks/discussions on all kind of RIA technologies. I am sure, next time (whenever it happens) we would have enough time to spread the word and developers from different RIA technology background can come up and share their views. As said, it was cool we had discussions on AJAX, Silverlight, AIR, Flex, Flash and RIA in general.

I managed to click some photographs, not really good quality due to my impatient and lazy nature since I have moved to Bangalore :-).Check out photographs.

Thanks to Mrinal Wadhwa of Bangalore FUG for taking the initiative and organizing the event. Thanks to Honeywell guys for a good venue with all facilities.

Technorati tags:

initRIA – More seats available

There are more seats available for initRIA event, if you have not yet registered, you can register here. You can read more details on Mrinal’s blog.

Two more days to go and I am already excited to meet everyone. I hope, I would get well by then.

Technorati tags:

Live Documents office-suite chooses Flash/Flex

Sabeer Bhatia, one of the guys behind Hotmail, has been working on Live Documents, which has been announced a couple of days back. Live Documents is an office-suite for web and desktop (AIR?).

It is interesting to see, Live Documents chose to use Adobe Flash/Flex as front-end technology.

I read Zoho guys on Flash, I understand, it makes sense to use a technology that doesn’t have dependencies, easy to develop with, saves time, provides better experience to user and good for business. If Zoho guys think, they are achieving these goals with technologies of their choice, it’s totally fine. I would love to see how they respond to Live Documents release.

But hey, there are some (Live Documents, Buzzword, SlideRocket etc) which think Flash/Flex is cool (faster to develop, easier to use, consistent experience and better for business).

Technorati Tags: , , , , , , , , , , ,

Adobe Buzzword

Adobe Buzzword is available, no need for private invite to use it. It took me couple of minutes to register, then I checked out Buzzword; I must say Buzzword rocks!

It has a usable, fast, responsive and sleek user-interface (UI). Buzzword also allows to save documents in different formats (.doc, office-xml etc).

It allows to insert images, tables, comments, notes etc. I loved the ui-interaction for each of these features. I don’t know how to express in words without showing the screen-shots, so why don’t you check it out :-)

Just wondering, who designed the user-interface of Buzzword?

Technorati Tags: , , ,

Setting position of Alert control in Flex

It seems, there is no direct way of setting position (x, y) of Alert control in Flex 2. The trivial method (setting x, y) is either buggy or there must be some official way, which I am not aware of.

I found some different ways to do that:-

var alert:Alert = Alert.show("Can you see me on random positions?",
"I am an Alert box", Alert.YES | Alert.NO,
this, alertClickHandler, null, Alert.NO);
PopUpManager.centerPopUp (alert);
var newX:Number = 200;
var newY:Number = 200;
alert.move (newX, newY)

var alert:Alert = Alert.show("Can you see me on random positions?",
"I am an Alert box", Alert.YES | Alert.NO,
this, alertClickHandler, null, Alert.NO);
var newX:Number = 200;
var newY:Number = 200;
callLater (alert.move, [newX, newY]);

Following, to me, sounds like a little expensive because we are asking for the immediate validation.

var alert:Alert = Alert.show("Can you see me on random positions?",
"I am an Alert box", Alert.YES | Alert.NO,
this, alertClickHandler, null, Alert.NO);
var newX:Number = 200;
var newY:Number = 200;
alert.validateNow ();
alert.move (newX, newY);

Technorati tags: , , ,

Aviary tools: Adobe Flex/AIR based Rich Internet Applications (RIA)

I got to know about Aviary through a colleague. I looked at their site and realized, they have some amazing tools (Flex/AIR based), which are editors/generators for image, vector, 3d, video, audio etc. As mentioned, these tools are web-based (flex) and desktop-client (air).

I am yet to look at their tools which are accessible only on invitation. I hope, I would get an invite soon. Why don’t you check it out too?

This is one more example to show why entire flash/flex ecosystem is so cool.

Technorati tags: , , , , adobe, createonthefly

VIM: ActionScript and MXML syntax files

I am sharing VIM syntax files for ActionScript and MXML, which  I was about to share last-year, I got lazy after Manish’s post. I hope, these syntax files would provide more (if not better) syntax-highlighting :-)

Click following links to download/see:-

You can refer to Manish’s post to learn how to use these files. Instruction applies to any VIM syntax file.

Credit goes to original creators of actionscript.vim and xml.vim. These files were starting points.

Disclaimer:These files work for me, these are not perfect or clean. I would try to clean up, add more (if any missing) syntax and share whenever I get time.

Technorati Tags: , , , , ,