Having fun with Adobe AIR

Hi All,
this post will be in Italian, in particular is dedicated to the whole community of Italian mobile developers.
Having fun with Adobe AIR is a free event in 6 different Italian cities where people will learn how to create or improve own cross platform applications made with Adobe AIR for mobile devices.
For any question feel free to leave a comment to this post or drop me an email.

logoOfficial

Ciao a tutti,
mi chiamo Luca Mezzalira e sono l’organizzatore di “Having fun with Adobe AIR” un evento dedicato a tutti gli sviluppatori mobile che vogliono avvicinarsi ad una tecnologia cross-platform, come Adobe AIR, per la realizzazione delle proprie app o game su smartphone o tablet.
In collaborazione con alcuni importanti sponsor, come Adobe e BlackBerry per esempio, che ringrazio innanzitutto, sono riuscito ad organizzare 6 tappe in giro per l’Italia dove in una giornata andremo a scoprire le potenzialità di Adobe AIR, andremo a sviluppare degli esempi pratici che possano far vedere il workflow per la realizzazione di un’applicativo mobile.
Infatti l’evento è basato sulla formula BYOL (Bring Your Own Laptop) dove ogni participante dovrà portare il proprio computer con installato Flash Builder dove potrà creare i proprio applicativi e installarli poi nel proprio tablet o smartphone.

Se ti stai chiedendo se è una perdita di tempo perchè Flash è “morto”, beh credimi, non è così.

Infatti Adobe sta continuando a sviluppare questa tecnologia dando nuove potenzialità per la creazione di applicativi mobile e desktop, dall’accelerazione in GPU all’integrazione con Native Extension e molto altro ancora!

Durante l’evento avremo la fortuna di avere con noi degli speaker Adobe, in alcune tappe, che ci daranno la possibilità di scoprire su cosa si sta concentrando Adobe e quale sarà il futuro della piattaforma.
Un evento totalmente gratuito che credo possa far piacere in Italia a molti sviluppatori che vogliono iniziare a muovere i primi passi nel mondo mobile oppure quelli che già ci lavorano ma vogliono alternative valide con cui sviluppare.
L’evento avrà un massimo di 20 partecipanti circa per tappa e sarà di una giornata, le città in cui si svolgerà saranno Milano, Torino, Bolzano, Padova, Firenze e Bari.
La registrazione è obbligatoria e dev’essere fatta tramite il sito dell’eventohttp://www.havingfunwithadobeair.com/
Se invece preferisci seguirci direttamente sulla nostra pagina facebook ecco l’indirizzo: https://www.facebook.com/pages/Having-fun-with-Adobe-AIR/430003473713246

Per qualsiasi dubbio o domanda non esitare a contattarmi via email o lasciando un messaggio su questo post.
Spero di vederti ad una delle tappe del tour!
A presto

Luca

Tips & tricks to become a good developer

In my spare time I’m reading “Think like a Programmer. An introduction to creative problem solving” and I’d like to share with my followers some things that I learnt in first chapters of this book.

 

I’ve learnt 10 good rules to approach any problem/algorithm that you can meet during your daily job as developer:

  1. study the constrains of the project, so important to define the area of your project and how to approach it
  2. find analogies of problems that you solved in the past, it could help to resolve the new one
  3. divide the whole project in small tasks it helps to focalize and to define better the effort of each task
  4. starting with the known tasks and then go ahead with others (in that case I usually start with what I don’t know, because after that, I can go ahead quickly with the rest of the project, it works with me 😛 )
  5. divide any problem in different parts, it’s more easy solve small issues than 1 big
  6. you ALWAYS need a plan to solve a problem (using collateral thought, I suggest to start with Google, in most cases someone else has approached the same problem and probably solved it)
  7. try to watch the problem in different way, it’s essential to find the right solution to implement the algorithm in your project
  8. make own the solutions of issues, it’s so important because next time you’ll find a problem you’ll know how to approach it (point 2 of this list)
  9. create samples highly focused on a particular functionality to accomplish your tasks, sometimes make a simple example helps your to find the solution of a big problem.
  10. don’t get disheartened on a problem, it’s normal to find them, it’s your job!!!

