background preloader

Flash

Facebook Twitter

Overriding framework default implementations for mx.managers classes. How to set a custom ToolTipManager. I needed to set a custom implementation of the ToolTipManager (more struts for our life!!!). I was looking for solution and found it. Here it is. To register your own class you should invoke Singleton.registerClass(interfaceName, clazz) method with appropriate parameters.

If class with interfaceName have been registered yet you cannot override it . It means you cannot register class in creationComplete, initialize or preinitialize handlers. Here is the example of custom preloader class: Maybe anyone has another solution. AS3 Runtime Font Loading « nochump.com. Here’s a little experiment with loading fonts dynamically at runtime. So what’s this good for? Well let’s say you have a flash application where you want to allow users to customize the text formatting for some text box. Typically you would provide a small set of fonts which would all get embedded into the swf but this isn’t very flexible or ideal. Changing font’s or adding new one’s require rebuilding the swf. Flash never supported this feature but some developer’s found ways around it. Approach This isn’t new or anything, apparently all assets embedded in a swf become associated with a class and the ApplicationDomain object is the way to access classes in other swfs.

So first off, create the external font asset swf with something like the following: Keep track of the class names you use and the fontName attribute of the Embed statement as that will be font name you’ll have to use in a text format. If you’d like to grab a little demo with source, here’s a download. More Thoughts. Flex and Embedded Fonts « Alex’s Flex Closet. Embedding fonts from a Flash SWF file into a Flex application.