From Adobe LiveDocs: cacheAsBitmap AS2

http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/ wwhelp.htm?context=LiveDocs_Parts&file=00002445.html

Best,

Karl

On Jul 9, 2009, at 5:43 PM, Karl DeSaulniers wrote:

The performance hit is when you try and animate or tween anything that is cached as a bitmap. Every time that cached file changes, it has to set it in cache again. If the next frame or state of the text box has not had the text set in it so it can be cached, then it caches an empty text box. Thus removing the previous frames/states text. I would set the variable before you set any texBoxes and then reference the variable when you want to load the texBox. Or don't cache as a bitmap. I think what is happening is that the text is placed into the textBox when the first frame is set but not holding once the textBox changes frames. If you set the variable first, then set the value of the textBox to that variable, no matter which frame/state that textBox is in, it should = that variable. I have done this in some of my flash files and I didn't notice a performance hit, but then again I didn't really test for that.

Another possible way of embedding multiple fonts is to load a swf that has that font embedded in it and that is all. You can make one for each font and load them on the fly before setting the textBox that uses that font. Then you don't have a bunch of font instances in your main swf, just in their own separate (small size) swf but can still have an instance of your font loaded to the stage for embedding. Mind you this is not a documented practice that I know of, just a though of mine.

G.L.

Karl


On Jul 9, 2009, at 5:03 PM, Joel Stransky wrote:

I considered that Kari but it just too much of a performance hit I'm afraid. There might be something to combing cacheAsBitmap = true and selectable =
false...

On Thu, Jul 9, 2009 at 5:54 PM, Karl DeSaulniers <[email protected]>wrote:

Can you set the value of the textBox to a variable in the first state and specify while tweening or any other function that the textBox = thatVariable
while performing?
Might work. That way, while tweening or other, your specifying that the
text is the same and loaded.
If it was an animation sequence, I would say put the  textBox =
thatVariable; code on the "play" frames between tween key frames for e.g..
JAT

Karl



On Jul 9, 2009, at 4:44 PM, Barry Hannah wrote:

I have a similar issue, runtime created Textfields in a scrolling list.
If the mouse is within the bounds of the list and I use the scrollwheel to scroll, when the text goes under the cursor it vanishes. I've tried
cache as bitmap, didn't work.

Any ideas to overcome this annoying little bit of Flash voodoo?




-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Joel
Stransky
Sent: Friday, 10 July 2009 9:37 a.m.
To: Flash Coders List
Subject: [Flashcoders] styled text disappears when clicked or animated

I have an entire site full of runtime created TextFields. Some are
styled
with Stylesheet objects, others with TextFormat objects. That all works
fine
but when it comes time to script some tweens on them or their display
parents, the text disappears!
Running the .swf by itself locally tends to work just fine but as soon
as a
browser displays it... poof, gone. I haven't done much testing with and without formatting/styling/embeded fonts since going without is pretty
much
out of the question.

Anyone know the wicked little trick I know exists out there somewhere? I
just want to finish this bad boy and get some sleep. :)



_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Karl DeSaulniers
Design Drumm
http://designdrumm.com


_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




--
--Joel Stransky
stranskydesign.com
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Karl DeSaulniers
Design Drumm
http://designdrumm.com

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Karl DeSaulniers
Design Drumm
http://designdrumm.com

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to