Hello,

We've successfully ported our Flex 3 application to run on Flash
Player versions below 9.0.28. Turns out it wasn't much of a big deal.
In case someone's interested (now or in the future), I'm explaining
here how to get it to work.

First, there are only two events that keep a regular Flex 3
application from running on, say, Flash Player 9.0.16:
Event.ADDED_TO_STAGE and Event.REMOVED_FROM_STAGE. These events are
used by 2 SDK components: ComboBox and PopUpButton.

The workaround is to create subclasses for these components:

public class MyComboBox extends ComboBox
{
   public function MyComboBox()
   {
       try {
           super();
       } catch (e:TypeError) {
           if (e.errorID == 2007) /* Parameter type must be non-null */
               ;
           else
               throw e;
       }
   }
}

In the constructor, you catch and ignore these errors.

Here are the other classes that are affected and that might need to be
subclassed or modified in a similar way.

 -  PopUpButton
 -  PopUpMenuButton
 -  RichTextEditor

In your mxml-manifest.xml, you could map these new subclasses to their
respective MXML element names (i.e. map MyComboBox to the ComboBox
element).

It would be ideal if developers didn't have to do all this at all, so
I've logged a bug in the bugbase so Adobe can fix it in the next
release.

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

If your application is doing file upload, then you need to know that
the 'uploadCompleteData' event on the FileReference class was added
only in Flash Player 9.0.28 (although strangely it is not mentioned in
the release notes). If you want to read the response to your upload
request, I'm afraid you won't be able to do it in older versions of
the Player and, in that case, you need to make a separate request.

The REMOVED_FROM_STAGE event is not crucial to the ComboBox and
PopUpButton components. But if you have another component in your
application that relies on these events, then you can create your own
REMOVED_FROM_STAGE event by following your ancestors' REMOVED event.

That's about it. Hope this helps someone.

Manish

Reply via email to