0 Replies Latest reply on May 21, 2009 7:08 PM by webguy5612

    Effects

    webguy5612 Level 1

      Hello, I'm trying to create two effects. I want to fade in a text area and vertical scroll the text inside. I'm having some issues.Can someone help me?

      Here is my code

                 private var timer:Timer;

       

                  private function init():void {

                      timer = new Timer(800);

                      timer.addEventListener(TimerEvent.TIMER, onTimer);

                      timer.start();

                  }

       

                  private function onTimer(event:TimerEvent):void {

                     

                      textArea.text = "Hello"

                      textArea.validateNow();

                      textArea.verticalScrollPosition = textArea.maxVerticalScrollPosition;

                  }

         ]]>        

      </mx:Script>

       

      <mx:Parallel>

      <mx:Move id="showeffect2" yFrom="300"/>

      <mx:Move id="hideeffect2" yBy="600"/>

      <mx:Fade id="fadeOut" duration="1000" alphaFrom="1.0" alphaTo="0.0"/>

      <mx:Fade id="fadeIn" duration="1000" alphaFrom="0.0" alphaTo="1.0"/>

       

       

      </mx:Parallel>

       

       

      <mx:LinkBar color= "#FFFFFF" dataProvider= "{tabNav}" backgroundColor="#e489cd"  borderStyle="solid" width="867" borderColor="#FFFFFF" selectionColor="0xffffff" separatorColor="0xcccccc"  rollOverColor ="0xe489cd" textRollOverColor="0xcccccc"  textSelectedColor="0x000000"/> 

          

       

      <mx:ViewStack id="tabNav" borderStyle="solid" width="867" height="480" >

      <mx:VBox id="Home" backgroundImage="@Embed(source='assets/StephanieHBoxmain.jpg')" showEffect="showeffect2" hideEffect="hideeffect2" horizontalAlign="center" verticalAlign="middle" label="Home"  width="100%" height="100%" borderStyle="solid"  borderColor="#FFFFFF" >

            

              <mx:TextArea id ="textArea" visible="true" hideEffect="{fadeOut}" showEffect="{fadeIn}" width="424" height="300" paddingTop="130"  backgroundAlpha="5"  paddingBottom="40"    borderColor="#FFFFFF"  borderStyle="solid" borderThickness="2" color="#FFFFFF"  backgroundColor="#e489cd"   shadowDirection="" wordWrap="true"   horizontalScrollPolicy="off"   fontSize="18" textAlign="left" verticalScrollPolicy="on" editable="false">

             

              <mx:text >

      Keep watching this site to look for Stephanie’s very first original song recording “Use My Story”</mx:text>

              </mx:TextArea>