11 Replies Latest reply on Mar 7, 2009 8:00 AM by Newsgroup_User

    flickering problem

      hi
      i have one problem
      i am refreshing the page for every 10 seconds what happens is that when refresh the page is flickering which client is not happy , i need to stop flickering effect please help me how to stop this effect i have panel and inside buttons i can do this in datagrid but that is not required by client



        • 1. Re: flickering problem
          Level 7

          "karthik flex" <webforumsuser@macromedia.com> wrote in message
          news:goj6nh$igh$1@forums.macromedia.com...
          > hi
          > i have one problem
          > i am refreshing the page for every 10 seconds what happens is that when
          > refresh the page is flickering which client is not happy , i need to stop
          > flickering effect please help me how to stop this effect i have panel and
          > inside buttons i can do this in datagrid but that is not required by
          > client

          Try the following:
          Stop refreshing the page every ten seconds.

          HTH;

          Amy


          1 person found this helpful
          • 2. Re: flickering problem
            hi
            if i stop refreshing then i cannot take the recent updated files from back end
            this cannot be the solution

            please any other way
            • 3. Re: flickering problem
              Level 7

              "karthik flex" <webforumsuser@macromedia.com> wrote in message
              news:gol20o$sqa$1@forums.macromedia.com...
              > hi
              > if i stop refreshing then i cannot take the recent updated files from back
              > end
              > this cannot be the solution
              >

              When you say "take the recently updated files", what do you mean? Are you
              rebuilding your Flex app on the server every 10 seconds? That doesn't sound
              very practical to me.


              • 4. Re: flickering problem
                bitwyse Level 1
                Don't refresh the entire page. Set a 10 second timer. When time is up, go and fetch your data again.

                No need to send the entire page across the wire thus causing your flicker. . .
                • 5. Re: flickering problem
                  robbyk87
                  exactly bitwyse!

                  No need to refresh the page when you can just run the methods again.

                  Page refresh basically runs the methods from scratch - why not just call them again?

                  e.g getmyinfo.send();

                  for http req
                  • 6. Re: flickering problem
                    hi guys thanks for the reply

                    i am already doing what robbyk87 said i am sending the service alone and getting data for every 10 seconds but the page is flickering just my sample application

                    <?xml version="1.0" encoding="utf-8"?>
                    <mx:WindowedApplication xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
                    <HTTPService id="myservice" url="myurl" method="POST" result="handleresult(event)" />
                    <mx:Script>
                    <![CDATA[
                    private function init():void
                    {
                    timer = new Timer(10000);
                    timer.addEventListener(TimerEvent.TIMER, this.resetTimerForPresenter);
                    timer.start();
                    }
                    private function resetTimerForPresenter(event:TimerEvent):void
                    {
                    myservice.send();
                    }
                    private function handleresult(event:ResultEvent):void
                    {
                    myRep.dataProvider="my result event"
                    }
                    ]]>
                    </mx:Script>
                    <mx:Repeater id="myRep">
                    <mx:Button label="{myRep.currentItem}" />
                    </mx:Repeater>

                    </mx:WindowedApplication>

                    i am sending the myservice.send(); alone but the whole repeter is refreshing and repeter gets flickering
                    (e.g how we blink our eyes )
                    if you want go and fill your service and check what happens the whole repeter gets flickering

                    any solution

                    please help me how to stop repeter flickering should i need to use any external component
                    we can use datagrid , but that is not required
                    • 7. Re: flickering problem
                      robbyk87 Level 1
                      looking at your code it seem that you are creating a new button (depending on how many currentItem's are in the back-end) every 10 seconds.

                      The timer is being called on creationComplete.which then does everything else. Creation complete only occurs when the flex ap has loaded.

                      Hmm

                      Instead of creationComplete init() have you tried making a simple button somewhere and attach the code to that? so after you click the new "start timer" button it should run the code. Just to test if its the creationComplete is responsible somehow for the flickering.

                      Also is it flickering every 10 seconds or constantly?
                      • 8. Re: flickering problem
                        Level 7

                        "karthik flex" <webforumsuser@macromedia.com> wrote in message
                        news:goo86p$1n0$1@forums.macromedia.com...
                        > hi guys thanks for the reply
                        >
                        > i am already doing what robbyk87 said i am sending the service alone and
                        > getting data for every 10 seconds but the page is flickering just my
                        > sample
                        > application
                        >
                        > <?xml version="1.0" encoding="utf-8"?>
                        > <mx:WindowedApplication xmlns:mx=" http://www.adobe.com/2006/mxml"
                        > layout="absolute" creationComplete="init()">
                        > <HTTPService id="myservice" url="myurl" method="POST"
                        > result="handleresult(event)" />
                        > <mx:Script>
                        > <![CDATA[
                        > private function init():void
                        > {
                        > timer = new Timer(10000);
                        > timer.addEventListener(TimerEvent.TIMER,
                        > this.resetTimerForPresenter);
                        > timer.start();
                        > }
                        > private function resetTimerForPresenter(event:TimerEvent):void
                        > {
                        > myservice.send();
                        > }
                        > private function handleresult(event:ResultEvent):void
                        > {
                        > myRep.dataProvider="my result event"
                        > }
                        > ]]>
                        > </mx:Script>
                        > <mx:Repeater id="myRep">
                        > <mx:Button label="{myRep.currentItem}" />
                        > </mx:Repeater>
                        >
                        > </mx:WindowedApplication>
                        >
                        > i am sending the myservice.send(); alone but the whole repeter is
                        > refreshing
                        > and repeter gets flickering
                        > (e.g how we blink our eyes )
                        > if you want go and fill your service and check what happens the whole
                        > repeter
                        > gets flickering
                        >
                        > any solution
                        >
                        > please help me how to stop repeter flickering should i need to use any
                        > external component
                        > we can use datagrid , but that is not required

                        Look through the results you get back and edit your existing dataProvider
                        rather than wholesale replacing it when the information comes in.


                        1 person found this helpful
                        • 9. Re: flickering problem
                          hi guys

                          thanks for the reply
                          my client is very keen on this even if i check the size of the result and display also it will flicker (flicker totally should be avoided - by client) is this a bug - in Adobe Flex, my client are revising to use further flex tech or we should change please give me a solution , shall i post to Adobe Team about this or will they see this post every day

                          any other idea please help

                          karthik.k
                          • 10. Re: flickering problem
                            robbyk87 Level 1
                            heres another idea - is the page flickering because the content on it has not been cached?

                            try setting different values for your

                            <mx:Application cachePolicy=" ">

                            long shot but you never know, also maybe creationPolicy and historyManagementEnabled

                            I only say this because my accordions made the page refresh because of historyManagement but I can't be sure any of these will help in your case.
                            1 person found this helpful
                            • 11. Re: flickering problem
                              Level 7

                              "karthik flex" <webforumsuser@macromedia.com> wrote in message
                              news:goqjvb$rl5$1@forums.macromedia.com...
                              > hi guys
                              >
                              > thanks for the reply
                              > my client is very keen on this even if i check the size of the result and
                              > display also it will flicker (flicker totally should be avoided - by
                              > client) is
                              > this a bug - in Adobe Flex, my client are revising to use further flex
                              > tech or
                              > we should change please give me a solution , shall i post to Adobe Team
                              > about
                              > this or will they see this post every day
                              >
                              > any other idea please help

                              Look at the ListCollectionView API, especially itemUpdated.