Hi,
setInterval each 10ms might be a bit overkill.
grtz
JC


On 9/3/06, kariminal <[EMAIL PROTECTED]> wrote:

Hello All...

My flash movie fills the whole browser window. If the window is kept small
performance is great, however when I maximize the browser everything slows
down. This is a simple effect which I think should run at a good speed
regardless. I've uploaded a sample here: http://www.kurst.co.uk/transfer/

And the animation code is as follows:

//CODE

       private function stopAnimation( ):Void{

               clearInterval( animationIID );

       }
       private function restartAnimation( ):Void{

               stopAnimation();
               animationIID = setInterval( this, "animationLoop" , 10 );

       }
       private function animationLoop( ):Void{


               // make sure we always keep the counter within the length
of
the array
               if ( lineCounter > code_lines.length ) lineCounter = 2

               // print the text
               if ( lineCounter == 0 ) {

                       field_txt.text = code_lines[lineCounter]

               } else { field_txt.text = field_txt.text +
code_lines[lineCounter] }

               // ready counter for the next line

               lineCounter ++

               if (field_txt.maxscroll > 1 ){


                       pageCounter ++;
                       field_txt.text = "";
                       stopAnimation();
                       clearInterval( clearIID );
                       clearIID = setInterval( this, "restartAnimation" ,
clearIntervalTime );

               }


       }

//CODE


And I've also uploaded a copy of the whole class here
http://www.kurst.co.uk/transfer/textComponent.as
Any tips on optimizing this one are welcome...


Regards




Karim




_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to