setRightFill($s->addFill($r, $g, $b));
else
echo "there's an error in your call to rect"." ";
$s->movePenTo($startx, $starty);
$s->drawLine($width,0);
$s->drawLine(0,-$height);
$s->drawLine(-$width,0);
$s->drawLine(0,$height);
}
//////////////////////////////////////////////////////////////////////
function createWord($movie, $sprite, $string_arr, $glyph_base, $depth, $count, $r, $g, $b, $stroke, $sr, $sg, $sb,
$f, $g_base, $x, $height, $xscale, $yscale, $string, $offx=0, $offy=0){
//for every letter in the string
for($i=0; $isetRightFill($r, $g, $b);
echo $r.$g.$b." ";
$$glyph->setLine($stroke, $sr, $sg, $sb);
//and draw a glyph of that letter using the .fdb font supplied
$$glyph->drawGlyph($f, $string_arr[$i]);
//add that letter to the current sprite
$g_base = $g_base.$txtcount."_".$i;
$$g_base = $sprite->add($$glyph);
//and move it to its proper place in the word
$$g_base->moveto($x, 0);
//as long as your not on the last letter, increment x by the width of the letter
if($i != count($string_arr)-1)
$x += ($f->getWidth($string_arr[$i])-2);
}
//when you done with all the letters, close the shudder once and add the sprite
$sprite->nextframe();
//create the displayItem name and add the sprite
$glyph_ = $glyph_base."__".$count;
$$glyph_ = $movie->add($sprite);
//put the glyph in the right spot, scale it, set its name and depth
$$glyph_->moveTo(0, $height);
$$glyph_->scale($xscale, $yscale);
$$glyph_->setName($glyph_base.$string);
$$glyph_->setdepth($depth+$count);
//if your creating a second (or third...) letter, supply an offset
if($offx!=0 || $offy!=0)
$$glyph_->move($offx, $offy);
//return the displayItem
return $$glyph;
}//end function
/////////////////////////////////////////////////////////////////////
//ming vars
Ming_setScale(20.0);
ming_useswfversion(6);
$movie = new SWFMovie();
$movie->setRate(20.000000);
//all variables found in this program that aren't declared locally
//are declared by text_gen_vars.php. all variables have a default value, and can
//be changed through the _post vars
//$w and $h are two such variables
$movie->setDimension($w, $h);
$movie->setBackground($m_r, $m_g, $m_b);
//EDIT!!!
//this area will need to be set to your path
$f = new SWFFont("../MING/".$font);
$b_f = new SWFFont("../MING/".$b_font);
//grab the menu items and links from the input and create arrays using the space
//character as the delimiter
$menu_items = explode(" ", $str_menu_items);
$menu_items_links = explode(" ", $str_menu_items_links);
//txtcount is used to create unique variable variable names
$txtcount=0;
//initial swfAction strings to null
$onloadActions = "";
$onenterframeActions = "";
$functions = "";
while($txtcount < count($menu_items)){
//arr is becomes the value of the current string in menu_items
$arr = array();
$string = $menu_items[$txtcount];
//wish i had php5
for($i=0; $igetAscent()-20, $$box, "fill", $m_r, $m_g, $m_b);
$$box_spr->add($$box);
$$box_spr->nextframe();
$box_ = "box__".$txtcount;
$$box_=$movie->add($$box_spr);
$$box_->moveTo(0, $height);
$$box_->setName("box".$string);
$$box_->setDepth(10-$txtcount);
////////////////////////////////////////
////////////////////////////////////////
//create the actionScript for this word
$link = $menu_items_links[$txtcount];
//getURL just retrieves the url from the link_base
$functions .= "_root.box".$string.".onPress= function(){
getURL(\"".$link_base."/".$link."\", '_self');
};";
$onloadActions .= "bk_glyph".$string."._alpha = 0;";
$onenterframeActions .= "//check for a hit on your hitArea
if(box".$string.".hitTest(_xmouse, _ymouse)){
//do something cool
if(bk_glyph".$string."._alpha < 100)
bk_glyph".$string."._alpha+=".$fade_speed.";
}
else {
//undo the cool thing
if(bk_glyph".$string."._alpha > 0)
bk_glyph".$string."._alpha -= ".$fade_speed.";
}";
//increment the height and the counter
$height += $height_increment;
$txtcount++;
}//end while
$movie->add(new SWFAction($functions."
_root.onload=function(){ ".$onloadActions." };
_root.onenterframe=function(){ ".$onenterframeActions." };"));
$movie->nextframe();
$movie->save($movie_name);
echo "it worked";
echo " viewit";
?>
/////////////////////////////////////////////////////////////////////////////////////////////////////
//text_gen_vars.php
\n";
for($m=0; $m";
for($i=1; $i