I hope could help many developers that start to approach this job and, to the others, I hope you use many of those tricks in your projects and if you have another feel free to share them with a comment to this post.

If I’ll found more tricks to share reading this cool book I’ll post them again.
Finally If you are interested to read it, I’ll share the link here.

How to install Apache Flex 4.8.0 SDK in Flash Builder

In this post I’ll explain in an easy step by step tutorial how to install Apache Flex 4.8.0 in Flash Builder, I know that it’s not rocket science but maybe newbie developers could need more information to start play with new SDK.

The new SDK is more or less the same of 4.6 but under Apache flag, like you can read at Spoon website, but we hope people behind the project could give us new opportunities for our RIAs and Mobile projects.

So let’s start!

First of all download Apache Flex 4.8.0 binaries for your operating system (in my case OS X), keep attention, you need the binaries release not the source one.
After unzip the downloaded file create a folder called 4.8.0 in /Applications/Flash Builder 4.5/sdks

Then download playerglobal.swc for Flash Player 11 on Adobe website.

Save it in /Applications/Adobe Flash Builder 4.5/sdks/4.8.0/frameworks/libs (it could be better create a folder called “player” or as you want, in my case I use “11.1” and save the swc inside).

Finally, open Terminal navigate trough your folders and position it to this location /Applications/Adobe Flash Builder 4.5/sdks/4.8.0/frameworks then launch this ANT command:

ant thirdparty-downloads

After 10 minutes you will download everything:
. OMSF dependencies
. TLF framework
. Flex 4.6 SDK and so on

Last but not least, in Flex 4.8 SDK folder you will find a env-template.properties, you have to duplicate the file, call env.properties and set the right path for each folder:

env.AIR_HOME= path to AIR SDK on your filesystem

env.FLASHPLAYER_DEBUGGER = path to Flash Player Debugger, if you have Flash Pro installed you can find a version in Players/Debug/Flash Player Debugger

env.PLAYERGLOBAL_HOME= path to playerglobal.swc (it’s not an absolute path, it’s relative and starts from frameworks folder in Flex SDK!!!)

env.PIXELBENDER_HOME= path to Pixel Bender Toolkit 2 (it’s not important to set if you don’t use it)

env.ADOBE_EXTENSION_MANAGER= path to Adobe Extension Manager

Remember that in template file you can read an accurate explanation on how to set those environment variables

Then you can start to enjoy the new Flex SDK.

The team behind Flex in Apache is working on a new AIR application that will help you to install in Flash Builder the SDK but it’s not released yet… we hope to have it soon, in the meanwhile I hope this tutorial could help you to set your IDE.
There is another way to install the SDK trough an AIR app that you can download from here: http://people.apache.org/~bigosmallm/installapacheflex/
If I forgot some steps in my description please comment to this post to help everybody to enjoy Apache Flex, thank you in advance.

Dynamic embedding fonts without using Flash or Embed Metadata

I’m working in a new project where we have to automate the integration of fonts loaded on a server by users and integrate them in a Flash / AIR project.
In the most cases, if you search online, you can find 2 main solutions:
1. first one is embedding fonts in a class with [Embed] metadata
2. second one is create a swf file and instantiate the class of Font embedded inside (this method require Flash Pro)

Searching well you can also find a solution with swfmill but there are some problems to integrate with AS3 projects.
Like you know, in my spare time, I’m playing with Haxe and Corona SDK and in this case Haxe help me to accomplish my task.
I found a great library called hxswfl made with Haxe that allow me to create a swf or swc file directly from an XML, there are many other usage of this library that are described on online repository of this project, but what I need this time is use it to create a library with embedded fonts inside with a class name assigned to each font.

