Sven Dens

deserialize me

Aced my ACE: Adobe Certified Expert Flex 3 with AIR

with 2 comments

Just a quick brag post :-)
This morning I passed the ACE Exam “Flex 3 with AIR”.  Feels good to have that one in the bank :-)

To be well prepared for the exam, I read the Flex 3 documentation and the Adobe AIR 1.5 documentation, especially the documents “Developing Adobe AIR 1.5 Applications with ADOBE FLEX 3″ and the “Adobe Flex 3 Developer Guide”, both available free of charge from Adobe.  I also downloaded Attest, an Adobe AIR application that was developed by the lovely people over at PXL Designs which you can download for free, and ran all the practice exams multiple times.  Unfortunately I must say, this effort was virtually worthless for what the exam was concerned.  Not a single question from the practice exams appeared on the real exam, nor did the “toughness” of the real questions reflect those in the practice exams.

To be honest, I must say that I found the exam quite hard.  After all, it’s been more than 3 years since I’ve been developing in Flex, and I would have expected the exam to be rather easy for a trained developer.  However, out of the 50 questions/problems I got, I would have to digg deep and long to find 20 of those that I’ve actually ever used in real-world application development.
So, reading through those PDF’s sure wasn’t a luxury to be able to pass this exam, not for me at least.

I know there are many possible questions out of which you’re presented 50 at the exam, so maybe I just got unlucky in the selection that I was presented with.
Anyway, if you’re looking to become certified too, make sure you’re well-prepared and good luck to you!

Sven

Written by Sven Dens

September 22nd, 2009 at 11:32 am

Posted in Adobe AIR, Flex

VMWare Tools in Sabayon Linux (4.2 – KDE)

with 3 comments

So you’ve just installed a shiny new Sabayon Linux Guest in VMWare, and you can’t get VMWare Tools to install properly?  You’re getting messages like “the directory for rc0.d is not found” or saying that none of the precompiled modules is suitable for your kernel and that they can’t be built from scratch because the kernel headers are missing?  Let’s fix that, and while we’re at it let’s upgrade our packages to the latest available versions too.

I won’t be explaining all the commands used here, you can Google them to fnd out what they do exactly, this is just a quick guide to get you up and running with Sabayon in VMWare in a couple of minutes without any hassle.

First, open a terminal and become root (su).
Then, create 7 new directories under /etc/rc.d. You need rc0.d to rc6.d. So mkdir /etc/rc.d/rc0.d, mkdir /etc/rc.d/rc1.d, … mkdir /etc/rc.d/rc6.d.

Now it’s time to update our system by getting the latest available kernel and packages.
Still as root in the terminal, enter these commands in the following order:
1) equo update all
2) equo upgrade
3) emerge – -sync && layman -S
4) equo conf update
5) equo install – -ask linux-sabayon

Now cd to the directory /usr/portage/sys-kernel/linux-headers and type ls to see a list of what’s in there.
Note the highest available number for your kernel (mine today is 2.6.30-r1).
Now execute the following command to get the linux-headers so you can compile the vmware-modules later on: emerge -va =sys-kernel/linux-headers-2.6.30-r1

Note that you don’t specify sys-kernel/linux-headers/linux-headers-2.6.30-r1 but instead directly refer to the header version you want after sys-kernel!!

Also keep in mind to enter the right version. The 2.6.30-r1 you see here is the one that is on my system. Replace it with the one you have if necessary!

Almost there!
If everything went well, you should now be able to get past the initial dialogs for installing VMWare Tools, and then successfully compile all the needed modules.
Just keep the default answers to all questions, it’s almost too easy ;)

If that install went fine as well, there’s one last thing to do: update all the packages in your system.
Once more, run these 2 commands:
1) equo upgrade
2) equo conf update

Et voilà, your very own bleeding-edge Sabayon VM is there to put a smile on your face :)

Sabayon-linux 4.2 in VMWare Fusion

Sabayon-linux 4.2 in VMWare Fusion

Written by Sven Dens

August 20th, 2009 at 3:19 pm

Posted in Linux, Open Source

SOAP headers in Flex and WS-Security

with 28 comments

UPDATE (06-16-2009): The problem with generating a correct nonce has been fixed!
It turned out to be a problem in the WSSEUsernameToken class in the com.adobe.crypto package in as3corelib.
A VERY big thank you goes to Tom from FlexibleFactory for pointing me to the solution and to Koen Weyn for fixing the bugs!

Dear readers,

I just spent 2 entire days trying to figure out how to consume a SOAP Webservice that requires a SOAP-header and WS-Security in Flex. Hopefully this post will help you out if you’re looking to do the same thing.

Download demo files here.

Let me start off by saying that the Import Web Service (WSDL) wizard in Flex 3 doesn’t work as it should!
The generated classes return invalid XML to the SOAP-request, and adding headers to your request is completely neglected.
But I did get it to work using the classical <mx:Webservice> tag and some hand-coding.

