<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Subtitling in Brightcove 3</title>
	<atom:link href="http://active6.com/blog/flash/subtitling-in-brightcove-3/feed" rel="self" type="application/rss+xml" />
	<link>http://active6.com/brightcove/subtitling-in-brightcove-3</link>
	<description></description>
	<lastBuildDate>Thu, 06 Jan 2011 21:20:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Bob de Wit</title>
		<link>http://active6.com/brightcove/subtitling-in-brightcove-3#comment-113</link>
		<dc:creator>Bob de Wit</dc:creator>
		<pubDate>Tue, 18 May 2010 14:09:42 +0000</pubDate>
		<guid isPermaLink="false">http://active6.com/blog/?p=41#comment-113</guid>
		<description>Hi Oli,

the sample code doesn&#039;t include handling of loading a new movie and loading the corresponding text array for that movie, that&#039;s why it &quot;jumps&quot; to the last element in the available array. You should add an event listener for the MediaChange event and reset the array + position.

Assuming the subtitle file is located in a .txt file with the video ID as filename, that could be something like this:

private function onMediaChange(evt:Object):void
{
	captionLabel.text = &quot;&quot;;
	GetCaptionFile();
}

private function GetCaptionFile():void
{
	Captions = new Array();
	cursub = &quot;&quot;;
	secs = 0;
	captionPlayerControl.text = &quot;loading subtitle file...&quot;;
	try
	{
		var video:Object = VideoPlayer.getCurrentVideo();

		var request:URLRequest = new URLRequest(SubtitleURL + video.id + &quot;.txt&quot;);

		var loader:URLLoader = new URLLoader();
		loader.dataFormat = URLLoaderDataFormat.TEXT;
		loader.addEventListener(Event.COMPLETE, handleResults);
		loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
		loader.load(request);
	}
	catch( e:Error)
	{

	}
}

