“Hello Andoid” with AIR and FlashBuilder with Windows on my Motorola Milestone – Part 2 – Preparation AIR

According to the Android version on our mobile phone we need Adobe Air for that Android version.
My Milestone still has Android version 2.1 – Eclaire, and waits for the update to 2.2 – Froyo, which has been announced for Germany till the end of this year. Let’s hope!
You can check the version number on the cell Phone here: Settings -> Phone Info -> Firmware -> Version.
To get the Air SDK for Android is a bit complicated; we need to register for the Adobe prerelease program. You can reach the URL to register on Adobe Labs

After the registration you get to the logging page for the prerelease program. Under download you can find the Android extensions for Flash CS5 and the Android builds we need

I choose Build 06/04/10 and the Runtime for Eclaire which fits my version 2.1, all the newer ones have only Froyo for download.
Also download the Air 2.5 SDK for Window, we need this later for the FlashBuilder environment preparation.

Download or copy Runtime_Device_Eclair_20100603.apk in the /android-sdk-windows /tools folder and install it with ADB on the cell phone.
This should install AIR on the cell phone and register with a SUCCESS. You should see AIR now on the phone: Settings/ Applications/ Manage Applications :

Congratulation, you have installed AIR successfully on your cell phone. Next time wewill prepare the FlashBuilder environment to write our first application!

  • Share/Bookmark

“Hello Andoid” with AIR and FlashBuilder with Windows on my Motorola Milestone – Part 1 – Preparation Android

In this blog post I want to document my experience and learning’s while doing my first Android Air Application. I kept every single Step in great detail for those who don’t have experience in some of the Steps.

