A little story that may help some others - part 2
and this didn't work... why not.. the trace gave me a clue:
Warning: createEmptyMovieClip is not a function
After a bit of digging around I found that this was because the flash movie was not running in the right version. There is a ming option that is mentioned in other posts but does not seem to be well documented and that is:
ming_useswfversion(setversion)
This makes the world of a difference as it sets what version of flash ming outputs its movies as.
So the monent I added:
ming_useswfversion(6)
To the top of my php I not only did the createEmptyMovieClip function work but so did the loading and the variable was accessible. Huruh!
So my final code now looks like this:
<?php
ming_useswfversion(6);
$m = new SWFMovie();
$m->setRate(30.000000);
$m->setDimension(480, 400);
$m->setBackground(0xff, 0xff, 0xff);
$m->add(new SWFAction('
myvar = "variable to pass to flash";
this.createEmptyMovieClip("mc", 99999);
mc.loadMovie ("/flash_file_created_by_hand.swf");
');
header('Content-type: application/x-shockwave-flash');
$m->output();
?>
instead of this:
<?php
$m = new SWFMovie();
$m->setRate(30.000000);
$m->setDimension(480, 400);
$m->setBackground(0xff, 0xff, 0xff);
$m->add(new SWFAction('
myvar = "variable to pass to flash";
LoadMovie("/flash_file_created_by_hand.swf", "mc");
');
$s1 = new SWFSprite(); $s1->nextFrame(); $i1 = $m->add($s1);
$i1->setName('mc');
$m->nextFrame(); header('Content-type: application/x-shockwave-flash');
$m->output();
?>
I dont pretend to be a flash guru.. but i know it took me a while to figure this all out.. so I thought that this post might one day be of help to someone.