BloggerInit Actionscript

Table of contents | Previous document | Download BloggerInit.as | SWF!T Homepage

RCSfile: BloggerInit.as,v  Revision: 1.4  Date: 2003/02/01 00:53:50  

Copyright 2003 Orgdot AS. All Rights Reserved. http://dev.swfit.com
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.


BloggerInit prepares the resources for the basic blogger. See BloggerLoop for further details.
author      Olaf Havnes
version     Revision: 1.4  Date: 2003/02/01 00:53:50  
since       SWFIT1.0



Font data, sizes and spacing

DEFAULT_LINE_HEIGHT = 20;
lheight = line_height eq "" ? DEFAULT_LINE_HEIGHT : line_height;

DEFAULT_CLIP_SPACING = 10;
cspacing = clip_spacing eq "" ? DEFAULT_CLIP_SPACING : clip_spacing;

DEFAULT_IMAGE_HEIGHT = 200;
imheight = image_height eq "" ? DEFAULT_IMAGE_HEIGHT : image_height;


List of variable names as they appear inside a single news clip


NME_USERNAME      = "username";
NME_USERMAIL      = "usermail";
NME_USERBIO       = "userbio";

NME_URL_VAL       = "urlval";
NME_URL_TXT       = "urltxt";

NME_TITLE         = "title";
NME_POST          = "post";

NME_IMAGE_PATH    = "image_path";
NME_IMAGE_TITLE   = "image_title";
NME_IMAGE_CREDITS = "image_credits";

NME_CDATE_SHORT   = "cdate_short";
NME_CDATE_LONG    = "cdate_long";
NME_MDATE_SHORT   = "mdate_short";
NME_MDATE_LONG    = "mdate_long";

Configuration done by javascript when embedding this movie. See BloggerBasic.js.


IMAGE_DIR = "_image_dir";
DATA_FILE = "_file";

has the data file has been set by another script?

if (var_url ne "")
{
}
else
{
   var_url = eval ("/:" add _name add DATA_FILE);
}

image_prepend = eval ("/:" add _name add IMAGE_DIR);



Constants used in the publishing system when exporting images.


FULL_IMAGE          = "_big.swf";
SCALED_IMAGE        = "_mid.swf";
THUMB_IMAGE         = "_sml.swf";
SCALED_WIDTH_IMAGE  = "_wdt.swf";
SCALED_HEIGHT_IMAGE = "_hgt.swf";
SCALED_THUMB_IMAGE  = "_thb.swf";

The most common image size:

DEFAULT_IMAGE_SIZE  = SCALED_IMAGE;

image_append = image_size ne "" ? eval (image_size) : DEFAULT_IMAGE_SIZE;


Constants used in the publishing system when exporting data as URL encoded Strings.


PUB_USERNAME      = "user_";
PUB_USERMAIL      = "usermail_";
PUB_USERBIO       = "userbio_";

PUB_URL_VAL       = "url_";
PUB_URL_TXT       = "url_txt_";

PUB_TITLE         = "title_";
PUB_POST          = "post_";

PUB_IMAGE_PATH    = "image_";
PUB_IMAGE_TITLE   = "im_title_";
PUB_IMAGE_CREDITS = "im_credits_";

PUB_CDATE_SHORT   = "cd_short_";
PUB_CDATE_LONG    = "cd_long_";
PUB_MDATE_SHORT   = "md_short_";
PUB_MDATE_LONG    = "md_long_";


Delete any duplicated movie clips and reset counters for the multi-blogger

c = 0;
while (c < num_clip)
{
   removeMovieClip ("clip_" add c);
   c++;
}


Counter for the full blogger

num_clip   = 0;
tot_height = 0;
adjust_clip = false;

Counter for the single blogger

current_clip = 0;

load variables from the external file

var_load = "";
loadVariables ( var_url , "");