Flash 8 Font/Text Scaling. Bug? Cont.

Yesterday i posted regarding an issue i stumbled uppon regarding the new saffron text engine in FP8. you can find the details of the issue here

After the comments from Richard Leggett I have produced this working alteration to the code posted previously.

The results while fixing the font adjustments as text is scaled, it causes re-wrapping in my example once the scale operation is complete. Given more time i will try to find a more robust solution to this issue.

more code after the split.

Please not this code is simply a stub that has been taken from the code in this post and updated. Please read the previous post for more information

[as]

but_field_0.onPress = function()
{
if(_root.bln_f0Scaled)
{
/*
Now prior to scaling the upper clip we simply turn the render method of the
text fields to “normal” like that of the old FP7 display.
*/
_root.mc_flashText_0.txt_field_0.antiAliasType = “normal”;
_root.mc_flashText_0.txt_field_1.antiAliasType = “normal”;
_root.twn_field0 = new Tween(_root.mc_flashText_0, “_xscale”, Regular.easeOut, _root.mc_flashText_0._xscale, 200, 3, true);
_root.twn_field0 = new Tween(_root.mc_flashText_0, “_yscale”, Regular.easeOut, _root.mc_flashText_0._yscale, 200, 3, true);
/*
Once the tween operation has been completed we then reset the text render
back to the advanced FP8 method

** NOTE **
This alteration while fixing the wrapping while scaling issue results in the text re-wrapping at the end of the scaling operation. I think a possible answer
would be to provide text field measurements and resize the field to ensure
this re-wrapping does not occur.

*/
_root.twn_field0.onMotionStopped = function(obj_item:Object)
{
var mc_t:MovieClip = obj_item.obj;
mc_t.txt_field_0.antiAliasType = “advanced”;
mc_t.txt_field_1.antiAliasType = “advanced”;
}
}
else
{
_root.mc_flashText_0.txt_field_0.antiAliasType = “normal”;
_root.mc_flashText_0.txt_field_1.antiAliasType = “normal”;
_root.twn_field0 = new Tween(_root.mc_flashText_0, “_xscale”, Regular.easeOut, _root.mc_flashText_0._xscale, 100, 3, true);
_root.twn_field0 = new Tween(_root.mc_flashText_0, “_yscale”, Regular.easeOut, _root.mc_flashText_0._yscale, 100, 3, true);
_root.twn_field0.onMotionStopped = function(obj_item:Object)
{
var mc_t:MovieClip = obj_item.obj;
mc_t.txt_field_0.antiAliasType = “advanced”;
mc_t.txt_field_1.antiAliasType = “advanced”;
}
}

_root.bln_f0Scaled = !_root.bln_f0Scaled;
}

[/as]

Leave a Reply

Your email address will not be published. Required fields are marked *