Ming GradTube Codes
Enter your parameters and then select and copy codes.
Color:
Red:
Green:
Blue:
Width:
Height:
Pixel x:
Pixel y:
then copy
$myMovie = new SWFMovie(); $myMovie->setBackground(0x00, 0x00, 0x00); $myMovie->setDimension(450, 450); $GRAD=new SWFGradient(); $GRAD->addEntry(0.0,0,0,0); $GRAD->addEntry(0.2,0,0,0); $GRAD->addEntry(0.4,0,0,0); $GRAD->addEntry(0.5,0,0,0); $GRAD->addEntry(0.6,0,0,0); $GRAD->addEntry(0.8,0,0,0); $GRAD->addEntry(1.0,0,0,0); $GRADsquare=new SWFShape(); $GRADsquare->setLine(1,0,0,0,0); $GRADfill=$GRADsquare->addFill($GRAD, SWFFILL_LINEAR_GRADIENT); $GRADfill->scaleTo(0.05); $GRADfill->moveTo(0,0); $GRADsquare->setLeftFill($GRADfill); $GRADsquare->drawLine(0, 0); $GRADsquare->drawLine(0, 0); $GRADsquare->drawLine(-0, 0); $GRADsquare->drawLine(0, -0); $GRADtube=$myMovie->add($GRADsquare); $GRADtube->moveTo(0,0); //uncomment this line for a horizontal tube //$GRADtube->rotate(90); header('Content-type: application/x-shockwave-flash'); $myMovie->output(); /* For a gradient of 2 colors change the addEntry codes to the 2 colors you want as below: $GRAD->addEntry(0.0,255,0,255); $GRAD->addEntry(1.0,255,255,0); */ ?>
Back to Functions