MAX 2009

Another year and another Adobe MAX obviously!

This year I decide to take part in a new pre-event called Creating Applications for the Flash Platform, this labs will be dedicated to Flash Builder and Flash Catalyst integration… I think could be very useful to understand a new point of view to create RIAs and Desktop Applications and how to integrate this workflow in our company.

During the conference, this is my schedule:

Monday, October 5, 2009
– Building Flex and Adobe AIR Service Clients
– ActionScript 3.0 Tastes Good (and Is Good for You, Too!)
– Advanced Data Visualization with Flex
–  What’s Coming in Adobe AIR 2
Tuesday, October 6, 2009
– Building a Scalable Interactive Video Solution Using P2P in Flash
Builder
– Flash Builder 4 Advanced Tips and Tricks
– How NOT to Code Flex
– ELIPS 3.0: Mobile Flex Builder Toolkit
Wednesday, October 7, 2009
– Real-Time Collaboration Deep Dive: Using Adobe Flash
Collaboration Service
– Building Mobile Applications with Adobe AIR
– Making Real-Time Data Come Alive With Flex Data Visualization
– Effective Form Design for Developers
– Tackling Memory and Performance in Flash, Flex, and Adobe AIR

Monday, October 5, 2009

– Building Flex and Adobe AIR Service Clients

– ActionScript 3.0 Tastes Good (and Is Good for You, Too!)

– Advanced Data Visualization with Flex

–  What’s Coming in Adobe AIR 2

Tuesday, October 6, 2009

– Building a Scalable Interactive Video Solution Using P2P in Flash

Builder

– Flash Builder 4 Advanced Tips and Tricks

– How NOT to Code Flex

– ELIPS 3.0: Mobile Flex Builder Toolkit

Wednesday, October 7, 2009

– Real-Time Collaboration Deep Dive: Using Adobe Flash

Collaboration Service

– Building Mobile Applications with Adobe AIR

– Making Real-Time Data Come Alive With Flex Data Visualization

– Effective Form Design for Developers

– Tackling Memory and Performance in Flash, Flex, and Adobe AIR

I hope to find many people to share ideas, knowledge and skills… see you there guys 😉

Presentation Zen: a book dedicates to speakers

This summer, during my flights, I decide to read a book dedicate on how to create AMAZING presentation, so I buy Presentation Zen and in 10 hours more or less I finish it and… WOW, it opens my mind!

Author approach is very simple and start his book saying: “Remember that are only suggestions, this book is not a bible that teach you how to use Powerpoint or Keynote, but it shows you how to approach a real presentation process”.

In fact, if you read the book, you don’t learn how to prepare great slides with slideware (it’s a fantastic term to define presentation’s softwares like Powerpoint or Keynote) but you’ll learn what you MUST think behind a slide… out of your computers world.

Few things that I learn reading Presentation Zen:

  • Avoid bullets list (like this :P)
  • Think about the message before switch on your computer and, if you can, go away from your computer with a pen or pencil and paper, tons of papers
  • You must focus your presentation in ONE MESSAGE and follow it during your slides creation
  • An image is better of 1 thousand of words
  • Presentation must help you during your speech and not substitute you
  • Less is better

There are tons of concepts that can help any kind of speakers from IT world to Yoga teachers (I suppose).

I think could be so interesting for anyone that usually speech for passion in conferences or for everyone that make presentation for work like CEO, marketing people and so on.
If you are interesting to buy this book or give more informations about it, go to author’s blog.

Why AIR is called AIR? my crazy idea

Yesterday morning when I came back from an AS3 course in Venice, when I was in my car (it was too hot!), I started to think why AIR was called AIR (I know I’m totally crazy!).
So, feel free to follow me in this mind trip:

1. There aren’t any kind of Adobe software where in own name there is “Adobe” word, in fact we talk about Adobe Photoshop, Adobe Flash, Adobe AIR, but if you read in long version Adobe AIR you’ll read Adobe Adobe Integrated Runtime… bad sound!

2. AIR is a technology that allow you to bring your web contents and put on user’s desktop to create an “offline software”.
In 1996 Macromedia published a whitepaper where, for the first time, they talked about RIA (Rich Internet Application), so a kind of online software.

