MikeVM Posted April 16, 2009 Posted April 16, 2009 Trying to use Copyfit ule for different frames: - for frame BCKHD I need to set tracking between 105 and 125% (assuming that 100% is regular tracking). Default tracking for this frame is 125%; - for frame WWW - copyfit web address (font size between 7 and 9 pt; - for any other frames with applied copyfitting rule - copyfit text. [color=black]if (FusionPro.Composition.CurrentFlow.name == "BCKHD")[/color] [color=black]{[/color] [color=black] if (!Copyfit(new MagnifyAttributes("tracking", 105, 125, 0, 0)))[/color] [color=black] ReportWarning("Could not copyfit text in flow " + [/color] [color=black] FusionPro.Composition.CurrentFlow.name);[/color] [color=black]} [/color] [color=black]if (FusionPro.Composition.CurrentFlow.name == "WWW")[/color] [color=black]{[/color] [color=black] if (!Copyfit(new MagnifyAttributes("text", 25, 400, 7, 9)))[/color] [color=black] ReportWarning("Could not copyfit text in flow " + [/color] [color=black] FusionPro.Composition.CurrentFlow.name);[/color] [color=black]}[/color] [color=black]else[/color] [color=black]{[/color] [color=black] if (!Copyfit(new MagnifyAttributes("text", 25, 400, 10.75, 13)))[/color] [color=black] ReportWarning("Could not copyfit text in flow " + [/color] [color=black] FusionPro.Composition.CurrentFlow.name);[/color] [color=black]}[/color] This is what I get - instead of adjusting tracking in the frame BCKHD the rule adjust text size - which I do not want to happen! Any help?
tobarstep Posted April 17, 2009 Posted April 17, 2009 [color=black]if (FusionPro.Composition.CurrentFlow.name == "BCKHD")[/color] [color=black]{[/color] [color=black]if (!Copyfit(new MagnifyAttributes("tracking", 105, 125, 0, 0)))[/color] [color=black] ReportWarning("Could not copyfit text in flow " + [/color] [color=black] FusionPro.Composition.CurrentFlow.name);[/color] [color=black]} [/color] [color=black]if (FusionPro.Composition.CurrentFlow.name == "WWW")[/color] [color=black]{[/color] [color=black]if (!Copyfit(new MagnifyAttributes("text", 25, 400, 7, 9)))[/color] [color=black] ReportWarning("Could not copyfit text in flow " + [/color] [color=black] FusionPro.Composition.CurrentFlow.name);[/color] [color=black]}[/color] [color=black]else[/color] [color=black]{[/color] [color=black]if (!Copyfit(new MagnifyAttributes("text", 25, 400, 10.75, 13)))[/color] [color=black] ReportWarning("Could not copyfit text in flow " + [/color] [color=black] FusionPro.Composition.CurrentFlow.name);[/color] [color=black]}[/color] This is what I get - instead of adjusting tracking in the frame BCKHD the rule adjust text size - which I do not want to happen! Your "else" clause is still executing for anything not a "WWW" frame, including the "BCKHD". Try this (I did this in Notepad, so there may be syntax errors, didn't have time to check it.). switch (FusionPro.Composition.CurrentFlow.name){ case "BCKHD": if (!Copyfit(new MagnifyAttributes("tracking", 105, 125, 0, 0))){ ReportWarning("Could not copyfit text in flow " + FusionPro.Composition.CurrentFlow.name);} break; case "WWW": if (!Copyfit(new MagnifyAttributes("text", 25, 400, 7, 9))){ ReportWarning("Could not copyfit text in flow " + FusionPro.Composition.CurrentFlow.name);} break; default: if (!Copyfit(new MagnifyAttributes("text", 25, 400, 10.75, 13))){ ReportWarning("Could not copyfit text in flow " + FusionPro.Composition.CurrentFlow.name);} }
Recommended Posts
Archived
This topic is now archived and is closed to further replies.