blog.ashier.com flash / flex / air development
rss rss comment

I still don’t know what new updates there may be, but I’m really glad that there are changes being done.

I’m looking forward to the changes in AMFPHP.

Thanks Wade.

Tags: , ,

I just noticed that the source code for Porting SWFAddress to PureMVC has been repackaged and modified by Pickle of http://allflashwebsite.com. Pickle made an awesome job converting it to a re-usable template for everyone. Wooooooot!

Go get the template now! View his post at http://allflashwebsite.com/article/pure-mvc-swfaddress-template-integrating-swfaddress-with-puremvc

Tags: , ,

An awesome way to send compressed bytes outside of flash.

View link here.

Tags: ,

Deferred instantiation is a common technique used to improve Flex application start-up time and to control when and how to instantiate child components within a container when the creationPolicy is set to none.

Last week, I was able to implement this into an application we’re currently developing at work. It took me a while to figure it out but I must say, it is really handy. A ViewStack for example will allow switching from one child to another, but as the child of that container gets to be really complicated, it may highly affect your application’s performance.

Why???
If no creationPolicy is specified for a container, that container inherits its parent’s creationPolicy. If no creationPolicy is specified for the Application, it defaults to ContainerCreationPolicy.AUTO.

This is where Deferred Instantiation can save your day.

I have below a basic example of how you can implement Deferred Instantiation using createComponentFromDescriptor()

createComponentFromDescriptor allows you to create one child at a time.

Read the rest of this entry…

Tags: ,

When creating Flex components, all child components (buttons, combobox, etc..) you add are always publicly accessible. There is a way to hide this and this is by using the Metadata tag "Exclude"

Here is a common Flex Component Example:

Actionscript:
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300">
  3.     <mx:Button x="167.5" y="146" label="Click Me" id="btn"/>
  4. </mx:Canvas>

In the example above, "btn" property is publicly accessible outside that component. For you to hide it, you must add an "Exclude" metadata tag.

Here's is an example:

Actionscript:
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300">
  3.     <mx:Metadata>
  4.         [Exclude(name="btn", kind="property")]
  5.     </mx:Metadata>
  6.     <mx:Button x="167.5" y="146" label="Button" id="btn"/>
  7. </mx:Canvas>

Now, the "btn" property won't be accessible outside that component.

I think it's proper to do it this way. It is a way of limiting the users of your components to access properties that should not be accessed outside your component thus, making them use your components properly.

Other Exclude kinds are

[Exclude(name="direction", kind="property")]
[Exclude(name="setFocus", kind="method")]
[Exclude(name="focusIn", kind="event")]
[Exclude(name="horizontalGap", kind="style")]
[Exclude(name="focusInEffect", kind="effect")]

Resource Blog

Tags: ,

I have updated my "SWFAddress Ported to PureMVC" example to support PureMVC 2.0.1

You can view the post here or if you want just download the latest file here.

Tags: , ,

There are alot of ways to connect to a remote service in Flex / Flash.

You can do it tag based:

Actionscript:
  1. <mx:Application
  2.     xmlns:mx="http://www.adobe.com/2006/mxml"
  3.     layout="absolute">
  4.    
  5.     <mx:RemoteObject id="blazeService" fault="onFault(event)" source="hello.Hello" endpoint="http://localhost:8400/hello/messagebroker/amf/" destination="Hello">
  6.         <mx:method name="sayHello" result="onResult(event)" />
  7.     </mx:RemoteObject>
  8.  
  9.     <mx:Script>
  10.    
  11.         <![CDATA[
  12.             import mx.messaging.channels.AMFChannel;
  13.             import mx.rpc.events.ResultEvent;
  14.             import mx.rpc.events.FaultEvent;
  15.            
  16.             private function onResult(e:ResultEvent):void {
  17.                 trace("Result" + e.result);
  18.             }
  19.            
  20.             private function onFault(e:FaultEvent):void {
  21.                 trace("fault");
  22.             }
  23.         ]]>
  24.     </mx:Script>
  25.    
  26. </mx:Application>

or actionsript based:
Read the rest of this entry...

Tags: , , , , ,

Today I attended an online meeting where Tom Jordahl of Adobe presented BlazeDS.

Here is a description of BlazeDS provided by Tom Jordahl:

Recently Adobe announced the release of BlazeDS which will make some key server technologies open source and free to use in any application. These technologies are critical to building great applications with Flex and AIR. Tom will talk about exactly what you get in BlazeDS and how it relates to LiveCycle Data Services and will detail some of the reasons why you might want to use these server technologies. He will also explain how ColdFusion developers can take advantage of BlazeDS in their applications.

The presentation lasted almost an hour and it was really fun. It was a great presentation and I'm looking forward for another BlazeDS related presentation.

The whole meeting was recorded. If you're interested, you can view the presentation here.

Tags: , ,