Joeflash’s Enigmacopaedia


Flash-Flex Integration: Coding With Flash Components in Flex Builder

Posted in Flash, ActionScript 3.0, Flex, Flex 3, Flash CS3 by Joeflash on the July 9th, 2008

In the last article on Community MX, we looked at how to use Flex Builder as the ActionScript 3 editor for a Flash-compiled project. But if you are using any Flash CS3 components, Flex Builder is unable to recognize those classes. In this article, we will take a look at how to get Flex Builder to recognize the Flash CS3 Component classes for editing ActionScript 3 files in Flash CS3 projects.

The Flex Builder 3-Flash CS3 Editing workflow
How do we get Flex Builder’s code assist to recognize Flash CS3 Component classes?

( I’ll give you a hint: you find all the fl.* class locations in the Flash CS3 installation directory, and reference them as external source paths in Flex Builder )

For the full, step-by-step explanation, the tutorial is available here on Community MX.

showSettings Method Incorrectly Listed in Camera Class Documentation

Posted in Flash, ActionScript 3.0, Flex by Joeflash on the July 1st, 2008

If anyone has tried to use System.showSettings() and wondered why it wasn’t working, I noticed that in all three reference manuals — AS3 ref, Flex 2 Lang ref, Flex 3 Lang ref — the Camera class has contradictory information about which class the showSettings method belongs. Must have been a typo left over from the AS2 days, and accidentally got duplicated. All three pages say the same thing:

Note: The attachCamera() method will not invoke the dialog box to Allow or Deny access to the camera if the user has denied access by selecting Remember in the Flash Player Settings dialog box. In this case, you can prompt the user to change the Allow or Deny setting by displaying the Flash Player Privacy panel for the user using Security.showSettings(SecurityPanel.PRIVACY).

If getCamera() returns null, either the camera is in use by another application, or there are no cameras installed on the system. To determine whether any cameras are installed, use the names.length property. To display the Flash Player Camera Settings panel, which lets the user choose the camera to be referenced by getCamera(), use System.showSettings(SecurityPanel.CAMERA).

The first reference is correct: the showSettings method belongs to the Security class in AS3.

Logged a bug here as well.