Travel on the edge of Adobe RIA, Flash-Flex-AIR and into Interactive Creation Galaxies: news, tutorials, presentations, reflexions, experiments, showcases, best practices.
 



Flash Summer Camp Berlin – Think In 3D Workshop – Follow-up

July 13th, 2009 by maddec

Falsh Camp Berlin Workshop 3d apis

analogdesign’s workshop at the Flash Summer Camp Berlin 2009

Few weeks ago I gave a workshop about Real Time 3d in Flash in Berlin during the Flash Summer Camp Berlin. To start with, I would like to thank the organisers flex-lab.de, Bettina and Mathias you did a great job the venue was amazing and the organisation worked like a Swiss watch ;)
I would like to thank also everybody who attended this workshop, especially because it was on Sunday.
Thank you for your positive feedback, I really enjoyed talking with you about Flash 3D. It was also nice to see that they were experimented 3D people in the audience. The audience was varied which brought me to build a workshop not focused very much on code but more on concepts. I know that could have been frustrating for some people and I will try to address this by posts targeted on code in upcoming weeks.

Workshop Think in 3D: follow-up

To start with I would like to tell people, because somebody asked, .ch is for Switzerland (Confoederatio Helvetica), I think I should switch for a .com now ;) Happy to see that Duanne Nickull knews about it ;) Cheers from Switzerland.

You will find below the first part of the workshop’s follow-up, it gives you further insight by theme about subjects discussed during my Workshop at the Flash Summer Camp Berlin, checkout also the pdf of the full workshop below, it includes plenty of links which were not presented in Berlin.
Workshop’s PDF here.

Good to know

They are often situations where you need to match 3D to 2D and the reverse, especially if you use 3d as a transition effect or as Wow effect within a 2D interactive design. Please find below a helpful link to achieve this:
Pixel Precision in 3D match 2D and 3D.

During the workshop I told you about using Unwrap and baked textures, here is for reference a simple explanation of it. UVW Unwrap allows you to unfold a 3D object on a flat plane. This technic is often used to add “baked textures” to your 3d objects. Baked textures are textures with lightening and shadows prerendered, leveraging your scene from the computer intensive real time lightening. This technic has been used a lot within the gaming industry and fits perfectly the context of Flash Real Time 3D. For example take a cube, unwrap it. Now you have a flat representation of each face of your cube, then you can export it as an image file and edit it in Photoshop. Once done with your modifications (adding for example shadows and lightening or swapping Flat texture with more realistic ones), you apply your modified image in your 3D software, and now you have your model with prerendered lightening and shadows ready to be exported to Collada and to be used within Papervision3D or Away3d or Alternativa3D or …
The previous example was
only given for the sake of explanation about UVW Unwrap. Most of the time 3D software allow you to directly bake the lightening and shadows as you set it up in your 3D environment to your texture (look at: Render to texture).
Checkout this tutorial by Blitz Lab about Unwrap, Baking a texture and Collada exports.
Checkout Texture Baking is your friend.
Checkout this tutorial about AS3exporter and Unwrap.

Collada

As mentioned during the workshop you should use the DAE.as class instead of the Collada.as class (Collada can be used for quick tests). The former is more advanced, loading is well managed and plenty of features are supported.
Regarding Collada you should look also at loading zipped Collada models using fzip or using the new Papervision3D KMZ Parser. KMZ files are Google Sketchup files, a zip file including an XML Collada and its related textures. Both technics can reveal handy if you have plenty of models to load. Check this blog post about loading zipped collada models within Papervision3D.
I was asked about how to deform a Collada model, here is links to resources: Using Collada Bend Modifier which uses as3dmod (see below for further explanations).

MD2

There is a great Getting Started video tutorial serie about steps to create ID Software MD2 models for Flash Real Time APIS, check this out if you are interested in MD2 animated models: Step by Step Tutorial creating MD2 Models by Michael Lively

An Away3D feature allows you to make smooth transition between MD2 keyed transitions. It is extremely useful to people working on 3d games: smooth transition of MD2 Keyed animation.

