Drawing curve in SWF whith PHP : Ming functions for Flash : Functions PHP Source Code


PHP Source Code » Functions » Ming functions for Flash »

 

Drawing curve in SWF whith PHP


drawcurveto test...


<?
/********************************************************************************
* @ File: drawcurveto.php
* @ Original date: March 2004  @ www16.brinkster.com/gazb/ming/
* @ Version: 1.2
* @ Summary: using drawcurveto
* @ Updated:  small improvements and summary text
* @ Copyright (c) 2003-2007, www.gazbming.com - all rights reserved.
* @ Author: gazb.ming [[@]] gmail.com - www.gazbming.com 
* @ Released under GNU Lesser General Public License - http://www.gnu.org/licenses/lgpl.html
********************************************************************************/

// some typical movie variables
Ming_setScale(20.0000000);
ming_useswfversion(6);
$movie=new SWFMovie();
$movie->setDimension(550,400);
$movie->setBackground(rand(0,0xFF),rand(0,0xFF),rand(0,0xFF));
$movie->setRate(12); 

for(
$i=10;$i<300;$i+=10){

$s = new SWFShape();
$s->setLine(4000);
$s->setRightFill(255,0,0);
$s->movePenTo(1010);
$s->drawLineTo(31010);
$s->drawLineTo(310230);
$s->drawCurveTo(10$i1010);

$movie->add($s);
$movie->nextFrame();
}

// save swf with same name as filename
$swfname basename(__FILE__,".php");
$movie->save("$swfname.swf",9);
?>


HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo Functions
» Ming functions for Flash