8 Replies Latest reply on Aug 2, 2009 1:15 PM by David_F57

    Issue with Flash Builder 4 effects

    Michael Orzechowski Level 1

      Hello

       

      I am currently building a web site for one of the charities. Because I really like new effects added in Flash Builder 4 I have decided to build this site using beta version. I know, not the smartest move taking into account it is still in testing but never mind. I came across 2 issues during development. I have already found a workaround for one of them but sadly I can’t seem to be able to solve the other. Let me explain the issue. On one of the sections of web site I have 3 controls (ComboBox, TileList and Image). All these controls are being populated using response from PHP methods. Now when user is accessing this section (from other part of the web site) I am adding some effects to these controls so they will make a nice entrance on the stage. I have created a separate set of effects for each control using Parallel object utilizing such effects as Rotate3D and Fade for instance. I am triggering these effects in result event of last PHP call to make sure that all data has already been retrieved from DB before playing them. Now what happens is that sometimes it plays perfectly fine but most of the time it does not. When it does not work controls appears on stage without any animation. I think that it might have something to do with the fact that RPC are done in asynchronous manner but as I said I am triggering effects when data has already been retrieved.

      Any idea what am I doing wrong?

       

      Regards

      Michael

        • 1. Re: Issue with Flash Builder 4 effects
          Chet Haase Level 3

          Hi Michael,

           

          It's tough to know what's going on here without seeing the app, but I have run into a situation before where some code calls UIComponent.suspendBackgroundProcessing()  on one effect, causing other effects to not render until background processing was resumed. In particular, I believe ComboBox sets this property on the effect that animates the list closing. This means that any other effect that might be starting at the same time might not show anything in the window until the ComboBox was done animating.

           

          Is this what you're seeing?

           

          (This is something I'd like to get rid of in our code; I think the capability was added years ago to work around some animation performance issues that are probably not an issue any longer).

           

           

          Chet.

          • 2. Re: Issue with Flash Builder 4 effects
            Michael Orzechowski Level 1

            Hi Chet

             

            You can have a look at web site if you like: http://www.morzech.myzen.co.uk/development/FundacjaPatra/FundacjaPatra.html

            Mentioned “bug” is in section called “GALERIA”. All controls in that section should enter stage with some nice effect (Rotate3D/Fade for instance). Weird thing is that sometimes they do. It seems to be random so I am a bit lost here...

             

            Regards

            Michael

            • 3. Re: Issue with Flash Builder 4 effects
              Peter deHaan Level 4

              Michael,

               

              I can see what you're talking about in the Galeria, and what I think is happening is that the effect is playing before the image has finished loading. Or in other words, the first time the image is loaded, the effect is playing on an empty Image control as the image is loading.

               

              I haven't tried, but the workaround may be to wait for the Image control's complete event, and then call the effect from there.

               

              Peter

              • 4. Re: Issue with Flash Builder 4 effects
                Michael Orzechowski Level 1

                Peter

                 

                Issue is related to all 3 controls (ComboBox, TileList and Image). I am triggering effects (grouped within parallel objects) as soon as I am getting results from RPC (PHP methods) that populates them. First one to trigger is ComboBox effect then TileList and lastly Image. Your answer makes perfect sense but it does not explain why ComboBox and TileList are not being animated. I also get a feeling that issue is a little bit random which makes it a lot more difficult to solve.

                 

                Regards

                Michael

                • 5. Re: Issue with Flash Builder 4 effects
                  Chet Haase Level 3

                  It would be useful to know whether the artifact is coming from the particular effects you are running, or whether the problem is with any effect.

                   

                  You could back off the effects to something much simpler, like Fade. Or even run a simple Animate that changes some property value that you trace out. Make sure that the effects are actually running, then we can try to figure out the source of the problem.

                   

                  Chet.

                  • 6. Re: Issue with Flash Builder 4 effects
                    Michael Orzechowski Level 1

                    Chet

                     

                     

                    Suggested debugging method makes perfect sense. Problem is that these effects are playing just fine. The problem is that they do not play every time...

                    I am going to fiddle with it more when I will find some time.

                    Please feel free to post any ideas in the meantime. Please note that this issue has no great urgency as functionality is not affected at all (it is just a visual glitch).

                    Any ideas are much appreciated.

                     

                     

                    Regards

                    Michael

                    • 7. Re: Issue with Flash Builder 4 effects
                      Chet Haase Level 3

                      Right: I can see the randomness. I guess the thing I was trying to figure out was whether the effects are actually running in the background when they're not showing up. That is, are we seeing some visual glitch in those particular effects, where they're running but not displaying the right data, or are we seeing the effects simply not running in some situations (due to the random factor we haven't nailed down yet)?

                       

                      Chet.

                      • 8. Re: Issue with Flash Builder 4 effects
                        David_F57 Level 5

                        This issue seems to be related to the images themselves, do you have load complete handlers ? because it seems that you may not or they are not behaving correctly. Another way to ensure that all the images display correctly is to place the downloaded binaries into an array of images then use that array as your dataprovider, this is like a double check on everything being completely loaded, that way the tilelist wont effect other transitions.

                         

                        David.