Monthly ArchiveMarch 2009



Just upgraded to version 2.7.1 of WordPress. Apparently my previous plugin update broke some old posts.

Right-clicking one of my swfs and selected ‘View Source’ won’t work for the time being. I think I’ll try to make some changes on how I do that stuff in the near future.

At the moment, “View source” links to

http://almostflan.com/2008/09/05/using-a-custom-class-as-an-mxml-base-to-completely-style-a-titlewindow/flex/sandbox/srcview/index.html

and it should link to

http://almostflan.com/flex/sandbox/srcview/index.html

I’ll fix this later, but first my taxes…

I recently updated some plugins and it appears to have broken some of my stuff. Working on it.

Thanks to DDDan for pointing this out.

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…