So AIR is the opposite of a RIA (one works online the other one mainly offline) and if you reverse the word R I A, you can find A I R!!!

I think that, after called this technology AIR, they think about the real acronym and marketing strategy.

I know, I’m crazy… but it’s funny… isn’t it?! 😀

How to switch from Actionscript 2 to Actionscript 3… in September for FREE in Milan and Rome

During September I’ll take part of Arrivano i Guru Tour, an Italian event that allow designers, developers and photographers to learn new stuff for FREE about Adobe technologies!
In fact, the event starts in September until to the end of October and you can see it in 10 differents Italian cities.

In the last event you can find a special guest… Katrine Eismann, on of the most important person in creative digital retouch world!
I decide to talk about a big problem for a lot of developers: How to switch from Actionscript 2 to Actionscript 3 during my sessions in Milan (27th September) and Rome (5ht September).

During my session we can see the power of new AS3 features,  architecture of new Flash Player and differences of both languages.
You can see a real mirror from AS2 scripts to AS3 scripts and how to porting your daily “Actionscript life” to a new step: more interesting and powerful!

If you’d like to have more information take a look at the site or feel free to contact me leaving a message on my blog or dropping me an email.

I hope to see you during this event and remember that is a great opportunity to learn more and for FREE!

See ya!

Modules and DragManager bug in Flex 3

In my last RIA project based on Flex 3, I find a bug working with modules that I’d like to sharing in this blog.

I create a dashboard where 4 custom components, that extend Panel component, load in a ModuleLoader differents sections.
In those sections there are components based on List component and when I run my project I’ve this kind of error:

TypeError: Error #1034: Type Coercion failed: cannot convert mx.managers::DragManagerImpl@21ef6df9 to mx.managers.IDragManager.

Surfing on web I don’t find anything about this kind of problem, finally on JIRA Adobe Flex bugs, I find it!
You can find workaround on JIRA ticket, it’s so easy to solve it, you only create a new instance of DragManager in your Default Application and everything works well.
This bug is created because you have more instance of DragManager in this sample, but DragManager in Flex framework is used like a Singleton so only one instance per time.
Each module has a List component that use DragManager when you have in the same application 2 or more modules you must put in Default Application file a DragManager instance and that’s it!
I think could be useful for anybody in the same situation.

Talking about Flash Catalyst and Adobe AIR in Rome at “Arrivano i guru”

Next week in Rome, starts a new Italian event called Arrivano i guru, where 6 speakers from designers to developers, talking about Adobe technologies and others arguments.
I’ll be speaker there and I choose to talk about Adobe AIR and Flash Catalyst Public Beta, because I think could be so interesting for people that comes to this event understand how to approach this new world and start to work with those technologies.
In fact I think in Italy there are few companies that approach AIR to create real desktop application and an overview about Flash Catalyst give me opportunity to introduce a new way to skinning your RIA or desktop applications and how to save lots of times in a real workflow.

In the same event you can find others session about Digital Imaging, Advanced technique with Indesign or Photoshop and SEO also.
I think could be very interesting for a lots of Italian people, so feel free to leave a comment here if you’d like to receive more information about this event.

For more information or registration take a look at official site event.
See you there guys.

Flash Builder Beta is out… my first tests

Finally is OUT! New Flash Builder version is out in labs.adobe.com

