Wierdness in squares

"Ben Schwarz" <[email protected]> Fri, 12 Sep 2003 02:21:00 -0400 (EDT)
Newsgroups gmane.comp.web.ming.general
Message-ID <[email protected]>
Ming is creating this
http://giraffaka.com/tees/exp/swfmovie.php?item=17

and for some unknown reason the boxes aren't square, they're going 
all
wierd on me.. I can't workout why.. anyway, here is the code.

cheers,

__b


--

<?
        if(isset($HTTP_GET_VARS['item'])){
                $item = $HTTP_GET_VARS['item'];
                switch($item){

                        case $item:
                                $movie = new SWFMovie();
                                $movie->setDimension(550,400);
                                $movie->setRate(60);

                                // a black shape, our base shape
                                $shape =  new SWFShape();
                                $shape->setRightFill(0,0,0);
                                $shape->drawLine(5,0);
                                $shape->drawLine(0,5);
                                $shape->drawLine(-5,0);
                                $shape->drawLineTo(0,0);

                                include("include.php");
                                if(!$conn){
                                        die(MYSQL_ERROR());
                                }
                                $select_db = MYSQL_SELECT_DB($db);

                                if(!$db){
                                        die(MYSQL_ERROR());
                                }
                                $query = "SELECT drawing_data FROM catalogue 
WHERE order_id='$item'";

                                $result = MYSQL_QUERY($query, $conn);
                                if(!$result){
                                        die(MYSQL_ERROR());
                                }

                                $key = MYSQL_FETCH_ARRAY($result);
                                        $data = $key['drawing_data'];

                                $i=1;
                                $data_array = explode(";",$data);
                                foreach($data_array as $newVal){
                                        list($size,$x,$y,$r,$g,$b)=split(",", $newVal);
                                        $object = $movie->add($shape);
                                        $object->addColor($r,$g,$b);
                                               $object->moveTo($x,$y);
                                               $object->scaleTo($size, $size);
                                        $i++;
                                }
                                // finishing our only frame in this swfmovie.
                                $movie->nextFrame;
                                header('Content-type: 
application/x-shockwave-flash');
                                $movie->output();

                        break;
                }
        }


?>