Archive for the ‘Flash’ tag
OAuth authorization with Flash and Flex apps
Below you will find links to my two video tutorials about OAuth authorization with Flash and Flex apps:
1) Introduction to OAuth for secure user and application authorization
2) OAuth in Adobe AIR applications built with Flash or Flex
You can also download example code from here.
as3viewnavigator – ViewNavigator for as3/flash projects
I’m currently working on an application for the BlackBerry PlayBook tablet. The API that comes with the PlayBook SDK is based on pure AS3. Of course I could use Flex Hero for the job but I wanted to try out the “native” stuff that it comes with. My impression so far is really positive and the only thing that I’ve found missing so far was the concept of Views and ViewNavigator that comes with Flex Hero for mobile devices.
That is why I took a bit of time today to create library heavily inspired by ViewNavigator from Flex Hero that I could use for my pure as3/flash projects. The library is available for download here. Also checkout the video below for the details on how to use it.
Just for the reference, to tween the view transitions I used Tweener library that is also used internally by PlayBook API.
Below is the snippet of code that implements the example from the video above, you can also download the project source from here.
package { import com.riaspace.as3viewnavigator.ViewNavigator; import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.MouseEvent; import flash.text.TextFormat; import flash.text.TextFormatAlign; import qnx.ui.buttons.LabelButton; import qnx.ui.core.Container; import qnx.ui.core.ContainerAlign; import qnx.ui.core.ContainerFlow; import qnx.ui.core.SizeMode; import qnx.ui.core.Spacer; import qnx.ui.text.Label; [SWF(width="600", height="1024", backgroundColor="#FFFFFF", frameRate="30")] public class Main extends Sprite { private var navigator:ViewNavigator; private var viewNumber:int = 0; public function Main() { initializeUI(); } private function initializeUI():void { stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; // Creating instance of ViewNavigator navigator = new ViewNavigator(this); // Pushing first view to the navigator navigator.pushView(createView()); } private function createView():Container { var view:Container = new Container; view.flow = ContainerFlow.VERTICAL; view.align = ContainerAlign.MID; // Incrementing view number viewNumber++; // 20% spacer from the top view.addChild(new Spacer(20)); // Adding label with view number var numLabel:Label = new Label; numLabel.text = viewNumber.toString(); var format:TextFormat = new TextFormat; format.size = 70; format.bold = true; format.align = TextFormatAlign.CENTER; numLabel.format = format; numLabel.size = 100; numLabel.sizeMode = SizeMode.BOTH; view.addChild(numLabel); // 15% spacer between label above and buttons view.addChild(new Spacer(15)); // Adding "push view" button var btn:LabelButton = new LabelButton; btn.label = "push view"; btn.addEventListener(MouseEvent.CLICK, function(event:MouseEvent):void { navigator.pushView(createView()); }); view.addChild(btn); // Adding "pop view" button btn = new LabelButton; btn.label = "pop view"; btn.addEventListener(MouseEvent.CLICK, function(event:MouseEvent):void { navigator.popView(); }); view.addChild(btn); // Adding "pop all" button btn = new LabelButton; btn.label = "pop all"; btn.addEventListener(MouseEvent.CLICK, function(event:MouseEvent):void { navigator.popAll(); }); view.addChild(btn); // Adding "pop to first button" button btn = new LabelButton; btn.label = "pop to first"; btn.addEventListener(MouseEvent.CLICK, function(event:MouseEvent):void { navigator.popToFirstView(); }); view.addChild(btn); // Adding "replace" button btn = new LabelButton; btn.label = "replace"; btn.addEventListener(MouseEvent.CLICK, function(event:MouseEvent):void { navigator.replaceView(createView()); }); view.addChild(btn); return view; } } }
Flash StageVideo API performance overview
As you may know, today Adobe released a beta version of upcoming Flash Player 10.2. This release brings few really cool features especially in the field of Flash video. In the recording below I demonstrate really incredible performance gains that you can have with new StageVideo API, which gives you full GPU acceleration of video content.
Amethyst Visual Studio IDE for the Flash Platform – Released!
This is really great news for all the Visual Studio fans that want to do Flash/Flex development with their favorite IDE. Amethyst IDE brings the really incredible feature set of Visual Studio to the Flash/Flex world. I really love how it handles component AS3 in a separate file. I wish something similar was available out of the box with Flash Builder! Really, really incredible!
Key Features of Amethyst Professional:
- Powerful editor with code coloring (76 options) and code folding
- Customizable code formatting
- IntelliSense with code completion and auto-expanding snippets
- Drag-and-drop Designer for Flex and AIR
- Designer integrates with Property panels, Event panels and Layout toolbar
- Multi-level undo/redo in editor and Designer
- Fast ‘Cylon’ debugger with breakpoints and call stack
- Step into/over/out in Debugger
- Conditional breakpoints and break-on-hitcount
- Expression evaluation in Immediate and Watch windows
- Hover and drill-down debugging in editor and Watch windows
- Debug multiple SWFs concurrently
- Find All References/Go To Definition
- Quick-find ToDo comments and User Tasks
- Auto-generate getter/setter ‘property’ methods
- Sophisticated refactoring with rename, move to package and refactoring previewer
- Source control support (TeamServer etc.)
- Import FLA to edit and debug Flash IDE projects
- Convert existing Flex or Flash Builder projects
All that is available at $249.
Check out this video of the Amethyst IDE in action:
NativeApplicationUpdater – updater for AIR apps packaged with native installers
I just released on Google Code a new project called NativeApplicationUpdater. Basically the name explains its purpose but for those that don’t know, AIR 2.0 brings new capability of packaging applications with native installers. This is necessary when you want to use the new NativeProcess APIs. Unfortunately Update Framework that comes with AIR 2.0 SDK doesn’t bring yet capability of updating this type of applications. That is why I decided to build it myself and publish it as open source library.
Here is a video explaining how it works:
Cooklet.com launched (Open Screen Project funded)
Very recently I was speaking at a press conference of a new culinary service called Cooklet.com. Okay, you may be wondering what my role at that event. So first of all, the Cooklet team is located out of Wroclaw/Poland, but this obviously isn’t the primary reason
What really brought me there is the fact that Cooklet is using a lot of Adobe technology, specifically our Platform technologies. Cooklet.com itself is a standard HTML based website but at the same time it has a desktop version that runs with Adobe AIR. There is also Cooklet Mobile built with Flash Lite and hosted as an application in the Nokia OVI store. Another very important fact is that this project was funded by the Open Screen Project initiative; you can find more details here as well a registration form to apply yourself.
The service itself has some unique and interesting features. What I really like is in-browser drag-and-drop capability that you can use to add new recipes to your cookbook or shopping list. The really cool thing here is that when you drag the recipe to the cooking list you instantly get access to it from your mobile phone. Another really cool thing is that the recipes get automatically translated into different languages. In the future this may give its users access to really tasty recipes from different cuisine.
Additionally the desktop version gives you offline access to your recipes that you may need in your kitchen. Also it has a great user experience and interactions that mimic reading real printed version of a cookbook.
Obviously Cooklet.com has much more interesting features and I encourage you to give it a try.
Check out the Cooklet Lite demo video below. Now I’m just waiting for the Cooklet team to provide an AIR for Mobile version that I can run on my Nexus One phone ;)
My presentation slides from 1st European Augmented Reality Business Conference
Below I have embedded slides from my presentation that I did last Friday in Berlin during the 1st European Augmented Reality Business Conference.
A PDF document with links to Flash based AR examples is here. The working demo application that I coded during my session is here with it’s source code and AR marker to print out.
Multi-touch development with Flash and Flex e-seminar materials
Below you will find links to my e-seminar recording, presentation slides and projects with source code of demo applications:
- Recording on Adobe Connect:
http://my.adobe.acrobat.com/p84912063/ - Presentation on SlideShare:
http://www.slideshare.net/pwalczyszyn/multitouch-with-flash-and-flex - Gesture events demo application source code (Flex/AIR):
http://www.riaspace.net/wp-content/uploads/2010/03/GesturesFlexDemo.zip - Touch events demo application source code (Flash/AIR/Apple Phone):
http://www.riaspace.net/wp-content/uploads/2010/03/TouchFlashDemo.zip
Multitouch development with Flash and Flex (e-seminar this Wednesday)
This Wednesday (17.03.2010, 11:00am CET) I will be doing an online e-seminar about “Multitouch development with Flash and Flex”. You will learn how you can start immediately building multitouch enabled applications, what new APIs are coming with FP10.1 and AIR 2.0, what the differences are, and what is supported on underlying operating systems. Please register here: http://multitouchflex.eventbrite.com
This will be 30-minute session followed by a 15-minute Q&A part, done via Adobe Connect room: http://my.adobe.acrobat.com/multitouchflex/
How-to use Text Layout Framework
Some time ago I was writing about how-to use latest Text Layout Framework but this time Mihai Corlan did excellent job and went down into very details, any one interested in TLF should read this one: http://corlan.org/2009/01/19/how-to-use-text-layout-framework-in-flex-32-or-air-15/



