note 85574 added to class.swfaction

From: Date: Sat, 06 Sep 2008 16:27:28 +0000
Subject: note 85574 added to class.swfaction
Groups: php.notes 
Request: Send a blank email to php-notes+get-144193@lists.php.net to get a copy of this message
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"); '); /* -- make movie clip 'mc' that we will load flash_file_created_by_hand.swf into -- */ $s1 = new SWFSprite(); /* (1 frames) */ $s1->nextFrame(); /* (end of sprite frame 0) */ $i1 = $m->add($s1); $i1->setName('mc'); $m->nextFrame(); /* (end of frame 0) */ 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. ---- Server IP: 87.124.35.190 Probable Submitter: 84.92.194.66 ---- Manual Page -- http://www.php.net/manual/en/class.swfaction.php Edit -- https://master.php.net/note/edit/85574 Del: integrated -- https://master.php.net/note/delete/85574/integrated Del: useless -- https://master.php.net/note/delete/85574/useless Del: bad code -- https://master.php.net/note/delete/85574/bad+code Del: spam -- https://master.php.net/note/delete/85574/spam Del: non-english -- https://master.php.net/note/delete/85574/non-english Del: in docs -- https://master.php.net/note/delete/85574/in+docs Del: other reasons-- https://master.php.net/note/delete/85574 Reject -- https://master.php.net/note/reject/85574 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#144193) next »