0 Replies Latest reply on Nov 25, 2010 2:37 PM by Jesper Steinicke Würtz

    Effects does not run smooth in FF after mouse click

    Jesper Steinicke Würtz

      Hi,

       

      I'm creating a web site using Flash Builder 4, but I've found out that effects does not run smooth in Firefox and Chrome after the mouse has been clicked on an item.

      Until the mouse is clicked the effects run smooth. I've tested on Windows 7 using Google Chrome, Firefox 3.6.12 and IE8, and it only works in IE8.

      I am using Flash player ver. 10,1,103,19.

       

      Is it a bug or am I doing something wrong? Is there a workaround?

       

      Here is a sample application that fades between two images. The fade effect runs smooth until the mouse is clicked anywhere on the screen:

       

      <?xml version="1.0" encoding="utf-8"?>
      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                     xmlns:s="library://ns.adobe.com/flex/spark"
                     xmlns:mx="library://ns.adobe.com/flex/mx"
                     minWidth="955" minHeight="600">

       

          <fx:Script>
              <![CDATA[
                  public function doFadeIn1():void {
                      fadeIn1.play([img1]);
                  }
                  public function doFadeOut1():void {
                      fadeOut1.play([img1]);               
                  }
                  public function doFadeIn2():void {
                      fadeIn2.play([img2]);
                  }
                  public function doFadeOut2():void {
                      fadeOut2.play([img2]);               
                  }
              ]]>
          </fx:Script>
         
          <fx:Declarations>
              <mx:Fade id="fadeIn1" alphaFrom="0.0" alphaTo="1.0" duration="5000" effectEnd="doFadeOut1()"/>
              <mx:Fade id="fadeOut1" alphaFrom="1.0" alphaTo="0.0" startDelay="500" duration="5000" effectStart="doFadeIn2()"/>
              <mx:Fade id="fadeIn2" alphaFrom="0.0" alphaTo="1.0" duration="5000" effectEnd="doFadeOut2()"/>
              <mx:Fade id="fadeOut2" alphaFrom="1.0" alphaTo="0.0" startDelay="500" duration="5000" effectStart="doFadeIn1()"/>
          </fx:Declarations>
         
          <s:BorderContainer backgroundColor="#ffffff" width="900" height="600" horizontalCenter="1" verticalCenter="1" focusEnabled="false">
              <mx:Image id="img1" x="0" y="0" width="900" height="600" source="../images/img01.jpg" alpha="0.0" creationComplete="doFadeIn1()"/>
              <mx:Image id="img2" x="0" y="0" width="900" height="600" source="../images/img02.jpg" alpha="0.0"/>
          </s:BorderContainer>
      </s:Application>

       

       

      Best regards

      Jesper Steinicke Würtz