Our quotes looking a little dumpy over here, so let's create a style for it as well. I will just close out of the Test window and we can start things off by creating our Quote style right up here after we create our Format page style.
I will make a little space and we will start things out the same way. I'll use my var keyword and we will name it. I will call this tFormatQuote. We will specify it as TextFormat object and we will use the new keyword and a constructor to make it. Now, we need to think of how we want our quote to look.
I want it to be a little bit bigger. I want it to be bolder and Italic. So, let's set those properties up first. tformatQuote.bold, that's just going to be a boolean value and I am going to set it equal to true. We will do the same thing for Italics. In this case, the property is italic and we can verify it right down there in the Help window; we will set that to true as well. I want it a little bit bigger than our other text, so I am going to set the size to 16, and let's finish things up by setting the Font and the Color. I will start with the color first, and once again, I am going to use my Color Picker to choose that color for me. I want a special color that matches the ones that are on the screen.
So, let me close my Actions panel here for a moment and what I would like to do is match it up to this main teal color that we are using in the banner. Now, once again, as long as I don't have anything selected, I can use my Fill color dialog box to choose it. I am pretty sure that teal is not located inside the box but I can pull my cursor outside and roll over any color that we are using and you will notice it will pick it up just as well. So, let me click up here in the banner, I will go down and reselect my chip and we can go and select that color right out. I will copy it and we can go back to our ActionScript window and paste it on it. I will do the same thing we did before which is change the pound sign (#) to 0x and once we finish that off with a semicolon (;), we will have that color assigned in our format.
Now, for the font, I am going to choose the same thing we had from before. I will set tFormatQuote.font and save a little typing. I will just select it from the previous style we made, copy it and paste it down into our new style. Next, let's apply our styles to the Quote Text field and then we can see how it looks. Again, I need to make sure I apply the style after we have assigned the text, so I will just do it down here at the bottom. We will take our TextField, tQuote, we will call our setTextFormat method, and we will assign it to our new style called tFormatQuote. Let's try it out and see how it looks.
Now, everything is looking good except I think we lost the author's name for the quote that used to say Henry Ford and that's because we probably didn't setup an autoSize property for this TextField. So obviously, we are going to have to plan for these types of things when we set our text fields up using ActionScript. That's okay, we can just go back and add that property into that text field. I will close up the Test window and sure enough, when we are setting up the Quote field, we are not setting up any autoSize properties. So, I will just drop it in here right after wordWrap, that's going to be tQuote.autoSize and we need to use one of the approved values for autoSize, so I am just going to select that right out of the last place we used it, copy that and paste it on it.
If we test our movie one more time, now we are getting the quote in and we are getting all the styles applied. Let's just close up that Test window.