February 25th, 2009 by Kyle
Tags: , ,
Posted in: Flex, Flex Builder


I am not sure if this is common knowledge. I googled and didn’t find any other reference to it. (At least not in 10 minutes of googling.)

I wasn’t sure this was possible, but then I decided to look in the Flex bugbase. This is what I found:

https://bugs.adobe.com/jira/browse/SDK-5308

Whaddaya know? An enhancement request that I logged that had actually addressed this issue back in the Flex 2.x days.

Basically if you change the extension of a swc to .zip, you can open the archive with winzip (or similar) and look at the top of the catalog.xml file. You should see something like this:

<?xml version="1.0" encoding ="utf-8"?>
<swc xmlns="http://www.adobe.com/flash/swccatalog/9">
  <versions>
    <swc version="1.2" />
    <flex version="3.2.0" build="3958" />
  </versions>
 

Hopefully this will help some folks out.

Incidentally such a thing does not exist for compiled swfs. There is an enhancement request:
https://bugs.adobe.com/jira/browse/SDK-14042

If you think such a thing would be valuable, please vote for the bug.

And one more thing…I actually had an AIR app back in the pre-release of AIR 1.0 days:
http://blog.flexmonkeypatches.com/2007/11/12/flex-sdk-fds-lcds-version-detection-adobe-air-application/

You could point it at a fds/lcds war or sdk directory and it would tell you the version (of LCDS and the SDK).
Maybe this should be resurrected and updated to AIR 1.5.1 and to use this new version info (at least new since I built the original AIR app). It could also be enhanced to read version info from individual swcs as well. Oh and maybe allow users to drag and drop directories, or wars or swcs onto the app to read the info. Hmmm….if only I had the time.




3 Comments »

January 20th, 2009 by Kyle
Tags: , ,
Posted in: Flex


I was looking into how one might implement zooming in on an item in a Tilelist or zooming out to view more of the items in a Tilelist and stumbled upon a “poor man’s solution”. Implementing true zooming with gradual easing in/out would be much more involved and take you into the depths of Listbase (and probably into private methods, etc).
This is based on code from one of my previous blog posts:

TileList with popup that deletes from dataProvider

Here is the sample and code that demonstrates the approach one might take:

This movie requires Flash Player 9

Download a zipfile containing the source to this sample.

Browse the source of this example.

Or continue into the blog entry to see the source:
Read the rest of this post»




4 Comments »

January 9th, 2009 by Kyle
Tags: , , , , ,
Posted in: LCDS


I had an opportunity too look into eking out every last bit of performance on an LCDS RTMP channel and came across this property:

socket-tcp-no-delay-enabled

The docs that describe this stuff is here:
http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/lcds/lcconfig_4.html

The docs seem to say that the “socket-tcp-no-delay-enabled” setting is a property of an NIO socket server.
The section that describes configuring NIO RTMP seemed wrong to me or at least has me confused.

in the LCDS install dir: resources\config\services-config.xml (this is a good additional resource for configuration parameters)

this comments say:

<!– Optional. Enables/disables TCP_NODELAY (the Nagle algorithm) for socket connections to the server.
                     The default value is the platform default.
                <socket-tcp-no-delay-enabled>

false</socket-tcp-no-delay-enabled>
                –>
 

Which don’t really help clarify things for me.

After speaking with Seth and Jeff from the LCDS engineering team, they were able to set me straight (and then some :) ).

Socket settings are up to the OS. Adjusting that is OS dependent and I don’t have any steps to offer offhand.
The default for this socket setting is false (meaning the Nagle algorithm is enabled) on various platforms that engineering investigated (Mac OS X Version 10.4.10, Windows XP Version 2002 Service Pack 2, Linux 2.6.9-24.ELsmp). The Java Socket API let’s you tweak these (but in some cases, such as send/receive buffer sizes, invoking a setter is just a request/hint that may be ignored by the platform). It’s best to configure these in LCDS config, so your desired settings are only applied to sockets that LCDS is managing.

When a Socket’s no-delay is false, this means that the Nagle algorithm is enabled. By overriding the default, setting this to ‘true’ in config, you’ll disable the Nagle algorithm.

