Recently I’ve run into the problem of controlling the size of an embedded swf movie in a Flex application. The size of the stage in Flash didn’t match the size of the SWFLoader-loaded component in Flex for some reason. I tried putting a Canvas around it and using the clipContent field, but that didn’t. After a few hours of pain, though, I did get a somewhat reasonable solution.

This post should also serve as a very light example of applying a mask.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Canvas mask="{myMask}">
        <mx:SWFLoader source="path/to/mySwf.swf"/>
        <mx:UIComponent id="myMask"
            creationComplete="myMask.graphics.beginFill(0xff0000);myMask.graphics.drawRect(0,0,360,541);myMask.graphics.endFill()"/>
    </mx:Canvas>
</mx:Application>

Here, the size and location of the rectangle you draw in the myMask determines the visible area of the swf.

I haven’t yet cooked up an actual example showing what this actually does - maybe I’ll do so later…

On a different note, if anyone knows of a quick way (perhaps a wordpress plugin) to post an example coded in Flex Builder, let me know - it would be much appreciated! Right now, I’m bundling a release build and manually pushing it up each time with no regard to specific posts, then hard-linking…

Maybe I’ll write something to do it…knowing me it’ll never get done…

Tags: , , ,

Telling lies is a slippery business!

One of the nice things about Flex is that you can default stylistic elements such as padding from a top level via CSS declarations on the Application level. However, if the property you have in mind isn’t a Flex Style, it isn’t so easy to default.

A common example is the horizontalScrollPolicy and verticalScrollPolicy values of the Container class. For various reasons, Adobe (understandably) chose to make these two values properties instead of styles. They’re defaulted to “auto” which means scrollbars are created when needed, but often it would be more convenient if they were defaulted to “off”.

Anyway, here’s one way to default those values:

Continue Reading »

Tags: , , , , ,

The Flex framework provides a rich library of components right out of the box, but often creating a custom component is necessary. When the component is a container, you might want to use it as the base of an mxml file. Here’s how.

Continue Reading »

Tags: , , , , , , ,

So Photometria is hiring again. We’re looking for software developers in really any language and any level of experience (entry to senior). We do development in actionscript on the Flex framework.

The official description (no, I didn’t write that):

Software Engineer

Are you a power hacker who enjoys challenging and diverse problems? Does your keyboard sound like the Rachmaninoff piano concerto? Do you get excited creating highly interactive and visual applications? Do your friends like using them? Do you want your code to be used by millions more people? Would you thrive in an intense, fast moving, and fun environment of a startup? If you answered “yes” to these questions, then Photometria wants you!

Job Description: You will be involved in working on our industry-leading taaz.com web site. TAAZ combines powerful, cutting-edge computer vision technologies with unique user-interface techniques to create an amazingly simple virtual makeover tool. Most code is written in ActionScript (Flex), Javascript, and C++. Candidates are not expected to be Flex experts, but experience with Flex or other dynamic languages like Python or Ruby is a big plus. We are seeking candidates at all levels (from those with no-experience to very senior engineers). Candidates need to be self-motivated, possess strong programming skills, and be excited about learning new things. Positions are full time or contract-to-hire.

About Us: Photometria Inc., is a San Diego technology company whose virtual makeover web site, TAAZ, has attracted two million visitors in the five months since its launch. Underneath an intuitive and attractive interface and hidden from the user, Photometria, a spinout from the University of California, San Diego (UCSD), exploits a confluence of technologies in computer vision, computer graphics, and machine learning. Users start by uploading their own digital photo and then experiment with a palette of thousands of colors and shades of makeup product, colored contact lenses, and hairstyles. The results are immediate and incredibly realistic. Taaz.com’s social network allows users to share images and makeovers with friends. Beyond its own web site, Photometria is partnering with top brands, retailers, and media. We encourage applicants to visit Taaz and experience our technology first hand.

Apply: Email your resume to jobs@photometria.com . Include references to the websites you have helped build and explain your role. Position is in the San Diego office. You can start as soon as possible, and the pay is negotiable.

Tags: , ,

I just ran into a really great article about a couple Somalian Olympians. It’s too bad they didn’t show more of these on prime time coverage.

I copied the article to the full page view of this post just in case it disappears from Yahoo.

Yahoo link

Continue Reading »

So earlier this month, I set Kristi up with wordpress (as I have in the past with lots of other people). For some weird reason, the site was developed quickly and she actually posts on it… :O

Check it out here

If anyone else wants a wp blog for the price of a domain registration, I can host it ;)


In other news, Team USA demolishes Spain???

I did not see that one coming…

Anyway, maybe my thoughts on that at a later point.

Tags: , , , ,

I did some searching for a good plugin to embed swf files into wordpress posts and it seemed like lots of the ones I turned up were rather dated until I ran into this one by Matt Carpenter. It uses the latest version of the SWFObject project and is compatible with Wordpress 2.6.

Tags: , , ,

« Previous PageNext Page »