So first of all, following the library XML schema, I create a lib with a list of fonts in this way:

<lib>
 <font file="Palatino-Bold.ttf" class="com.insideabit.PalatinoBold"/>
 <font file="Palatino-BoldItalic.ttf" class="com.insideabit.PalatinoBoldItalic"/>
 <font file="Palatino-Italic.ttf" class="com.insideabit.PalatinoItalic"/>
 <font file="Palatino-Roman.ttf" class="com.insideabit.PalatinoRoman"/>
 <font file="Verdana-Bold.ttf" class="com.insideabit.VerdanaBold"/>
 <font file="verdana.ttf" class="com.insideabit.Verdana"/>
</lib>

Any node has 2 attribute, file attribute where I set the path to find my font on filesystem and the class where I set the class name of my font that I’ll use in my actionscript class later.
After download source of hxswfml library (and obviously before anything I’ve installed Haxe in my computer), I go with Terminal in bin/neko folder and I launched neko file (hxswfml.n) with those parameters:

neko hxswfml.n xml2lib librarySWF.xml lib.swf

I’m telling to my neko program that it has to convert my xml to a swf library, embedding inside all fonts described in the XML file with that class name.

Now we have our SWF file with fonts, we can create our Actionscript project and load with a loader object our swf file.
Then, when SWF file is loaded, we have to register our fonts inside the SWF library, you can accomplish this task like this:

 for(var i:int = 0; i < _fontsArr.length; i++){
 var FontLib:Class = _loader.contentLoaderInfo.applicationDomain.getDefinition(FONT_NAME) as Class;
Font.registerFont(FontLib);
}

Ok, now you can use any fonts that you have in your SWF without install them in your laptop and without create any AS3 class, this is a really easy way to work with external fonts in a dynamic way.


Obviously I prepare a sample to download if you have any questions feel free to leave me a message to this post.

It’s not finished yet, because I’ve a question for you: what happens if I use the same technique for different devices?
On web and desktop (AIR application) there are any problem because I can load any external SWF file, the same on Android and Playbook but on iOS?
With iOS you can a SWC file instead a SWF file so your SWC library will be embedded at compile time in your application for iOS and you can access to fonts more easily instantiate directly your class name.


For more information about this technique I suggest to read this article on Adobe DevNet.

mPresenter 2: become a baker!

Hi All,

Today I’d like to share with you my IndieGoGo campaign to raise $35.000 for mPresenter 2.
mPresenter is a cross-platform software composed by 2 different tools: a mobile manager and a desktop viewer.
It helps you during own presentation to your boss or clients, during a public talk or only when you want to show your holidays photos to your friends.
It’s totally free (7.000 downloads from the stores) and it’s available on Android and iOS marketplace; the desktop app is downloadable directly from the mPresenter website.

With the new release I thought to deliver 2 new main features: mPresenter client to deliver slides trough P2P connection (goal to 15.000 bucks) and the other one is port mPresenter (client and editor) to tablet with a new stunning GUI !

I’d like to take your attention to the $3.000 donation where we customize a special version of mPresenter for your company with a skin dedicated to you, I think a good idea to have a different tool for work force to show products or service, for example, with a cheap investment
if you have any question, suggestion or anything to say me, feel free to contact me directly via email or leaving a comment to this post.

Thank you for your time and thank you in advance if you’ll become my baker!
Thank you also to anyone that decide to spread the word on social networks 😛

I tell you a story…

Long, long time ago there was a company called Adobe that changed the aim of a great platform like Flash, so Flash became from “write once, run everywhere” to a platform where developers could create games, mobile apps and desktop apps but not everywhere.
But a day Adobe decide to collaborate with Microsoft to create a Flash Player with amazing performance on tablets and on desktop too, and that moment my brain started to imagine a new future, maybe impossible, maybe a nightmare or maybe a dream…come with me in this fantastic story!

