1 /* 2 * Copyright the original author or authors. 3 * 4 * Licensed under the MOZILLA PUBLIC LICENSE, Version 1.1 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.mozilla.org/MPL/MPL-1.1.html 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 import main.Flex; 18 import main.Configuration; 19 20 /** 21 * {@code FlexApplication} is the default access point for Flex applications. 22 * 23 * <p>Use this class to configure your application with Macromedia Flex. It inits 24 * your flex configuration in {@link main.Flex} and your configuration for all 25 * environments in {@link main.Configuration}. 26 * 27 * <p>You must simply init your application something like this: 28 * <code> 29 * <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" initialize="initApp();"> 30 * <mx:Script> 31 * <![CDATA[ 32 * import org.as2lib.app.conf.FlexApplication; 33 * public function initApp(Void):Void { 34 * FlexApplication.init(); 35 * } 36 * ]]> 37 * </mx:Script> 38 * </mx:Application> 39 * </code> 40 * 41 * @author Simon Wacker 42 * @version 1.0 43 */ 44 class org.as2lib.app.conf.FlexApplication { 45 46 /** 47 * Executes the configuration for the Flex environment in {@link main.Flex} and the 48 * configuration for all environments in {@link main.Configuration}. These are the 49 * {@link Flex#init} and {@link Configuration#init} methods. 50 * 51 * <p>This method takes any amount of arguments and forwards them to both methods 52 * {@code main.Flex.init} and {@code main.Configuration.init}. 53 * 54 * @param .. any amount of arguments of any type 55 */ 56 public static function init():Void { 57 Flex.init.apply(Flex, arguments); 58 Configuration.init.apply(Configuration, arguments); 59 } 60 61 }