I'm trying to get a "simple as possible" script to work using Ming and
Flash 8 features. The link below shows how gobbsmacking F8 can be:
http://redhot.pepper.jp/ming_php/textgradient.htmlI'd like to load up a jpg within the AS portion of the Ming script,
but so far, I haven't had any luck. This works when the "ming_useswfversion" is
set to 6, but 7 kills it. Have I slammed up against a brick wall here?
TIA,
sround
<?php
dl('php_ming.so');
Ming_setScale(20.0);
ming_useswfversion(7);
$movie = new SWFMovie();
$movie->setRate(25.000000);
$movie->setDimension(550,400);
$movie->setBackground(0xde,0xde,0xde);
#------------------------------------
# Add onClipEvent Actions
#------------------------------------
$strAction= "
createEmptyMovieClip('pic',1);
pic._x=150;
pic._y=100;
pic.loadMovie('yum.jpg');
";
// add the actionscript to frame 1 of the movie and save...
$movie->add(new SWFAction($strAction));
// save movie
$swfname = basename(__FILE__,".php");
$movie->save($outswf="$swfname.swf",9);
// open movie and set version to 8
// (hack until it can be set in ming)
$ftmp=fopen($outswf,"r");
$stmp=fread($ftmp,filesize($outswf));
$ftmp=fopen($outswf,"w");
fwrite($ftmp,substr_replace($stmp,chr(

,3,1));
?>