We can start with Adobe side, they donate Flex framework to Apache foundation, so MXML, FalconJS, Blaze and so on are now in this great foundation where communities are working on the new release of Flex framework 4.8.
Adobe is working a lot on HTML5 and JS side to create new tools for designers and they are moving fast on mobile side too with Phonegap.
Adobe stuff are mainly (or trying to be) cross-platform, so contents made with Adobe solutions work on Android, iOS, Mac OS X and Windows.

In the other hand we have Microsoft with C# (that is powerful and easy to write for a Flash Platform developer with good skills in development), XAML (the Microsoft answer to Flex), WPF, XNA and Silverlight; an ecosystem dedicated mainly to Microsoft OS from desktop to XBox.
Microsoft is trying to promote JS on develop contents for its new operating system: Windows 8.
Microsoft has Expression Studio that is the “poor baby” for a web designer that is more comfortable with Photoshop, Illustrator, Flash so with the Creative Suite!

Last week everybody read about the Adobe and Microsoft partnership for delivering Flash Player on Windows 8 (desktop & metro), but if they are working on that, maybe a day they’ll talk about AIR… this is they key of the story.

Try to imagine.

Adobe has a total penetration of Flash Player on desktop, with AIR you can work easily on desktop and on iOS, Android and QNX OS (BlackBerry one) then they are working on new tools for the future of web on HTML 5, CSS3 and JS like Muse, Edge and Dreamweaver too.
Microsoft has a lot of money they don’t have a cross platform ecosystem (there are some third party solutions like Mono but are not the same), they have strong technologies and partnership (Nokia for example).

And what do you think will happen if Microsoft plans to buy Adobe?!

Imagine a day where a developer using Visual Studio and writing C# and XAML could define to export own project on desktop with AIR, or better on mobile OS or in a browser in HTML5 with the same (I mean the SAME) base of code, same tools of development and an amazing integrating workflow from the idea to the software delivery…so WOW!!!
Bringing the powerful of Microsoft and the smart technologies of Adobe could be an amazing opportunities for both companies, and for developers too, to innovate in the best way ever the multimedia era.

This could be a real dream… what is missing now, probably, is to find a driver that lead the multimedia scenario because everyday we receive tons of emails about new framework, new technologies, new programming languages and developers are scared to bring a direction because probably it will not be the right one, probably next week or next month they will have to study another one and another one again…

Dear reader, try to imagine a world where you can really focused on create the silver bullet software, without think which will be the new JS framework or which are the new features of the latest Flex release… a world where you have only to think about contents in the best… maybe it could be a dream or maybe could be a the best place to live… sorry… to code.

UPDATE

There is another fact that I remember only now… by the end of 2010 Adobe and Microsoft CEOs meet in Microsoft headquarters to talk about what?!
It could be another indication of my conspiracy theory… maybe we’ll have some surprises next year!

Speaking at WHYMCA about Haxe for Flash Platform developers

Hi Guys!
I’ve a good announce to share with my followers, next 24-25 May in Bologna will take place WHYMCA a great mobile conference where I’ll be speaker with Piergiorgio Niero and we’ll talk about Haxe for Flash Platform developers.
We’ll discuss on why we choose Haxe instead JS or other languages, we evaluate differences between Haxe and AS3, we’ll show pros and cons to use Haxe, we’ll show you how create content with Haxe for JS, Flash, Android, iOS and so on.
Finally we give you some tips to getting started with Haxe 😀

So we are waiting for you at WHYMCA! see you there guys!

UPDATE:

This is our session about Haxe during Whymca in Bologna:

WWX 2012: Haxe conference in Paris

Today is finished Haxe conference in Paris, my first time at WWX and in Paris (very nice place).
In this post I’d like to answer some questions that many friends ask me on Twitter about why use Haxe and if there are good news from WWX 2012.
First of all I’ve to say that Haxe community is so strong, with great people so engaged to evolve the technology and for me they are going in the right direction.
There are few points that I have in mind now and I’d like to share with you here:

  • Why Haxe and not a JS framework
  • Haxe and is future
  • What is missing in Haxe now
  • Haxe projects in the real world