The Nagle algorithm was designed to help with congestion avoidance for TCP-based applications like Telnet, which may send a single character per TCP packet, leading to lots of unnecessary packets and overhead. With the algorithm enabled, as long as there’s an outstanding un-acked TCP packet the sender will buffer any further bytes to send until it has a full packet’s worth or until it receives the outstanding ack it’s waiting for. So you get something like send – buffer –buffer –buffer – send – buffer … So with Nodelay on, the latency of small messages is reduced but overall throughput probably goes down a bit if you send lots of small messages (i.e. less than a packet size). With nodelay off, smaller data writes (i.e. less than the MTU) are held so they can be combined with other small writes.

Both RTMP and HTTP are just bytes over a TCP socket, so whenever RTMP data or an HTTP response is written back to the client, this algorithm will come into play as the bytes are put on the network.

This is where the docs where incorrect (and they are being fixed as we speak.)
In order to configure a RTMP channel to set the socket-tcp-no-delay-enabled property you would do something like this:

<channel-definition id="my-rtmp" class="mx.messaging.channels.RTMPChannel">
     <endpoint url="rtmp://servername:2038"
          class="flex.messaging.endpoints.RTMPEndpoint"/>

          <properties>
               <idle-timeout-minutes>120</idle-timeout-minutes>
               <!— Disable the Nagle algorithm. ?
               <socket-tcp-no-delay-enabled>
true</socket-tcp-no-delay-enabled>
          </properties>
</channel-definition>
 

HTH

-Kyle




No Comments »

November 19th, 2008 by Kyle
Tags: , , , , ,
Posted in: Air, BlazeDS, Flex, Flex Builder, LCDS


OK…so I guess I kind of passed over these yesterday in my announcements. To me, the fact that there would be new releases timed with MAX was known and to anyone in the community there was probably a strong suspicion that there would at least be a new point release at MAX 2008. But in an effort to correct my oversight, here are links to the announcements by the product managers:

Matt Chotin (PM for Flex SDK) announces Flex Builder 3.0.2 and Flex SDK 3.2 (with support for AIR 1.5 and Flash Player 10).

Anil Channappa (PM for LCDS and BlazeDS) announces LCDS 2.6.1 and BlazeDS 3.2.




1 Comment »

November 17th, 2008 by Kyle
Tags: , , , , ,
Posted in: Flex


There were lots of exciting new things at Adobe MAX 2008 today, plus a lot of new stuff landed on Adobe LABs. Here are the things I think are cool and showcase the innovation of the people at Adobe:

http://labs.adobe.com/technologies/alchemy/

Alchemy is a research project that allows users to compile C and C++ code that is targeted to run on the open source ActionScript Virtual Machine (AVM2). The purpose of this preview is to assess the level of community interest in reusing existing C and C++ libraries in Web applications that run on Adobe® Flash® Player and Adobe AIR®.

http://labs.adobe.com/technologies/flashcatalyst/(formerly Thermo)

“Adobe® Flash® Catalyst is a new professional interaction design tool for rapidly creating application interfaces and interactive content without coding. These can range from interactive Ads, product guides and design portfolios to user interfaces for applications. Flash Catalyst enables designers to start from static compositions created in Adobe Photoshop® CS4, Illustrator® CS4, or Adobe Fireworks® CS4 and convert the artwork into applications and interactive content. The designer does this by visually defining events, transitions and motion. Flash Catalyst can output a finished Flash SWF or AIR application that’s ready to publish on the web. In addition designers can provide the project file to developers who can use Adobe Flex® Builder™ to add additional functionality such as connection to back-end systems.”

http://labs.adobe.com/technologies/cocomo/

Codename “Cocomo” is a Platform as a Service that allows Flex developers to easily add real-time social capabilities into their RIA (rich Internet applications). Comprised of both Flex-based client components and a hosted services infrastructure, Cocomo allows you to build real-time, multi-user applications with Flex in less time than ever before. And because Acrobat.com hosts the service, issues like deployment, maintenance, and scalability are taken care of for you.

Add social features to your existing Flex apps or build totally new ones, such as real-time productivity/collaboration apps, multiplayer games, and audio/video chat.

http://labs.adobe.com/wiki/index.php/Genesis

