FLASHCARD TUTORIAL This file is divided in several sections, explaining how each section works. The final section is a series of advice on how to accomplish upgrades to the system. Please see the GALLERY section for information on uploading images to the background image galleries, and also adding/editing gallery names. _____________________________ CONFIG ______ This is what the basic config file looks like: The config file will be parsed by the loader to create the initial loading screen. It tells Flash which font to use, its size, its color, the border of the square bars, the background color of the bars, and the color of the loading bars themselves. The width parameter means the total width of the string plus the loadBar. The strings element contains the strings to be used for the loading of each different element. Note that loading gallery refers to the gallery.php script. The pics won't be loaded till the user tries to select a background. This is the same with the fonts. Font files won't be loaded till one of them is used. You can use different language files by calling the movie using loader.swf?lang=es. This will tell the system to load config_es.xml, and strings_es.xml. If no lang parameter is sent to the loader, it'll just load config.xml and strings.xml, which in this case are english, but could be set by the user to be any language. The config file also tells the user what skin and skin configuration file to use. _____________________________ HTML TEMPLATE _____________ This is just a plain html file. The strings %to, %from and %img will be substitued by the saveImage.php for the appropiate values. %to and %from can be used in the subject string in config.inc as well. _____________________________ GALLERY _______ The background galery is organized by directories. Each directory is an image category. The name of the directory is not important in itself, although they MUST all begin with an integer number, followed by a -, then a descriptive name. The numbers cannot repeat themselves. The actual names shown by the application are found in the appropiate strings_xx.xml file, and the association between these names and the galleries is made using the number before the "-" symbol in the gallery name. So for example, if we have the gallery 1-my photos we'll have an entry in the english language file like this: and in the spanish language file (note: do not use accented letters or non-Latin symbols): Please note that your images must be (a) JPG format, (b) non-progressive, and (c) optimized. Flash is somewhat picky about the JPGs that it loads, so if it doesn't work for you, try using a more advanced image editor, like Photoshop or Fireworks, which produce 'cleaner' JPGs. _____________________________ STRINGS _______ This is basically an xml file with lots of elements, each of them with two attributes, name and value. The name is how the app knows where to put the value. So the name parameter should not change. All the strings found in the current files should be included in any localization of the app. The first group of strings are used mainly as window titles and texts, the next 2 groups are tooltips for the buttons. An important note. There's also a section in each skin's config file. These tell the app what's the name of the text field into which to put a certain string value from the strings.xml file. Note that these strings will be set only once when the skin is loaded. Thus, they cannot point to an object that will be created dynamically. If a new string was to be added to the skins (as a copyright notice), a new entry should appear in the strings configuration file, and in the skin configuration file. __________________________________ SKINS _____ Each skin aims to have all the visual elements needed right in the screen when opened in the flash authoring environment. No hidden objects in the library that will be attached later. For resizing, the skin is divided in 9 separate sections, lefttop, middletop, righttop...the four corners are never resized, they're just moved when the window is resized. The other sections can be composed by any number of internal movieclips, and the name of these movieclips must be specified to the application by means of the skin config file. The sections themselves will never be resized, only the specified movieclips in the top, left, right, bottom and center part will. You'll find the configuration for these clips in the window tag. The 5 elements inside the window element are compulsory. The attribute resize takes as value the names of the movieclips inside the GUI sections that'll be resized. Plenty of effects can be achieved using this method. Most of the other parts of the config file modify the colors of different clips in the skin. These are the tags that can be found in a skin config file: * WINDOW * CONFIG This node defines config parameters. The drag attribute can be either title or window. It defines what part of childwindow is draggable, either the title, or the whole background of the window. defaultColor sets the color of the card, in case the user selects no background picture. * BACKGROUNDWINDOW This node defines some colors for the background selection window: -area: the container of the thumbnails. -shade: shade for the container, bottom and right lines surrounding the area. -highlight: highlight for the container, top and left lines surrounding the area. -normal and selected define the colors of the squares surrounding the thumbnails, either in normal state, or selected state. Proper shade and highlight arguments work as for the container area. * GRID The color of the lines of the grid when snap to grid is selected, and the spacing among lines. Note that this color is applied with a 50% alpha. This prevents the grid lines from covering totally other lines in the drawing, notably when using the line or rectangle drawing tools. * CHILDWINDOW Defines the behaviour of the childWindows. The childWindow movieclip in the skin will be used for all the windows in the system: messageboxes, background selection, email sending...The first 6 elements work just as in the main window. For resizing purposes. Note that only the background selection window is resizable, but all the others also have to adjust their size to their contents, so they use resizing as well. Subsequent elements (after first 6) point to the location of different elements used by the system. The system must know where these elements are to know which ones to hide when showing another window, and to give each element it's proper functionality. * BUTTONS