Why Haxe and not a JS framework

After Adobe MAX 2011 I spent a lot of time to study which could be the best alternative of Flash Platform to prepare myself and my company to find an alternative in the worst cases, I was looking for a cross-platform technology with a good workflow from design concept to the delivery that could help me to target content on desktop, mobile, web and embedded systems too.
We spent last 5 years on developing Flash Platform softwares in a lots of devices, if I’ve to start think to do the same thing only in JS I probably change my skills from client side and GUI creation, to anything else, maybe Python or maybe… but during my searches I found Haxe and I’m excited about this technology.
The first thing make me happy was that I can use design patterns, micro-architectures, OOP in general so all my experience gains in Flash projects could be useful also with Haxe.
An Haxe project is written with a language similar to Actionscript or Java (so easy for us to port our knowledge in that direction), after that when you compile you have the executable file for any OS like iOS, Android, Windows, Mac, Linux, QNX OS and so on.
It will produce also the “translation” of native files, for example I can write an Haxe application for Android and Haxe NME (a really good framework based on Haxe highly focused on mobile and desktop purpose) the compiler create the .apk file and the java translation from Haxe code, it make the same for Objective C, C# or Javascript and so on.
Another interesting thing is that is so fast to code with it, Haxe allows in few lines of code make cool things instead of native code and it’s so important for a company have fast delivery and targeting for more platform as possible, in this case Haxe is the right technology.
So the answer for the first question is that with Haxe you can easily use the same basecode and export your projects in different technologies targeting to different devices, re-use your knowledge and use real OOP language for client side purpose.

Haxe and is future

During WWX 2012 they show us the future of Haxe, during those days they release Haxe 2.09, by the end of this summer they are planning to release Haxe 3 and there are also some ideas for the 4th released.
The final idea behind Haxe is to create a unique language for all the targets and all the languages that you can work with Haxe.
They would like to work on tools and IDEs that are the most problem today with this great technology.
Main goal of Haxe 3 is optimization and evolution of code created for each targets, default imports that allow you to import all classes in a unique file for all the project, they has just created Haxe foundation and there are many things are boiling in pot.
The future of this platform seems so interesting first of all for the exciting community behind, after that because there haven’t any marketing goals that they have to achieve and this help the technology to grow in the right direction.

What is missing in Haxe now

The main problem today working with Haxe is that it’s not so “comfortable” environment like in Flash or Flex, there are many IDEs but they miss good tools for debugging (in particular in C++), for code coverage and so on.
Another big problem is that NME framework (the most interesting in my opinion) is not so well implemented in each IDEs so if you use FDT or Sublime Text with NME are more or less the same thing.
Finally the integration between design and code, it seems to come back of 5/6 years ago for me, it’s totally miss a good workflow to create stunning Graphic User Interfaces for Haxe, there is an interaction with Flash Libraries (take a look at SWFMill) but it’s not enough when you are in production mode, so for me the first investment on Haxe are on the environment.

Haxe projects in the real world

When I started to take a look at Haxe I tried to found some good case history but I found only games and not stunning applications, but during WWX I found that Prezi and other foreign companies are investing a lots on that technology and they delivered great stuff from web to mobile to tv applications… I’m pretty sure that in the future we will see other great projects made with Haxe because the power of this technology is really high and the future seems so interesting.
Finally I saw a couple of installation based on Haxe and OpenGL of interactive window that make me totally astonished, trust me that WWX was so inspiring for me, it seems to come back to my first conference around Europe like Flash on the Beach!

Conclusion

In my opinion I think that I found the right technology to focus myself in next few months hoping that could become the right solution also for my daily job and my company.
There are a lots of investment to do but we are only at the beginning, I’m sure that with the right boost Haxe could become an interesting client side technology for all the market fields.
For any further questions feel free to comment this post, it will be a pleasure for me exchange ideas or comments on Haxe!

