Products

Products
Viewing By Category : Resources / Main
December 5, 2009

OVP Open Video Player for Flex

I'm working on creating a simple video chat component for my application and came across this open source solution from the good folks at OpenVideoPlayer.com. You can download the latest open source flash video player version from SourceForge. Open it up and go to the core\bin and drag the ovp_core.swc to your project's asset folder. Now open project properties within your project and add the swc file through the Flex Build Path, Library path. Now the openvideoplayer package and akamai package will be available for development from the org and com packages.

Below is a very basic Hello World I used to make sure it operated correctly as expected. I'm not sure yet if I'll use it for my specific needs which are very basic. This OVP brings a lot of other features I may or may not need, like running ads, which I may need. But for now I'll go through and see if it has the features I require before making a commitment.

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

   <mx:Script>
      <![CDATA[
         import flash.events.*;
         import org.openvideoplayer.net.*;
         import org.openvideoplayer.events.*;
         import com.akamai.net.*;
         
         public var net:AkamaiConnection;
         
         public function init():void {
            ovc = new OvpConnection();
            ovc.addEventListener(NetStatusEvent.NET_STATUS,netStatusHandler)
            ovc.connect("localhost/devCRW");
            //net = new AkamaiConnection();             //net.addEventListener(NetStatusEvent.NET_STATUS,netStatusHandler);             //net.connect("localhost/devCRW");          }
         public function netStatusHandler(e:NetStatusEvent):void {
            var info:Object = e.info;
            switch(info.code) {
               case "NetConnection.Connect.Success":
                  output.text = "Hello World!";
               break;
               default:
                  output.text = "Sorry, try again.";
            }
         }
      ]]>
   </mx:Script>
   
   <mx:Text x="10" y="10" id="output"/>
   
</mx:Application>

Notice that you don't include the usual rtmp:// when connecting. I believe it does some of it's own decision making about connection protocols, meaning you don't have to test connections and try HTTP tunneling etc.. becuase it'll do it for you. Now to put up a simple video UI, connect it to my camera, and then stream it to FMS and back again.

September 6, 2009

Generating and using site documentation, cfcdoc

I'm completely embarrased to admit it but, I didn't know until yesterday that not only can I create my own web site's API documentation automatically but how useful it can be. Sure beats glazing over my directories and trying to remember where everything is and what it does.

My latest project has got me dealing heavily with application API's and it's important to read and understand how to apply the API to development, especially when using OO framework architectures. Reading and using the API's for my Coldbox framework (here) I got to thinking that having this documentation for my own site would be very useful and very cool. It literally puts OO into perspective, for me anyways since I like the API's, and helps me to visualize how my classes (components) are organized, if anything is out of place, and if I can optimize anything.

At first I was using the CFIDE component utilities (localhost:8300/cfide/componentutils/) like the explorer and the componentdoc. But it would always list packages from everywhere, including the CFIDE and WEB-INF folders. And then it would list the pakages from the mappings as well as the folder it pointed to. So I edited the code to exclude folders, thinking that there's got to be a better way, and there was. Looking back at Coldbox's API I notice it's from an open source RIAforge thing, get it here: CFCDoc. It's so easy, just extract the zip to your root under a folder, like '/api/' and go there. There's information about what to do next because all the packages you'll see at first are the one's in the /api/ folder you placed it in, not very useful. But basically you add or delete folders to include through a simple config xml file and that's it, your exploring your very own API.

Depending on the length you want to go to in your documentation you can go really wild with component and function attributes like hint and displayname, probably more too. Using these extra attributes I'm sure you thought were useless and time consuming you can add enough information to make the API a virtual users manual. At the very least you can use the API to match up with your UML class models. I'm thinking also that planning a site's structure could be done API style instead of UML style, maybe even faster. You can think of what classes you need and how to package them for your application doing API visualization. In other words, what should your API look like and is it all packaged logically from an API documentation perspective?

September 3, 2009

Free web-based UML diagram tool

This is really cool, a simple web-based UML diagram tool you can use on the fly without being at the web site it is served from. Without even going to, or even signing up with, Yuml.me I can create a UML model typing in what I want into the address bar, then just copy and paste that into my blog or anywhere else I can use the URL to share and display it.

Since you asked, of course I'll show you an example right here. I will create a user gateway class [UsersGateway|+DNS;+User|+getUserBean();+getAllUsers()]:

You simply use an img tag with the source http://yuml.me/diagram/class/, the "scruffy" option makes the output look less formal.

August 25, 2009

Flex Key Codes

Just a reference for myself:

Keybaord: Enter = 13, ` = 192, 1 = 49, 2 = 50, 3 = 51, 4 = 52, 5 = 53, 6 = 54, 7 = 55, 8 = 56, 9 = 57, 0 = 48, - = 189, = = 187, Backspace = 8, [ = 219, ] = 221, \ = 220, ; = 186, ' = 222, , = 188, . = 190, / = 191, Esc = 27, Shift = 16, Ctrl = 17, Tab = 9, Spacebar = 32 A = 65, B = 66, C = 67, D = 68, E = 69, F = 70, G = 71, H = 72, I = 73, J = 74, K = 75, L = 76, M = 77, N = 78, O = 79, P = 80, Q = 81, R = 82, S = 83, T = 84, U = 85, V = 86, W = 87, X = 88, Y = 89, Z = 90

Other: Enter = 13, up = 38, right = 39, down = 40, left = 37, Insert = 45, Home = 36, Delete = 46, End = 35, Page Up = 33, Page Down = 34

Keypad: Num Lock = 144, / = 111, * = 106, - = 109, + = 107, Locked: . = 110, 0 = 96, 1 = 97, 2 = 98, 3 = 99, 4 = 100, 5 = 101, 6 = 102, 7 = 103, 8 = 104, 9 = 105 Unlocked: . = 46, 0 = 45, 1 = 35, 2 = 40, 3 = 34, 4 = 37, 5 = 12, 6 = 39, 7 = 36, 8 = 38, 9 = 33

OLD: CTRL + A = 1 CTRL + B = 2 CTRL + C = 3 CTRL + D = 4 CTRL + E = 5 CTRL + F = 6 CTRL + G = 7 CTRL + H = 8 CTRL + I = 9 CTRL + J = 10 CTRL + K = 11 CTRL + L = 12 CTRL + M = 13 CTRL + N = 14 CTRL + O = 15 CTRL + P = 16 CTRL + Q = 17 CTRL + R = 18 CTRL + S = 19 CTRL + T = 20 CTRL + U = 21 CTRL + V = 22 CTRL + W = 23 CTRL + X = 24 CTRL + Y = 25 CTRL + Z = 26 ALT + A = 197 ALT + B = 166 ALT + C = 199 ALT + D = 206 ALT + E = 180 ALT + F = 207 ALT + G = 169 ALT + H = 211 ALT + I = 136 ALT + J = 212 ALT + K = 190 ALT + L = 210 ALT + M = 194 ALT + N = 152 ALT + O = 216 ALT + P = 222 ALT + Q = 140 ALT + R = 174 ALT + S = 205 ALT + T = 134 ALT + U = 168 ALT + V = 175 ALT + W = 221 ALT + X = 188 ALT + Y = 193 ALT + Z = 253

August 24, 2009

ActionScript 3 Tutorial AS3 for Flash & Flex

Working in Flex this morning and as usual I need to do a search for some information on an AS3 class and I came across this excellent tutorial. It's mostly a beginners guide but a good refresher if you've been away from AS3, Flash or Flex for a while. Sometimes I can go a whole year or more without doing any ActionScripting, because I'm doing a ColdFusion project, then have to jump right into another project requiring AS.

Senocular.com's AS3 tutorial for Flash CS3

August 7, 2009

ColdFusion 9 Beta Hosting Available

All of my sites are hosted by Crystaltech.com's ColdFusion plans and I've always been on top asking for the next CF version before they've gotten it. This time they have beaten me to the punch, offering the new CF 9 in beta for testing before I knew it was out myself, too busy to notice I guess. Hurray for Crystal Tech! Are they the first this time? Here's the email:

Dear Customer, ColdFusion 9 Beta plans are now available!

This latest iteration from Adobe includes many exciting new features and improvements that will make your life easier, including:

Adobe's first ever ColdFusion IDE, ColdFusion® Builder™

Better application performance with more granular control over code, templates, and applications

Language and database enhancements

And much more

After ordering your FREE Beta Plan, please share your thoughts in our CF9 Beta public forums. As one of the first developers to test-drive CF9 in a full-featured hosting environment, we'll be anxious to hear what you like as well as what needs improvement. We're thrilled to be the first host fully backed by Adobe to offer CF9 Beta, and hope you're as eager to experience it as we are to offer it. Please let your colleagues and other industry contacts know - in fact, feel free to tweet it from the virtual rooftops. Simply click the link below, login to your Twitter account, and either use the embedded message or create your own.

**Please note that the beta plan is only available on new site orders made at http://www.crystaltech.com/coldfusion9.aspx. The free beta is not available for existing site upgrades.

Happy Test-Driving! -The CrystalTech Team

May 20, 2009

CFC Method Testing in Coldbox

I got tired of trying to get cfUnit working and all I wanted to do was test component methods. I wanted to be able to simply point to it, test it, and enter arguments if required. And I wanted this set up somewhere easy I could use quickly, repeatedly, effortlessly, and painlessly (word?).

In almost all my applications I have a 'webmaster' directory where I run test. Lately I've found myself getting fancy with setting up a web development control panel of sorts. Whereas web sites generally have administration control for admin users, I've been building in webmaster control for developers. Mostly things like server and framework info, links to documentation, framework and site functionality examples, and etc.

Now I'm adding a little CFC Test form where I enter my cfc path, the method name, and arguments. It will pass the event argument so you can also test cfc handlers.

Warning, I just created this a few hours ago. It's tested to work but I haven't cleaned it up or put in validation and error handling yet.

views/webmaster/index.cfm (webmaster control panel)

<cfform name="cfctestform" action="#cgi.SCRIPT_NAME#" method="post" format="html">
   <cfinput name="do" type="hidden" value="webmaster.panelcontrol.testmethod" />
   <cfinput name="sbIsEnabled" type="hidden" value="0" />
   Enter Component Path:<br /><cfinput name="cfcpath" type="text" />
   <br />
   Enter Method to Test:<br /><cfinput name="cfcmethod" type="text" />
   <br />
   Arguments:(comma seperated list)<br /><cfinput name="methodargs" type="text" width="80" />
   <br />
   <cfinput type="submit" name="submit" value="Run Test" />
</cfform>

events/webmaster/panelcontrol.cfc (Coldbox handler)

<cffunction name="testmethod" access="public" returntype="void" output="true">
   <cfargument name="Event" type="coldbox.system.beans.requestContext">
   <cfset var rc       = arguments.event.getCollection()>
   <cfset var ret       = "">
   <cfset var cfcObj    = createObject("component",rc.cfcpath)>
   <cfif listLen(rc.methodargs)>
      <cfloop from="1" to="#listLen(rc.methodargs)#" index="i" step="2">
         <cfset evaluate("arguments['#listGetAt(rc.methodargs,i)#'] = '#listGetAt(rc.methodargs,i+1)#'")>
      </cfloop>
   </cfif>
   <cfinvoke component="#rc.cfcpath#" method="#rc.cfcmethod#" argumentcollection="#arguments#" returnvariable="ret">
   <cfscript>
      //Display       event.setValue("cfctestresults",ret);
      event.setValue("author","Clint Willard");
      event.setView("webmaster/dspCfcTestResult");
   </cfscript>
</cffunction>
Basically it loops through the method arguments list you entered in the form setting them as part of the arguments struct. That arguments struct is then passed to the invoked component and method, along with the event object. Then the view is set to output with the test results, whatever the method is set to return.

views/webmaster/dspcfcTestResult.cfm

<cfscript>
   cfcresult = event.getValue("cfctestresults","NA");
</cfscript>
<cfoutput>
   #dump(cfcresult)#
</cfoutput>
KISS output.

Let me know if this might be a good idea to expand on or should I just LOL learn cfUnit? And the webmaster information and control panel stuff?

August 7, 2008

Flash SEO

I was ask about Flash SEO today and realized I hadn't given it much thought, maybe due to working on so many internal projects in the past. But I revisited the topic and did some research.

Although Google, and I think Yahoo, are claiming to be working on new technologies to index Flash content, they admit it would only be static text at best. So don't count on technology to do the trick anytime soon.

The truth is that you must provide the content via the page displaying the flash content through some means that their spiders will get what you want them to find and index. I offer a few observations here to help you get your Flash application indexed with search engines.

Use a div tag to provide an HTML alternative to browsers without a Flash plugin detected. This will trigger spiders to consume the alternate content, which you should include text and links. Be sure that the alternate content and the Flash application closely matches or you could get banned.

Use Flash page indexing if possible to create more url links to your Flash content within the Flash application. SwfAddress is an excellent resources for providing such capabilities, check it out.

Other than that, if your Flash content is embedded into an HTML page surrounded by other indexable content, then you have less to worry about. But for those who's entire site is Flash based, I hope my tips will help.

May 21, 2008

UML Sequence Diagrams made easy

Web based sequence diagram tool. Enter your logic and out pops the image for your documentation.

Web Sequence Diagrams

October 1, 2007

Adobe conferencing and new portal

Adobe Developer Center: http://www.adobe.com/devnet/ - A new consolidated portal with everything you need to build on the Adobe platform and products.

Adobe Acrobat Connect: http://www.adobe.com/products/acrobatconnect/ - Web conferencing from Adobe, free 15 day trial, $39/month. Unlimited meetings up to 15 ppl. Screen share, phone connect, whiteboard, chat, audio. Flex interface.

More Entries


Copyright © 2005-2006 Clint Willard. All rights reserved.
Aura skin for Clint Willard's BlogCFC inspired by Brooks Bilson's Bolg.
All trademarks property of their owners.