Flex 3 / Wowza Notes

11:53 pm in Flex by admin

Some notes on getting Flex 3 to work with Wowza.

Some Links:

Better BlazeDS links (BlazeDS is the Remoting and Messaging technology previously available only as part of LiveCycle Data Services) BUT rtmp is NOT included in BlazeDS :

  • http://coenraets.org/blog/2007/12/blazeds-open-sourcing-remoting-and-messaging/
  • http://www.javabeat.net/articles/116-flex-30-applications-with-blazeds-in-eclipse-1.html

Flex frameworks

  • Review of different frameworks :
  • http://blogs.oreilly.com/cgi-bin/mt/mt-search.cgi?IncludeBlogs=34&search=FrameworkQuest+2008
  • http://www.insideria.com/2009/01/frameworkquest-2008-part-6-the.html
  • http://www.websector.de/blog/2009/01/07/swiz-example-based-on-adobe-air-and-sqlite/
  • http://www.websector.de/blog/2008/10/04/new-mate-extensions-for-using-air-and-sqlite-sqlservice-sqlserviceinvoker/

Interesting blogs and code sources :

http://www.quietlyscheming.com/blog/

http://flex.org/software/components

Flex/Flash editors :

http://www.flashdevelop.org/community/index.php

Getting the free Flex SDK and using it without FlexBuilder :

  • http://www.hiveminds.co.uk/?p=3791
  • The openFlexSDK website has been reporting a bad gateway for ages… Grab an equivalent from http://www.adobe.com/products/flex/flexdownloads/

Notes :

  • Flex Hello World
    • http://asantoso.wordpress.com/2008/05/18/flex-3-sdk-command-line-development-with-example-on-linux/
    • A simple ant file for compiling on the command line…(./src and ./bin  are inside the FlexCommandLineSpike directory)
    <?xml version="1.0"?>
    <project name="MXMLSpike" basedir=".">
        <!-- call the command line to invoke the compiler -->
        <target name="compile">
            <exec executable="E:\\flex\\bin\\mxmlc.exe">
                <arg value="-source-path=E:\\Projects\\FlexCommandLineSpike\\src"/>
                <arg value=".\\src\\com\\example\\quickstart\\Greeter_mx.mxml"/>
                <arg value="-output"/>
                <arg value=".\\bin\\Greeter_mx.swf"/>
            </exec>
        </target>
    </project>
  • Call a Wowza server method to send a String

Carefull with .mxml naming or you’ll get some crazy errors -  http://www.judahfrangipane.com/blog/?p=57

SimpleConnect.as

package com.example.quickstart
{
import flash.net.NetConnection;

    public class SimpleConnect
    {       
        private var nc:NetConnection = new NetConnection();

        public function SimpleConnect()
        {       
            nc.connect("rtmp://127.0.0.1/simpleconnect");
        }

        public function callWowza():void
        {
            nc.call("callFromFlex",null);
        }

    }
}

SimpleConnect_mx.mxml :

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"  initialize="initApp();">
<mx:Script>

<![CDATA[
import com.example.quickstart.SimpleConnect;

 private var sc:SimpleConnect = new SimpleConnect()

public function initApp():void{
    sc.callWowza();
}

]]>
</mx:Script>

</mx:Application>
  • Get called by Wowza with a String
  • Send/Receive a Set
  • Send/Receive a Value Object
  • Look at http://xdoclet.codehaus.org/Actionscript+plugin for generating Value Objects
  • Fetch some data from a Wowza url with http
  • Update a form with Server data using Cairngorm framework
  • Have the server call an object on the client side using Cairgorm?
  • Implement a User Login using (Flex+Cairngorm)<->(Wowza+Spring+JSecurity+Hibernate)