3D API tools

AS3geom exporter: a 3ds Maxscript which allows you to export your 3ds Max models as .as class files (for Paperversion3D, Away3D and Sandy3D). Can be useful if you need to embed a model, but should be used with care if you need to embed a lot of various 3D models. Loading of external Collada files should be preferred, (or you could export multiple models then embed them within a swf or numerous swfs and then load it using modules)

Flash 3D Modifier API: Any regular 3D Software has its own Modifiers Library. To be short, it provides you a way to modify various aspects of your 3d object or/and add further edit options. It is usually based on the Decorator Design pattern, hence it is non-destructive. Now Flash 3D APIS has its own: as3dmod.

Spring Camera: a camera with natural movement useful, for example, for FPS or games: Spring Camera by Agit8

Jiglib 3D Real Time Physics Engine ported from c++, is an engine which adds physic qualities to your scene, the same as Havok works for 3ds Max.
There is also WOW Physic engine based on APE, but recently Jiglibs brought a lot of excitement within the Flash 3D community. The question is: has Flash Player power enough to manage Real Time 3D rendering AND Real Time Physic simulation?
Here is a game demo using this engine: 3D Ball Adventure.

If you are interested doing Augmented Reality within Flash checkout the following: FLAR Toolkit and Lee brimelow Getting Started tutorial. I have started a blog post serie about Augmented Reality following a conference I did some time ago, check it out if you are interested in this.

Flash 3D API Editors

There is currently a “trend” starting for Flash 3D APIS to propose users “live editors/builders” to allows them quickly setup their 3d scene. This is a good opportunity also for non 3d people to getting started.

This is a promising initiative by Juxt Interactive to be used with Papervision3D: VizualPV3D by Gary Stasiuk, the task is huge and a 3D software is something very hard to build especially regarding user interface, I wish Gary a lot of success in his work!

John Grden is also working on a PV3D CS4 integration which is not available yet.

Alternativa3D Team is currently working on this kind of tool for their registered clients.

End of part 0

This is it, for the first part of this follow-up to my Flash Summer Camp Berlin workshop. I would like to thank Carlos Ulloa (Papervision3D), Rob Bateman (Away3d) and Alex Karpovich (Alternativa3D) for having so kindly answered to my short “Interview” which was amazingly helpful to build this workshop and tell people about the latest news within Flash Real Time 3D APIs.

 

 

 

Category: 3d, Actionscript, Alternativa3D, Away3D, Papervision3d, Presentations, to_all, to_designers, to_developers | 2 Comments »

analogdesign Giving a Workshop on Real Time 3d at Flash Summer Camp Berlin

June 8th, 2009 by maddec

Falsh Camp Berlin Workshop 3d apis

analogdesign’s workshop at the Flash Summer Camp Berlin 2009

Next week-end I am giving a workshop in english on Real Time 3d in Flash in Berlin during the Flash Summer Camp Berlin. I am very excited about it and I am looking forward to meeting a lot of interesting people and following exciting presentations. It is an event targeting developers and designers, which is already full booked.

The Flash Summer Camp Berlin is organised by flex-lab.de and Adobe, it is part of the Official Adobe Flash Platform Tour 2009, which promotes Flash Builder 4 and Flash Catalyst.

With recent publishing of official Beta of Flash Builder 4 and Flash Catalyst, it is an interesting time to discover from Adobe’s people the latest improvements and strategic choices. Duanne Nickull, Adobe Senior Technical Evangelist, will present two Adobe Official Sessions at Flash Summer Camp Berlin.
I will be particularily interested to ask how will Flash Platform fits in Adobe Suite Scheme… Would they be a Flash Platform suite? Would it be part of other suites? Would it be part of CS4 Master Collection?
I am also looking forward to attending to Andre Michelle’s presentation and several others. Meet you there…

Workshop’s teaser:Think in 3D: opening a new world of creative interactions

