Posts Tagged ‘flash’


08.14.2009 / Loading a Remote Module into a Local App

At work, we deal a lot with loading modules residing on remote servers into our applications running locally.  By locally I mean from a local path on our hard drives (the default Flex Builder run/debug settings), not on a local web server instance (localhost).  Depending on what type of module we are loading, we would normally use one of Flex’s built-in functions to load modules:

// Loading a language resource module:
resourceManager.loadResourceModule('http://aaronhardy.com/en_US_ResourceModule.swf');
 
// Loading a style module (e.g., a compiled font swf):
StyleManager.loadStyleDeclarations("http://aaronhardy.com/fonts/Astroid.swf");
 
// Loading miscellaneous modules:
var moduleInfo:IModuleInfo = ModuleManager.getModule('http://aaronhardy.com/MyModule.swf');
moduleInfo.load();

But these methods of importing modules result in errors like the following:

Unable to load resource module from http://aaronhardy.com/en_US_ResourceModule.swf
Error: Unable to load style(SWF is not a loadable module): http://aaronhardy.com/fonts/Astroid.swf.

Continue reading »


07.03.2009 / Rain SVG

Businesses win customers when they deliver what customers want. Customers get what they want when they can customize products to their own preferences. At Rain, where I work, we recognize the profit potential that clients can achieve with this concept and have created many applications allowing users to design their own products. How do we do it? Let’s talk SVG.

Suppose we create a simple product designer containing a single rectangle. The user can rotate, scale, position, and color the rectangle. The rectangle will then be printed in spectacular fashion on the customer’s very own poster. So, Jim hops into the application and moves the rectangle to the center of the poster, doubles its size, colors it blue, then rotates it 45 degrees. He then saves his design.

How is Jim’s design saved? That is, how is Jim’s design described in such a way that (1) he can later re-open it and continue modifying his rectangle and (2) a printing shop can print his poster at virtually any size without degrading its quality? Continue reading »