I spent all the evening to try new features, so I think that could be useful talking about that in my blog.
The new features that I like so much are:

  • States / Library / Modules: States are totally changed in a new version that make easier write in MXML, I love so much includeIn and excludeFrom attribute to decide in which state you can put or remove a particular component.
    If you want you can work also with group and add in the same group N states.
    Library is a new object that works like Flash library, so you can create a Definition (like a Symbol) and reuse it during your application, make attention because you are working with Element and not Child!
    States and Library increase a lots application KB so I prefer work with Modules that load in runtime mode. They have a new particular argument when you try to load it that is ByteArray (more information on Migration Guide on labs).
  • Automatic getter / setter / event handler: YESSS! I switch to FDT in last month because I increase my productivity to write AS3 code, now with Flash Builder you’ve a couple of actions to create getter, setter and event handler, that’s so cool!
  • New Drawing API: we have a lots of new interesting MXML tag to define a shape like a square or a rectangle, but the most interesting is Paths that allow you to create particular lines and shape with bezier curve via code
  • Advanced CSS selectors: another interesting feature is the new way to refer a component via CSS, in fact you can interact with MXML structure (all buttons in an hbox must be red and all buttons in a vbox must be black).
    Very easy and cool!
  • Flex Theme: that’s one of my favorite features, in fact with Flash Builder you can create custom Flex Theme and skin your application in a second! You can find more information about Theme in Ted Patrick blog.
  • DateGroup: Instead of using Repeater to repeat a particular object, now we have DataGroup that defines a dataprovider and how to render it via an ItemRender or an ItemRenderFunction.
  • Switch a Flex project to AIR: finally if your client doesn’t know what he wants, you can swtich a Flex app into an AIR desktop application directly from context menu of Package Explorer (new name of  Flex Navigator panel).

Remember to read Migration guide, it’s so interesting! Stay tuned for next Flash Builder and Catalyst tests!
Another great resource that is now live to see Flex 4 features is Tour de Flex that you can view directly from Adobe web site.

Bye bye

First impressions about Flash Catalyst

Yesterday I was in Milan at From A to Web and I saw Serge Jespers session about RIA workflow with Flash Catalyst and Flash Builder.

In 30 minutes he made a real Flex application that interact with Coldfusion to retrieve data from a database and he started from a normal and static AI file… that’s totally AMAZING!
Flash Catalyst will be a great software that will help us to create desktop applications and rich internet application, in particular could be very interesting to create animations and user interaction on own GUI.

When Serge showed Flash Builder he interacted with a CF script (you can work with WS, XML and other back end tecnologies also) trough a panel and in few steps he was connected to data source… COOL!
I’m so excited, Flash Catalyst will change RIA and desktop apps workflow definitely! I’m sure about that… BUT…

I’d like to investigate more about Flash Catalyst when Adobe decides to release public BETA on Labs, but I asked a couple of questions to Serge during his session to understand better the power of this new software.
For me the first problem is that FC doesn’t work with Flex Modules but only with States and in big projects it could be a problem.
Yes, you can copy MXML code and  paste on a Module, but it could be more easy to choose if you want to work with states or modules or better, export your GUI like module and not only custom component.
Another thing that I’m scared is that FC is very easy to use, open new way of business and make your daily work more fast, so designers and developers that approach for first time RIA and Desktop apps could start to release tons and tons of “bad apps” like Flash in 90s… I hope that Adobe will teach around the world with free training courses, not only with one day events, or will begin a new HORROR ERA for RIA and Desktop apps.

That’s my 2 cents, if you’d like to talk about FC on this blog, feel free to leave a comment.

@PyCon with Flex and AIR

Here we are! My first conference of the year is PyCon 3 in Florence from 8th to 10th May.
This is THE PYTHON conference in Italy, there will be very cool and strong developers of the Python world from all over the world.

In this edition I propose a session about Python, Flex and AIR on how to integrate those technologies all together.
I think could be very interesting for Pyhton developers approach this RIA world and find a new way to create an amazing GUI with Flex and AIR.
It will be my first time there and I start to study Python only on January, so I’m very happy to take part on this event.

If you’d like to come, please feel free to tell me and add a comment on this post!
See you there guys.

UPDATE
I make a post about PyCon 3, in few days I’ll put conference photos on my Flickr account, stay tuned!

Create PDF in runtime with Actionscript 3 (AlivePDF, Zinc or AIR, Flex or Flash)

This morning I’ve a new target, create PDF in runtime with Actionscript 3.
Very cool project to accomplished this mission is AlivePDF, an opensource AS3 library that you can download from Google Code.
AlivePDF allow you to generate PDF in runtime with Actionscript 3 and you can add pages, draw in each pages or add images, it’s very powerful library.

In this sample I use Actionscript 3 (with FDT) and Multidmedia Zinc 3, but you can use Flex or Flash and AIR to make this sample.
So first of all I create a simple class that allow you to create a PDF file with multiple pages and to add content in each pages.
This is the code:

