[Papervision3D] movieAssetMaterial play and stop
luisk
luiskrod.s at gmail.com
Thu Jul 16 08:47:11 PDT 2009
Hello,
This is my first reply in this forum, been reading and learning from a while
:).
I'm new to papervision so I don't know how good my answer will be hehe.
I tried your file, I made some changes:
// I changed the MovieAssetMaterial to a MovieMaterial
//
private var movieAssetMaterial:MovieMaterial;
private var vMovie:walkingTest = new walkingTest();
// Movie Material
//
movieAssetMaterial = new MovieMaterial(vMovie, true);
movieAssetMaterial.animated = true;
movieAssetMaterial.doubleSided = true;
movieAssetMaterial.interactive = true;
// When you click on stage the movieclip stops running
//
stage.addEventListener(MouseEvent.MOUSE_DOWN, hagoClic);
// And then the function:
private function hagoClic(e:MouseEvent):void{
movieAssetMaterial.animated = false;
}
yes, it's a dirty way haha, i just set the animated material to false and it
stop.
Hope it helps, still im trying to find out a better way.
Greetings
Luisk
andysk8er wrote:
>
> Okay,
> I played with your files and here's what I came up with:
>
> add:
> import flash.display.MovieClip;
> to the top of your class. You'll need it later.
>
> kill your gourad shaded material for now (it just complicates things) and
> add "movieAssetMaterial" to your plane:
> walkingDoll = new Plane(movieAssetMaterial, 600, 600, 3, 3);
>
> then add this line after you add walkingDoll to the scene:
> MovieClip(movieAssetMaterial.movie).traceMe();
>
> For some reaon, I had to cast it as a movieclip for it to work. So, if you
> want to be able to call it at any time, you can create a reference to it:
>
> var myAnimatedClip:MovieClip; //do this in the variable declarations at
> the top of your class
>
> myAnimatedClip = MovieClip(movieAssetMaterial.movie); //do this after you
> have initialized everything
>
> myAnimatedClip.traceMe(); //do this whenever you want
>
> You also had a bunch of other compiler errors, but I didn't fix those.
> Good Luck,
> Andy
>
>
--
View this message in context: http://www.nabble.com/movieAssetMaterial-play-and-stop-tp24485566p24519033.html
Sent from the Papervision3D mailing list archive at Nabble.com.
More information about the Papervision3D
mailing list