Flash and 3D has always been something that innovative people tried to gather. Unfortunately it has been complex to achieve because of past performances.

From fake 23d with 2d objects, to pre-rendered Vector 3d animations, from pre-rendered 3d videos to Real Time 3d, from Real Time 3d to 3d physic, fps games and Augmented Reality. 3d and Flash has been coming a long way. Real Time 3D APIs are around the corner for some time now and it is quite impressive what people behind these have achieved and how far it goes.

This workshop targets a wide range of people from Designers to Developers. The objective is to introduce people to the 3d world. Its well established concepts will be presented to help people have a better idea of the big picture. Then it will be used as a starting point to explore Flash Real Time 3d. This workshop will go through following themes:

Flash and 3d short history

3d world concepts

Presentation of the most popular 3d APIS including current state and future expectations

Comparison of these APIS

How Flash CS4 and Flash Player 10 intervene in this game

Definition and usage of the various source formats handled by these APIS

Presentation of the tools gravitating around these APIS

Getting started examples and hands’ on code presentation

Conceptual introduction to advanced features

Piece of advice and References

Meet you there…

Category: 3d, Actionscript, Announcements, Events, Flex, Presentations, to_all, to_designers, to_developers | 1 Comment »

AR you there? Serie on Augmented Reality, Part 0 Introduction

June 2nd, 2009 by maddec

Adobe Hair Head Application update

Introduction

The 21th April 2009 in Geneva, I made a presentation focused on Augmented Reality (AR). You will find at the bottom its teaser. As promised to people who attended this presentation, I will publish it as a serie of blog posts including a fair amount of video links and references and several enhancements and details.

What is augmented reality?

“An AR system supplements the real world with virtual (computer-generated) objects that appear to coexist in the same space as the real world” Recent Advances in Augmented Reality, 2001, Azuma, Baillot, Behringer, Feiner, Julier, MacIntyre

“Augmented reality (AR) is a field of computer research which deals with the combination of real-world and computer-generated data (virtual reality), where computer graphics objects are blended into real footage in real time.”
Wikipedia

Disclaimer

I am not a specialist of AR and what I present is from a personal exploration standpoint, if you are a professional of AR or have extensive experience in it or have a business build around it please feel free to comment on this serie or provide extra links to papers.

Karma AR Product

Objectives and future

The objective behind this presentation was to show that there is much more behind AR than just “buzz effect” and they are already viable commercial products based on AR concepts.
Personally speaking I feel it is the next upcoming media revolution. I am convinced that AR devices will be everywhere as it happened with mobile phone (or is it mobile phone used as AR devices which will prevent true AR devices to be success full?), even if people might be socially more reluctant to accept it. Of course this is linked to two crucial points: how efficient would devices be to perform live tracking and how affordable would they be.

As far as I can see the upcoming device by Vuzix might help having more people buy AR based devices. Sony has also one in preparation even if Tom Hanks is not that much keen on it: here. I am looking forward to seeing appear an hybrid device allowing full non transparent video display and semi transparent display for AR.

I feel that the video games industry might help also spreading AR concepts. I will not be surprised that the next generation of portable system by Nintendo would use AR (or maybe is it too early?).
(Nintendo GAR, Game bAR or GAR Boy or AR WII ;) or WII AR (the champion)
Maybe it is the revenge of Gunpei Yokoi after the mistake of the Virtual Boy …)

All in all AR opens a complete new field to explore and to start new concepts and products. It is an exciting time because true commercial solution starts to emerge, time to be creative with these wonderful new worlds opening ….

Stay tune on analogdesign’s blog for the next part of this serie… Chronology, AR in the air at MAX2008, Presentation starts.
Find below the teaser of the conference AR you there?

Karma AR Product

Presentation’s Teaser

