<?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>Flex Examples &#187; horizontalScrollPosition</title>
	<atom:link href="http://blog.flexexamples.com/tag/horizontalscrollposition/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Wed, 26 Jan 2011 18:09:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Creating an animated transition when scrolling through items in a Spark HGroup container in Flex 4</title>
		<link>http://blog.flexexamples.com/2009/11/11/creating-an-animated-transition-when-scrolling-through-items-in-a-spark-hgroup-container/</link>
		<comments>http://blog.flexexamples.com/2009/11/11/creating-an-animated-transition-when-scrolling-through-items-in-a-spark-hgroup-container/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 15:17:48 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[HGroup (Spark)]]></category>
		<category><![CDATA[Animate]]></category>
		<category><![CDATA[clipAndEnableScrolling]]></category>
		<category><![CDATA[getHorizontalScrollPositionDelta()]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[horizontalScrollPosition]]></category>
		<category><![CDATA[motionPaths]]></category>
		<category><![CDATA[NavigationUnit]]></category>
		<category><![CDATA[SimpleMotionPath]]></category>
		<category><![CDATA[valueBy]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2183</guid>
		<description><![CDATA[<p>The following example shows how you can create a simple horizontal list using a HGroup container and do an animated scroll using the Animate and SimpleMotionPath classes and the getHorizontalScrollPositionDelta() method</p> <p>Full code after the jump.</p> <p></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2009/11/11/creating-an-animated-transition-when-scrolling-through-items-in-a-spark-hgroup-container/ --&#62; &#60;s:Application name=&#34;Spark_HGroup_horizontalScrollPosition_test&#34; xmlns:fx=&#34;http://ns.adobe.com/mxml/2009&#34; xmlns:s=&#34;library://ns.adobe.com/flex/spark&#34; xmlns:mx=&#34;library://ns.adobe.com/flex/halo&#34;&#62; &#160; &#60;fx:Script&#62; &#60;!&#91;CDATA&#91; import spark.core.NavigationUnit; &#160; protected [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can create a simple horizontal list using a HGroup container and do an animated scroll using the Animate and SimpleMotionPath classes and the <code>getHorizontalScrollPositionDelta()</code> method</p>
<p>Full code after the jump.</p>
<p><span id="more-2183"></span></p>
<p class="alert">The following example(s) require Flash Player 10 and the Adobe Flex 4 SDK. To download the Adobe Flash Builder 4 trial, see <a href="http://bit.ly/crThlI">http://www.adobe.com/products/flex/</a>. To download the latest nightly build of the Flex 4 SDK, see <a href="http://bit.ly/Flex4SDK">http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4</a>.<br/><strong>For more information on getting started with Flex 4 and Flash Builder 4, see the official <a href="http://bit.ly/dCkecm">Adobe Flex Team blog</a>.</strong></p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2009/11/11/creating-an-animated-transition-when-scrolling-through-items-in-a-spark-hgroup-container/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_HGroup_horizontalScrollPosition_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span> </span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span> </span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/halo&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;">&lt;!<span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span></span>
<span style="color: #000000;">            import spark.core.NavigationUnit;</span>
&nbsp;
<span style="color: #000000;">            protected function scrollToThere<span style="color: #66cc66;">&#40;</span>dir:uint<span style="color: #66cc66;">&#41;</span>:void <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                var value:Number = hGr.getHorizontalScrollPositionDelta<span style="color: #66cc66;">&#40;</span>dir<span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">                if <span style="color: #66cc66;">&#40;</span>value != <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                    pth.valueBy = value;</span>
<span style="color: #000000;">                    anim.play<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">                <span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">            <span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">        <span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Declarations</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Animate</span> id=<span style="color: #ff0000;">&quot;anim&quot;</span> target=<span style="color: #ff0000;">&quot;{hGr}&quot;</span> duration=<span style="color: #ff0000;">&quot;500&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:motionPaths</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:SimpleMotionPath</span> id=<span style="color: #ff0000;">&quot;pth&quot;</span> property=<span style="color: #ff0000;">&quot;horizontalScrollPosition&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:motionPaths</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Animate</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Declarations</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Panel</span> title=<span style="color: #ff0000;">&quot;HGroup horizontalScrollPosition test&quot;</span></span>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter=<span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:layout</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HorizontalLayout</span> verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:layout</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Button</span> label=<span style="color: #ff0000;">&quot;&amp;lt;&quot;</span></span>
<span style="color: #000000;">                click=<span style="color: #ff0000;">&quot;scrollToThere(NavigationUnit.PAGE_LEFT);&quot;</span></span>
<span style="color: #000000;">                width=<span style="color: #ff0000;">&quot;30&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HGroup</span> id=<span style="color: #ff0000;">&quot;hGr&quot;</span></span>
<span style="color: #000000;">                requestedColumnCount=<span style="color: #ff0000;">&quot;3&quot;</span></span>
<span style="color: #000000;">                columnWidth=<span style="color: #ff0000;">&quot;100&quot;</span></span>
<span style="color: #000000;">                variableColumnWidth=<span style="color: #ff0000;">&quot;false&quot;</span></span>
<span style="color: #000000;">                height=<span style="color: #ff0000;">&quot;100&quot;</span></span>
<span style="color: #000000;">                clipAndEnableScrolling=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> text=<span style="color: #ff0000;">&quot;One&quot;</span> backgroundColor=<span style="color: #ff0000;">&quot;red&quot;</span> backgroundAlpha=<span style="color: #ff0000;">&quot;0.1&quot;</span> height=<span style="color: #ff0000;">&quot;100%&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> text=<span style="color: #ff0000;">&quot;Two&quot;</span> backgroundColor=<span style="color: #ff0000;">&quot;red&quot;</span> backgroundAlpha=<span style="color: #ff0000;">&quot;0.2&quot;</span> height=<span style="color: #ff0000;">&quot;100%&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> text=<span style="color: #ff0000;">&quot;Three&quot;</span> backgroundColor=<span style="color: #ff0000;">&quot;red&quot;</span> backgroundAlpha=<span style="color: #ff0000;">&quot;0.3&quot;</span> height=<span style="color: #ff0000;">&quot;100%&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> text=<span style="color: #ff0000;">&quot;Four&quot;</span> backgroundColor=<span style="color: #ff0000;">&quot;red&quot;</span> backgroundAlpha=<span style="color: #ff0000;">&quot;0.4&quot;</span> height=<span style="color: #ff0000;">&quot;100%&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> text=<span style="color: #ff0000;">&quot;Five&quot;</span> backgroundColor=<span style="color: #ff0000;">&quot;red&quot;</span> backgroundAlpha=<span style="color: #ff0000;">&quot;0.5&quot;</span> height=<span style="color: #ff0000;">&quot;100%&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> text=<span style="color: #ff0000;">&quot;Six&quot;</span> backgroundColor=<span style="color: #ff0000;">&quot;red&quot;</span> backgroundAlpha=<span style="color: #ff0000;">&quot;0.6&quot;</span> height=<span style="color: #ff0000;">&quot;100%&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> text=<span style="color: #ff0000;">&quot;Seven&quot;</span> backgroundColor=<span style="color: #ff0000;">&quot;red&quot;</span> backgroundAlpha=<span style="color: #ff0000;">&quot;0.7&quot;</span> height=<span style="color: #ff0000;">&quot;100%&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> text=<span style="color: #ff0000;">&quot;Eight&quot;</span> backgroundColor=<span style="color: #ff0000;">&quot;red&quot;</span> backgroundAlpha=<span style="color: #ff0000;">&quot;0.8&quot;</span> height=<span style="color: #ff0000;">&quot;100%&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> text=<span style="color: #ff0000;">&quot;Nine&quot;</span> backgroundColor=<span style="color: #ff0000;">&quot;red&quot;</span> backgroundAlpha=<span style="color: #ff0000;">&quot;0.9&quot;</span> height=<span style="color: #ff0000;">&quot;100%&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> text=<span style="color: #ff0000;">&quot;Ten&quot;</span> backgroundColor=<span style="color: #ff0000;">&quot;red&quot;</span> backgroundAlpha=<span style="color: #ff0000;">&quot;1.0&quot;</span> height=<span style="color: #ff0000;">&quot;100%&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:HGroup</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Button</span> label=<span style="color: #ff0000;">&quot;&amp;gt;&quot;</span></span>
<span style="color: #000000;">                click=<span style="color: #ff0000;">&quot;scrollToThere(NavigationUnit.PAGE_RIGHT);&quot;</span></span>
<span style="color: #000000;">                width=<span style="color: #ff0000;">&quot;30&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Panel</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p class="alert">This entry is based on a beta version of the Flex 4 SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex 4 SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Creating an animated transition when scrolling through items in a Spark HGroup container in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2009/11/11/creating-an-animated-transition-when-scrolling-through-items-in-a-spark-hgroup-container/',contentID: 'post-2183',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'Animate,clipAndEnableScrolling,getHorizontalScrollPositionDelta(),Gumbo,horizontalScrollPosition,motionPaths,NavigationUnit,SimpleMotionPath,valueBy',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2009/11/11/creating-an-animated-transition-when-scrolling-through-items-in-a-spark-hgroup-container/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Creating a simple animated text ticker using the Spark TextInput control in Flex 4</title>
		<link>http://blog.flexexamples.com/2009/08/25/creating-a-simple-animated-text-ticker-using-the-spark-textinput-control-in-flex-4/</link>
		<comments>http://blog.flexexamples.com/2009/08/25/creating-a-simple-animated-text-ticker-using-the-spark-textinput-control-in-flex-4/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 14:02:46 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[Animate]]></category>
		<category><![CDATA[beta1]]></category>
		<category><![CDATA[RichEditableText]]></category>
		<category><![CDATA[TextInput (Spark)]]></category>
		<category><![CDATA[contentWidth]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[horizontalScrollPosition]]></category>
		<category><![CDATA[motionPaths]]></category>
		<category><![CDATA[repeatBehavior]]></category>
		<category><![CDATA[repeatCount]]></category>
		<category><![CDATA[repeatDuration]]></category>
		<category><![CDATA[SimpleMotionPath]]></category>
		<category><![CDATA[textDisplay]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=1738</guid>
		<description><![CDATA[<p>The following example shows how you can create a simple, animated text ticker using a Spark TextInput control in Flex 4 by using the Animate and SimpleMotionPath classes to tween the horizontalScrollPosition property.</p> <p>Full code after the jump.</p> <p></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2009/08/25/creating-a-simple-animated-text-ticker-using-the-spark-textinput-control-in-flex-4/ --&#62; &#60;s:Application name=&#34;Spark_TextInput_textDisplay_horizontalScrollPosition_test&#34; xmlns:fx=&#34;http://ns.adobe.com/mxml/2009&#34; xmlns:s=&#34;library://ns.adobe.com/flex/spark&#34; xmlns:mx=&#34;library://ns.adobe.com/flex/halo&#34;&#62; &#160; &#60;fx:Script&#62; &#60;!&#91;CDATA&#91; protected function [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can create a simple, animated text ticker using a Spark TextInput control in Flex 4 by using the Animate and SimpleMotionPath classes to tween the <code>horizontalScrollPosition</code> property.</p>
<p>Full code after the jump.</p>
<p><span id="more-1738"></span></p>
<p class="alert">The following example(s) require Flash Player 10 and the Adobe Flex 4 SDK. To download the Adobe Flash Builder 4 trial, see <a href="http://bit.ly/crThlI">http://www.adobe.com/products/flex/</a>. To download the latest nightly build of the Flex 4 SDK, see <a href="http://bit.ly/Flex4SDK">http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4</a>.<br/><strong>For more information on getting started with Flex 4 and Flash Builder 4, see the official <a href="http://bit.ly/dCkecm">Adobe Flex Team blog</a>.</strong></p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2009/08/25/creating-a-simple-animated-text-ticker-using-the-spark-textinput-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_TextInput_textDisplay_horizontalScrollPosition_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/halo&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;">&lt;!<span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span></span>
<span style="color: #000000;">            protected function init<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:void <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                anim.stop<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">                pth.valueFrom = <span style="color: #cc66cc;">0</span>;</span>
<span style="color: #000000;">                pth.valueTo = txtInput.textDisplay.contentWidth - txtInput.textDisplay.width;</span>
<span style="color: #000000;">                anim.play<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#91;</span>txtInput.textDisplay<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">            <span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">        <span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Declarations</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Animate</span> id=<span style="color: #ff0000;">&quot;anim&quot;</span></span>
<span style="color: #000000;">                duration=<span style="color: #ff0000;">&quot;10000&quot;</span></span>
<span style="color: #000000;">                repeatBehavior=<span style="color: #ff0000;">&quot;reverse&quot;</span></span>
<span style="color: #000000;">                repeatCount=<span style="color: #ff0000;">&quot;0&quot;</span></span>
<span style="color: #000000;">                repeatDelay=<span style="color: #ff0000;">&quot;500&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:motionPaths</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:SimpleMotionPath</span> id=<span style="color: #ff0000;">&quot;pth&quot;</span></span>
<span style="color: #000000;">                        property=<span style="color: #ff0000;">&quot;horizontalScrollPosition&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:motionPaths</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Animate</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Declarations</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:TextInput</span> id=<span style="color: #ff0000;">&quot;txtInput&quot;</span></span>
<span style="color: #000000;">            text=<span style="color: #ff0000;">&quot;BEGIN -- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque faucibus laoreet porttitor. Nullam a urna eget augue lacinia sodales ornare in justo. -- END&quot;</span></span>
<span style="color: #000000;">            editable=<span style="color: #ff0000;">&quot;false&quot;</span></span>
<span style="color: #000000;">            fontSize=<span style="color: #ff0000;">&quot;24&quot;</span></span>
<span style="color: #000000;">            left=<span style="color: #ff0000;">&quot;100&quot;</span> right=<span style="color: #ff0000;">&quot;100&quot;</span></span>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter=<span style="color: #ff0000;">&quot;0&quot;</span></span>
<span style="color: #000000;">            creationComplete=<span style="color: #ff0000;">&quot;init();&quot;</span></span>
<span style="color: #000000;">            resize=<span style="color: #ff0000;">&quot;init();&quot;</span></span>
<span style="color: #000000;">            rollOver=<span style="color: #ff0000;">&quot;anim.pause();&quot;</span></span>
<span style="color: #000000;">            rollOut=<span style="color: #ff0000;">&quot;anim.resume();&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/spark/Spark_TextInput_textDisplay_horizontalScrollPosition_test/bin/srcview/">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/spark/Spark_TextInput_textDisplay_horizontalScrollPosition_test/bin/main.html" width="100%" height="150"></iframe></p>
<p class="alert">This entry is based on a beta version of the Flex 4 SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex 4 SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Creating a simple animated text ticker using the Spark TextInput control in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2009/08/25/creating-a-simple-animated-text-ticker-using-the-spark-textinput-control-in-flex-4/',contentID: 'post-1738',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'contentWidth,Gumbo,horizontalScrollPosition,motionPaths,repeatBehavior,repeatCount,repeatDuration,SimpleMotionPath,textDisplay',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2009/08/25/creating-a-simple-animated-text-ticker-using-the-spark-textinput-control-in-flex-4/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Setting the horizontal scroll position in the TextInput control in Flex</title>
		<link>http://blog.flexexamples.com/2009/01/27/setting-the-horizontal-scroll-position-in-the-textinput-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2009/01/27/setting-the-horizontal-scroll-position-in-the-textinput-control-in-flex/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 07:56:18 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[TextInput]]></category>
		<category><![CDATA[horizontalScrollPosition]]></category>
		<category><![CDATA[maxHorizontalScrollPosition]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2009/01/27/setting-the-horizontal-scroll-position-in-the-textinput-control-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can progammatically scroll the Flex TextInput control by setting the horizontalScrollPosition property.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2009/01/27/setting-the-horizontal-scroll-position-in-the-textinput-control-in-flex/ --&#62; &#60;mx:Application name="TextInput_horizontalScrollPosition_test" xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:Script&#62; &#60;![CDATA[ private function textInput_change(evt:Event):void { slider.maximum = textInput.maxHorizontalScrollPosition; } ]]&#62; &#60;/mx:Script&#62; &#60;mx:ApplicationControlBar dock="true"&#62; &#60;mx:Form [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can progammatically scroll the Flex TextInput control by setting the <code>horizontalScrollPosition</code> property.</p>
<p>Full code after the jump.</p>
<p><span id="more-945"></span></p>
<p class="download"><a href="">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2009/01/27/setting-the-horizontal-scroll-position-in-the-textinput-control-in-flex/ --&gt;
&lt;mx:Application name="TextInput_horizontalScrollPosition_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            private function textInput_change(evt:Event):void {
                slider.maximum = textInput.maxHorizontalScrollPosition;
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="horizontalScrollPosition:"&gt;
                &lt;mx:HSlider id="slider"
                        snapInterval="1"
                        liveDragging="true"
                        showTrackHighlight="true" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:TextInput id="textInput"
            text="The quick brown fox jumps over the lazy dog."
            horizontalScrollPosition="{slider.value}"
            width="100"
            creationComplete="textInput_change(event);"
            change="textInput_change(event);" /&gt;

&lt;/mx:Application&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the horizontal scroll position in the TextInput control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2009/01/27/setting-the-horizontal-scroll-position-in-the-textinput-control-in-flex/',contentID: 'post-945',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'horizontalScrollPosition,maxHorizontalScrollPosition',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2009/01/27/setting-the-horizontal-scroll-position-in-the-textinput-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Setting the horizontal scroll position in the HorizontalList control in Flex</title>
		<link>http://blog.flexexamples.com/2008/04/03/scrolling-the-horizontallist-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/04/03/scrolling-the-horizontallist-control-in-flex/#comments</comments>
		<pubDate>Fri, 04 Apr 2008 03:15:23 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[HorizontalList]]></category>
		<category><![CDATA[horizontalScrollPosition]]></category>
		<category><![CDATA[max()]]></category>
		<category><![CDATA[maxHorizontalScrollPosition]]></category>
		<category><![CDATA[min()]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/04/03/scrolling-the-horizontallist-control-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can scroll the Flex HorizontalList control by setting the horizontalScrollPosition property.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/HorizontalList_horizontalScrollPosition_test/bin/srcview/source/main.mxml.html">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/04/03/scrolling-the-horizontallist-control-in-flex/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:Script&#62; &#60;![CDATA[ import mx.events.SliderEvent; private function prev():void { var pos:int = hList.horizontalScrollPosition-1; var min:int = 0; var [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can scroll the Flex HorizontalList control by setting the <code>horizontalScrollPosition</code> property.</p>
<p>Full code after the jump.</p>
<p><span id="more-583"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/HorizontalList_horizontalScrollPosition_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/04/03/scrolling-the-horizontallist-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.events.SliderEvent;

            private function prev():void {
                var pos:int = hList.horizontalScrollPosition-1;
                var min:int = 0;
                var value:int = Math.max(min, pos);
                hList.horizontalScrollPosition = value;
            }

            private function next():void {
                var pos:int = hList.horizontalScrollPosition+1;
                var max:int = hList.maxHorizontalScrollPosition;
                var value:int = Math.min(pos, max);
                hList.horizontalScrollPosition = value;
            }

            private function slider_change(evt:SliderEvent):void {
                hList.horizontalScrollPosition = evt.value;
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:Array id="arr"&gt;
        &lt;mx:Object lbl="Illustrator" src="ai_appicon-tn.gif" /&gt;
        &lt;mx:Object lbl="Adobe AIR" src="air_appicon-tn.gif" /&gt;
        &lt;mx:Object lbl="ColdFusion" src="cf_appicon-tn.gif" /&gt;
        &lt;mx:Object lbl="Dreamweaver" src="dw_appicon-tn.gif" /&gt;
        &lt;mx:Object lbl="Flash" src="fl_appicon-tn.gif" /&gt;
        &lt;mx:Object lbl="Flash Player" src="fl_player_appicon-tn.gif" /&gt;
        &lt;mx:Object lbl="Fireworks" src="fw_appicon-tn.gif" /&gt;
        &lt;mx:Object lbl="Flex" src="fx_appicon-tn.gif" /&gt;
        &lt;mx:Object lbl="Lightroom" src="lr_appicon-tn.gif" /&gt;
        &lt;mx:Object lbl="Photoshop" src="ps_appicon-tn.gif" /&gt;
    &lt;/mx:Array&gt;

    &lt;mx:Panel styleName="opaquePanel"&gt;
        &lt;mx:HorizontalList id="hList"
                dataProvider="{arr}"
                itemRenderer="HorizontalListItemRenderer"
                verticalScrollPolicy="off"
                horizontalScrollPolicy="off"
                columnWidth="100"
                columnCount="4"
                rowHeight="100"
                rowCount="1"
                borderSkin="{null}" /&gt;
        &lt;mx:ControlBar&gt;
            &lt;mx:Button label="Previous" click="prev();" /&gt;
            &lt;mx:HSlider id="slider"
                    minimum="0"
                    maximum="{hList.maxHorizontalScrollPosition}"
                    value="{hList.horizontalScrollPosition}"
                    liveDragging="true"
                    snapInterval="1"
                    tickInterval="1"
                    showDataTip="false"
                    width="100%"
                    change="slider_change(event);" /&gt;
            &lt;mx:Button label="Next" click="next();" /&gt;
        &lt;/mx:ControlBar&gt;
    &lt;/mx:Panel&gt;

&lt;/mx:Application&gt;
</pre>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/HorizontalList_horizontalScrollPosition_test/bin/srcview/source/HorizontalListItemRenderer.mxml.html">View HorizontalListItemRenderer.mxml</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/04/03/scrolling-the-horizontallist-control-in-flex/ --&gt;
&lt;mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"
        styleName="plain"&gt;

    &lt;mx:Image source="{data.src}"
            horizontalCenter="0"
            verticalCenter="0" /&gt;
    &lt;mx:Label text="{data.lbl}"
            fontWeight="bold"
            horizontalCenter="0"
            bottom="0" /&gt;

&lt;/mx:Canvas&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/HorizontalList_horizontalScrollPosition_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/HorizontalList_horizontalScrollPosition_test/bin/main.html" width="100%" height="300"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the horizontal scroll position in the HorizontalList control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/04/03/scrolling-the-horizontallist-control-in-flex/',contentID: 'post-583',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'horizontalScrollPosition,max(),maxHorizontalScrollPosition,min()',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/04/03/scrolling-the-horizontallist-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
	</channel>
</rss>

