Feb 21 2008

SOAP headers in Flex and WS-Security

Tag: FlashSven Dens @ 5:00 pm

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:

Continue reading “SOAP headers in Flex and WS-Security”


Jan 30 2008

A new year, a new look and a baby!

Tag: FunSven Dens @ 4:57 pm

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…


Jun 22 2007

FlexBook in Flex3 running in Adobe AIR

Tag: FlexSven Dens @ 11:25 pm

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


May 29 2007

Web Flash Festival - a story in pictures

Tag: EventsSven Dens @ 2:27 am

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

It should be illegal to get up at 4AM…
Continue reading “Web Flash Festival - a story in pictures”


May 29 2007

Web Flash Festival retrospect

Tag: EventsSven Dens @ 2:08 am

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.

Continue reading “Web Flash Festival retrospect”


May 29 2007

Carlos Ulloa at Web Flash Festival Paris

Tag: EventsSven Dens @ 1:39 am

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.

Continue reading “Carlos Ulloa at Web Flash Festival Paris”


May 26 2007

Erik Natzke at Web Flash Festival Paris

Tag: EventsSven Dens @ 3:51 pm

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.

Continue reading “Erik Natzke at Web Flash Festival Paris”


May 26 2007

Sitting at the Web Flash Festival in Paris

Tag: EventsSven Dens @ 1:07 pm

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!


May 26 2007

Off to Paris

Tag: EventsSven Dens @ 4:33 am

Getting up at 4 in the morning… ouch! Does this ever not suck?

Well, today probably not as bad as any other day, since we’re going to the Web Flash Festival Paris at the Centre Pompidou. I’m expecting to see alot of nice creative work - web, video and audio - and of course to be having loads of fun with my colleagues Wim, Stefan, Jannes, Tom, Frederik and more guys you may not know yet, but should ;-)
And Paris, well… wouldn’t you go there even if there was no event at all? This city totally rocks!
Expect some live blogging coverage if I’ve got internet access there.

Bye for now (better start driving to get there in time :-) )


May 25 2007

Raf Vervink & Nicolas Lierman (These Days) at MultiMania 07

Tag: EventsSven Dens @ 5:55 pm

Raf Vervink & Nicolas Lierman are doing a session on “Flex/Apollo RIA Goodness”.

They show us what is all possible with Flex & Apollo today.
The main point of interest in their session is Google Analytics.

Google Analytics hasn’t got a public API, so they wrote a GA ActionScript 3 API and a GA client in Flex running in Apollo, entitled “Google Analytics Reporting Suite“. With this Apollo app they want to bring Google Analytics to the desktop and provide powerful extra features the desktop has to offer.

The big deal about this is:

  • 3+ million users will have instant access to GA from the desktop
  • It will reduce Google’s bandwith cost
  • It’s just too cool :-)

They’ve shown us how to build a widget for the desktop with Flex and Apollo, using their GARS SWC component.
Which was pretty easy! And thus even cooler! :-) The widget will be available for download on their labs from tomorrow.

Nice work guys!


Next Page »