“The 21th April 2009 in Geneva, I am giving a presentation focused on Augmented Reality. It has been a long time that scientists make experiments on this matter, but it is recent that big brands use it to create new ways to communicate about their brand or new products. AR in some of its current use is sometimes just seen as a new way to create buzz and waouw effect for a given brand, but they are much more behind Augmented Reality. AR opens a wide new area to explore new ways of communication, new services and new products. Today it is much easier to build projects based on Augmented Reality and the recent Flash platform port of the AR toolkit will certainly play an important role in increasing the amount of AR products and allow projects based on AR to reach a wider audience. This presentation will include an introduction on Augmented Reality, present a wide range of existing examples and propose hands on Flash Augmented Reality demos.
So be there to meet AR.”

Category: Augmented Reality, Experiments, Presentations, to_all | 1 Comment »

Rebranding of Flex builder, Flash Builder the hidden story, Part 0 A Boy and His Flash

June 2nd, 2009 by maddec

Flex builder new name

Introduction

Lately Macromedia, no no no, Adobe announced the rebranding of Flex builder as Flash Builder. I’ve read plenty of posts and interesting comments on this matter. I will not start here with giving my opinion directly on this matter, but start with a trip with a time machine to try to better understand what brought the current situation.
Vintage Flash User Group

Disclaimer

This post is supposed to be slightly humorous. What is expressed is personal and I hope this will not offense anybody ;)

Denno Coil Anime AR Fishing

What Flash do

As somebody who touched for the first time a Flash product with the version 2 in 1998. I feel that today’s confusion inherits from Flash’s evolution. Through time and various iteration our tool, our technology has evolved a lot from an animation tool to an ubiquitous way to produce a wide range of products from simple things to extremely complex one, but in a context where the simple one has a mission as important as the complex one, moreover each addressing a wide range of requirements and last but not least ubiquitous.

Denno Coil Anime AR Fishing

theflashblob

I feel that Flash along its history has been like a blob whose flexible flesh were pull to diverse directions along what users made of it, trends, demands and future expectations. Through time your blob character has lost a (8)bit its well defined bouncy borders, but it is still there and as flexible as he used to be. I’m not sure that Macromedia were that much clear about what it would become of Flash when they bought Futuresplash back in 1996 (if you have internal info about it please let me know).
It started with something which addressed an issue: provide lightweight/vectorial animations for the web. A well thought tool which was very different from what existed before. But a tool which produce content which is difficult to identify by the end user as being “made by Flash” because it is available as would any image within an html page.

