mike chambers | about

Branden Hall Session 2 of 3 : Creating applications in Flash MX

Components

UI Component Set 2 From Macromedia. Avaliable from Flash Exchange.

Most components support handlers, which is the name of the function that you want to be called when an event happens. By default the function is on the same timeline as the components. You can set them via the API to use functions on any object.

Components are similar to components in MS visual studio, or Swing.

Component API : Extensive, full featured API. Components can be treated like class instances.
Data Providers

Data Glue

Skinning Components

Can do with code using FStyleFormat class. Created a new syle format object, and then you can set all of its properties (look in reference panel for complete list).

sf = new FStyleFormat();
sf.face = 0x00ff00;
sf.addListener(componentName);
sf.applyChanges();

you can also set individual properties through setStyleProperty on the component.

componentName.setStyleProperty("face", 0x00ff00);

Can set globally using GlobalStyleFormat class.

Can also skin in the library, by actually editing graphics. Library > Flash UI Components > Component Skins.

Skins are broken into very small pieces. if you are making you own skins, you dont have to make them into so many small peices. it is done this way in the flash components to work with stye objects.

Customizing Components

Can extend and customize components. Extending Listbox.

Creating Components

main pieces

branden is showing the TabBar component that he built, showing how the live preview automatically updates when properties in the property inspector is updated. Nigel Pegg is going to have a lot more

info on this during his session.

Dont name a parameter “horizontal”, if it gets set to true, it will rotate component.

Flash Remoting
Branden really likes it.

XML is a very verbose way to serialize data. Flash Player communicates with Flash Remoting Adaptor via AMF, a binary format created specifically to serialize ActionScript data types. very efficient and lightweight.

branden is showing his book app again. when specifying URL for remote web service, you point to the web services WSDL file (in this case, he is calling a remote web service creating in ASP.NET).
branden is passing the responder object as the first parameter to the remote method. onResult method is automatically called when data is returned from remote service.

NetDebug.as, include this and you can use the NetConnection Debuger Panel (Window > NetConnection Debugger), and it will show all of the communication bewtween flash and the server.
end of session.

twitter github flickr behance