Archive

Posts Tagged ‘flash’

initRIA – More seats available

December 14th, 2007 No comments

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:

initRIA – an event for RIA enthusiasts

December 8th, 2007 No comments

Bangalore Flex User Group, precisely Mrinal Wadha, is organizing initRIA on Dec 16, 2007. Haven’t heard about it? Please read the details.

I hope to see good crowd and sessions there.

Technorati tags: ,

SWFObject html/javascript generator

November 22nd, 2007 1 comment

I heard about SWFObject html/javascript generator from a colleague. An useful tool for people who want to use Flash/Flex in their blog/webpage and not comfortable writing html/javascript code.

Technorati Tags: , , ,

Live Documents office-suite chooses Flash/Flex

November 22nd, 2007 No comments

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: , , , , , , , , , , ,

Some Adobe Flex/Flash related resources from India

January 27th, 2007 28 comments

I have compiled a list of sites, mailing-list and bloggers from India. Most of them blog about Flash, Flex, RIA Usability, Web 2.0 etc.

Website/groups:-

Blogs:-

Above list is partial. If I have missed something, please feel free to leave the URL (of blog, site, mailing-lists etc) in the comment. I would update the list.

If you are Adobe Flex developer, you might want to register on International Registry of Flexcoders.

Technorati tags: , , , ,

How to get URL query-string variables within Flex application

March 6th, 2006 88 comments

On flexcoders, someone asked, how to get the URL parameters in a Flex 2.0 application? By URL parameter, I mean the query-string variables, as shown below:

http://yourserver/yourapp.swf?name=Joe&age=22 or http://yourserver/yourapp.mxml?name=Joe&age=22

Note: To get the variables in flex via mxml file, you need server-side compilation of mxml files.

You can get the values of the params using from

mx.core.Application.application.parameters

object, which contains the name-value pairs (hash-map).

For example,

mx.core.Application.application.parameters.name

would return “Joe”, considering above example URL. You can find more information about this in livedocs: http://livedocs.macromedia.com/flex/20beta1/docs/00001300.html

Then someone asked, what if your swf is embedded in custom html wrapper, how to get the query-string params inside swf?

Most of us use ExternalInterface class in Macromedia Flash Player 8(onwards) to invoke some JavaScript functions and extract the value in ActionScript.

I wrote a quick-and-dirty class in ActionScript 3, which would get the values of params from URL query-string for you. You don’t need any extra JavaScript code in HTML. The same logic can be used for any an ActionScript 2.0 running Macromedia Flash Player 8.
QueryString class has following properties:-

  • parameters – an Object which contains the name-value pairs from query-string
  • queryString- String, this contains the entire query-string (url-encoded) name-value pairs.
  • url- String, this returns the complete URL of the wrapper page with query-string.

See demo
Download source files

Extending CSS capablities in Macromedia Flash Player

October 26th, 2004 1 comment

I am going to give a simple example using TextField.StyleSheet.transform(..). This is used to extend the CSS parsing capability. For example, “leading” is not parsed by CSS parser in Flash Player. Let’s make an example for the same.

First we would extend TextField.StyleSheet by creating a subclass(StyleSheetEx) and overriding it’s transform method.

  • StyleSheetEx.as
    import TextField.StyleSheet;
    
    class StyleSheetEx extends TextField.StyleSheet {
    
      // override the transform method
      function transform(style:Object):TextFormat {
    	var _fmt:TextFormat = super.transform(style);
    	for (var z in style) {
          if (z == "leading") {
            _fmt.leading = style[z];
    		delete style[z];
            break;
          }
        }
    	for(var i in _fmt) {
    		trace(i + " : " + _fmt[i]);
    	}
       	return _fmt;
      }
    }
    // end class definition

  • style.css
    p {
    
    	leading:10;
    	font-style:italic;
    	font-family:arial;
    	text-decoration:none;
    }

  • StyleSheetEx.fla
    import StyleSheetEx;
    
    this.createTextField("_txt",this.getNextHighestDepth(), 50,50, 400,200);
    _txt.multiline = true;
    _txt.html = true;
    _txt.wordWrap = true;
    _txt.text = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc erat est, dapibus id, porttitor a, nonummy nec, augue. Vivamus non felis. Quisque posuere, est et iaculis convallis, felis eros tempor lectus, vel tempor dolor diam quis nisl. Donec tincidunt pellentesque leo. Donec eget nisl. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Morbi sit amet arcu ac magna elementum tristique. Nam fermentum.";
    
    var _css:TextField.StyleSheet = new StyleSheetEx();
    
    _css["owner"] = this;
    _css.onLoad = function(bSuccess) {
    
    this.owner._txt.styleSheet = this;
    
    }
    
    _css.load("style.css");
    

You can also see demo this example.

Create above files with code and test it. I hope, “leading” works for you also. I know there could be many better ways, as I can see many enhancements in the above code. Please feel free to suggest.