Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Long Text Variable slows Player Frame Rate

Status
Not open for further replies.

beneale

Technical User
Apr 30, 2002
5
GB
I have a Flash movie with some animation and a scrolling textbox, containing a large text variable (with HTML formatting).

For some reason the text appears to be slowing the frame rate of the movie to a snail's pace. If I remove the text, it plays at the correct speed.

Any ideas what might be causing this, and how I might resolve the problem would be greatly appreciated...

Ben
 
The reason is that Flash 5 is really bad at handling strings and text objects (the string object is actually written in actionscript not machine level code), you can avoid this in some cases by breaking text apart and converting it to a graphic. This doesn't help if you're using dynamic text though. Slainte

 
Unfortunately I am using dynamic text...loaded from a datadase via ASP...so breaking apart the text isn't really an option.

I am sure I have done this before, without the same problems...
 
It's probably simply down to the size of the variable - I've had some similar problems in the past with large flat text files, and the HTML formatting definitely adds a bit of load on the processor.

Is there a way you can break the large amount of text into a series of smaller variables? If your ASP is returning a series of URL encoded variables from a database table perhaps sling them into an array in Flash and only call the array indices you need to display in the text box at any one time rather than concatenate the whole lot into one large string.

The other (easier) way out is to freeze the rest of the page when scrolling, of course that all depends on what's actually happening on your page but there may be a couple of widgets that could stop moving just for a second without anyone noticing.

Hope it works out. Slainte

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top