Preparing the Android SDK:

  • 1. Download the Android for the appropriate operating system below: http://developer.android.com/sdk/index.html
  • 2. Unzip to a folder C:/Developing/externalLibs/android-sdk-windows
  • 3. Run the SDK Setup.exe to update packages, which offers some additional „Available Packages“. We need the USB Driver package to connect our Handy with USB to our Computer and the Android SDK (Apple does this automatically).
    In the /tools folder we find all important applications to develop Android apps, like adb to install apps on the device/cell phone.
    More information about AVD and ADB

  • 4. Set a Path Variable to avoid calling the Tools in the /tools Folder while using Command Prompt. Go into System Properties -> Environment Variables -> System -> Edit.
    In Path add the path to the Android SDK Tools Folder. My example looks like this:
    …;C:\Developing\externalLibs\android-sdk-windows\tools
  • Connect the cell phone through the USB to the Android SDK:

  • 1. Connect your cell phone trough the USB port to the computer. Now we need to check if the cell phone can be detected. To do this I type the following in the Command Prompt (without directing to the path, if the Path Variable has been set before):
    adb Devices
  • In my case the device is detected and it shows its ID. If not there can be some things wrong, like:

    - The USB driver for the mobile phone is not installed correctly. Download (in my case), directly from Motorola Motorola Milestone: Motorola Mobiltelefon USB-Treiber (für Windows®)

    - Turn on the cell phone debug mode under Settings / Applications / Development:

    These screenshots can be created with the Dalvik debug monitor, to find and start at /tools ddms.bat

    In the next blog post I will describe the preparation for the Air Development with Flash Builder!

    • Share/Bookmark

    A little interface to the web

    Sorry, this entry is only available in Deutsch.

    • Share/Bookmark

    Before Design Pattern and after OOP

    It’s a while since I started to buy books about Design Pattern, but mostly some other interesting book needs to be read first, especially since I organize the Actionscripthero books from Apress and Friends of Ed.

    Lets start with the title slogan and cover a few pre-important knowledge terms:

    Encapsulation: Stay private and use getter and setter.

    Polymorphism: Keep flexible with objects, or the ability of object variables to gather objects from different Classes.

    At this point we need to remember the 2 rules of good software design:

  • Program to an interface, not to a implementation.
  • use Object Composition before inheritance.
  • And here we are implementing this rules with the help of Interfaces and abstract classes:

    Interfaces:

  • They provide methods, which have to been included in the implementing Classes.
  • When using a class with interface implementation, cast to supertyp.
  • All clear? Lets program to an interface
    :

  • 1.Create Interface class – IClass – add methods.
  • 2.Create any class implementing the interface – AnyClass implements IClass.
  • 3.Call each method of the IClass and fill if needed.
  • 4.UsingClass with extended AnyClass instantiates AnyClass with Iclass object type.:

    Looks like this:
    UsingClass extends AnyClass
    private var objVar: IClass = new AnyClass();

  • 5. Now AnyClasses methods from IClass can be called.
  • Abstract Classes: (don’t exist in AS, like they do in Java, but we do some ourself and do as if):

  • Can be instantiated, cause the have methods which haven’t been implemented.
  • Abstract Classes are extended:

    public class AnyClass extends AbstractClass

  • Abstract methods cant be called, they only define the Interface. The abstract Class becomes concrete and can be called when the extending classes implementing methods are used in a derivative class.
  • One or more methods can be implemented with override.
  • The construction is like the Interface with programming to the interface.
  • Composition:

  • CompoClass includes a reference to AnotherClass in its class definition and generates a reference to this AnotherClass.
  • Delegate:

  • In CompoClass references a public function back to the AnotherClass.
  • The performing, using class accesses the AnotherClass by the CompoClass and its methods.
  • Granularity:

  • Working coarse, spilt to small functionalities.
  • Why I used this short form to explain? There are already many books and articles covering this theme. I wanted a quick reference for me to remember the basics while learning more about design pattern.

    • Share/Bookmark

    FFK10

    From April 14-16 Flash Forum Conference- FFK celebrated its 10th anniversary in Cologne. Actionscripthero’s Beatrix and Fernando have been present! We reported in advance in our Online Secret Meeting with the 2 organizer Sascha Wolter and Marc Thiele.

    Workshops took place on April 13 and 17 respectively, Hero Fernando joined the Papervision 3D Workshop with Seb Lee-Delisle.

    Sascha started the Conference 10 years ago and Marc joined a year later. The organisation is a 2 man business, and the familiar atmosphere one can feel all over. Everything is concentrated in the main open place in front of the great Conference room in Cologne Mediacenter.

    This is the place for communication with everyone. Exchange, contact, friendship, discussions and business. Especially in the Powerflasher lounge technical discussions occurred on the highest level.

    In context with our call: Meet the Heroes, we had 8 book give-away’ss for our members from Apress and FriendsOfEd. We will try to have concrete meeting points in the future, like a red sofa travelling with us around the world. We work hard on it!
    Meanwhile a great THANK YOU to Kai, Dominic, Michel, Jörg, Saban, Frank, Simon, Jesse, Joshua, Ralph, Mario, André, Joa, Oliver, Michael, Chris, Cornelia, Carlo, Lena from Weave and all the others!

    Speakers we have not been able to attend, but all the discussions and interviews gave so much input for us. Step by step we will add the videos in the next days and weeks.

    One highlight was the audiotool Party with André Michelle as DJ in the evening.

    Free beer and we have never seen a party with people talking and discussing and connecting that much.

    The End:

    The cloud above Europe:
    But the end was not the end on Friday. Many of the speakers, sponsors or attendees have not been able to get home for a few days. Not back to England, Norway or United States. Marc Thiele invited some to his house, I tried to care with moral support for some. Some started a Odyssey, others waited with patience and enjoyed the additional days in Germany. However, today the nightmare is gone, everyone save at home, and I am sure the the 10th FFK anniversary remains in mind to everyone even more because of the cloud!

    Some private pics from the conference you can find here:http://www.flickr.com/groups/ffk_conference/

    • Share/Bookmark

    FITC – Amsterdam – Day 2

    Day 2:

  • Session 1:
    As a huge fan of Papervision 3D, I had to go to see Carlos Ulloa, and it was a pleasure. I was surprised to see such a pleasant and cautious person on the stage. In detail he explained the procedure, thoughts and ideas, which occurre during the working process, and how he handled and resolved solutions. One could see how much work was involved in every single project.
    Ulloa seemed to me like a designer with all the technical knowledge to realize his ideas. His love to the details impressed me, but that’s something very common among Flash designer.
    The 2 projects:
    1. Energy Lab Papervision 3D:
    What a afford to divide the model in a way that the shader look like they have to. How much work to get the light from inside the bottle to shine the right way around the pieces. A lot of efford to make it seem to be simple and „right“!
    2. Hello Racer – Unity 3d:
    I had a drive with the mini car before this event. Well its Unity3D, everything in Unity 3D looks like cool 3D. But I didn’t realize the perfect physic simulation, or how precise the wheels are constructed to seem to be like „natural“!

  • Session 2:
    “Building maintainable Applications with PureMVC” –with Javier Julio – at the Dylan, which had several fireplaces!
    At my last job I had to use Cairngorm, and I emphasize, had to. For a long time I wanted to start with PureMVC, but never had the time. A good reason to see Javier’s presentation, who explained in an enthusiastic and skillful speech how precisely PureMVC can structure a project and benefit me.
    – Notifications – The communication system, works without EventDispatcher, no Flash dependency, a pure ActionScript system
    – Model and Proxy – encapsulates control and manipulation of data, service interactions happen at this level
    – View and Mediators – encapsulates view component from the rest of the framework, no knowledge of PureMVC whatsoever
    - Controller and Commands – application business logic
    A hint to a Pipe Utility
    And Javiers Link tips with sourcecode

    A huge difference to Cairngorm, my next project will use pureMVC!

  • Session 3:
    I decided to join my paparvision teacher Seb Lee-Delisle’s speech. I am always glad to watch his performance and it could have been called Fun/Play instead of Work/Play!
    His works is coloured and funny – Big and Small in 3D
    His ideas are a bit strange and human, like his Park ticket story
    What I liked most, and that’s maybe because I worked as Multiplayer Programmer, was his Multiplayer version of his Lunar Lander. What a simple and great idea to print out all user movements in a single picture. Just sad that I cant find a pic.
  • Thanks Seb, after pancake dinner we had the interview with you and as soon the video is uploaded I will add the link

    Before leaving Amsterdam I visited the Cinema4D presentation, but that was nothing new, except the fact that Cinema4D can export to collada now.

    Conclusion:
    Amazing for the flash community or cool for the user? Can both be combined? What is an amazing demo, and what makes the money!
    I remember my slogan as a fashion designer: A design is good for the masses when I get toothache watching it. No matter if fashion or flash, its always the same:
    The amazing for the reputation.
    The popular for the pocket.

    Good bye FITC – maybe we see next year again!
    I got a lot of inspiration from the conference!
    Many thanks to all the speakers and to the organization!
    A hug to all my new friends from all over the world!

    • Share/Bookmark

    FITC – Amsterdam

    My first time FITC Amsterdam was a great creative-technical input event with a few Close Encounters of the Special Kind.
    The fact to be there also as a ActionScriptHero made the conference even more to a special event, and it was difficult to decide between speeches and speeches and speeches and interviews.

    Day 1:

  • Arrival in Amsterdam and via hotel I moved directly to Felix Merit, a building typically for Amsterdam = small + lots of stairs + rampant stairs + small doors = everyone is close to everyone! In the bar i found Pablo Parado and Fernando Colaco – what a pleasure to meet this kind and friendly guys for the first time in real life.
    At 3:PM the first interview with a very optimistic Shawn Pucknel.
  • Day 2:

  • Session 1:
    Everything started in the great conference room with Adobe Keynotes, Flash Player 10.1 – Flash on all devices for ever and ever, just not really on the IPhone!
    Annotation: There was a balance between visitors and IPhones on the conference!
    Well, we want and we get hardware acceleration. Unity3D got that right from the beginning!

  • Session 2:
    Klingemann I will see in Cologne, Flash on IPhone will be interesting when performance doesn’t suck any more. There was „Making Meaningful Data Meaningful“, that sounded interesting:
    How to visualize data? With charts and diagrams! But how can I visualize dependencies and connections? How can I make data visual and self explaining, even without legend?
    Wesley Grubs had a few really interesting and new examples. Personally I liked the Esquire example (all examples on the web page).
    To handle the data he uses Processing as scripting language, Flash would be too slow to handle it, and he uses Json Objects.
    Some creative tips: Start with a diagram, design what happens. What do you want tell to the people. Circles are great to show Connections.

  • Session 3:
    Difficult decision! Bartek Drozdz and „From Flash to Unity3D“ or Quick as a Flash“ with Grant Skinner? I choose Skinner, having read not long ago some about his Performance Test Classes.
    His speech was a flow of information, you can find it here.
    Some differences between Flash Player 9, 10 and 10.1 are interesting. For example uint will be much faster, also access to variables, function calls and static member access!
    Framerate: A lower framerate can help to get better performance, regarding that each frame has to handle Code and graphics and media and also garbage collection, which still cant be controlled. Adobe!
    Skinner makes a logical division on optimizing in syntax, architecture and design. Some of his examples which I remember well:
    Syntax
    – Check out TAAS from Joa Ebert
    – Don’t repeat maths
    – Multiply is faster then dividing (should be resolved in 10.1)
    Bitwise wherever possible
    – Point is faster then object
    – Prioritize true and false
    – Call methods directly instead of using references
    – No i.length in loop, declare value in var and use that
    Architecture:
    – Avoid instantiation, nested function calls, deep linkage and number of operations.
    – Callback – are faster then events, bubbling events are even slower.
    – Regarding collections one should choose (LinkedList, ByteArray and Vector or Array, Object and Dictionary) according further usage. Check the Chunker.as class.
    – Algorithm! I would have liked to hear some more then: Look for better ones, ones who fit better, which are faster and use encapsulation .
    Video and Media:
    With right mouse click check Show Redraw Regions if necessary. Reduce render costs while beeing careful using mask and gradient. Use anti-alias for animations, use Bitmaps when possible, cache as Bitmap, put graphics in container and script those. Avoid strong filter, empty pixel, use invisible false instead of alpha 0 or better delete complete.
    The ActionScriptHero interview withGrant Skinner you can see here!

  • Session 4:
    Ralph Hauwert’s Skunkworks, what else!
    He told us about his tests with PixelBender, Flash Raytracer and 3D simulations, and how he made his example in Letitbloom. All his examples are on his Blog!
    The ActionScriptHero interview with Ralph Hauwert you can see here!

  • Session 5:
    Jared Tarbell with „The strangest things I’ve ever seen“ was the most amazing stuff I have seen on the conference. His speech was a deep dive into the worlds intersections, in small and in big size! The simplicity and proximity to the substantial one in our world and the surrounding universe and his speech left a lasting impression.
    After his speech I had the pleasure to be at his interview with ActionScriptHero, and its just sad that the surrounding noise was disturbing a lot. I hope Fernando will make it with some subtitles. Thank you Jared the gentle!

    The evening ended with a Dinner for Heros and Friends somewhere in a restaurant in Amsterdam with a group of people from different countries and continents. I found new friends!

    • Share/Bookmark
  • One model with some geometric elements

    A model with single geometric Elements makes it possible to change this single Elements.

    I cant explain how this works while creating a 3D model, but i have seen the strangest adds while exporting to Collada. Swift 3D for example adds extra nod elements for each geometric element, when exporting from Cimena 3D. In the example i have cleaned the structure manually and in this case deleted the extra elements for each geometrical Element. The pic shows the „unclean“ file with head existing twice inside each other:

    < node id="head1"> and < node id="head">
    also < body> tag is not necessary:

    And this is the clean version for head:

    Again i recommend to become familiar with the Collada xml structure!
    If you dont delete unnecessary elements, also Papervision defines those as DisplaObjects3D, and the fun starts to find out which is the right element to use with setChildMaterialByName:

    Papervision traces alle 5×2 geometric elements and the body element:

    INFO: DisplayObject3D: COLLADA_Scene
    INFO: DisplayObject3D: body
    INFO: DisplayObject3D: head1
    INFO: DisplayObject3D: head
    INFO: DisplayObject3D: hand
    INFO: DisplayObject3D: hand1
    INFO: DisplayObject3D: ub
    INFO: DisplayObject3D: ub1
    INFO: DisplayObject3D: lb1
    INFO: DisplayObject3D: lb
    INFO: DisplayObject3D: shoe
    INFO: DisplayObject3D: shoe1

    After deleting the unneseccary nots 5 geometric elements remain:

    INFO: DisplayObject3D: COLLADA_Scene
    INFO: DisplayObject3D: head
    INFO: DisplayObject3D: hand
    INFO: DisplayObject3D: ub
    INFO: DisplayObject3D: lb
    INFO: DisplayObject3D: shoe

    This way one can work proper, and in the sample

    - without texture and Phong Shader – every element is colored different, so you can see the different geometric elements.
    Button change between 2 different head textures.

    var bitmap:Bitmap = new _imageAsset() as Bitmap;
    bitmapMaterial_cloth = new BitmapMaterial(bitmap.bitmapData, true);
    
    var bitmap_bump:Bitmap = new _imageAsset_bump() as Bitmap;
    bitmapMaterial_bump = new BitmapMaterial(bitmap_bump.bitmapData, true);
    
    private function bumpDae(event : MouseEvent) : void {
             dae.setChildMaterialByName("head", bitmapMaterial_bump);
    }
    
    private function clothDae(event : MouseEvent) : void {
            dae.setChildMaterialByName("head", bitmapMaterial_cloth);
    }

    There is a nice Air Tool to optimise Daes from Mark I. Ross.

    • Share/Bookmark

    Lets dress the woman – setChildMaterialByName

    In this example i want to show how to add material on models manually.
    When creating a 3D modell in any 3D program, one can add bitmap materials to the surfaces, in a Collada.dae this is defined in library_images

    < library_images>

    I prefer to leave this empty and to add my material on my model manually – and this works fine using Dae.as and the method setChildMaterialByName(), which requires 2 parameter.

    dae.setChildMaterialByName("Cylinder", bitmapMaterial_bump);
  • The first parameter is the geometry Elemet ID, which can be checked in the XML of the document under Visual Scene, and it repeats in all other elements like material, geometry, effect, images and all other relevant elements of a Collada. In my Collada the descriptions name is Cylinder. A meaningful name makes further use easier. Lets have a look at my Visual Scenen:
    < library_visual_scenes>
    	< visual_scene id="VisualSceneNode" name="Scene">
    		< node id="Cylinder" name="Cylinder" type="NODE">

    Debugging mode traces the following:

    INFO: DisplayObject3D: COLLADA_Scene
    INFO: DisplayObject3D: Cylinder 

    COLLADA_Scene is the complete Collada model, the Cylinder is the geometry in the model.

  • The second Parameter is the Bitmap Material as BitmapData
    In my example one can change the skin with the buttons.

    • Share/Bookmark
  • Crystalclash

    Today we finaly found the name for our online flash browser game. I want to thank my friend Brian from USA – Carolina for helping us getting the right name.

    Crystalclash.de und Crystalclash.com are ours!

    Actually we are preparing project organisation stuff, but as soon as we have news i gonna post it here.

    • Share/Bookmark
    Get Adobe Flash playerPlugin by wpburn.com wordpress themes