Lesson 13 - Using
Transparency
Code summary for lesson 13: <html>
<body>
<?php
$myFont=new SWFFont("Arioso.fdb");
$myText1=new SWFText();
$myText1->setFont($myFont);
$myText1->setColor(0,0,255);
$myText1->setHeight(40);
$myText1->moveTo(-($myFont->getWidth("Hiding"))/3,0);
$myText1->addString("Hiding");
$myShape2=new SWFShape();
$myShape2->setRightFill(255,0,0);
$myShape2->drawLine(150,0);
$myShape2->drawLine(0,60);
$myShape2->drawLine(-150,0);
$myShape2->drawLine(0,-60);
$myMovie=new SWFMovie();
$myMovie->setDimension(300,200);
$myMovie->setBackground(255,255,255);
$firstText=$myMovie->add($myText1);
$firstText->moveTo(150,150);
$transparentSquare=$myMovie->add($myShape2);
$transparentSquare->moveTo(80,110);
for($i=0; $i<20; $i++){
$myMovie->nextFrame();
$transparentSquare->multColor(1.0, 1.0, 1.0,1.0-$i/20);
}
$myMovie->save("lesson13.swf");
<OBJECT
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"
ID=objects WIDTH=460 HEIGHT=80>
<PARAM NAME=movie
VALUE="lesson14.swf">
<EMBED src="lesson14.swf" WIDTH=460 HEIGHT=80
TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</OBJECT> <br><a href="javascript:history.go(-1)"><
back</a>
</body>
</html>
^ Execute this php script.
Go on with Lesson 14!