Adobe Developer Week Recordings
Posted by David in Adobe on May 7, 2008
Flex: Adding Your Own Context Menu Items
Posted by David in Flex on May 1, 2008
Well I've been working with Flex alot more so I will hopefully be posting more things on Flex. Something I have been working on lately is adding Context Menu items to my applications. You can add as many as you'd like but I would limit them to only the essential ones. I searched online and found various examples. Here is how I did it:
FlexContextMenu.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()">
<mx:Script>
<![CDATA[
[Bindable] public var cm:ContextMenu;
private function init():void
{
// Create custom context menu items
var cm1:ContextMenuItem = new ContextMenuItem("Copyright © 2008 DCFusion.com");
cm1.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,cm1_link);
cm = new ContextMenu();
cm.hideBuiltInItems();
cm.customItems = [cm1];
application.contextMenu = cm;
}
private function cm1_link(evt:ContextMenuEvent):void
{
goToURL("http://www.dcfusion.com/blog/");
}
public function goToURL(urlStr:String):void
{
var webPageURL:URLRequest = new URLRequest(urlStr);
navigateToURL(webPageURL, '_blank');
}
]]>
</mx:Script>
<mx:Panel width="100%" height="100%" title="Flex Context Menu Example">
<mx:Label text="Welcome to my Flex app!"/>
</mx:Panel>
</mx:Application>
I added a link to my new context menu item using an event listener, but that is not necessary.
And the final product (right-click on the Flex app to see the context menu):
ColdFusion 8.0.1 Now Available
Posted by David in ColdFusion on April 4, 2008
Did You Know
Posted by David in Announcements on March 4, 2008
My buddy Josh posted this video on his blog the other day and it really makes you think. So... check it out!
ColdFusion 8: Creating CAPTCHA images
Posted by David in ColdFusion on November 13, 2007
![]()
I recently had a project where my customer was getting alot of spam thru a contact form. So I thought I could use some CAPTCHA on the web form to stop some spam. I knew CF8 had the functionality to create CAPTCHA images, but I didn't know how to actually implement it. So after a bit of googling, I found Ben Nadel's post on creating and validating CAPTCHA images on forms.
I will briefly go over his code and show you my final result...
Recent Comments