Re: Calling all Ming-a-teers...

SoftwareDave <[email protected]> Tue, 21 Oct 2003 18:40:38 -0700 (PDT)
Newsgroups gmane.comp.web.ming.general
Message-ID <[email protected]>
I think setDepth is what your looking for.  You could create an empty movie clip in your main movie, set the depth, and load movies into it via actonscript.

//Add Empty Clip
$clip = new SWF::Sprite();
$clip->nextFrame();
$xclip = $movie->add($clip);
$xclip->setName('Clip');
$xclip->setDepth(99);
$xclip->moveTo(1,1);

$movie->add(new SWFAction("loadMovie('clip1.swf', '_root.Clip');"));


--- Ben Schwarz <[email protected]> wrote:
Hey folks,

I'm having trouble getting my head around this stuff, so I'll fork it to 
you guys and see if you have any ideas.
I want to achieve the following:

Create a file using the script (shown below)
Put another *.swf in the background.
Place the dots created in the script shown below OVER the other swf file...

SCRIPT:

--
<?
	session_start();
	$data = $_POST['draw_data'];
	$desc = $_POST['description'];
	$title = $_POST['title'];
	$price = "45.00";
	$date = gmdate("j/m/y");
	
	if(isset($_SESSION['user'])){
		$user = $_SESSION['user'];
	}else{
		$user = $_POST['usename'];
	}
	
	//draw square

	$movie = new SWFMovie();
	$movie->setDimension(450,360);
	$movie->setRate(30);
				
	// create 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);
	
	$date_file = str_replace("/", "_", $date);
	$username_file = str_replace(" ", "_", $user);
	$title_file = str_replace(" ", "_", $title);
	$filename = "drawings/" . $username_file . "_" . $title_file . "_" . 
$date_file . ".swf";

	include("include.php");

	$query = "INSERT INTO catalogue (filename, username, description, price, 
date, title) VALUES('$filename', '$user', '$desc', '$price', '$date', 
'$title');";
	$result = MYSQL_QUERY($query, $conn);
	if(!$result){
		die(MYSQL_ERROR());
	}
	
	//loop data, split into variables
	$data_array = explode(";",$data);
	foreach($data_array as $newVal){
		list($x,$y,$r,$g,$b)=split(",", $newVal);
	        $object = $movie->add($shape);
	        $object->addColor($r,$g,$b);
			//$object->scale($size);
	       	$object->moveTo($x,$y);
	}
	// finishing our only frame in this swfmovie.
	$movie->nextFrame;
	$movie->save($filename);
	
	//tell flash its done
	print("status=complete");

?>
--


If you have any ideas, please do email me, its late and I'm braindead, 
hopefully some stuff will make sense in the morning,
thank you very much for reading!

Cheers,


__ben


_______________________________________________
ming-fun mailing list
[email protected]
http://www.opaque.net/mailman/listinfo/ming-fun