Here’s how to do it:

Read the rest of this entry »

Written by Sven Dens

February 21st, 2008 at 5:00 pm

Posted in Flash, Flex, Java

A new year, a new look and a baby!

without comments

Dear readers,

It’s been ages since I looked at my blog… I know, and I apologize.
Alot of changes have been going on in my life in the past few months.
I got married, had a great honeymoon, bought a house, did tons of interesting & fun stuff at work, and now my first child is about to be born halfway March.

Having said that, I hope you can understand there were other things on my mind lately than writing my blog.
But here we are again in a new year with a fresh look, what better way to start it?

I do hope you’ll be pleased again by what you find if you stop by here from time to time.
There’s tons of things on my mind I’d like to share with you all and I promise to make up for the lost time in this new year.
If you’re reading this, welcome back and thanks for not dropping out on me!

Also I would like to say a BIG thank you to all the people who have commented on the topics posted and who have helped improving the classes you can find on this blog! Sorry for not getting back to you on your comments for so long and thank you for all your help and kind words!

I’ve noticed alot of visitors get to my blog in search of finding answers to using encryption in Flash and Flex.
Since this seems to be a hot topic, you can expect to find more on this at this blog in the future.

No new post without a new class, so here I give you Baby.as.
It’s my first child, still in the womb.
Expected to be born on March 14th, 2008.
Gender & name remain secret for now…

Written by Sven Dens

January 30th, 2008 at 4:57 pm

Posted in Fun

FlexBook in Flex3 running in Adobe AIR

with 3 comments

Dear readers,

Sorry for the long silence, it’s been extremely busy at work for the past weeks.
I’ve also been making a website for my wedding next month, and for that I wanted to use the magnificent FlexBook component written by Elijah Greenfield. I struggled a little getting it to work on my MacBook Pro without FlexBuilder installed, but finally managed to get it to work and I’d love to share it with you as the tutorials for this component on the web seem to be non-existing.

To take it one step further, I also got it working in Flex 3 (which has been released on Adobe Labs) and running in Adobe AIR (formerly Apollo), which I thought was pretty cool :-)
You can download the sources here.

To make it extremely cool, I wondered if I could get it to work in Remoting also using AMFPHP 1.9, Flex3 and running in AIR. And so I did:-)
The sources for a simple “Hello World” demo and for the AMFPHP demo are also included in the same ZIP-file.

As always, everything was built using only Open Source software (in my case in Eclipse using the free Flex2/Flex3 SDK, the AIR SDK and the FlexBook component, and AMFPHP 1.9), it can run on any platform at no cost.

If you don’t have the Flex3 SDK or Adobe AIR SDK yet, head over to Adobe Labs first to download them.
Included in the ZIP-file is everything you need to make it run.
Simply unzip the contents of the ZIP-file to a directory on your PC/Mac, create a new project in Eclipse and import the files.
You’ll notice the build.properties file. It is set up to compile the FlexBook demo by default. However, all that is needed to compile the HelloWorld demo and the AMFPHP demo is also set-up. All you need to do to compileone of those is comment out the appropriate lines in the build.properties file, and comment the ones you don’t need anymore.

For more detailed instructions on how to set up your Eclipse environment and use the ANT-templates, check out my other post: “Build and compile AS3, Flex2 and Apollo applications in Eclipse using Mac OS X”.

Basically, to use the FlexBook component, you only need to include the namespaces xmlns:controls=”qs.controls.*” and xmlns:effects=”qs.effects.*” in your mxml file. Make sure you use the right classpath, including it like this presumes the folder “qs” is on the same level in the hierarchy as your MXML-file. If you unzipped the contents of my download it should be in the right place.

Next, you can use the FlexBook component as such:

<controls:FlexBook id="book" y="70" width="580" height="435" horizontalCenter="0"
    animateCurrentPageIndex="true"
    animatePagesOnTurn="true"
    activeGrabArea="corner"
    edgeAndCornerSize="50">

    <!--create the cover page in the book-->
    <controls:cover>
        <mx:Label text="FlexBook AIR example" fontSize="18" horizontalCenter="0" verticalCenter="0" width="100%" textAlign="center"/>
    </controls:cover>

    <!--create the back cover page-->
    <controls:backCover>
        <mx:Label text="And now, go study and have fun :-)" fontSize="12" horizontalCenter="0" verticalCenter="0" width="100%" textAlign="center"/>
    </controls:backCover>
   
    <mx:Image source="@Embed('assets/ss1.jpg')" />
    <mx:Image source="@Embed('assets/ss2.jpg')" />
    <mx:Image source="@Embed('assets/ss3.jpg')" />
    <mx:Image source="@Embed('assets/ss4.jpg')" />
    <mx:Image source="@Embed('assets/ss5.jpg')" />
    <mx:Image source="@Embed('assets/ss6.jpg')" />
