How to Create a Text Format Object in Adobe Flash CS3 ActionScript 3

Description

Learn how to create a second Text Format Object in Adobe Flash CS3 ActionScript 3.

Transcript
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.
Related Articles

How to Create a Text Format Object in Adobe Flash CS3 ActionScript 3

Hot Tricks For Photoshop CS3 Tools And Functions

If you are looking for tutorials that cover the latest Photoshop CS3 tools, then why not get this free Adobe Photoshop report and discover our totally unique step-by-step Photoshop CS3 video tutorial training system....

Download Adobe Flash Professional CS5 FREE

Adobe Flash Professional CS5 software is the industry standard for interactive authoring and delivery of immersive experiences that present consistently across personal computers, mobile devices, and screens of virtually any size and resolution....

Purchase Adobe InDesign CS3 cheap

Discount computer software Adobe InDesign CS3 buy cheap! Built for demanding workflows, InDesign integrates smoothly with the Adobe tools you use every day, streamlines repetitive tasks, reliably outputs pages, and offers powerful features for creating richer, more complex documents....

Adobe PhotoShop CS3 Extended 10.0.1

Adobe Photoshop is the ideal graphics software for ideal imagining contain powerful graphical editor for extraordinary results....

Adobe Flash: from the Web into a Nokia's Qt

Article about a component package called Qtitan Multimedia enables Qt developers to tightly integrate various multimedia components, such as Adobe Flash, Microsoft Silverlight movies or Adobe Reader documents, into their Qt applications....

Learn The Strategies of Photoshop CS3 Tools - How to Use Other Photoshop CS3 Tools

Learn The Strategies of Photoshop CS3 Tools - How to Use Other Photoshop CS3 Tools!Adobe CS3 (Creative Suite 3) is a suite of products that combines traditional Adobe programs with programs that Adobe acquired and has since rebranded from Macromedia. The suite includes Dreamweaver, Flash, and Fireworks, as well as Illustrator and Photoshop...

Utility Of Actionscript In Flash 8 For A Flash Designer

Actually, Flash 8 uses ActionScript in its back end, which renders ActionScript as the powerful means to achieve optimum flexibility in a project for a Flash web designer....

Photoshop Cs3

This software perfects for prevailing subscribers of flash. It adds a completely web host of innovative fits then extends the benefit oft his system into new markets such as 3D. However, I''m afraid t......

Adobe Brick Cs3 Design And Style Review Courses News

But if the goal can be to turned into a excellent web development company and have the the majority of realised making in the recent doing work environment, the particular training you may need is usu......

Hire ActionScript Developer

ActionScript is an object-oriented programming (OOP) language that is designed specifically for Web site animation. ActionScript makes it possible for developers to create onscreen environments (such as games, tutorials, and e-commerce applications) that can respond to user input through the keyboard or mouse. ActionScript is an event-based language: just as is the case in real life, actions are t...