This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package { | |
| import mx.formatters.DateFormatter; | |
| import mx.utils.StringUtil; | |
| public class DateUtil { | |
| public static const SECOND_IN_MILLISECONDS : int = 1000; | |
| public static const FEW_SECONDS : int = 5; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (car.speed() > 2 * SPEED_LIMIT) | |
| generateAlert("Watch out for cops!"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package { | |
| import mx.controls.Text; | |
| import mx.core.UITextField; | |
| import mx.core.mx_internal; | |
| use namespace mx_internal; | |
| public class TruncatedText extends Text { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package { | |
| import flash.external.ExternalInterface; | |
| public class URLUtil { | |
| protected static const WINDOW_OPEN_FUNCTION : String = "window.open"; | |
| public static function openWindow(url : String, window : String = "_blank", features : String = "") : void { | |
| ExternalInterface.call(WINDOW_OPEN_FUNCTION, url, window, features); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| URLUtil.openWindow("http://skovalyov.blogspot.com/"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package { | |
| import flash.display.DisplayObject; | |
| import mx.containers.FormItem; | |
| import mx.controls.Label; | |
| import mx.styles.CSSStyleDeclaration; | |
| import mx.styles.StyleManager; | |
| [Style(name="labelAlign", type="String", enumeration="left,right", inherit="no")] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| while (s.length > 1 && textWidth + TEXT_WIDTH_PADDING > w) { | |
| s = s.slice(0, -1); | |
| super.text = s + truncationIndicator; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package { | |
| public class AuthenticationManager { | |
| public static var instance : AuthenticationManagerInstance = new AuthenticationManagerInstance(); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package { | |
| internal class AuthenticationManagerInstance extends EventDispatcher { | |
| public function AuthenticationManagerInstance() { | |
| super(); | |
| } | |
| public function authenticate(username : String, password : String) : void { | |
| // Authentication routine. |
OlderNewer