Genesis is the code-name for a new product initiative at Adobe with the objective of joining business applications, documents and the web on every knowledge workers desktop with integrated collaboration capabilities. Using the very intuitive interface of the Genesis desktop client (built on Adobe AIR) knowledge workers are able to create custom workspaces combining views into business applications, analytics, web sites and documents. Workspaces can be easily and securely shared with other colleagues or business partners outside the company and provide out-of-the-box real time collaboration capabilities like instant messaging, voice and video as well as screen sharing and white boarding.

http://labs.adobe.com/wiki/index.php/Adobe_Wave

Adobe® Wave™ is an Adobe AIR application and Adobe hosted service that work together to enable desktop notifications. It helps publishers stay connected to your customers and lets users avoid the email clutter of dozens of newsletters and social network update messages. Adobe Wave is a single web service call that lets publishers reach users directly on their desktop: there’s no need to make them download a custom application or build it yourself. The Adobe Wave pre-release program is geared towards developers, so if you’re a user who wants to try it out, click here to send us an email. We’ll let you know when Adobe Wave is available for you to try!

http://labs.adobe.com/wiki/index.php/Stratus

Flash Player 10 and Adobe AIR 1.5 introduce a new communications protocol called the Real-Time Media Flow Protocol (RTMFP). The most important features of RTMFP include low latency, end-to-end peering capability, security and scalability. These properties make RTMFP especially well suited for developing real-time collaboration applications by not only providing superior user experience but also reducing cost for operators.

In order to use RTMFP, Flash Player endpoints must connect to an RTMFP-capable server, such as the Adobe Stratus service. Stratus is a Beta hosted rendezvous service that aids establishing communications between Flash Player endpoints. Unlike Flash Media Server, Stratus does not support media relay, shared objects, scripting, etc. So by using Stratus, you can only develop applications where Flash Player endpoints are directly communicating with each other.




2 Comments »

November 17th, 2008 by Kyle
Tags: , , ,
Posted in: Flex


I pointed one of my customers at this app last week. I had no idea it would be all the rage at MAX :)

http://flex.org/tour

“Tour de Flex is a desktop application for exploring Flex capabilities and resources, including the core Flex components, Adobe AIR and data integration, as well as a variety of third-party components, effects, skins, and more.”

I have posted an install badge in my sidebar (below my paypal badge)…check it out.




1 Comment »

November 17th, 2008 by Kyle
Tags: , , ,
Posted in: Flex


Two things really excite me that there will be more info on at MAX NA, 2008.

Cocomo and Genesis.

Cocomo is now on Adobe Labs: http://labs.adobe.com/technologies/cocomo/

Do not miss these sessions:
Real-Time Collaboration Apps with Flex and Cocomo
Explore Cocomo, Adobe’s new Platform-as-a-Service for developing real-time, multiuser Flex applications. Learn how any Flex developer can use Adobe’s services infrastructure to build stunningly rich real-time social apps, including robust data messaging and streaming live video and VoIP. In this session we’ll be showing live coding with the Cocomo Flex SDK and Adobe’s services. Bring a laptop and be ready to join in.

Speakers: Nigel Pegg
Audience: IS/IT, Creative Designer, Business Decision Maker, Architect, Application Developer
Skill: Intermediate
Products: Flex Builder, Flex, Flash Player, Flash Media Server, Connect, AIR, ActionScript, Acrobat
When: Monday, November 17, 3:30 pm – 4:30 pm, Moscone West 2007

Cocomo Deep Dive: Building Social RIAs with Flex + Adobe Hosted Services
Learn to build your first multiuser Adobe AIR application using the new Cocomo Flex SDK. In this session, we’ll walk you through the philosophy and design considerations of this new breed of application, all the way to the nuts and bolts of coding, debugging, and deploying it. Follow along as a real-time collaborative AIR app is built from scratch and deployed on stage. There will be code — bring a laptop!

Speakers: Nigel Pegg
Audience: IS/IT, Creative Designer, Business Decision Maker, Architect, Application Developer
Skill: Intermediate
Products: Flex Builder, Flex, Flash Player, Flash Media Server, Connect, AIR, ActionScript, Acrobat
When: Wednesday, November 19, 3:30 pm – 4:30 pm, Moscone West 2003

