<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Widget King</title>
	<atom:link href="http://www.infosemantics.com.au/widgetking/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.infosemantics.com.au/widgetking</link>
	<description>So many widgets, so little time</description>
	<lastBuildDate>Tue, 03 Apr 2012 05:23:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Master Widget eSeminar</title>
		<link>http://www.infosemantics.com.au/widgetking/2012/04/master-widget-eseminar/</link>
		<comments>http://www.infosemantics.com.au/widgetking/2012/04/master-widget-eseminar/#comments</comments>
		<pubDate>Tue, 03 Apr 2012 01:53:25 +0000</pubDate>
		<dc:creator>Tristan</dc:creator>
				<category><![CDATA[eSeminars]]></category>
		<category><![CDATA[Interactive Widgets]]></category>
		<category><![CDATA[allen]]></category>
		<category><![CDATA[eSeminar]]></category>
		<category><![CDATA[infosemantics]]></category>
		<category><![CDATA[interactive]]></category>
		<category><![CDATA[master]]></category>
		<category><![CDATA[partridge]]></category>

		<guid isPermaLink="false">http://www.infosemantics.com.au/widgetking/?p=581</guid>
		<description><![CDATA[Shameless plug time! Part two of the &#8216;Enhancing Captivate eLearning with Interactive Widgets&#8217; eSeminar series featuring Allen Partridge and I is to be broadcast in a couple days! If you enjoyed part 1 (and even if you didn&#8217;t) I&#8217;m sure &#8230; <a href="http://www.infosemantics.com.au/widgetking/2012/04/master-widget-eseminar/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Shameless plug time!</p>
<p>Part two of the &#8216;Enhancing Captivate eLearning with Interactive Widgets&#8217; eSeminar series featuring Allen Partridge and I is to be broadcast in a couple days!</p>
<p>If you enjoyed part 1 (and even if you didn&#8217;t) I&#8217;m sure you&#8217;ll find this one a blast as we&#8217;re going to take on that widget-of-widgets the <a href="http://www.infosemantics.com.au/adobe-captivate-widgets/interactive-master">Infosemantics Interactive Master Widget.</a></p>
<p><a href="http://www.infosemantics.com.au/widgetking/wp-content/uploads/2012/04/InteractiveMaster_flat.jpg"><img class="aligncenter size-full wp-image-582" title="InteractiveMaster_flat" src="http://www.infosemantics.com.au/widgetking/wp-content/uploads/2012/04/InteractiveMaster_flat.jpg" alt="" width="200" height="200" /></a></p>
<p>DUN</p>
<p>DUN</p>
<p>DAH</p>
<p>Oh yes, be afraid&#8230; be very af- wait. No! Don&#8217;t be afraid! I mean the Master Widget may look big and tough with its talk of slide object slavery and forcibly scoring failures along with successes, but underneath that harsh tyrantulant exterior is a widget that just wants to be loved.</p>
<p>&#8230;</p>
<p>Yeah&#8230;</p>
<p>Seriously, the Master Widget isn&#8217;t that hard to learn. By the end of this eSeminar you&#8217;ll be best friends and sharing beers while talking about NASCAR. I&#8217;m still blown away by what you can do with it. It&#8217;s one tool you should not be without!</p>
<p><a href="http://www.adobe.com/cfusion/event/index.cfm?event=detail&amp;id=2006265&amp;loc=en_us">Click here to register for the Master Widget eSeminar and see how your eLearning can benefit from a little slavery.</a></p>
<p>Be there or be quadrilateral!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.infosemantics.com.au/widgetking/2012/04/master-widget-eseminar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Widget Rooms&#8211;Part 1</title>
		<link>http://www.infosemantics.com.au/widgetking/2012/03/widget-roomspart-1/</link>
		<comments>http://www.infosemantics.com.au/widgetking/2012/03/widget-roomspart-1/#comments</comments>
		<pubDate>Mon, 19 Mar 2012 04:24:41 +0000</pubDate>
		<dc:creator>Tristan</dc:creator>
				<category><![CDATA[Communication]]></category>
		<category><![CDATA[Theory]]></category>
		<category><![CDATA[Widgets]]></category>
		<category><![CDATA[agent]]></category>
		<category><![CDATA[bill]]></category>
		<category><![CDATA[communication]]></category>
		<category><![CDATA[jo]]></category>
		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false">http://www.infosemantics.com.au/widgetking/?p=574</guid>
		<description><![CDATA[From the dark widget ages it was theorised; in the widget revolution it was proved possible; but now moving into the next widget era, it is practical. What am I talking about? Widget communication. A Communication History The first Infosemantics &#8230; <a href="http://www.infosemantics.com.au/widgetking/2012/03/widget-roomspart-1/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>From the dark widget ages it was theorised; in the widget revolution it was proved possible; but now moving into the next widget era, it is practical. What am I talking about?</p>
<p>Widget communication.</p>
<h2>A Communication History</h2>
<p>The first Infosemantics widget to use a form of communication was the Event Handler widget. Initially only one Event Handler widget could pick up a right mouse click at any time. So it was built in that if any Event Handler widget detected a right click, they&#8217;d notify all other Event Handler widgets.</p>
<p>The next widget to use communication was the Interactive Drag and Drop widget. This was the project saw the development WidgetFactory communication architecture. To date I&#8217;d say the D&amp;D widget is still the best example of widget communication out there. In fact check out <a href="http://www.infosemantics.com.au/widgetking/2012/03/moar-eseminars/" target="_blank">our recent eSeminar on the Interactive Drag and Drop widget</a>, in there are a number of good examples of using multiple D&amp;D widgets to make powerful interactions. None of that would be possible without Widget Communication.</p>
<p>So how does it work?</p>
<h2>Widget Communication Explained</h2>
<p>The Widget Communication architecture is made up of three parties.</p>
<ol>
<li>The Widgets</li>
<li>The Rooms</li>
<li>The Agent</li>
</ol>
<p>Let&#8217;s meet them.</p>
<h3>The Widgets</h3>
<p>Meet WidgetBill and WidgetJo</p>
<p><a href="http://www.infosemantics.com.au/widgetking/wp-content/uploads/2012/03/MeetWidgets.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 0px; border: 0px;" title="MeetWidgets" src="http://www.infosemantics.com.au/widgetking/wp-content/uploads/2012/03/MeetWidgets_thumb.png" alt="MeetWidgets" width="437" height="378" border="0" /></a></p>
<p>WidgetBill and WidgetJo are best friends. They like to talk very loud, which unfortunately disturbs their neighbours. So they decide to start their own exclusive club, where they, and any other like minded individuals, can &#8216;dude&#8217; all they want.</p>
<p>First of all, they&#8217;ll need a room for their club to meet.</p>
<h2>The Room</h2>
<p>So Bill and Jo go ahead and design their club&#8217;s board room.<a href="http://www.infosemantics.com.au/widgetking/wp-content/uploads/2012/03/FindRoom.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 0px; border: 0px;" title="FindRoom" src="http://www.infosemantics.com.au/widgetking/wp-content/uploads/2012/03/FindRoom_thumb.png" alt="FindRoom" width="474" height="739" border="0" /></a></p>
<p>It may not come as a surprise to you that neither WidgetBill nor WidgetJo possess the craftsmanship skills to build their own room. So they search for an Agent.</p>
<h3>The Agent</h3>
<p>WidgetBill and WidgetJo manage to find an agent willing to take on building their room.</p>
<p><a href="http://www.infosemantics.com.au/widgetking/wp-content/uploads/2012/03/MeetAgent.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 0px; border: 0px;" title="MeetAgent" src="http://www.infosemantics.com.au/widgetking/wp-content/uploads/2012/03/MeetAgent_thumb.png" alt="MeetAgent" width="631" height="320" border="0" /></a></p>
<p>So the Agent goes away and does the following.</p>
<ol>
<li>First of all, he checks there are no similar clubs in the district that WidgetBill and WidgetJo could join instead. If there are none, he builds their room to spec.</li>
<li>The agent inducts WidgetBill and WidgetJo into the room&#8217;s member list (which all rooms have by default).</li>
<li>He gives WidgetBill and WidgetJo directions to their new room.</li>
</ol>
<p>And finally WidgetBill and WidgetJo have their own private room to communicate about anything they want.</p>
<p><a href="http://www.infosemantics.com.au/widgetking/wp-content/uploads/2012/03/TheEnd.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 0px; border: 0px;" title="TheEnd" src="http://www.infosemantics.com.au/widgetking/wp-content/uploads/2012/03/TheEnd_thumb.png" alt="TheEnd" width="490" height="455" border="0" /></a></p>
<p align="center"><span style="font-size: medium;">The End!</span></p>
<h2>Wha-?</h2>
<p>Okay, dudeish metaphors aside, what&#8217;s really going on?</p>
<p>The &#8216;widgets&#8217; we&#8217;re talking about are different widget instances in the exported Captivate runtime. They need to be able to communicate with each other without disturbing other widgets, so they create what&#8217;s called a Widget Room.</p>
<p>There are two types of rooms: Regular Rooms and Slide Rooms. <strong>Regular rooms</strong> can be joined by widgets anywhere in the Captivate Movie. <strong>Slide Rooms</strong> can be joined only by widgets on the same slide as the room&#8217;s attached to.</p>
<p>Now widgets can&#8217;t build the room themselves, because the two widget would end up creating two separate rooms that only they could join. So they pass the job of building the room off to the &#8216;agent&#8217;.</p>
<p>The agent takes information about the room and uses it to check if another room already exists with the same details. If there is no room, then the agent will create one. If there is a room, then it most likely exists because previously another widget asked the agent to create the room and that widget is now eagerly awaiting the arrival of the other widget. Now that the agent is in possession of a room (pre-created or otherwise) it adds the widget to the room&#8217;s member list, then passes back to the widget a reference to the room.</p>
<p>At the end of the day, the whole process is just a safe way of ensuring the two (or more) widgets have a reference to the same room object.</p>
<p>So on a conceptual level that&#8217;s how Widget Rooms work.</p>
<p>In the next post I&#8217;ll show you how to code your widgets in such a way as to create and join a room.</p>
<p>If you can&#8217;t wait till then, I suggest you check out the <a href="http://www.infosemantics.com.au/widgetfactory/doco/index.html" target="_blank">WidgetFactory documentation</a> and look at the classes under the widgetfactory.communication package.</p>
<p>Until then, PARTY ON DUDES!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.infosemantics.com.au/widgetking/2012/03/widget-roomspart-1/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Moar eSeminars!</title>
		<link>http://www.infosemantics.com.au/widgetking/2012/03/moar-eseminars/</link>
		<comments>http://www.infosemantics.com.au/widgetking/2012/03/moar-eseminars/#comments</comments>
		<pubDate>Tue, 13 Mar 2012 04:20:22 +0000</pubDate>
		<dc:creator>Tristan</dc:creator>
				<category><![CDATA[eSeminars]]></category>
		<category><![CDATA[allen partridge]]></category>
		<category><![CDATA[buzzword]]></category>
		<category><![CDATA[drag and drop]]></category>
		<category><![CDATA[eSeminar]]></category>
		<category><![CDATA[nuts]]></category>
		<category><![CDATA[shark jump]]></category>

		<guid isPermaLink="false">http://www.infosemantics.com.au/widgetking/?p=561</guid>
		<description><![CDATA[EDIT: You can watch this eSeminar for free right now by clicking here. It&#8217;s that time of year again. Time to dust off the microphone and screen capture software and do some eSeminars! The last eSeminars we did were over &#8230; <a href="http://www.infosemantics.com.au/widgetking/2012/03/moar-eseminars/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h3>EDIT: You can watch this eSeminar for free right now by <a href="http://www.adobe.com/cfusion/event/index.cfm?event=register_no_session&amp;id=2002880&amp;loc=en_us">clicking here</a>.</h3>
<p>It&#8217;s that time of year again. Time to dust off the microphone and screen capture software and do some eSeminars!</p>
<p>The last eSeminars we did were over a year ago. Since then the Drag and Drop Interactive and Master widgets have arrived on the scene, and come on, you know they deserve some&#8230; explaining.</p>
<p>And we shall not disapoint!</p>
<p><a href="http://www.adobe.com/cfusion/event/index.cfm?event=detail&amp;id=2001136&amp;loc=en_us">Register now</a> for a new series of eSeminars entitled:</p>
<h1>Enhancing Captivate eLearning with Interactive Widgets</h1>
<p>Up first is part 1 (though I considered starting with part 3 and working backwards like G-Lucas) all about Drag and Drop. Specifically the Interactive Drag and Drop widget (<a href="http://www.infosemantics.com.au/adobe-captivate-widgets/drag-and-drop/interactive">shameless link</a>). Under its fluffy exterior, this puppy is quite powerful. The objective of this eSeminar is to get you comfortable using multiple (count them: MULTIPLE) Drag and Drop Interactive widgets together to build interactions.</p>
<p>Sound like your idea of fun? Then shift forward your lunch break by two hours and join us on March 14, 10 AM Eastern US time for widgety goodness!</p>
<h3><a href="http://www.adobe.com/cfusion/event/index.cfm?event=detail&amp;id=2001136&amp;loc=en_us">Click here to register for this fun filled, horizon expanding, deadline delivering, buzzword abusing ESEMINAR!</a></h3>
<p>May include nut.</p>
<p>PS: If you&#8217;re very good and come, you may get a sneak peak at the next major version of the Interactive Drag and Drop widget.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.infosemantics.com.au/widgetking/2012/03/moar-eseminars/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>New Runtime Detection Explained</title>
		<link>http://www.infosemantics.com.au/widgetking/2011/12/new-runtime-detection-explained/</link>
		<comments>http://www.infosemantics.com.au/widgetking/2011/12/new-runtime-detection-explained/#comments</comments>
		<pubDate>Sat, 31 Dec 2011 06:54:04 +0000</pubDate>
		<dc:creator>Tristan</dc:creator>
				<category><![CDATA[Theory]]></category>
		<category><![CDATA[Widgets]]></category>
		<category><![CDATA[detection]]></category>
		<category><![CDATA[runtime]]></category>

		<guid isPermaLink="false">http://www.infosemantics.com.au/widgetking/?p=558</guid>
		<description><![CDATA[Cold on the heels of the release WidgetFactory 5.5 (well 5.6 now), I&#8217;d like to take some time to explain one of the major new features: Runtime Detection. What is Runtime Detection? In short, Runtime Detection is the method for &#8230; <a href="http://www.infosemantics.com.au/widgetking/2011/12/new-runtime-detection-explained/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Cold on the heels of the release WidgetFactory 5.5 (well 5.6 now), I&#8217;d like to take some time to explain one of the major new features: Runtime Detection.</p>
<p>What is Runtime Detection? In short, Runtime Detection is the method for working out when the Captivate Movie is playing through the period of time the widget is set to appear in.</p>
<p><a href="http://www.infosemantics.com.au/widgetking/wp-content/uploads/2011/12/YouAreHere.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 0px; border-width: 0px;" title="YouAreHere" src="http://www.infosemantics.com.au/widgetking/wp-content/uploads/2011/12/YouAreHere_thumb.png" alt="YouAreHere" width="527" height="138" border="0" /></a></p>
<p>Now this is an interesting topic because there are many ways to do this, but finding one that is reliable AND CPU friendly AND can tell when you&#8217;ve moved out of the widget&#8217;s runtime period is difficult. In fact, one person described it as: &#8216;Taming an elusive wild jackalope.&#8217;</p>
<p>So before discussing the new Runtime Detection method, let&#8217;s take a look at a few alternative methods.</p>
<h2></h2>
<h2>The isWidgetVisible() Method</h2>
<p>If you cast your memory back to the days of early widget programing with the Adobe Widget Template (if anyone has memories of those days), a very important part of the widget everything was the &#8216;movieHandle&#8217; object. This object has a method called isWidgetVisible(). isWidgetVisible() will tell you very reliably if your widget is being displayed in that special &#8216;runtime&#8217; section. If you call it it will return true if you&#8217;re at runtime, and false if you&#8217;re not. For this to be useful, you have to set up an ENTER_FRAME event listener to check this method on each frame of the movie. This is true regardless of what slide the movie is currently playing through, of if the movie&#8217;s playing at all. In other words, this calculation is going on continually.</p>
<p>Now to it&#8217;s credit, it will detect runtime reliably, and it will also notice when the widget has moved out of runtime &#8211; but there&#8217;s a catch.</p>
<p>If you only have one widget in your movie, then this calculation isn&#8217;t much of a burden. But each time you add a new widget, an extra calculation is added. So if you have 10 widgets in the Captivate Movie, that&#8217;s 10 checks of isWidgetVisible() every frame. If the movie plays back at 30 frames a second, then that&#8217;s 300 checks a second. If you have 50 widgets in your movie then that&#8217;s 15,000 checks of isWidgetVisible() a second. After a while it starts to add up, slows down the movie. This is especially true on low end computers which may be used by a majority of the Captivate Movie&#8217;s audience.</p>
<p>Widgets are becoming more and more plentiful in Captivate Movies. Once upon a time, Captivate movies may only have had one or two widget in them. Now however, it&#8217;s not out of the range of possibility for one movie to have hundreds of widgets.</p>
<p>So let&#8217;s sum the method up:</p>
<p>Pros</p>
<ul>
<li>Reliable</li>
<li>Can detect entering and exiting runtime</li>
</ul>
<p>Cons</p>
<ul>
<li>The combined runtime calculations slow down the movie. So you&#8217;ve caught your jackalope, but it&#8217;s dragging its heels, and slowing you to a crawl.</li>
</ul>
<p>From the very start, I decided this was not a viable form of runtime detection for WidgetFactory. When WidgetFactory was first released, widgets were still a new and scary feature of Captivate, and if they started to get a reputation of &#8216;slowing the movie down&#8217; that could have killed them right there and then.</p>
<p>So I started to look for another way of detecting runtime.</p>
<h2>The Old Method</h2>
<p>What happens when a widget hits that special runtime period? In all honesty, not much. Widgets aren&#8217;t &#8216;created&#8217; when they are displayed on the slide, they&#8217;re created right at the start of the movie. All the widget&#8217;s setup processes are handled by a different object, so it&#8217;s very difficult to find something that signals &#8216;runtime happening now&#8217;.</p>
<p>There is however, one thing that sets runtime apart from… non-runtime(?). Runtime is the only time in the Captivate movie where the widget is visible. Which means at that point Captivate must turn the widget&#8217;s visibility on.</p>
<p>BING! That&#8217;s different.</p>
<p>Now to cut a long story short, due to the ability in object oriented programming to override stuff, WidgetFactory was able to hack into the &#8216;visible&#8217; switch for the widget, and call the enterRuntime() template method when the widget was turned &#8216;on&#8217;.</p>
<p>However, there was a problem with this. First of all, this only worked if the widget WAS going to be shown during this runtime period. If the visible checkbox on in the widget&#8217;s settings was turned off, then the widget wouldn&#8217;t be made visible at runtime and therefore runtime detection flat out didn&#8217;t work. <img class="wlEmoticon wlEmoticon-sadsmile" style="border-style: none;" src="http://www.infosemantics.com.au/widgetking/wp-content/uploads/2011/12/wlEmoticon-sadsmile.png" alt="Sad smile" /></p>
<p><a href="http://www.infosemantics.com.au/widgetking/wp-content/uploads/2011/12/SNAG_Program-0020.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 0px; border-width: 0px;" title="SNAG_Program-0020" src="http://www.infosemantics.com.au/widgetking/wp-content/uploads/2011/12/SNAG_Program-0020_thumb.png" alt="SNAG_Program-0020" width="337" height="94" border="0" /></a></p>
<p>What&#8217;s more, although this method could pick up when the widget was being made visible, it did not pick up when the widget was being made invisible, because for some reason Captivate doesn&#8217;t directly turn the widget&#8217;s visibility off, but rather does so to one of its parents. So let&#8217;s break this method down again:</p>
<p>Pros:</p>
<ul>
<li>No Enter Frame loop, so doesn&#8217;t leave a CPU footprint.</li>
</ul>
<p>Cons</p>
<ul>
<li>Not Reliable. The jackalope&#8217;s still prancing about free.</li>
<li>Can&#8217;t detect exiting runtime.</li>
</ul>
<p>Although this method did not tax the computer&#8217;s resources, it was a bit frustrating to work with, and under certain circumstances, such as playbar scrubbing, didn&#8217;t work at all as expected.</p>
<p>So it was &#8216;okay&#8217; but not really &#8216;good&#8217;. We could do better. In fact, I had an idea for a better method, but it only became achievable after WidgetFactory 5.1.</p>
<h2>The New Method</h2>
<p>What if we didn&#8217;t have to rely on Captivate to tell us when the widget was in runtime? What if we could work it out for ourselves? You know, be assertive and all that. Unfortunately for a long time this was not possible because we were lacking some key pieces of information. Although it wasn&#8217;t very difficult to work out which slide the widget would appear on, it was, on the other hand, very difficult to establish which frames of the slide the widget was supposed to start and end on.</p>
<p>I can tell you there was much searching through Captivate&#8217;s innards to try and find a place that listed it clearly. Eventually it was discovered that widgets have XML attached to them which details on how the Captivate Author set up the widget (including when they set it to appear on the timeline <img class="wlEmoticon wlEmoticon-openmouthedsmile" style="border-style: none;" src="http://www.infosemantics.com.au/widgetking/wp-content/uploads/2011/12/wlEmoticon-openmouthedsmile.png" alt="Open-mouthed smile" />). This information was made available in WidgetFactory 5.1 through the widgetInfo property. The new runtime method takes advantage of three properties of widgetInfo: startFrame, endFrame, and isDisplayedForRestOfSlide.</p>
<p>Here&#8217;s the idea: WidgetFactory 5.5 widgets now have a partner in crime, the Widget Manager. The Widget Manager is like a club that every widget will join. When registering with this club, the widget provides information about itself, including the startFrame, endFrame, and isDisplayedForRestOfSlide data from widgetInfo. The Widget Manager is independent. There is only one Widget Manager in a movie no matter how many widgets there are.</p>
<p>Keep that in mind while I talk about something completely different. Did you know there&#8217;s a real neat method in ActionScript called addFrameScript()? It allows you to link a function to a particular frame of a MovieClip. So when the flash movie is playing that Movie Clip and it hits that frame, your function will be called.</p>
<p>With the information available from widgetInfo, we can now tell what frames of the slide the widget starts and ends on. So the Widget Manager uses addFrameScript() to attach a function to those frames of the slide. These force each widget on the current slide to perform a check to see whether they are in runtime.</p>
<p>So when the Captivate movie is playing through a slide and it hits the start frame for a widget, all the widgets on the slides check themselves to see if they&#8217;re in runtime. Those that are, call their enterRuntime() method. As the movie plays along further, it will bump into the end frame for the widget, at which point, the widgets check themselves again to see if they&#8217;ve exited runtime. If so they call the exitRuntime() method.</p>
<p>Now this is fine assuming that the movie will always play the frames in order (1, 2, 3, 4, 5). But in practice that doesn&#8217;t always happen. Sometimes when the Captivate movies is running low on resources it will skip a frame or two (1, 2, 4, 6, 7). If the movie skipped the start frame for a widget, then the widget wouldn&#8217;t call enterRuntime() AND THE WHOLE WORLD WOULD EXPLODE!</p>
<p>So to get around this inconvenient combustion, the Widget Manager (and ONLY the Widget Manager) has an ENTER_FRAME loop which continually checks if there has been a frame skip. If there has, it makes every widget on the current slide check itself to see if it has entered or exited runtime. This also clears up many of the issues encountered with the audience scrubbing the playbar. You will never get two enterRuntime() calls together without an exitRuntime() call in-between them. This allows you to load and unload the widget with the enterRuntime() and exitRuntime() methods reliably. Seeing as there is only one Widget Manager in the movie, regardless of the number of widgets, the ENTER_FRAME calculations don&#8217;t accumulate. The load remains consistent and manageable.</p>
<p>In other words: You can catch your Jackalope and eat it too.</p>
<p>Let&#8217;s review:</p>
<p>Pros:</p>
<ul>
<li>Very reliable.</li>
<li>Can detect runtime exit.</li>
<li>A Single Enter Frame loop that doesn&#8217;t increase the load as more widgets are added.</li>
<li>Plays nice with movie scrubbing.</li>
<li>Works well with widgets that are displayed for rest of project.</li>
</ul>
<p>Cons:</p>
<ul>
<li>None that I&#8217;ve found so far.</li>
</ul>
<h2>Conclusion</h2>
<p>This new Runtime Detection should give widgets a firmer ground to stand on as they continue to explore new worlds of possibilities.</p>
<p>Such as… Perhaps… Communication.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.infosemantics.com.au/widgetking/2011/12/new-runtime-detection-explained/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>A Word on Partial Scoring</title>
		<link>http://www.infosemantics.com.au/widgetking/2011/10/a-word-on-partial-scoring/</link>
		<comments>http://www.infosemantics.com.au/widgetking/2011/10/a-word-on-partial-scoring/#comments</comments>
		<pubDate>Wed, 26 Oct 2011 10:34:29 +0000</pubDate>
		<dc:creator>Tristan</dc:creator>
				<category><![CDATA[Interactive Widgets]]></category>
		<category><![CDATA[Question Widgets]]></category>
		<category><![CDATA[Widgets]]></category>
		<category><![CDATA[interactive]]></category>
		<category><![CDATA[master]]></category>
		<category><![CDATA[partial]]></category>
		<category><![CDATA[scoring]]></category>
		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false">http://www.infosemantics.com.au/widgetking/?p=546</guid>
		<description><![CDATA[So Rod had been on to me for a long time to look into partial scoring. Which is basically a way of conveying &#8221;You sorta got it right, but not entirely&#8221; as a quiz score. Currently all Captivate Quiz Questions and Interactive Objects &#8230; <a href="http://www.infosemantics.com.au/widgetking/2011/10/a-word-on-partial-scoring/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So Rod had been on to me for a long time to look into partial scoring. Which is basically a way of conveying &#8221;You sorta got it right, but not entirely&#8221; as a quiz score. Currently all Captivate Quiz Questions and Interactive Objects can only report two scores: Zero and whatever number you gave it other than zero.</p>
<p><a href="http://www.infosemantics.com.au/widgetking/wp-content/uploads/2011/10/THATNumber.png"><img class="aligncenter size-full wp-image-547" title="THATNumber" src="http://www.infosemantics.com.au/widgetking/wp-content/uploads/2011/10/THATNumber.png" alt="" width="323" height="290" /></a></p>
<p>This static score is a bit limiting, and many people out there, who are extending the bounds of what Captivate can do, have been trying to find ways around it. Until recently the only viable method was employing Javascript. Which, for the non-programmatically minded, is &#8211; uh &#8211; Javascript.</p>
<p>So we wanted to find a way to open up the world of partial scoring to the grand populous. After a little more Captivate spelunking we found a way to BEND CAPTIVATE TO OUR WILL! MUAHAHA! The rest, as they say, is <a href="http://www.infosemantics.com.au/interactivemaster">the Infosemantics Interactive Master Widget Version 1.1!</a></p>
<p>Don&#8217;t believe me? Take a look at this video here:</p>
<p><iframe src="http://www.youtube.com/embed/DCjYzHejMdk?hd=1" frameborder="0" width="560" height="315"></iframe></p>
<p>Pretty cool right?</p>
<p>And before you ask, yes this will be in the next version of WidgetFactory. Definitely for Interactive Widgets, most likely for Question Widgets too. WidgetFactory 5.6 shouldn&#8217;t be too far away and you can harness the awesome power of partial scoring for your very own widgets!</p>
<p>Bonn appetite!</p>
<p>(And yes I know I haven&#8217;t blogged about the features in WidgetFactory 5.5 yet. STILL GETTING AROUND TO IT!)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.infosemantics.com.au/widgetking/2011/10/a-word-on-partial-scoring/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>An Introduction to the Infosemantics Master Widget</title>
		<link>http://www.infosemantics.com.au/widgetking/2011/10/an-introduction-to-the-infosemantics-master-widget/</link>
		<comments>http://www.infosemantics.com.au/widgetking/2011/10/an-introduction-to-the-infosemantics-master-widget/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 08:42:36 +0000</pubDate>
		<dc:creator>Tristan</dc:creator>
				<category><![CDATA[eSeminars]]></category>
		<category><![CDATA[Interactive Widgets]]></category>
		<category><![CDATA[Widgets]]></category>
		<category><![CDATA[captivate]]></category>
		<category><![CDATA[flesh]]></category>
		<category><![CDATA[interactive widget]]></category>
		<category><![CDATA[master]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://www.infosemantics.com.au/widgetking/?p=541</guid>
		<description><![CDATA[I&#8217;m afraid I haven&#8217;t had time to put up another blog post for a while now, because I&#8217;ve been too busy doing this! Here we are, two videos for the Infosemantics Interactive Master Widget (or &#8216;Master Widget&#8217; for much shorter). &#8230; <a href="http://www.infosemantics.com.au/widgetking/2011/10/an-introduction-to-the-infosemantics-master-widget/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m afraid I haven&#8217;t had time to put up another blog post for a while now, because I&#8217;ve been too busy doing this!</p>
<p>Here we are, two videos for the <a href="http://www.infosemantics.com.au/interactivemaster/help">Infosemantics Interactive Master Widget</a> (or &#8216;Master Widget&#8217; for much shorter).</p>
<p><a href="http://www.infosemantics.com.au/widgetking/wp-content/uploads/2011/10/InteractiveMaster_flat.jpg"><img class="aligncenter size-full wp-image-542" title="InteractiveMaster_flat" src="http://www.infosemantics.com.au/widgetking/wp-content/uploads/2011/10/InteractiveMaster_flat.jpg" alt="" width="200" height="200" /></a></p>
<p>The first one has me, in the flesh, introducing the concepts behind the Master Widget:</p>
<p><iframe src="http://www.youtube.com/embed/ML2WHPWSzdM" frameborder="0" width="560" height="315"></iframe></p>
<p>The next one has me, less in the flesh, showing how to use the Master Widget to create an interaction with our <a href="http://www.infosemantics.com.au/dragdrop/interactive">Drag and Drop Interactive Widget </a>(double publicity!).</p>
<p><iframe src="http://www.youtube.com/embed/fTzGB8BoXFk" frameborder="0" width="560" height="315"></iframe></p>
<p>Please leave a comment bellow if you have any questions about the Master widget.</p>
<p>Also I&#8217;d like to say that if you have an Interactive Widget publicly available which is not built with WidgetFactory, feel free to <a href="http://www.infosemantics.com.au/widgetking/contact/">flick me an e-mail </a>and I&#8217;ll let you know how to get it to work with the Master Widget.</p>
<p>Happy slave driving!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.infosemantics.com.au/widgetking/2011/10/an-introduction-to-the-infosemantics-master-widget/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WidgetFactory 5.5.1 and Question Pools</title>
		<link>http://www.infosemantics.com.au/widgetking/2011/09/widgetfactory-5-5-1-and-question-pools/</link>
		<comments>http://www.infosemantics.com.au/widgetking/2011/09/widgetfactory-5-5-1-and-question-pools/#comments</comments>
		<pubDate>Thu, 15 Sep 2011 03:22:57 +0000</pubDate>
		<dc:creator>Tristan</dc:creator>
				<category><![CDATA[Captivate Movie Structure]]></category>
		<category><![CDATA[Question Widgets]]></category>
		<category><![CDATA[WidgetFactory Builds]]></category>
		<category><![CDATA[5.5.1]]></category>
		<category><![CDATA[getSlideObjectByName]]></category>
		<category><![CDATA[question pools]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[random question slide]]></category>
		<category><![CDATA[widgetfactory builds]]></category>

		<guid isPermaLink="false">http://www.infosemantics.com.au/widgetking/2011/09/widgetfactory-5-5-1-and-question-pools/</guid>
		<description><![CDATA[Just a quick post to let you know that I released a minor update to WidgetFactory which fixes some problems with widgets in question pools. Click here to get the update. While I&#8217;m here I may as well talk about &#8230; <a href="http://www.infosemantics.com.au/widgetking/2011/09/widgetfactory-5-5-1-and-question-pools/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Just a quick post to let you know that I released a minor update to WidgetFactory which fixes some problems with widgets in question pools. <a href="http://code.google.com/p/widgetfactory/downloads/list?saved=1&amp;ts=1316049562" target="_blank">Click here to get the update</a>.</p>
<p>While I&#8217;m here I may as well talk about what I&#8217;ve learnt about question pools.</p>
<h2>Whatfore art thou Question Pools?</h2>
<p>From the Captivate author&#8217;s standpoint, question pools are a group that they can assign certain quiz questions to. These questions are kept separate from the rest of the lesson and left to their own devices would never appear in the movie. However, when a &#8216;Random Question Slide&#8217; is added to the movie, it will pick a random question, from the pool of your choice, to display in the movie. This way the audience will get different quiz questions for each time they watch the lesson.</p>
<p>Here is what&#8217;s going on behind the scenes to make this happen:</p>
<p>When the Captivate Movie is opened all the question pool slides are created and then stored in a sort of waiting room which is separate from other slides in the movie. Random question slides however, are created and placed where the Captivate Author set them to appear in the movie. When the movie enters a random question slide, it goes searching in the waiting room for a question pool slide to display. When it finds one, the random question slide makes itself the parent of the chosen slide. So <strong>the random question slide is not replaced by the question pool slide, it becomes the parent of the question pool slide</strong>. The question pool slide is inside the random question slide. You have a slide inside a slide.</p>
<p><a href="http://www.infosemantics.com.au/widgetking/wp-content/uploads/2011/09/QuestionPoolStructure.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="QuestionPoolStructure" border="0" alt="QuestionPoolStructure" src="http://www.infosemantics.com.au/widgetking/wp-content/uploads/2011/09/QuestionPoolStructure_thumb.png" width="498" height="706"></a></p>
<p>When the audience moves to the next random question slide, it will then go to the waiting room and pick its question pool slide.</p>
<p>So here are a few things to remember:</p>
<ol>
<li>Random question slides are slides in their own right. Not just placeholders for the quiz slide.</li>
<li>The decision on which question pool slide will appear in the movie is not made until just before the audience enters it.</li>
<li>Question pool slides are not counted with the other slides in the movie. So they don&#8217;t have a slide number assigned to them.</li>
<li>Random question slides however, do have a slide number assigned to them.</li>
<li>If you had a widget on another slide of the movie which is trying to access slide elements on the question pool slide with getSlideObjectByName(), then it won&#8217;t work. Because getSlideObjectByName() will be searching for the slide elements in the random question slide, not the question pool slide.</li>
</ol>
<p>So what does this topsy turvy system mean if you&#8217;re building a widget which might be used on a question pool slide?</p>
<h2>Widgets and Question Pools</h2>
<p>Perhaps the most significant difference is that the enterMovie() template method is not called at the start of the movie after the widget has set itself up. This is because the question pool slides are in the waiting room at the start of the movie and therefore outside the typical Captivate Movie structure. At this time WidgetFactory is unable to locate the elements it needs to set up the widget (like slides and the Captivate Main Timeline). So the widget delays its setup until the question pool slide is added as a child to the random question slide. The slide is now part of the typical Captivate Movie structure and the widget can find the elements it needs to set itself up, after doing that the enterMovie() Template Method will be called.</p>
<p>This delay in enterMovie() can cause some troubles if your widget is trying to join a widget room. I haven&#8217;t written an article on these yet, but when I do I will explain that it&#8217;s usually best behaviour for your widget to join rooms at the start of the movie. In other words: In the enterMovie() template method.</p>
<p>Now I&#8217;m afraid it&#8217;s not all good news and clean shoes. Although widgets now co-exist with question pools in Captivate 5 and Captivate 5.5, in Captivate 4 they are still at odds. Actually, they don&#8217;t work full stop. From the tests I&#8217;ve done, I can tell you that the movie doesn&#8217;t even get to the point of creating the widget before experiencing a terminal cardiac arrest. There is some error inside Captivate that prevents the widget being created and therefore the problem can&#8217;t be fixed in WidgetFactory. The good news is that the bug has already been fixed! So if you&#8217;re getting complaints from a user, tell them to upgrade to Captivate 5/5.5.</p>
<p>I hope that makes the pool a little clearer for your guys. Time to dive in!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.infosemantics.com.au/widgetking/2011/09/widgetfactory-5-5-1-and-question-pools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WidgetFactory 5.5</title>
		<link>http://www.infosemantics.com.au/widgetking/2011/09/widgetfactory-5-5/</link>
		<comments>http://www.infosemantics.com.au/widgetking/2011/09/widgetfactory-5-5/#comments</comments>
		<pubDate>Mon, 05 Sep 2011 03:31:00 +0000</pubDate>
		<dc:creator>Tristan</dc:creator>
				<category><![CDATA[Debugging]]></category>
		<category><![CDATA[WidgetFactory Builds]]></category>
		<category><![CDATA[Widgets]]></category>

		<guid isPermaLink="false">http://www.infosemantics.com.au/widgetking/?p=524</guid>
		<description><![CDATA[It&#8217;s been a long time coming, and now it&#8217;s here&#8230; 5 POINT 5 YEEEEEHAAAA! That&#8217;s not to say that WidgetFactory 5.1 wasn&#8217;t compatible with Captivate 5.5, but&#8230; Yeah. WidgetFactory 5.5 has many new features, but there are three major ones. I &#8230; <a href="http://www.infosemantics.com.au/widgetking/2011/09/widgetfactory-5-5/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a long time coming, and now it&#8217;s here&#8230;</p>
<p><a href="http://www.infosemantics.com.au/widgetking/wp-content/uploads/2011/09/WidgetFactory5_5Logo.png"><img class="aligncenter size-full wp-image-531" title="WidgetFactory5_5Logo" src="http://www.infosemantics.com.au/widgetking/wp-content/uploads/2011/09/WidgetFactory5_5Logo.png" alt="" width="519" height="101" /></a></p>
<p>5 POINT 5 YEEEEEHAAAA!</p>
<p>That&#8217;s not to say that WidgetFactory 5.1 wasn&#8217;t compatible with Captivate 5.5, but&#8230; Yeah.</p>
<p>WidgetFactory 5.5 has many new features, but there are three major ones. I will briefly describe them here, and then in the coming weeks write a post that goes into greater detail for each of them.</p>
<p>Just before I delve in here, I&#8217;d like to say that anyone out there who has an Interactive Widget should update to 5.5 as soon as possible. Why? All I can say is&#8230; Stay tuned <img src='http://www.infosemantics.com.au/widgetking/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h2>Debugging</h2>
<p>Debugging has always been difficult with widgets, because the only true way to test them is to pull them in to Captivate and see how they fare. When a swf leaves the confines of its design environment a lot of its debugging features leave as well.</p>
<p>WidgetFactory 5.5 now has an interface to trace to external debuggers. This interface is focused on delivering the best debug experience for widgets.</p>
<p>If you need information on how to use these features before I write the next article, see the <a href="http://www.infosemantics.com.au/widgetfactory/doco/index.html">documentation </a>under the WidgetDebugger class.</p>
<h2>Communication</h2>
<p>Widgets have come a long way since they were released, they are moving past childhood and into the awkward stages of adolescence. Probably no other milestone will be more awkward, or powerful, than communication with other widgets. But do not worry, because WidgetFactory 5.5 is here to ease the awkwardness.</p>
<p>Just a note up front, the communication architecture in 5.5 is not the only way that widgets can communicate with each other. In fact there are many ways that communication can be done. The hope is this architecture will help to establish a standard which will allow different types of widgets (even those created by separate developers) to communicate with each other.</p>
<p>Here&#8217;s the concept: There is a &#8216;room&#8217; and widgets can become &#8216;members&#8217; of the room. By joining the room, widgets can contact each other and make decisions that take into account all other members of the room. Alternatively, the room itself could become a middle man for its members, it receives requests from widgets and decides which should be acted upon.</p>
<p>WidgetFactory 5.5 provides two types of rooms:</p>
<ul>
<li><strong>Global Rooms:</strong> Are available for all widgets to register with, no matter where they are in the movie. (See the <a href="http://www.infosemantics.com.au/widgetfactory/doco/index.html">BaseRoom</a> class in the documentation)</li>
<li><strong>Slide Rooms:</strong> Are only open to widgets on a certain slide. (See the <a href="http://www.infosemantics.com.au/widgetfactory/doco/index.html">BaseSlideRoom</a> class in the documentation)</li>
</ul>
<p>When your widget creates a room it has to decide what type of object the room will be. A room could be created with the BaseRoom or BaseSlideRoom classes listed above, or a class of your own creation that extends either BaseRoom or BaseSlideRoom.</p>
<p>Anyway, more information on this to come. Until then, the third major feature is&#8230;</p>
<h2>Runtime Detection</h2>
<p>Runtime detection is how a widget detects the Captivate Movie is playing through the time period the widget is supposed to appear. Now this doesn&#8217;t sound like such a big deal, but believe me, it is.</p>
<p>The problem is not so much finding a way to detect runtime, but finding a way that doesn&#8217;t chew up CPU. It&#8217;s a balancing act of accuracy and resources, and with WidgetFactory 5.5 we&#8217;ve found that balance. I&#8217;ll tell you more about the method in another post. <img src='http://www.infosemantics.com.au/widgetking/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>When a widget &#8216;detects runtime&#8217; it will call the enterRuntime() template method. We&#8217;ve all used that one right? (&lt;&#8211; I knew this was a mistake the instant I typed it. But I kept it in and wrote this aside instead. Go figure). One thing that always bothered me about the &#8216;enterRuntime()&#8217; template method was that it had no &#8217;exitRuntime()&#8217; method to balance it out. Well guess what&#8230; now there is!</p>
<p>enterRuntime() is called when the Captivate Movie enters the period of time that the widget is set to appear, and exitRuntime() is called when the movie exits that period. This will make things like loading and unloading the widget much easier. In my projects now I find myself using exitRuntime() just as much as enterRuntime().</p>
<p>Now there is one side effect of this new system that may cause a hiccup for certain widgets. Previously, runtime detection was tied into the widget&#8217;s visibility. However, with the new system enterRuntime() and exitRuntime() are called regardless of whether the widget is visible or not. Again, I&#8217;ll go more into this in a later post.</p>
<h2>Everything Else</h2>
<p>Besides those features there are a number of small additions:</p>
<h3>Features</h3>
<ul>
<li>Slide Label features can now be used in all versions of Captivate. However, they still can&#8217;t be used when Captivate&#8217;s accessibility features are turned off.</li>
<li>New property <strong>itemName</strong> allows you to read the item name the Captivate Author gave the widget (Note: At runtime InteractiveWidgets get a suffix added to the end of their name, which leads me to&#8230;).</li>
<li>New constant <strong>INTERACTIVE_WIDGET_SUFFIX</strong> holds the suffix that Captivate slaps on the end of Interactive Widget item names (The suffix is: _iWidgetAS3)</li>
<li>Eliminated the need for translatePropertiesXML(). Properties are now translated the first time you access them at runtime.</li>
<li>New property <strong>isCaptivate4Embedded</strong> indicates if the widget is embedded into a Captivate 4 movie (rather than being externalized).</li>
<li>Added new <strong>WidgetEvent INTERACTIVE_WIDGET_SUBMITTED</strong> event which is dispatched when an InteractiveWidget sets success or failure.</li>
<li>Added new <strong>WidgetEvent RESET_CRITERIA</strong> event which is dispatched when an InteractiveWidget calls resetCriteria().</li>
<li>Added new property <strong>captivateMainTimeline</strong>, which is exactly the same as cpVariables, but with a more appropriate name.</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>Fixed bug where Widget Properties did not appear to be saved under certain circumstances in Captivate 5.</li>
<li>Fixed a bug regarding QuestionWidgets and failure levels.</li>
<li>Corrected spelling mistake on WidgetInfo property maxAttempts.</li>
<li>getSlideObjectByName() now takes into the account the possibility of the Interactive Widget suffix.</li>
</ul>
<h3>Known Bugs</h3>
<ul>
<li>If a question widget is on the first slide of the movie, the enableAnswers() Template Method will be called before enterRuntime().</li>
</ul>
<p>That&#8217;s a lot of new stuff to play around with. Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.infosemantics.com.au/widgetking/2011/09/widgetfactory-5-5/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Testing Your Widgets</title>
		<link>http://www.infosemantics.com.au/widgetking/2011/06/testing-your-widgets/</link>
		<comments>http://www.infosemantics.com.au/widgetking/2011/06/testing-your-widgets/#comments</comments>
		<pubDate>Mon, 27 Jun 2011 13:35:19 +0000</pubDate>
		<dc:creator>Tristan</dc:creator>
				<category><![CDATA[Testing]]></category>
		<category><![CDATA[Widgets]]></category>
		<category><![CDATA[captivate 4]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://www.infosemantics.com.au/widgetking/?p=521</guid>
		<description><![CDATA[I&#8217;m taking a break from Captivate family relations for a moment (they&#8217;re so sensitive!) to touch on a rather essential topic. You can do all the IDE fooling you want, but like it or not, at some point you have &#8230; <a href="http://www.infosemantics.com.au/widgetking/2011/06/testing-your-widgets/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m taking a break from Captivate family relations for a moment (they&#8217;re so sensitive!) to touch on a rather essential topic.</p>
<p><a href="http://www.infosemantics.com.au/widgetking/wp-content/uploads/2011/06/TESTING.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 0px; border: 0px;" title="TESTING" src="http://www.infosemantics.com.au/widgetking/wp-content/uploads/2011/06/TESTING_thumb.png" border="0" alt="TESTING" width="331" height="47" /></a></p>
<p>You can do all the <a href="http://www.infosemantics.com.au/widgetking/?p=403" target="_blank">IDE fooling</a> you want, but like it or not, at some point you have to test your widget where it&#8217;s intended to run (in case you don&#8217;t know (and it&#8217;s a little worrying if you don&#8217;t) that&#8217;s Captivate). Which means you&#8217;ll find problems, which means you&#8217;ll code solutions, which means you&#8217;ll publish a new version of the widget, which means you&#8217;ll need to update the widget in Captivate to the current version, which means you&#8217;ll test again, which means you&#8217;ll find problems, and you&#8217;ll start the process all over again.</p>
<p>This, not surprisingly, takes time, and in the cutthroat world or widget building (yeah&#8230; no) we want to maximize our efficiency right?</p>
<p>So here&#8217;s how I go about testing my widgets.</p>
<h1>General Testing Setup</h1>
<p>I have a directory on my system where I keep all my widget test files. In there I have three different Captivate projects. They are:</p>
<ul>
<li>TestWidgetCP4</li>
<li>TestWidgetCP5</li>
<li>TestWidgetCP5_5</li>
</ul>
<p>Usually I&#8217;ll do my main testing in Captivate 5 because Captivate 4 has no easy update feature, and Captivate 5.5 currently has some problems as regards updating widgets. I&#8217;ll only test in Captivate 4 or Captivate 5.5 for the sake of making sure the widget works in those versions.</p>
<p>Inside my TestWidgetCP5 file I have a specific structure, it goes like so:</p>
<h2>Slide 1: Main Testing Slide</h2>
<p>This slide holds the widget and any objects that it&#8217;s interacting with. It will be the first slide to appear in the published movie.</p>
<p>If I&#8217;ve got a number of widgets that I&#8217;m playing around with, I&#8217;ll create testing slides for each of them, then show and hide whichever one I&#8217;m currently working with.</p>
<h2>Slide 2: Update Slide</h2>
<p>This slide is hidden and contains an instance of each widget you&#8217;re testing. When you publish a new version of the widget, you&#8217;ll use the instance on this slide to update the widget.</p>
<p>Why? Because when you update a widget, the instance you use to update will lose its Widget Properties, while all other instances will not. If you directly updated the instance on the Main Testing Slide each time, then you&#8217;d waste a lot of time resetting its Widget Properties. However, if you update the one on this slide (which will never be seen in the movie) then you&#8217;ll save a lot of time.</p>
<h2>Slide 3: Tracing Slide</h2>
<p>This slide holds an instance of <a href="http://blog.flash-factor.com/widgets/cp-x-ray-widget/" target="_blank">Whyves CPXray widget</a>. Quite often while I&#8217;m testing one of my widgets, I&#8217;ll want to check whether a function on <a href="http://www.infosemantics.com.au/widgetking/?p=512" target="_blank">m_movie</a> or a variable on the <a href="http://www.infosemantics.com.au/widgetking/?p=452" target="_blank">Captivate Main Timeline</a> may hold the information I need to access. This is what Monster Debugger is perfect for. Generally this slide will be hidden. But when I want to check something, it&#8217;s simply a matter of hiding the Main Testing Slide and showing this one.</p>
<h2>Slide 4: Rewind Slide</h2>
<p>This slide is placed right at the end of the movie and has a single button on it. On success that button will make the movie &#8216;Go To Previous Slide&#8217;. This makes it quick and easy to test if your widget works when the movie has been rewound.</p>
<h1>Testing in Captivate 4</h1>
<p>Testing in Captivate 5 is a dream, but when it comes to Captivate 4, it becomes a lot more time consuming. As I mentioned above, Captivate 4 has no formal update function. In order to bring in a new version of your widget, you have to delete the current instance, reimport the new version, then configure your Widget Properties again. It takes FOREVER!</p>
<p>But there are a few cheats you can use to speed up testing in Captivate 4.</p>
<h2>New Widget &#8211; Same Slide</h2>
<p>If your widget accesses slide objects at runtime, then make sure when you import in a new version of the widget you bring it in to the same slide. This will save you a lot of time otherwise spent in creating the objects and naming them again (this is especially true if you follow the next step).</p>
<p>Bad News: If your widget is a Question Widget, then you&#8217;re sunk. Each time you re-add it to the movie, Captivate will create a new slide for it to operate on.</p>
<h2>Set Up Default Properties</h2>
<p>To save yourself the time and pain of having to configure properties each time you import your widget, you can hard code default properties. If you&#8217;re already using the <a href="http://www.infosemantics.com.au/widgetking/?p=319" target="_blank">Widget King Widget Properties Method</a> in your widget, then you may already have default properties.</p>
<p>The trick is to change those default properties to the settings that you&#8217;re currently testing in your widget. That way when you import the widget into Captivate 4, all you have to do is zip over to the Widget Parameters tab, which will write the default properties, and click OK.</p>
<p>Publish the movie, and then if everything is set up right you should be able to test your widget instantly.</p>
<p>If your widget deals with slide objects, then remember you can hard code the names of the slide object into the default properties. If you&#8217;re importing the widget to the same slide, then all the slide objects will have the same name and will link up with the widget.</p>
<h1>One Last Thing</h1>
<p>This may seem like splitting hairs, but my preferred way of testing the widget is to hit F12 which will publish the movie and open it up in a browser. I prefer this over the traditional publish dialog because that spits up dialog after dialog while publishing the movie.</p>
<p>I don&#8217;t use the in-Captivate preview a whole lot, because there are subtle differences between the preview movie and the published version.</p>
<p>So that&#8217;s a little about my setup for testing. In a future post I will write about a number of things that are important to test before you release your widget.</p>
<p>Stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.infosemantics.com.au/widgetking/2011/06/testing-your-widgets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Meet the Captivate Family &#8211; The Manager</title>
		<link>http://www.infosemantics.com.au/widgetking/2011/05/meet-the-captivate-family-the-manager/</link>
		<comments>http://www.infosemantics.com.au/widgetking/2011/05/meet-the-captivate-family-the-manager/#comments</comments>
		<pubDate>Thu, 26 May 2011 09:04:52 +0000</pubDate>
		<dc:creator>Tristan</dc:creator>
				<category><![CDATA[Captivate Movie Structure]]></category>
		<category><![CDATA[Captivate Variables]]></category>
		<category><![CDATA[Widgets]]></category>
		<category><![CDATA[manager]]></category>
		<category><![CDATA[movie controller]]></category>
		<category><![CDATA[m_movie]]></category>
		<category><![CDATA[slides]]></category>
		<category><![CDATA[TOC]]></category>

		<guid isPermaLink="false">http://www.infosemantics.com.au/widgetking/?p=512</guid>
		<description><![CDATA[In the last post we got an introduction to the everyday ordinary slide, and how it fits into the Captivate Movie. However, Captivate Movies are rarely made out of one slide. More often than not they&#8217;re made out of A-MILLION-BAJILLION SLIDZE! &#8230; <a href="http://www.infosemantics.com.au/widgetking/2011/05/meet-the-captivate-family-the-manager/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In the last post we got an introduction to the everyday ordinary <a href="http://www.infosemantics.com.au/widgetking/?p=506" target="_blank">slide</a>, and how it fits into the Captivate Movie. However, Captivate Movies are rarely made out of one slide. More often than not they&#8217;re made out of A-MILLION-BAJILLION SLIDZE!<em> (Note: WidgetFactory, Infosemantics, and the Widget King do not in any way sanction or encourage the use of &#8216;A-MILLION-BAJILLION&#8217; slides in a single Captivate Movie. Use imaginary numbers of slides in your movie at your own risk).</em></p>
<p>With the possibility for that many slides in a single movie, managing them gets very complex. That&#8217;s why this week we&#8217;re going to look at a little object which keeps those slides in line!</p>
<p>Ladies and Gentlemen, meet Ms&#8217; Movie Controller.</p>
<h2>Meet the Control Freak</h2>
<p>Previously we illustrated the Captivate Movie as being a family talent show. Well now let&#8217;s say that due to overwhelming critical success, the Captivate family have decided to take their show on the road!</p>
<p>However, it&#8217;s not as simple as doing the same song and dance routine on a giant stage in front of 6,000 people. No, no, they need to be organized about this! So the first thing they do is hire Ms&#8217; Movie Controller to manage the acts and keep those slides in line. And no wonder, just look at her.</p>
<p><a href="http://www.infosemantics.com.au/widgetking/wp-content/uploads/2011/05/MsMovieController.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 0px; border-width: 0px;" title="MsMovieController" src="http://www.infosemantics.com.au/widgetking/wp-content/uploads/2011/05/MsMovieController_thumb.png" border="0" alt="MsMovieController" width="189" height="323" /></a></p>
<p>Would you dare cross her?</p>
<p>With her reputation slides obey her command without question. But what makes her fabulous at her job is not her dominating attitude, but her intimate knowledge of the show. She can tell you immediately the current slide, frame, frame rate, movie height/width, number of slides, Captivate Version… and almost any other peice of the information you could ever want.</p>
<p>She isn&#8217;t in charge of the movie, but she&#8217;s the go to person when you want something to happen.</p>
<p>Seriously, this is a gal you want on speed dial.</p>
<h2>How to Access the Movie Controller</h2>
<p>Every slide has a property called m_movie, which holds a reference to the Movie Controller. You may be needing the Movie Controller regularly, so it&#8217;s a good idea to save it to a variable. Here&#8217;s how you&#8217;d do that:</p>
<div class="codecolorer-container actionscript3 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:650px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6699cc; font-weight: bold;">var</span> movieController<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=object%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:object.html"><span style="color: #004993;">Object</span></a> = widgetSlide<span style="color: #000066; font-weight: bold;">.</span>m_movie</div></td></tr></tbody></table></div>
<p>Here I used the widgetSlide to access the Movie Controller, but you could access it through any slide.</p>
<h2>The Remote Control</h2>
<p>Here are all the unique methods on the m_movie object. Many are self explanatory. Others are a bit vague. I&#8217;ve marked the ones I&#8217;ve found useful and given them a brief explanation.</p>
<ul>
<li>addSlide()</li>
<li>clickHandlerLoaded()</li>
<li>closeFLVConnections()</li>
<li>Dofscommand()</li>
<li>exit() – Closes down the movie.</li>
<li>getCurrentFrame()</li>
<li>getCurrentSlide()</li>
<li>getCurrentSlideData() – This function returns a rdSlideData object that has the following properties:
<ul>
<li>m_playOnFrame: The number frame of the movie that the slide starts.</li>
<li>m_stopOnFrame: The number frame of the movie that the slide ends.</li>
<li>m_rdSlide_mc: A reference to the slide object.</li>
</ul>
</li>
<li>getFrameCount()</li>
<li>getFrameRate()</li>
<li>getMovieHeight()</li>
<li>getMovieSlideCount()</li>
<li>getMovieWidth()</li>
<li>GetPlayingSlideIndex()</li>
<li>getSlide()</li>
<li>getSlideCount()</li>
<li>getSlideIndexFromFrame() – If you pass in a number to represent a frame in the Captivate movie, it will tell you which slide is supposed to be visible for that frame.</li>
<li>getSlidesInProject()</li>
<li>getTOCContainerMC() – (Not in Captivate 4)</li>
<li>getVersion()</li>
<li>gotoFlashFrame()</li>
<li>gotoFrameAndResume()</li>
<li>gotoMovieSlide()</li>
<li>gotoNextSlide()</li>
<li>gotoPreviousSlide()</li>
<li>gotoSlide()</li>
<li>gotoSlideAndResume()</li>
<li>hasPlaybar() – Returned false even though I had a playbar.</li>
<li>isMovieReady()</li>
<li>isPlaying() – Returns true if the movie is playing, false if it&#8217;s paused. Quite useful in some situations.</li>
<li>isTOCVisible() – Returns true if the TOC is out, false if it&#8217;s not. (Not in Captivate 4)</li>
<li>JumpToSlide()</li>
<li>markSlideAsCompletedForTOC() – (Not in Captivate 4)</li>
<li>movieonEnterFrame()</li>
<li>mute()</li>
<li>pause()</li>
<li>pauseMovie()</li>
<li>pauseOnInfo()</li>
<li>printCurrentFrame()</li>
<li>ReArrangeSlideData() – No idea what this one does, but it sounds scary.</li>
<li>relayoutTOC()  &#8211; (Not in Captivate 4)</li>
<li>RestoreMovieState()</li>
<li>resume()</li>
<li>resumeMovie()</li>
<li>resumeOnInfo()</li>
<li>rewindAndPause()</li>
<li>rewindAndPlay()</li>
<li>setMovieSize()</li>
<li>SetPacemeker()</li>
<li>setSize()</li>
<li>showCC()</li>
<li>showInfo()</li>
<li>slideCompleted()</li>
<li>slideLoaded()</li>
</ul>
<p>If that&#8217;s not enough for you. Here are the object&#8217;s properties:</p>
<ul>
<li>m_clickHandler_mc</li>
<li>m_currFrame</li>
<li>m_currSlideIndex</li>
<li>m_fps</li>
<li>m_isPreviewForAudioDialog</li>
<li>m_itemToInitialVisibilityMap – (Not in Captivate 4)</li>
<li>m_keyHandler</li>
<li>m_movie_mc</li>
<li>m_OrigFPS</li>
<li>m_paused</li>
<li>m_QuizInfoLastSlidePointScored – (Not in Captivate 4)</li>
<li>m_quizPlaybackController</li>
<li>m_slideData_array</li>
<li>m_soundHandler</li>
<li>m_startPlaying</li>
<li>m_state</li>
<li>m_supportsSyncPlayback</li>
</ul>
<h2>Déjà vu</h2>
<p>Some of you may find these properties and methods familiar. Yes, many of these operations or peices of information are accessible to Advanced Actions through Captivate Variables. What I believe is happening (and I can&#8217;t say for sure because I&#8217;m not a Captivate Developer) is that when you access or change one of these Captivate Variables, it diverts your request to the Movie Controller. For example, if you wanted to show the Closed Captions then usually you&#8217;d change the cpCmndCC variable like this:</p>
<div class="codecolorer-container actionscript3 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:650px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cpVariables<span style="color: #000066; font-weight: bold;">.</span>cpCmndCC = <span style="color: #000000; font-weight:bold;">1</span></div></td></tr></tbody></table></div>
<p>But what&#8217;s actually happening behind the scenes is the Captivate Main Timeline is calling the Movie Controller&#8217;s showCC() function.</p>
<p>As you can see, the Movie Controller has a lot of extra gems that have not been exposed via Captivate Variables. So I suggest you pull out your nearest test widget and have a good play <img class="wlEmoticon wlEmoticon-smile" style="border-style: none;" src="http://www.infosemantics.com.au/widgetking/wp-content/uploads/2011/05/wlEmoticon-smile.png" alt="Smile" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.infosemantics.com.au/widgetking/2011/05/meet-the-captivate-family-the-manager/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
	</channel>
</rss>

