Okay so I learned something interesting recently. A few weeks ago, I met a guy who's smarter than me, and turns out he uses WidgetFactory. This got me curious, so I did a Google search. He's not the only one. It seems a widget community has sprung up while I've been distracted with other things, and WidgetFactory has (somehow) found its way into it. I wouldn't be so vain as to say that WidgetFactory is at the very core of the widget community and thousands of people are buying WidgetFactory T-shirts and Coffee Mugs (yet), but it has got mentions on a few blogs, and has even been 'tweeted'. One place called it 'Tristan Ward's Widget Factory'. That witted me out a bit, and gave me an itch of neglected responsibility. When we released the big W and F, Rod said to me: "Oh well, if nothing else we get to use it." That sort of made me believe I was the only one who was. Wrong, apparently.
My first reaction to this sudden surge in usage was, 'Uhh… Okay… I should probably release that new version I've been using for the past couple of months but hadn't released because I didn't think anyone was using it.' So here it is:
Here are the release notes: - Added method clearAnswerList() to allow you to clear out the Answer List - Added new event WidgetEvent.ENTER_WIDGET_PANEL_PREVIEW - Added a new 'slide' property. It allows you to access items on the Captivate Slide. - Added a new method, getSlideObjectByName() that will return the item on the Captivate Slide with the same name as you pass in - Improved ENTER_STAGE detection. - Fixed issue where viewing a widget at runtime on a user's hard drive (rather than a server) would cause the widget to stop working. However, if you view the .swf outside the .html file you will still see a Flash Security Error appear. Now the slide and getSlideObjectByName features are mind blowingly cool and powerful, but I have to say that the best thing about the new version is that the pesky Flash Security error that ruined a lot of people's fun has been squashed. In fact, I recommend that ANYONE who has released a widget that uses WidgetFactory IMMEDIATELY republish said widget using the new version. Otherwise you run the risk of messing up your client's course. Back to the 'slide' features coolishness. This new slide property gives you direct access to the Captivate slide Display Object, and allows you to access elements on the Captivate slide. If you give a Captivate Object (such as a Caption, or a Highlight Box) a name inside of Captivate, you can access that item by passing the name into the getSlideObjectByName() method. That method will then return you a reference to that Captivate Object, through which you can play with. So you'd set up your code like so: var myCaption:Sprite = getSlideObjectByName("myCaption"); And then do what you want to the captivate object through the myCaption variable! If you want more information on any of these new features, the documentation has been updated for the new version. Now there are probably a few of you wondering if this new version is compatibility with Captivate 5. The answer is 'no'. We're going to need to make some major changes to get WidgetFactory ready for CP5, but don't worry, we'll be getting that out to you as soon as possible. We're still working out how CP4 compatibility is going to fit in, so stay turned for more information. Until then, have a good play about with the new features, and get yourself to a copy of Captivate 5!