Posts Tagged ‘web-dev’

Calling multiple methods from one RemoteObject in Flex and Actionscript using BlazeDS

Posted in Flex, web-dev on August 19th, 2009 by Nick – Be the first to comment

BlazeDS allows us to use RPC to access our Java objects from an Adobe Flex or AIR app. This is a simple example that allows you to have a remote java object which you will make calls upon from Flex (or Actionscript). There are plenty of BlazeDS remoting tutorials out there. This HOW-TO shows how to create an actionscript class to handle your remote objects and handlers as well as linking more than one method to a single remote object.
read more »

Looping Sound in Flex and AIR

Posted in Flex on July 27th, 2009 by Nick – 4 Comments

This is a short example of how to play an audio clip and loop it in Flex, and works with AIR. Some of this code is taken from the Sound class example in the Adobe Flex Language Reference docs.

You can paste this into pretty much any function, like an init():

var soundReq:URLRequest = new URLRequest("someSound.mp3"); 
var sound:Sound = new Sound(); 
var soundControl:SoundChannel = new SoundChannel(); 
sound.addEventListener(Event.COMPLETE, completeHandler);
sound.addEventListener(Event.ID3, id3Handler);
sound.addEventListener(IOErrorEvent.IO_ERROR, ioSoundErrorHandler);
sound.addEventListener(ProgressEvent.PROGRESS, progressHandler);
sound.load(soundReq); 
soundControl = sound.play(0, int.MAX_VALUE);

read more »

Quick Tomcat https SSL Config

Posted in Java, web-dev on March 10th, 2009 by Nick – 2 Comments

Setting up your webapp to work with https and SSL encryption when using Tomcat is easier than most people think.  Here’s a very quick HOW-TO to get you up and running…
read more »

GWT Right-click Context Menu

Posted in GWT, Java, Programming on February 17th, 2009 by Nick – 39 Comments

The Google Web Toolkit has been out for a while now, and yet there is still basic functionality that is missing from the toolkit.  Don’t get me started on the lack of draggable/resizable columns for the FlexTable, because that’s a rant and a half.  Given that GWT’s event handling model isn’t bad, you’d think they’d have included from the get-go the ability to handle right-clicks and bringing up a context menu or popup menu.  Well, even with 1.6 on the doorstep it seems they forgot again or just don’t care.   Now some people will spout out “web apps don’t need or shouldn’t have right-clicks handled or context menus overridden”……and for those I say STFU!  Web apps are used for more than just banking, news, forums and dare I say blogs.  The browser is becoming the new medium for running applications and just because an application is running in a browser doesn’t mean we should limit functionality.  That’s about as narrow minded as saying that we’ve only had one mouse button for this long, why add a second one?  Duh!

Anyway, enough with the blabbing.  I’ve put together a simple example to add a right click context menu and override the default browser context menu using GWT. 
read more »

GWT Yellow Fade Technique (YFT)

Posted in GWT, Java, Programming on February 9th, 2009 by Nick – 3 Comments

This is a quick example of a fading technique which notifies that a change or update in your GWT app has happened. read more »