Getting started
Template files
Flash CMS template consists of two parts - preloader and the website. While the preloader embedded in HTML page initializes Flash CMS engine, the other SWF file is loading alongside with animation and the elements of the template. Flash CMS template contains two SWF files and one of them loads another. This makes the process of Flash Project creation more comfortable. Flash Project and Test Project functions may compile two files one by one in the required order.
Flash CMS gives you two types of base that you may use in a website creation. Minimal Version has all the files needed for fully functional product. You may start creating your first Flash CMS website using a Full Website Template base. It has all necessary files, a basic structure and sample content. If you create a Flash CMS template for the first time, we recommend you to start from applying changes to the existing, ready-made templates or with the help of Full website template base.
Website Preloader (moto.swf)
In order to initialize Flash CMS engine, you should create MotoApplication. Usually it is done within a preloader Constructor of the Document class.
var app:MotoApplication = new MotoApplication(this);
To import Flash CMS classes you need to add Flash CMS component to the Library.
Preloader file may not contain any animation, since the main purpose is to show the process of the site loading. With the help of special events generated by MotoApplication you may track the loading process of the website. Please use the following events to apply. MotoProgressEvent.MOTO_PROGRESS and MotoEvent.INITIALIZATION_COMPLETE.
app.addEventListener(MotoProgressEvent.MOTO_PROGRESS, appMotoProgressHandler);
app.addEventListener(MotoEvent.INITIALIZATION_COMPLETE, appInitializationCompleteHandler);
As soon as MotoEvent.INITIALIZATION_COMPLETE comes into action, all the necessary elements have been loaded, and you may start the website. In order to get access to the loaded website SWF, please perform:
Moto class is one of the key classes of the Flash CMS engine. It provides access to all the data and elements of the template. You may get the detailed information in the Moto section.
Initialization process loads all the necessary components of the template – SWF, configuration file, settings, structure, content, menus and fonts data.
Website SWF (website.swf)
All the animation and the elements of the template are located in the separate SWF file. It helps to load a website correctly and to use this separate file both for the upload and in the Control Panel. In the first frame (shot) of the website SWF you put stop() action to avoid playing the website before the loading process (of all the site elements) is complete.
Flash CMS does not dictate the terms in regards to internal website structure and animation. Flash developers may create their own websites up to their needs and taste. They may decide whether to place main animation on the main timeline or to use nesting hierarchy. The key point is to take into consideration the specifics of the Flash CMS template creation process that are going to be disclosed in other sections of this documentation.
The size of the website SWF should coincide with the size of the preloader and the sizes specified in the configuration file.
Template Configuration File (config.xml)
Configuration file loads first. It is an XML file. There is not a certain path to this file, but it may go as ConfigurationFile through Flash vars while embedding SWF into HTML. By default it is placed in the root under the name config.xml. This file contains the locations of all the necessary folders and files of the template and some other parameters as well.
WEBSITE_RESOURSE_PATH – the path to the file with the animations and the elements of the template. It is loaded by the preloader;
CONFIG_RESOURSE_PATH – the path to the file with the settings of the template;
MENUS_RESOURSE_PATH – the path to the Menu file;
CONTENT_RESOURSE_PATH – the path to the file with the entire content of the website;
STRUCTURE_RESOURSE_PATH – the path to the file with the description of the template's structure;
FONTS_RESOURSE_PATH – the path to the file with the description of the fonts used in the template;
FONTS_FOLDER – the path to the folder with the font files;
SNAPSHOT_WIDTH – the width of the screenshots of the pages created in Control Panel (this parameter is placed in this particular file and refers to this template, as different templates might have different width). The height of the snapshot is adjusted automatically;
SNAPSHOT_CREATION_DELAY - the delay during the creation of the template’s snapshot is given in seconds (This parameter is set in accordance with the number of elements loaded on the page in a runtime. This helps to avoid black spaces on the page, when the elements are still loading);
ALLOW_FULL_SCREEN - full screen mode (If this parameter is checked as True, an additional option appears in the Control Panel and lets to switch to full screen mode. This parameter influences Flash parameters – allowFullScreen while embedding into HTML);
WEBSITE_WIDTH – the width of the website. Configured by number or percentage value,100%;
WEBSITE_HEIGHT – the height of the website. Configured by number or percentage value,100%;
WEBSITE_MIN_WIDTH – minimal website width. If the window of the browser is less than the specified value, the scroll appears;
WEBSITE_MIN_HEIGHT - minimal website height. If the window of the browser is less than the specified value in HTML, the scroll appears;
FLASH_PLAYER_VERSION_REQUIRED – minimal version of the Flash Player for viewing the website;
BACKGROUND_COLOR – background color.
Most of the above parameters are used for the integration of the SWF into HTML. They are listed in this file as they are configured automatically using index file provided by Flash CMS. We recommend to use this file because on the top of automatic configuration and usage of the parameters it extends the capabilities of the website with the help of extra logic, HTML scroll bars, and content page outcome for better SEO of the flash websites. The flash is inserted with swf object. Also, you may use such utilities as swf address for deep linking features and YouTube loader for embedding YouTube video into the flash website.
Settings (xml/settings.xml)
Website settings file contains initial page, title, warning message option, Google analytics and webmaster tools accounts. This file is edited through the control panel and does not need to be modified manually. Please copy this file from the template if you create a Flash CMS website from scratch.
Fonts (xml/fonts.xml)
This file contains fonts and their information. Each of the fonts has its name, file name, characters – the type of the symbols used in the font, may be enabled or disabled. If the font is disabled, it does not load with the website. Besides these parameters, there is a number of parameters that allow you to define whether the bold/italic text is possible and what symbols are included in the font.
This file is generated automatically, when the fonts are uploaded from the control panel and does not require manual configuration. Please refer to the User Guide for more information about Fonts Manager and Fonts creator.
Structure (xml/structure.xml)
Structure file is the main file the flash developer edits while creating the Flash CMS template. This file contains the description of the website structure, its layouts, types of the pages and pop-ups, and all the animated elements – slots and modules.
In order to understand the structure file, you should know the main elements of Flash CMS. Such a file is easy to create copying and pasting the existing parts of the code once you get to know the main elements of Flash CMS. Please read more about Flash CMS elements here.
We also plan to create a small Flax application – the generator of the structure file that allows to build and generate the Flash CMS template structure with the help of intuitive constructor.
Content (xml/content.xml)
Content file comprises all the website data, except the menu and modules. This file has a similar structure with XML Structure file, but it describes the concrete objects used on the site, layouts, pages and pop-ups and their properties.
This file is generated automatically while editing the website through the Control panel and does not require manual modifications. While creating such a file, it is necessary to add the same number of the layouts as specified in the Structure file.
Menus (xml/menus.xml)
Menu file contains the structure and the data of the site Menu. This file combines the structure and the content of the menu, describing all possible types of the menu and menu data providers. Flasher edits the Menu files while creating types of the menu. The Menu itself is created in the control Panel and does not require manual modifications.
We plan to create a small Flex application – the generator of the Menu file that allows building and generating the Flash CMS Menu structure with the help of intuitive constructor.
After all the necessary elements of the Menu are uploaded MotoEvent.INITIALIZATION_COMPLETE is dispatched by MotoApplication and the site is running.
