1 Reply Latest reply on Aug 1, 2008 6:10 AM by robdillon

    Increase the font size

    gaurav_ch Level 1
      Hi,

      I need to make a flash presentation for a client. He wants to give an option to the user to increase the font size or decrease the font size of the text. Can you please give me a sample of actionscript 2.0 code regarding it? Also, please tell me how should I structure the presentation? It will have 50 sections. I was thinking of making 50 different movie clips and load them as needed. If I do it like that, then how can I increase the font size from the base movie clip itself.

      Thanks.

      Gaurav
      www.gauravchandra.com
        • 1. Re: Increase the font size
          robdillon Most Valuable Participant
          One way to do this is to create two variables at the root level of the base movie. You might call them smallFont and largeFont. Something like this:
          var smallFont:Number = 12;
          var largeFont:Number = 14;

          Create a third variable to hold the user selected font size: var selectedFontSize:Number;

          Then, in every textfield in the movies, specify the fontSize property value of selectedFontSize.

          At the start of the movie, show the user two example paragraphs and have them choose one. Then store their selection in selectedFontSize.