/ Published in: ActionScript 3
http://leongaban.com/com/leongaban/Snipplr/Model/Fonts.as
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
package com.leongaban.Snipplr.Model { import flash.text.Font; import flash.text.TextFormat; import flash.text.TextFormatAlign; import flash.text.TextFieldAutoSize; import flash.text.*; public class Fonts { public static var data:Object = {}; public static var customFormat1 = new TextFormat(); public static var customFormat2 = new TextFormat(); customFormat1.font = "Arial"; customFormat1.size = 14; customFormat1.bold = true; customFormat1.color = 0x000000; customFormat1.align = TextFormatAlign.LEFT; customFormat2.font = "Arial"; customFormat2.size = 11; customFormat2.bold = false; customFormat2.color = 0x000000; customFormat2.align = TextFormatAlign.LEFT; } } // How to use in other Classes: /*videoTitle.defaultTextFormat = Fonts.customFormat1; videoTitle.border = false; videoTitle.embedFonts = false; videoTitle.selectable = false; videoTitle.mouseEnabled = false; videoTitle.x = 5; videoTitle.y = 8; videoTitle.width = titleSize; videoTitle.height = 30; videoTitle.text = titleString; addChild(videoTitle);*/