HaXe, my new toy!

After Adobe MAX 2011 everything should not be the same for me and maybe for a lot of flash platform developers around the world, Adobe brings some “directions”  that didn’t find my consent mainly for the way that communicate these news and the impact that had in the market, but we know that Flash Platform is not dead and it will go ahead for many years.
Obviously nothing was the same after that, in fact many developers started to look around for new technologies and frameworks like Backbone.js, Sencha Touch, Ext JS and so on.
Personally I started to checked in last few months many Javascript frameworks because my aim was find something that could replace Flash Platform in the future and I have to spend time in next years to consolidate it and go ahead with Flash Platform too.
Last week a big friend of mine gave me this link: http://www.haxenme.org/ and when I started to read what you can do and how you can do it, I immediately started to go in deep with HaXe in my spare time and trust me that I had a lot of fun!

First of all what is HaXe?
HaXe is an open source multiplatform programming language, it allows to write once and deploy everywhere (in the right meaning of therm “everywhere”).
In fact with HaXe we can write in a programming language similar to Actionscript 3 (strictly typed, OOP, …) but more powerful (it has enum, generics, dynamic type, …), with HaXe we can target our projects for Flash, C++, Neko, HTML5, Node.JS, PHP, iOS, Android… if we work with multiplatform APIs we can write once and deploy our project for multiple targets.
So for many developers that come from Javascript, Actionscript, Java and so on, will be so easy to start deal with HaXe.
Another interesting thing of HaXe is that we can work with the library present in the SWF files and integrate movieclip in our project, we can create also SWF file without Flash Professional with SWFMill that is used for the generation of asset libraries containing images (PNG and JPEG), fonts (TTF) or other SWF movies.
That’s so interesting because it means that designers that usually prepare assets for developers don’t need to change own daily workflow!
If you need to extend your target platform we can add new features with external libraries, it’s so important because we can really cover everything with this feature; we can find a lot of ready to use libraries directly on the lib HaXe website.
With HaXe you can communicate between different languages like JS and Flash in both direction, you can easily find many frameworks and library porting in HaXe, for example javascript like JQuery, Sencha Touch, Node.JS and so on.

What about the IDE to work with HaXe (so important for a developer!)!?
On Mac you can use TextMate or FDT on Win FDT or FlashDevelop this one seems the best one but I didn’t try it. For more specs I suggest to take a look at HaXe site section, maybe you can find your favorite IDE in the list.

Finally I made an easy sample to understand better the powerful of HaXe NME, this sample loads an external XML file and an external SWF library with a movieclip inside exported for Actionscript, so I added a drag&drop feature to the list. Then I tried to compile it for iOS, Mac OS X Lion, C++ and SWF with the same basecode and everything work so well and smooth!


You can download source files here, to compile it take a look at HaXeNME section and you can find everything you need to try this sample and start to play with HaXeNME!

If you want to deal with HaXe, I suggest two books, the first one is really a good start to work with this fantastic language:
HaXe 2 beginner’s guide
Professional HaXe and Neko

Last but not least, next April in Paris there will be World Wide HaXe conference, I’ll be there to learn more about the future of this amazing platform if you are planning to be there it will be a pleasure for me catch up for a beer!

I hope soon to publish more experiments and informations about HaXe because it is a thrilling programming language!!!
So stay tuned!

InDesign and Flash: PageFlip controller

