« PureMVC Tutorial - Flex, PureMVC, Jabber and XIFF 3: Introduction
» PureMVC Tutorial - Flex, PureMVC, Jabber and XIFF 3: Part 2 - Directory structure

Actionscript 3.0, FlashDevelop, Flex 3, PureMVC

PureMVC Tutorial - Flex, PureMVC, Jabber and XIFF 3: Part 1 - Frameworks

07.19.08 | 3 Comments

Introduction
Part 1 - Frameworks
Part 2 - Directory structure
Part 3 - Application and ApplicationFacade
Part 4 - Notifications, Commands & Use Cases
Part 5 - Model & Proxy
Part 6 - The Application View & Mediator
Part 7 - The Login View & Mediator
Part 8 - The Roster View & Mediator
Part 9 - The Chat View & Mediator
Conclusion, Demo & Downloads

Now that we’ve got a basic FlashDevelop project setup we can install the frameworks we’ll be using.

PureMVC

Download the PureMVC framework from here. Put this into a directory somewhere on your machine and add this to the FlashDevelop project classpath like so:

  1. Right click on ‘XIFFer’ and select Properties…
  2. Go to the Classpaths tab
  3. Click Add Classpath… and in the directory selector choose the PureMVC src folder.

XIFF

XIFF is an excellent Actionscript XMPP (Jabber) framework that we’ll be using to take care of the internals of Jabber communication. Its been around since Actionscript 2 but has recently been ported to Actionscript 3 (albeit in beta form). Download it here, put it into a directory and add the classpath as above.

As XIFF is currently in beta you’ll need to make a small change in order to get it to play nice with ejabberd - a common Jabber server written in Erlang. Research tells me that this is actually a problem with ejabberd’s implementation rather than XIFF’s, but whatever the issue might be this will fix it :)

  1. Open org.jivesoftware.xiff.core.XMPPSocketConnection
  2. Goto line 108
  3. Remove the version=\”1.0\” / so that the line now reads:

openingStreamTag = “<?xml version=\”1.0\”?><stream:stream to=\”" + server + “\” xmlns=\”jabber:client\” xmlns:stream=\”http://etherx.jabber.org/streams\”>”;

Now we’re all sorted with the bits we require and its time to set up our directories and packages.

Social bookmarks:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google

3 Comments

have your say

Add your comment below, or trackback from your own site. Subscribe to these comments.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

:

:


« PureMVC Tutorial - Flex, PureMVC, Jabber and XIFF 3: Introduction
» PureMVC Tutorial - Flex, PureMVC, Jabber and XIFF 3: Part 2 - Directory structure