This technology offered an open field for creativity and MM was looking with awareness what was happening with this technology. This attracted people from a very wide range of professionals, gathering people from the developer side and from the designer side, and even giving birth to an hybrid class of people devsigners.
(by the way do not you feel like the Boy in “A Boy and His Blob” http://en.wikipedia.org/wiki/A_Boy_and_His_Blob, feeding the blob with actionscript licorice jelly beans to make it transform into amazing “shapes” ;) )

Amazingly fun but can you be serious?

Ok so now you have this wonderful technology which produce funky animated visuals (skip it) and interactive pieces, it works great still it is not very well recognized for what it is and what it could be…

1: Target audience has difficulties to identify it, well it is not much a problem because the important : point is that they enjoy it and that they will demand for this kind of content. (see what is happening with Flashlite which is rarely advertised in Mobile phones leaflets, it is the same reason.) It has the advantage that you are maybe a bit more free with what you do with the branding.

2: You have people convinced by the technology, but you’d like to attract more people and people who can also show that your technology is “serious”. I mean by that prove that your technology is a serious challenger to existing others in the field of Interactive Applications.
You have a very cre-active and devoted community (respectable in size), but you need a bigger workforce to promote your technology. They are out there a huge amount of developers, but currently they work with other technologies, you really need to appeal them to widen the spread of your technology and widen its possible applications…

Denno Coil Anime AR Fishing

Let’s appeal the other side

The Apparition of Flex resulted from this will of Macromedia to make Flash more appealing to “historical/true” developers/Architect/Business Stategist/….

1: effort were put on improving Actionscript to be respectful of programming standards (as1->as2 -> as3).

2: changed the paradygm of the timeline to meet screen based paradygm

3: promote use of MVC (mxml= the view building language, actionscript= the controller and management of data)

4: improve management of external data

5: provide a set of tools to allow this kind of developers to find ready to use well know components

6: use a well known developer platform : Eclipse with features like syntax completion, break points, profiler, etc which makes their work more efficient and comfortable.

(7: target open source and offer the opportunity to people to work with the technology for free)

A compflexe case

Then you have a new tool which use the same technology but which is free of the burden of “time incremental evolution”. (not like Flash IDE) (I jump here, on purpose, over the intermediary phase of Flex 1.0 +1.5 which I feel were to test the market)

What would you do, you need to attract these people, now you have a way to speak their language but how would you call it? Flash something? No way! Developers, IT Stategist,… have being forged an image about the product which is not very positive regarding their field and does not fit what you want to communicate. Aka the “skip animated intro complex (of the death)”. So you create a new brand, which will identify your new approach and communicate it to the right people. FLEX! (Flexible, were other challenger are not so much flexible)

Strategically speaking you need to make this new brand appealing to decision makers, to make them trust it, then you ensure to have blue print companies starting partnerships to develop impressive RIA with this tool (like ebay, IBM), which will help promote the tool within other big companies and make them start to trust it.

To finish with this part, check this historical document, the press release of Flex 2.0 http://www.adobe.com/macromedia/proom/pr/2005/announcing_flex2.html, interesting to read it in today’s context.

END OF PART 1, NEXT PART the rebranding, preparation of the future.

Category: Announcements, Flex, Misc, Personal Opinion, RIA, to_all | No Comments »

Adobe Hair Head Application update

June 2nd, 2009 by maddec

Adobe Hair Head Application update

Adobe HAIR Update

A few month ago, I have “Launched Adobe Hair”. I have not been having much time to blog about it, I would like to explain it and thanks people who blogged about it. Check out the interview Michael Chaize did at the Adobe Max Press room, below:

So what?

I had got this idea a long time ago. The initial purpose was to make an Haircut including analogdesign ’s logo with a few other graphic elements. Then to be photographed from the back and design a Greetings Card for analogdesign’s clients. Unfortunately the end of year is always very busy and I never had time enough to release it.

I thought it was a good idea to make it for Adobe Max. It was also a way to “celebrate” my 10 years of Flash productions (started with Flash 2) and using the Adobe logo was also a tribute to my years with Adobe Softwares (Started with Photoshop 2.0 and Illustrator 3.0). In addition I decided to make the whole looks a bit 3d using perspective lines extending the logo because I have been keen on 3d depth within Flash productions for years now.

Thanks

All in all I had a very positive feedback about Adobe HAIR at Adobe Max. It helped me to meet people or to let people find me back. Often in those crowded environment it is hard to find people back and I have observed that some has chosen flashy shirts to be easily identifiable. For me it played the same purpose and was very efficient even at the Adobe official party.

Now it is time to thank Michael Chaize who took time in the Adobe MAX Press room to take footage of Adobe HAIR and made it public.
Guess who hold the camera?
Thibault Imbert ;) By the way big up for his work on AlivePDF which I used a lot recently and which is just great, more on that later…

I was also honored that Ben Forta blogged about Adobe Hair Head Application. Thank you ;)

I know that it isn’t something that much original and nothing to be proud of ;) and I am not, it was just a matter to thanks people and say that I had fun preparing this (one hour and an half to the Hairdresser) and meeting People at Max Europe 2008. So stay tuned on analogdesign’s blog to receive Adobe Hair updates…
By the way if you took pictures of Adobe HAIR or blogged about it please let me know.
Last but not least I discovered that Adobe Hair Studio exists ;)

By the way do not forget to register to the Vintage Flash User Group (vfug), I am managing on Linkedin:

Vintage Flash User Group

Category: Events, to_all | No Comments »

Live from Max Europe 2008 Serie: First Sessions (d1)

December 4th, 2008 by maddec

Live from Adobe Max