One of our last project was to create an easy but integrated workflow from InDesign to web.
In particular they request us to create a PageFlip that will be published automatically online every change they made in the offline version without spending a lot of time on this activity.
Like you can see for a Flash Platform developer nothing more obvious that a project like this, so you can take a PageFlip online, you export all pages in swf or jpg files and you popolate the XML behind the PageFlip… yes but we don’t bring this direction.
First of all we suggest to our client to add interaction elements directly in InDesign because from CS5 version (if I remember well) it adds the animator engine of Flash, so it is quite easy make animations directly in InDesign for a graphic designer that is more comfortable with this software instead of Flash Professional.
After that we study the InDesign exporting settings and we find that you can have your PageFlip exporting InDesign document directly in unique SWF file; the only problem is that you haven’t any control panel to add interaction in your PageFlip, for example if my catalogue is composed by 300 pages and I have to see the 250, from the beginning I have to click 249 times on the right page to see my page.
Another interesting thing that we see during this development is that there are many PageFlip on the web but it’s not easy for a graphic designer, more focused on the paper, to customize them because you have to know how Flash works and in detail how the PageFlip, that you chosen, works too.
Also the PageFlip made by InDesign has great performance instead of any other PageFlip tested with many pages in particular if pages are vector based.
Finally we decide to decompile the InDesign PageFlip to analyze if we will able to create a control panel for this SWF file and… WOW… we really bring an interesting direction!


In fact, in the document class of the SWF file called IDSWFFile, you can find many methods that could help you to create, for example, a navigation panel to jump from a page to another one or to create an index to navigate trough chapters.
The main thing that you have to remember is that InDesign PageFlip works putting each page in a frame so if you have 20 pages you’ll have 20 frames inside the SWF file generated.

Below you can find some useful methods that could help you to develop your personal control panel:

  • getFrameCount() return the number of frames (so the number of pages inside the SWF file)
  • getCurrentFrame() return the actual frame (so the page that user is reading)
  • getThumbnailForFrame(frame:int, width=32, height=32) return a bitmapdata of a frame in the size that you prefer, the default values are 32×32 px
  • goToFirstFrame() goes to the first page of the PageFlip
  • goToLastFrame() goes to the last page of the PageFlip
  • goToPreviousFrame() goes to the previous page of the PageFlip
  • goToNextFrame() goes to the next page of the PageFlip
  • goToFrame(frame:int) goes to a particular page
  • stopAllAnimations()
  • stopAllSounds()
  • stopAllVideos() 

There are also other public methods but for me those are the most interesting to create a PageFlip controller.
To work with those methods you have to cast the content of Loader like a generic Object and then you can call all those methods like you can see here:

// here we create the generic object to call PageFlip methods
private var _pf:Object; 
// we load our file generated by InDesign
_loader = new Loader();
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, setPosition);
_loader.load(new URLRequest("pageflip.swf"));
//when PageFlip is loaded I add on the DisplayList
private function setPosition(e:Event):void{
_contPF = new Sprite();
_contPF.addChild(_loader.content);
addChild(_contPF);
_pf = _loader.content; 
}

// below I make functions to navigate the PageFlip when user click a button
private function prevPage(e:MouseEvent):void{
 _pf.goToPreviousFrame();
 }
 private function nextPage(e:MouseEvent):void{
 _pf.goToNextFrame();
}
 private function lastPage(e:MouseEvent):void{
_pf.goToLastFrame();
}
private function firstPage(e:MouseEvent):void{
_pf.goToFirstFrame();
}

If you’d like to create a more automatic workflow that allow your user to focus only on the content of PageFlip without waste his time with exporting issues.
In our case we use InDesign Server to solve this problem and create some scripts that allow user to create thumbnails and zoom pages without spend a minute on Photoshop or InDesign but easily upload own InDesign file on a server and via scripts we make everything user needs.
But I know that not everybody could have InDesign server in house, so another solution that I’d like to suggest could be create an InDesign panel with Flex that make the dirty job for the user, preparing all images for thumbs and exporting the PageFlip with right settings.

I know very well that it’s not rocket science for a Flash developer but I think that the workflow behind could be interesting and could be helpful in many situations and also I guess that InDesign users could find good stuff in this post.
Finally we have to remember that technology has to help people in their daily work accelerating process and maybe substitute the human interaction with a computer interaction giving more time to what people should be better like think to new stuff.