Peter Hall's Flash, Flex and AIR blog. News and insights into development with Flash, Flex and AIR.

This page is powered by Blogger. Isn't yours?
Friday, September 26, 2003

brilliant solution for serving policy files

A number of people have problems with the new security model, particulary with XMLSockets, because they are not running an HTTP server on that domain so cannot privide a policy file. For most, installing a full-featured HTTP server, like Apache, is overkill juts to serve a single file.

I just saw this solution from Ted Patrick, which is a simple HTTP server written in Python, and all it does is serve up the policy file. Only 20 lines long and, because it has no other features, it won't require all the setup that a full HTTP server would require. Such a simple idea that it just wouldn't have occured to most people, I'm sure.

You can get it here.

why Central is so boring

The public beta of Central had a mixed review today. But people were talking about it everywhere. (see links on Mike's blog).

We can't add new apps yet, and there is no information on how to go about building one. After all the hype and waiting around, this is definitely an anticlimax. Not because it isn't a good product - I'm sure it's wonderful, but because it is us, the developers, who will make it interesting. When all you have to look at cinema listings and weather reports (from another country), its hard to get too excited.

Monday, September 22, 2003

Window Component content class

A very simple class that can be used as a base for window contents. It automatically resizes the window to fit itself and also interprets a few extra parameters that may be passed to the window, if you instantiate it with PopUpManager.createPopUp:

  • margin:Number - margin around the window content
  • centred:Boolean - makes the window centred on the screen (only works if Stage.align=="TL" and Stage.scaleMode=="noScale")
  • boundToStage:Boolean - Prevents the window from being dragged off stage, or disappearing if the stage is resized.

In addition, if you subclass this class, you have access to the property container, which refers to the Window instance itself, and the method closeWindow, which closes the container.

The code is here. Make sure to preserve the full package path or it won't work. Just put it in a folder within one of you classpaths and type the name into a symbol linkage or as the class name for a Form, before using it as a window content.

Sunday, September 21, 2003

Flash 7 feature - TextSnapshot

As the name suggests, a TextSnapshot is a snapshot of the text within a specific movieclip. This applies only to static textfields, but allows you to find out information about them that you could previously only do with dynamic fields, as well as doing things like detecting what character is at a specific screen coordinate.

This is a strange new feature of Flash 7 player. Useful, but hard to see how it fits in to any "great scheme". I mean, who builds that much static textual content into Flash movies these days anyway? My suspicion is that it ties in with some new, as yet unreleased, technology that Macromedia is working on. When can a static textfield in Flash really be dynamic...? Yep - when the swf itself is dynamically generated...