Mario Session: Introduction

Mario Klingemann/Quasimondo made a session on bitmap/pixels manipulations. It was announced as a session on using Bitmap manipulation and comparing Flash Player 9 and Flash Player 10 with Pixel Bender ways to do this. But finally it reveals to be far more interesting and inspiring, it was about: QR codes, Augmented Reality and 3D. I won’t describe everything in details today, but will do that later on.

Mario Session part 2: Augmented Reality

Now that we know how to extract QR codes we can use the same kind of technic to track simpler graphical elements, isolate the one we are interested in and use the perspective algorythm to find an estimation from the pespective analysis of where the virtual camera should be and finally use this to build an Augmented Reality view mixing the webcam live video with computer 3d Object (for ex.).
In short, the objective is to track a square on a piece of paper and having a virtual 3d object reacting accordingly to the real movement of the square printed on the real piece of paper. By the way it is a classic in Augmented Reality demos. Currently Mario Klingemann demo is only tracking the shape as a vector element. It is not yet working with Papervision3D or Away3D.

Denno Coil Anime AR Fishing

Denno Coil Anime AR Fishing

Mario Session part 3: Images as encryption key

Mario demonstrated in this Max Europe session how to use an image as an encryption key, if the image is not the correct the data are not correctly decoded (he went a bit quickly on this).

Denno Coil Anime AR Fishing

Category: Augmented Reality, Bitmap, Uncategorized, to_all, to_designers, to_developers | No Comments »

Live from Max Europe 2008 Serie: Arrived at MAX First Images (d-1)

November 30th, 2008 by maddec

Live from Adobe Max

Arrived at MAX First Images (d-1)

Finally I’ve arrived to MAX Europe. 4 hours of train, 4o minutes of Vintage Tram and then MAX Venue.
Met the snow on the mountain during the trip. ;)

My first impression of the venue is great and I’m looking forward to exploring the venue. Please find below first images of the venue and some of my trip.

I went to the to the Nokia Lab I had a really good time there people were amazing and great ideas came up, very inspiring ideas for mobile applications. Thank you Nokia for this session! More t
o come tomorrow so stay tuned.

Category: Events, Flex, General, to_all, to_designers, to_developers | No Comments »

Live from Max Europe 2008 Serie: Preparing to leave (d-2)

November 29th, 2008 by maddec

Live from Adobe Max

Live from Max Europe 2008 Serie: Preparing to leave (d-2)

I will start in following day a serie Live from Max Europe. I am moving there tomorrow. I am looking forward to meeting a lot of people sharing ideas and attending amazing conferences.
So stay tuned on analogdesign’s blog.

I did a special thing to celebrate my 10 years of Adobe/Macromedia Flash Commercial Productions. This will be revealed tomorrow along first images of the venue.

All in all the free time doing networking will be great also ;)

I have followed closely news from Max USA, I hope that MAX Europe will be even better ;)

Find below the conferences I have booked: I am especially looking forward to meeting in real people behind Papervision3D and Away3d. The session on advanced Away3d will be amazing. There is also Mario Klingemann’s session on pixel manipulation, I wonder which inspiring gems he will reveal using Pixel Bender.

There’s an Nokia Open Lab on Sunday Night, it is free but there is only a limited available places!

Monday, December 1, 2008
09:30am – 11:00am MAX 2008 Opening General Session Auditorium
11:30am – 12:30pm Here Be Pixels Yellow 2
02:00pm – 03:30pm Twenty Tips and Tricks for Building Top-Performing Mobile Applications Orange 1
04:30pm – 05:30pm Advanced Papervision3D Blue 1
05:30pm – 09:30pm Welcome Reception in Community Pavilion Level 1

