Re: help please! - Rotation

[email protected] Wed, 05 Nov 2003 09:44:17 -0800
Newsgroups gmane.comp.web.ming.general
Message-ID <[email protected]>
I use Ming from C so I don't have any real example to post,
but I never had problems with rotate and other DisplayItem operations.

Try this sample, from the PHP documentation. It looks good to me :)
http://www.php.net/manual/en/function.swfdisplayitem.rotateto.php

Hope this helps,
 
  Raffaele

---- Original Message ----
From:		** sLiMkRaZy **
Date:		Wed 11/5/03 1:34
To:		[email protected]
Cc:		[email protected]
Subject:	Re: [ming-fun] help please! - Rotation

Thanks for this Alessandro, but using this method will only duplicate what I 
have already.

I'm trying to create a swf that will not have any actionscript in it, but 
will just be a single frame movie with all of the objects on the stage in 
that first and only frame.

The way I tried to do this was by exploding the cordianates into an array, 
then looping through them and creating and adding the objects to the movie.  
That part works great, but when I tried to use the rotateTo method on a fill 
that did not work.

Has anyone successfully managed to use rotateTo or swfDisplayItem's Rotate 
method??

If someone could show me some source of a simple square rotated by 45 
degrees on a stage that would be great!


>From: alessandro pasotti <[email protected]>
>Reply-To: [email protected]
>To: "** sLiMkRaZy **" <[email protected]>
>CC: [email protected]
>Subject: Re: [ming-fun] help please!
>Date: Wed, 5 Nov 2003 08:07:43 +0100
>
>ROTATION in AsctionScript
>
>Hope it helps.
>
>
><?php
>//#!/usr/bin/php
>// create movie and set parameters
>// change the following if needed for storing swf
>// $_path='../../';
>
>// I'm using ming0.3a from CVS
>ming_useSWFVersion(6);
>
>$movie=new SWFMovie();
>$movie->setRate(15);
>$movie->setBackground(0xee,0xee,0xff);  // nice light blue
>$movie->setDimension(300,150);
>
>$movie->add(new SWFAction("
>this.createEmptyMovieClip('c1', 1);
>this.c1.lineStyle(1, 0x00aa00, 100);
>this.c1.beginFill(0xffff00, 70);
>this.c1.moveto(-20, -40);
>this.c1.lineto(20, -40);
>this.c1.lineto(20, 40);
>this.c1.lineto(-20, 40);
>this.c1.lineto(-20, -40);
>this.c1.endFill();
>this.c1.duplicatemovieclip('c2',0);
>this.c2._x+=2;
>
>var stepx= 3;
>var stepy= 3;
>this.onEnterFrame = function() {
>     c1._rotation += 5;
>     c2._rotation += 5;
>     if (c1._x > 300 || c1._x < 0) {
>     	stepx = stepx > 0 ? -1 : 1;
>	stepx=(1+Math.random()*3)*stepx;
>	};
>	c1._x+=stepx;
>     if (c1._y > 150 || c1._y < 0) {
>     	stepy = stepy > 0 ? -1 : 1;
>	stepy=(1+Math.random()*3)*stepy;
>	};
>	c1._y+=stepy;
>
>};
>
>
>"));
>header("Content-Type:application/x-shockwave-flash");
>$movie->output();
>if ($argc == 0) $nome=$_path."swf/ex.swf"; else $nome=$argv[1];
>//$movie->save($nome);
>?>
>
>
>--
>Alessandro Pasotti
>
>

_________________________________________________________________
Get Hotmail on your mobile phone http://www.msn.co.uk/msnmobile

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