0

I've been using flash functionality in order to fill in dynamic text variable with an external data. The script works fine, except that now runs very slow - around 30 seconds or so.

myData = new LoadVars();
            System.useCodepage  =  true;
            myData.load("get_content.php?id="+_root.id); //get external content
            myData.onLoad = function(success){

            if (success){
            my_dynamic_text.htmlText = this.content; //attach the read content to the my_dynamic_text varialble
            }
        }

Do you know where might be the problem?

Nevyan
  • 1
  • Your server is slow? The text is very long? ... unless you provide any information on what you are trying to load and how your text is styled, we can only guess. – weltraumpirat Jan 03 '11 at 17:52
  • the server is reasonably fast, the text is around 1-or-2 pagex max on average, the text uses default styling. The only additional thing is one sidebar scroller placed on the text. The flash size is around 45kb's so when it gets loaded(~1-2sec.) the browser waits around 10 seconds to display the scrollbar, then another 10 before START loading(making GET query to) the external content... – Nevyan Jan 03 '11 at 18:00
  • It should work much faster than that, although adding several pages of text to the stage can cause some frame dropping. Can you show us more of your code around the loading part? How is the scrolling done? Do you have any onEnterFrame actions or repeating loops? – weltraumpirat Jan 03 '11 at 22:28

1 Answers1

0

The scrollbar UIScrollBar is just added to the textarea component(my_dynamic_text) graphically - to scroll it up and down automatically. No other onEnterFrame actions or loops except the only line before the whole code: System.security.allowDomain("http://mydomain.com");

Nevyan
  • 1