Tuesday, December 2, 2008
09:00am – 10:00am Adobe@Adobe: IT Innovation — It’s Not an Oxymoron Red 2
10:30am – 12:00pm General Session Auditorium
01:30pm – 02:30pm Anatomy of a Seriously Sophisticated Adobe AIR Application Blue 2
02:45pm – 03:45pm Architecture 4.0 Red 2
04:00pm – 05:00pm Wireframing Experiences and Applications Red 2
05:30pm – 07:00pm Sneak Peeks Auditorium, Level 2
08:00pm – 11:30pm Customer Appreciation Event Special Offsite Location

Wednesday, December 3, 2008
09:00am – 10:00am Flash Player Internals Yellow 3
10:15am – 11:15am Flash Lite 3: Learn How to Package and Distribute Mobile Content Red 1
11:30am – 12:30pm Finding Away3D Yellow 2
01:30pm – 02:30pm Building High-Performance Applications for Adobe AIR Blue 1
03:30pm – 05:00pm Collaborative Applications with Flex and BlazeDS/LiveCycle Data Services Green 1

Meet you in MAX Europe…

Category: Announcements, Events, Flex, General, to_all, to_designers, to_developers | No Comments »

Adobe AIR tips serie: browseForSave set default file extension and validate/modify.

November 17th, 2008 by maddec

AIR tips serie

In this serie I propose some quick tips for Adobe AIR products developers, which came out during my regular practice of this technology. Today topic is:

Conforming extension for a browseForSave.

This short tip allows you to ensure that the file which will be saved following a browseForSave match legal extension you have defined beforehand and if not it will apply a default extension when using the browse for save functionality. Currently File.extension is a read only property and you cannot change it directly, so I decided to manipulate the path in order to allow it. I think a setExtension and allowedExtensions property might be useful in such a situation.


import flash.filesystem.File;
import flash.filesystem.FileStream;
import flash.events.Event;

private var docsDir:File;
private const MY_DEFAULT_EXTENSION:String = "abc";
private const VALID_EXTENSIONS_LIST:Array = ["abc"];

public function mySave():void
{
	docsDir = File.desktopDirectory;
	docsDir.browseForSave("Save As");
	docsDir.addEventListener(Event.SELECT, mySaveHandler);
}
private function mySaveHandler(event:Event):void
{
	docsDir.removeEventListener(Event.SELECT, mySaveHandler);
	//Split the returned File native path to retrieve file name
	var tmpArr:Array = File(event.target).nativePath.split(File.separator);
	var fileName:String = tmpArr.pop();//remove last array item and return its content
	//Check if the extension given by user is valid, if not the default on is put.
	//(for example if user put himself/herself an invalid file extension it is removed in favour of the default one)
	var conformedFileDef:String = conformExtension(fileName);//comment: updated 17.11.2008 removed the typo
	tmpArr.push(conformedFileDef);
	//Create a new file object giving as input our new path with conformed file extension
	var conformedFile:File = new File("file:///" + tmpArr.join(File.separator));
	//Make save
	var stream:FileStream = new FileStream();
	stream.open(conformedFile, FileMode.WRITE);
	stream.writeUTFBytes("demo demo demo demo demo demo demo demo demo");
	stream.close();
}
private function conformExtension(fileDef:String):String
{
	var fileExtension:String = fileDef.split(".")[1];
	for each(var it:String in VALID_EXTENSIONS_LIST){
		if( fileExtension == it)
			return fileDef;

	}
	return fileDef.split(".")[0] + "." + MY_DEFAULT_EXTENSION;
}

Feel free to add any comment!

Category: Actionscript, Adobe Air, Useful, to_developers | 3 Comments »

Homemade Custom Wii Sensor bar schema howto

September 22nd, 2008 by maddec


A while ago during my first experiments with WiiFlash, I have built a Home Made Wii sensor bar, I have promised to provide details about it.
Thank you to Fabien who helped me build this akward piece of Object Design ;)
It is equivalent to the true Wii Sensor Bar with 10 leds, it has been designed to limit energy consumption as much as possible. It uses 2 AAA batteries.

Find below more information:
Home made Wii Sensor Bar

Category: Augmented Reality, Experiments, Gaming, Wii | No Comments »

« Previous Entries