Forum Moderators: coopster

Message Too Old, No Replies

PHP w/ MING generating wierd random characters

PHP ming swf strange output

         

alanv72

2:06 am on Mar 15, 2004 (gmt 0)

10+ Year Member



Can someone look at this and tell me what is wrong? I'm running Slackware 9.1 with PHP 4.3.3 w/ ming module that comes precompiled in Slackware 9.1. I have downloaded the newest ming version and compiled the module for php, but I get the same results...

Here is the simple code of the page..

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#666666">
<p>Starting Flash Document</p>
<p>
<?

// Create movie and set parameters.

$movie = new SWFMovie();
$movie->setBackground(0x00, 0x00, 0x00);
$movie->setDimension(5400, 3600);

// Create a new shape.

$square = new SWFShape();

// Set a line width of 15, and rgb color of gold.

$square->setLine(15, 0xff, 0xcc, 0x33);

// Move the drawing pen toward the middle of the screen.

$square->movePenTo(2000, 2000);

// Draw the square, 'standing' it on a point.

$square->drawLine(500, -500);
$square->drawLine(500, 500);
$square->drawLine(-500, 500);
$square->drawLine(-500, -500);

// Add the square to the canvas.

$addedSquare = $movie->add($square);

// Output the $movie to the canvas.

header('Content-type: application/x-shockwave-flash');
$movie->output();

?>
</p>
<p>End Flash Document</p>
</body>
</html>

Looks like something is not compiled correctly. I'm wondering if I need a newer version of the libpng or libgif packages. Any help will be appreciated.

Thanks,
alanv72

[edited by: jatar_k at 4:01 am (utc) on Mar. 15, 2004]
[edit reason] no urls thanks [/edit]

alanv72

6:50 am on Mar 15, 2004 (gmt 0)

10+ Year Member



jatar_k,
the url was only so that you could see the output of the weird characters..

This is what the page outputs..

Starting Flash Document

CWSHxÚ@¿ÿx_ CÌÌÌ`>€>€ÿÿÐú/¡Ñ0`‰ú @æa9

End Flash Document