private function handleResults(evt:Event):void
{
	var response:String = evt.target.data as String;
	Captions = response.split(&quot;\n&quot;); //assign this to your subtitles array and reset
	captionPlayerControl.text = &quot;&quot;;
	captionFullScreenControl.text = &quot;&quot;;
}</description>
		<content:encoded><![CDATA[<p>Hi Oli,</p>
<p>the sample code doesn&#8217;t include handling of loading a new movie and loading the corresponding text array for that movie, that&#8217;s why it &#8220;jumps&#8221; to the last element in the available array. You should add an event listener for the MediaChange event and reset the array + position.</p>
<p>Assuming the subtitle file is located in a .txt file with the video ID as filename, that could be something like this:</p>
<p>private function onMediaChange(evt:Object):void<br />
{<br />
	captionLabel.text = &#8220;&#8221;;<br />
	GetCaptionFile();<br />
}</p>
<p>private function GetCaptionFile():void<br />
{<br />
	Captions = new Array();<br />
	cursub = &#8220;&#8221;;<br />
	secs = 0;<br />
	captionPlayerControl.text = &#8220;loading subtitle file&#8230;&#8221;;<br />
	try<br />
	{<br />
		var video:Object = VideoPlayer.getCurrentVideo();</p>
<p>		var request:URLRequest = new URLRequest(SubtitleURL + video.id + &#8220;.txt&#8221;);</p>
<p>		var loader:URLLoader = new URLLoader();<br />
		loader.dataFormat = URLLoaderDataFormat.TEXT;<br />
		loader.addEventListener(Event.COMPLETE, handleResults);<br />
		loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);<br />
		loader.load(request);<br />
	}<br />
	catch( e:Error)<br />
	{</p>
<p>	}<br />
}</p>
<p>private function handleResults(evt:Event):void<br />
{<br />
	var response:String = evt.target.data as String;<br />
	Captions = response.split(&#8220;\n&#8221;); //assign this to your subtitles array and reset<br />
	captionPlayerControl.text = &#8220;&#8221;;<br />
	captionFullScreenControl.text = &#8220;&#8221;;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: oliver</title>
		<link>http://active6.com/brightcove/subtitling-in-brightcove-3#comment-112</link>
		<dc:creator>oliver</dc:creator>
		<pubDate>Tue, 18 May 2010 13:49:54 +0000</pubDate>
		<guid isPermaLink="false">http://active6.com/blog/?p=41#comment-112</guid>
		<description>Hi Bob,

thanks for taking the time to ans above..
I created a movieclip and added a dynamic text field into it.  I left some default text inside the text box to
see if it would display.
I repeated this twice and was left with below::
ft = fullscreen with the instance name of big sub and dynamic text selected.
st = smallscreen with instance name of smallsub and dynamic text selected.

http://screencast.com/t/MmMxMzc0YWEt

The problem is when the movie kicks in as you can see from the screencast it goes to the last array value in the subtitles array..

Hope that ans your faqs..

reagrds

Oli</description>
		<content:encoded><![CDATA[<p>Hi Bob,</p>
<p>thanks for taking the time to ans above..<br />
I created a movieclip and added a dynamic text field into it.  I left some default text inside the text box to<br />
see if it would display.<br />
I repeated this twice and was left with below::<br />
ft = fullscreen with the instance name of big sub and dynamic text selected.<br />
st = smallscreen with instance name of smallsub and dynamic text selected.</p>
<p><a href="http://screencast.com/t/MmMxMzc0YWEt" rel="nofollow">http://screencast.com/t/MmMxMzc0YWEt</a></p>
<p>The problem is when the movie kicks in as you can see from the screencast it goes to the last array value in the subtitles array..</p>
<p>Hope that ans your faqs..</p>
<p>reagrds</p>
<p>Oli</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob de Wit</title>
		<link>http://active6.com/brightcove/subtitling-in-brightcove-3#comment-111</link>
		<dc:creator>Bob de Wit</dc:creator>
		<pubDate>Fri, 14 May 2010 13:56:15 +0000</pubDate>
		<guid isPermaLink="false">http://active6.com/blog/?p=41#comment-111</guid>
		<description>Some questions:
I can&#039;t see from your code how you redefined the subtitle movieclips in Flash. Did you specify the labels to be dynamic text?
If you specify an initial text for the labels, does that show? If not, this is a layering issue.
Do the subtitles not show up in both player and full screen mode? If not, then again this is likely to be a layering issue.

HTH</description>
		<content:encoded><![CDATA[<p>Some questions:<br />
I can&#8217;t see from your code how you redefined the subtitle movieclips in Flash. Did you specify the labels to be dynamic text?<br />
If you specify an initial text for the labels, does that show? If not, this is a layering issue.<br />
Do the subtitles not show up in both player and full screen mode? If not, then again this is likely to be a layering issue.</p>
<p>HTH</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: oliver</title>
		<link>http://active6.com/brightcove/subtitling-in-brightcove-3#comment-110</link>
		<dc:creator>oliver</dc:creator>
		<pubDate>Wed, 12 May 2010 14:48:35 +0000</pubDate>
		<guid isPermaLink="false">http://active6.com/blog/?p=41#comment-110</guid>
		<description>I have had no luck in flex, and am still quite new to the ide. so i moved onto flash - but the problem i get in flash is that the subtitles dont display when the they should please have a look at this code if you get chance to see if you can spot any obvious errors..
regards

oli

http://dev.oliverdalton.com/bc/thecode.txt</description>
		<content:encoded><![CDATA[<p>I have had no luck in flex, and am still quite new to the ide. so i moved onto flash &#8211; but the problem i get in flash is that the subtitles dont display when the they should please have a look at this code if you get chance to see if you can spot any obvious errors..<br />
regards</p>
<p>oli</p>
<p><a href="http://dev.oliverdalton.com/bc/thecode.txt" rel="nofollow">http://dev.oliverdalton.com/bc/thecode.txt</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob de Wit</title>
		<link>http://active6.com/brightcove/subtitling-in-brightcove-3#comment-109</link>
		<dc:creator>Bob de Wit</dc:creator>
		<pubDate>Wed, 12 May 2010 14:37:50 +0000</pubDate>
		<guid isPermaLink="false">http://active6.com/blog/?p=41#comment-109</guid>
		<description>Hi Oli,

the Subtitle and FSTitle (full-screen title) are simple MXML components that define the font size, type, alignment etc for the text to be displayed in resp. Player mode and Full Screen mode. I&#039;ve used this for the subtitle component, but you can tweak it to your own color and styling easily. I&#039;ve updated the article and included a sample component markup you could use.</description>
		<content:encoded><![CDATA[<p>Hi Oli,</p>
<p>the Subtitle and FSTitle (full-screen title) are simple MXML components that define the font size, type, alignment etc for the text to be displayed in resp. Player mode and Full Screen mode. I&#8217;ve used this for the subtitle component, but you can tweak it to your own color and styling easily. I&#8217;ve updated the article and included a sample component markup you could use.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: oliver</title>
		<link>http://active6.com/brightcove/subtitling-in-brightcove-3#comment-108</link>
		<dc:creator>oliver</dc:creator>
		<pubDate>Wed, 28 Apr 2010 15:00:23 +0000</pubDate>
		<guid isPermaLink="false">http://active6.com/blog/?p=41#comment-108</guid>
		<description>Hi attempting the above - not sure what to call the dynamic instances of the text fields and the movieclip names??

getting following error...

1046: Type was not found or was not a compile-time constant: Subtitle.
1046: Type was not found or was not a compile-time constant: FSTitle.

changes instance names to Subtitle &amp;&amp; FSTitle

and the movieclip names to st and ft

not sure how to progress - any help much appreciated

reagrds

oli</description>
		<content:encoded><![CDATA[<p>Hi attempting the above &#8211; not sure what to call the dynamic instances of the text fields and the movieclip names??</p>
<p>getting following error&#8230;</p>
<p>1046: Type was not found or was not a compile-time constant: Subtitle.<br />
1046: Type was not found or was not a compile-time constant: FSTitle.</p>
<p>changes instance names to Subtitle &amp;&amp; FSTitle</p>
<p>and the movieclip names to st and ft</p>
<p>not sure how to progress &#8211; any help much appreciated</p>
<p>reagrds</p>
<p>oli</p>
]]></content:encoded>
	</item>
</channel>
</rss>