package org.mart3.pdfGeneration {
    import flash.events.Event;    
    import flash.utils.ByteArray;    
    
    import org.alivepdf.images.ImageFormat;    
    import org.alivepdf.saving.Method;    
    
    import flash.display.Loader;    
    import flash.events.IEventDispatcher;    
    import flash.events.EventDispatcher;
    
    import org.alivepdf.pdf.PDF;
    import org.alivepdf.layout.Orientation;
    import org.alivepdf.layout.Size;
    import org.alivepdf.layout.Unit;
    import org.alivepdf.display.Display;
    
    /**
     * @author lm
     */
    public class CreatePDF extends EventDispatcher {
        
        private var pdf:PDF;
        public var pdfBA:ByteArray;
        
        public function CreatePDF(target : IEventDispatcher = null) {
            super(target);
            
            pdf = new PDF(Orientation.LANDSCAPE, Unit.MM, Size.A4);
            pdf.setDisplayMode(Display.FULL_PAGE);
        }
        
        public function set totalPages(num:int):void{
                
            for(var i:int = 0; i < num; i++){
            
                pdf.addPage();    
                
            }
    
        }
         public function setData(_l : Loader, _numPage:int) : void {
            
            pdf.gotoPage(_numPage);
            pdf.addImage(_l, 15, 15, 0, 0, ImageFormat.JPG, 100);
        }
        
        public function savePDF():void{
            pdfBA = new ByteArray();
            pdfBA = pdf.save(Method.LOCAL);
            
            var evt : Event = new Event("baReadyEvent");
            dispatchEvent(evt);
        }
    }
}

Obviously if you want, you can create a custom event that pass to the document class the ByteArray but this is a quick sample to show how you can create PDF in runtime!

One of the amazing things that you should do with AlivePDF, it’s that you can decide to save PDF locally or on web! Read documentation because it’s very interesting what you can do with this library!

Ok now, go to document class where we use MDM swc that you can find when install Zinc on your computer (you can find 2 differents SWC, one for Flash and the other one for Flex. Remeber also that Flash SWC works with Flash CS4 also, not only with Flash CS3!).
In this class we do those simple steps:

  • create a PDF object using CreatePDF object
  • set our PDF document
  • pass an external image loaded with Loader object
  • save PDF bytearray with Zinc FileSystem class
package org.mart3.pdfGeneration {

    import flash.display.MovieClip;    
    import flash.net.URLRequest;    
    import flash.display.Loader;    
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.events.MouseEvent;

    import mdm.*;

    import org.mart3.pdfGeneration.*;

    /**
     * @author lm
     */
    public class Main extends Sprite {
    
        private var pdfObj:CreatePDF;
        private var l : Loader;
    
        public function Main() {
            
            mdm.Application.init(this);            
            
            pdfObj = new CreatePDF();
            pdfObj.totalPages = 2;
            pdfObj.addEventListener("baReadyEvent", saveLocalPDF);
            
            l =  new Loader();
            l.name = "myImg";
            
            l.contentLoaderInfo.addEventListener(Event.COMPLETE, showImage);
            l.load(new URLRequest(mdm.Application.path+"assets/bg.jpg"));
        }
        
        private function saveLocalPDF(e:Event) : void {
        
            mdm.FileSystem.BinaryFile.setDataBA(pdfObj.pdfBA);
            mdm.FileSystem.BinaryFile.writeDataBA(mdm.System.Paths.desktop+"generate.pdf");
    
        }

        private function showImage(event : Event) : void {
            
            l.scaleX = l.scaleY = .4;
            var mc : MovieClip = new MovieClip();
            mc.buttonMode = true;
            mc.addEventListener(MouseEvent.CLICK, savePDF);
            mc.addChild(l);
            this.addChild(mc);
        }
        
        private function savePDF(event : MouseEvent) : void {
            event.currentTarget.alpha = .5;
            pdfObj.setData(l, 1);
            pdfObj.savePDF();

            
        }
    }
}

You can also download source files from their hosting service and test it on your computer.
Feel free to give me any comments about AlivePDF, it’s very interesting to know what you think about this AS3 library.