The Genesis Blog is here: http://blogs.adobe.com/mashup/

Don’t miss this session either:

Genesis: A Collaborative Mashup Client for Business Users
Learn how Genesis enables knowledge workers to combine web applications, enterprise apps, and documents within one workspace on their desktop and provides sharing as well as real-time collaboration. Genesis is a code name for a new Adobe product in development that includes a desktop client based on Adobe AIR and Flex as well as hosted collaboration services that leverage Adobe Acrobat Connect via Cocomo. We’ll discuss business use cases for Genesis and demonstrate features and functionality. For Flex developers, we’ll explain the architecture and opportunities to create Flex widgets that can be distributed via the Genesis catalog.

Speakers: Mattias Zeller, Steve Yankovich
Audience: Partner Decision Maker, IS/IT, Business Decision Maker, Architect
Skill: General Audience
Products: Flex
When:
Monday, November 17, 2:00 pm – 3:00 pm, Moscone West 2014




No Comments »

October 29th, 2008 by Kyle
Tags: , ,
Posted in: Flex


I wrote a demo a while back for a customer to demonstrate the following scenario:

  • Tilelist populated by an arrayCollection of typed objects.
  • Tilelist has a custom itemRender that pops up a “view” of the data for the item in the tilelist that was clicked.
  • The popup can delete the related object from the dataProvider of the TileList, removing the popup and the corresponding item from the Tilelist.

    Here is the app:

    This movie requires Flash Player 9

    Download a zipfile containing the source to this sample.

    Browse the source of this example.

    Or continue into the blog entry to see the source:
    Read the rest of this post»




  • 3 Comments »

    October 24th, 2008 by Kyle
    Tags: , , ,
    Posted in: Flex


    I was helping a customer with an interesting question and it resulted in a nice little bit of code that I am demoing here.

    The basic idea was to force the combobox to receive focus when it is moused over rather than when clicked. Also, it would be useful to have the combobox get focus only if the previously focused component was a particular component.

    If you look at the docs:
    http://livedocs.adobe.com/flex/3/langref/mx/managers/FocusManager.html

    you will see that:

    Each FocusManager instance is responsible for a set of components that comprise a “tab loop”. If you hit Tab enough times, focus traverses through a set of components and eventually get back to the first component that had focus. That is a “tab loop” and a FocusManager instance manages that loop.

    You can use the focusManager.getFocus(); method to get the currently focussed item and you can also use focusManager. getNextFocusManagerComponent(backward:Boolean = false):IFocusManagerComponent to get you the next and previous items in the loop.

    This movie requires Flash Player 9

    The sample shows how to set the focus to the combobox when you hover over the combobox instead of setting focus only when you click on it(watch the blue focus ring), but only if the textInput whose id is “ti” first had focus. If the “ti2″ textinput had focus (or nothing had focus) before you hover over the combobox, then focus is not stolen.

    Download a zipfile containing the source to this sample.

    Browse the source of this example.

    Or continue into the blog entry to see the source:
    Read the rest of this post»




    2 Comments »

    October 13th, 2008 by Kyle
    Tags: , ,
    Posted in: ActionScript, Flex


    Last week in this post: http://blog.flexmonkeypatches.com/2008/10/08/flex-make-popup-follow-spawning-component-as-you-scroll/ I demonstrated one approach to on how one could make a popup follow the component that “spawned” it when the component was one of many (but not too many) that was in a VBox with vertical scrolling.

    The first approach felt a bit hacky and the showing and hiding of popups as they came in and out of view was a little fiddly. (My demo didn’t worry to much about exact “edge detection” to determine when the edge of a popup came in contact with the edge of the containing VBox…I’ll leave that to you if you decide to use that approach.)

    I came up with a second approach that feels a little cleaner.
    Basically, I overlay a canvas on top of my VBox and “addChild” popup components to the canvas (NOT using popupmanager) and scroll the canvas along with the VBox. Setting the isPopup property of the popup component allows me to drag the component around like you can a true popup.

    Check out the sample and the code:

    This movie requires Flash Player 9

    Download a zipfile containing the source to this sample.

    Browse the source of this example.

    Or continue into the blog entry to see the source:
    Read the rest of this post»




    No Comments »

    « Previous Entries