</controls:FlexBook>

The “controls” namespace is known because you referenced it in your Application tag. To compile, the compiler also needs to know where to find the AS3 sources for the component. That is handled by the build.xml file which serves the right source path to the compiler (qs.*).
Next, you need to provide a front- and back-cover. Between these tags you can use any Flex component you like, like a mx:Label, mx:Text, mx:Image and so on.

Following the </controls:backCover> tag you start creating the pages of your FlexBook. Each component you use represents a new page in the FlexBook. In the demo I just used 6 <mx:Image> tags with embedded images to create 6 photo-pages. Feel free to replace them with your own content, or to use entirely different stuff. You can embed webpages, video, text, htmlText, images, … or your own components.

To compile them for Adobe AIR, you need 1 more XML file that describes your AIR Application. There are 3 files included in the ZIP-archive, one for each demo.

If the compiler gives you cr@p about compile-time constants, edit the flex-config.xml and set the “strict”-option to false. Then you should have no more trouble compiling the sources.

Use it, have fun with it, study it, and let me know what you think!

(P.S.: I’ll be posting more demo’s on Flex2/3, AIR and combining them with AMFPHP this weekend. One of them will be an Flex3/AMFPHP example of how to create a guestbook once I’ve written that for my wedding website. If you speak Dutch or are just curious, go and have a look :-) -> http://www.pinnemuts.be And let me know what you think about it.)

Sven

Written by Sven Dens

June 22nd, 2007 at 11:25 pm

Posted in Flex

Web Flash Festival – a story in pictures

without comments

Saturday, May 26 2007, 5AM: the Boulevart crowd gathering to drive off to Paris

It should be illegal to get up at 4AM…
Read the rest of this entry »

Written by Sven Dens

May 29th, 2007 at 2:27 am

Posted in Events

Web Flash Festival retrospect

without comments

Yesterday evening I got home after 2 days in Paris for the WFF 07.

In retrospect, I must say that it hasn’t been what I’d expected it to be. Although there were some really nice sessions (like that by Erik Natzke and Carlos Ulloa), the overall level was below-average in my opinion and I don’t think I’ll be attending next year.

Read the rest of this entry »

Written by Sven Dens

May 29th, 2007 at 2:08 am

Posted in Events

Carlos Ulloa at Web Flash Festival Paris

without comments

Last Saturday I saw Carlos Ulloa at WFF doing a talk on Papervision3D. Carlos is the founder of this amazing project, and it was very interesting to hear him talk about how it all started and where PPV3D is heading in the near future.

Carlos worked for many years at Sony in London as a game developer/designer. It wasn’t untill Spark Europe in Amsterdam in november 2005 where the idea arose that it would be cool to have a good 3D engine for Flash, and Papervision3D was born. The first one to join Carlos to kick off the project was Joost Korngold (better known as renascent), and on December 1st 2006, PPV3D was first published as Open Source on OSFLash under the MIT license.

Read the rest of this entry »

Written by Sven Dens

May 29th, 2007 at 1:39 am

Posted in Events

Erik Natzke at Web Flash Festival Paris

with one comment

Just saw Erik’s session at the WFF in Paris. All I can say is WOW! So inspiring, so impressive, it rocked my world!

Must say that I’m glad I didn’t give up on the festival after the dissapointing kick-off this morning!
Erik showed the evolution of his own work, from the time he himself just started out ’till now. He started off by saying that he was originally a pure designer with no programming skills whatsoever. Animations he built in Flash were built using keyframes on the timeline, which led up to enormous FLA files using hundreds of keyframes to create his animations.

He then realized there had to be a better way of doing things, and started looking into ActionScript.

Read the rest of this entry »

Written by Sven Dens

May 26th, 2007 at 3:51 pm

Posted in Events

Sitting at the Web Flash Festival in Paris

without comments

Bonjour, chèrs spectateurs!

Don’t understand what’s written above? If you’ve read my other post on Aral’s session at MultiMania yesterday, you know what to do: use the web and all it’s great software to find the translation.

Currently, the Web Flash Festival is going on at the Centre Pompidou in Paris. We’re here with 11 guys from our company, so the ambience is great! Just watched a video of past contestors and winners in the Flash animation category, and I’m sorry to say, it sucked :-(

I don’t like to bash people, and I do hope this event is going to be better as the day advances, but first impressions are far from great. There’s (almost) no one here (around 40 visitors for the moment I guess), there’s no “schwung”, just not a creative atmosphere, and the quality of the work displayed so far was far below expectation.

This afternoon, Eric Natzke is going to do a session, that almost can’t be bad… let’s hope so!
I’ll keep you posted!

Written by Sven Dens

May 26th, 2007 at 1:07 pm

Posted in Events