[Papervision3D] MovieMaterial interactive
dorian lyder
badman_2_d at hotmail.com
Wed Oct 8 06:16:21 PDT 2008
Just in case .
You can also add eventListeners for your MovieClip objects through the MovieMaterial:
_material.movie["simple_button"].addEventListener(MouseEvent.CLICK, doSomething);
Regards
> From: papervision3d-request at osflash.org> Subject: Papervision3D Digest, Vol 25, Issue 29> To: papervision3d at osflash.org> Date: Wed, 8 Oct 2008 04:15:58 -0700> > Send Papervision3D mailing list submissions to> papervision3d at osflash.org> > To subscribe or unsubscribe via the World Wide Web, visit> http://osflash.org/mailman/listinfo/papervision3d_osflash.org> or, via email, send a message with subject or body 'help' to> papervision3d-request at osflash.org> > You can reach the person managing the list at> papervision3d-owner at osflash.org> > When replying, please edit your Subject line so it is more specific> than "Re: Contents of Papervision3D digest..."> > > Today's Topics:> > 1. Re: adding filters to a plane (Gordon Everett)> 2. Re: MovieMaterial interactive (Gordon Everett)> 3. Re: MovieMaterial interactive (TurboHz)> 4. Re: adding filters to a plane (360fusion)> 5. Re: adding filters to a plane (John Brookes)> > > ----------------------------------------------------------------------> > Message: 1> Date: Wed, 8 Oct 2008 09:58:18 +0100> From: Gordon Everett <gordee at hotmail.co.uk>> Subject: Re: [Papervision3D] adding filters to a plane> To: <papervision3d at osflash.org>> Message-ID: <BLU103-W358BD5EDFAF3C64D3F29C28C3B0 at phx.gbl>> Content-Type: text/plain; charset="iso-8859-1"> > > plane.useOwnContainer = true; then apply filters as normal using InteractiveScene3DEvent.OBJECT_OVER> hthGordon Everett> > > > > From: mikesven at me.com> To: papervision3d at osflash.org> Date: Tue, 7 Oct 2008 17:30:14 -0400> Subject: [Papervision3D] adding filters to a plane> > Hey Guys,> > I have been looking around on the net but I haven't been able to find > any good tutorials that explain how to apply filters to the outside > edge of a plane. I would like it so that when you mouse over the > plane there is a glow on the outer edge. Do any of you know of any > tutorials, or have any sample code that could lead me in the right > direction.> > Thanks for any help that can be offered,> > Michael> > _______________________________________________> Papervision3D mailing list> Papervision3D at osflash.org> http://osflash.org/mailman/listinfo/papervision3d_osflash.org> _________________________________________________________________> Make a mini you and download it into Windows Live Messenger> http://clk.atdmt.com/UKM/go/111354029/direct/01/> -------------- next part --------------> An HTML attachment was scrubbed...> URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20081008/86e68dc9/attachment-0001.html > > ------------------------------> > Message: 2> Date: Wed, 8 Oct 2008 10:01:54 +0100> From: Gordon Everett <gordee at hotmail.co.uk>> Subject: Re: [Papervision3D] MovieMaterial interactive> To: <papervision3d at osflash.org>> Message-ID: <BLU103-W1607CEBB1E96867594FC2A8C3B0 at phx.gbl>> Content-Type: text/plain; charset="iso-8859-1"> > > Flash has a built in simpleButton classGordon Everett> > Date: Wed, 8 Oct 2008 09:53:19 +0100From: jimmyhay at gmail.comTo: papervision3d at osflash.orgSubject: Re: [Papervision3D] MovieMaterial interactive> Fraid it isn't that simple. Already tried this, the papervision Interactive3DEvent model works quite differently to the standard Flash MouseEvent model. What exactly do you mean by 'SimpleButtons'? Do you mean movieclips or sprites, cause I> On Wed, Oct 8, 2008 at 9:39 AM, TurboHz <turbohz at gmail.com> wrote:> > As far as I know, yes it's posible: it really is that simple. Just build your MoviecClip and code all your stuff (as you would do in 2D, including mouse events and all), add an instance to a MovieMaterial, and set the plane to interactive.I haven't tested it with components, but with SimpleButtons I didn't have any problem at all.> 2008/10/8 James Hay <jimmyhay at gmail.com>> > > Does anyone know if it's possible to make the movieClips that I might have in a movieClip that I use as a material interactive through a 3D plane? So for instance, say I have a movieClip and inside this I have another movieClip called "buttonOne_mc". I then want to make this "buttonOne_mc" interactive in my 3D scene with a mouse down event. Anyone know if this is possible or not, or will I have to create 3D planes or particles over all the buttons that I want to make interactive and then add 3D interactive events to these 3D objects?Cheers, Jimmy H._______________________________________________Papervision3D mailing listPapervision3D at osflash.orghttp://osflash.org/mailman/listinfo/papervision3d_osflash.org_______________________________________________Papervision3D mailing listPapervision3D at osflash.orghttp://osflash.org/mailman/listinfo/papervision3d_osflash.org> _________________________________________________________________> Get all your favourite content with the slick new MSN Toolbar - FREE> http://clk.atdmt.com/UKM/go/111354027/direct/01/> -------------- next part --------------> An HTML attachment was scrubbed...> URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20081008/4065c910/attachment-0001.html > > ------------------------------> > Message: 3> Date: Wed, 8 Oct 2008 12:36:43 +0200> From: TurboHz <turbohz at gmail.com>> Subject: Re: [Papervision3D] MovieMaterial interactive> To: papervision3d at osflash.org> Message-ID:> <586e5da10810080336i354f70f3l67559972b2ddc8f0 at mail.gmail.com>> Content-Type: text/plain; charset="iso-8859-1"> > At first, I thought that Interactive3DEvents was the only option. But> instead of using the Interactive3DEvents I simply used the regular> MouseEvents on the elements of the movieclip (a SimpleButton instance, for> example) and just worked.> > 2008/10/8 James Hay <jimmyhay at gmail.com>> > > Fraid it isn't that simple. Already tried this, the papervision> > Interactive3DEvent model works quite differently to the standard Flash> > MouseEvent model. What exactly do you mean by 'SimpleButtons'? Do you mean> > movieclips or sprites, cause I> >> >> > On Wed, Oct 8, 2008 at 9:39 AM, TurboHz <turbohz at gmail.com> wrote:> >> >> As far as I know, yes it's posible: it really is that simple. Just build> >> your MoviecClip and code all your stuff (as you would do in 2D, including> >> mouse events and all), add an instance to a MovieMaterial, and set the plane> >> to interactive.> >>> >> I haven't tested it with components, but with SimpleButtons I didn't have> >> any problem at all.> >>> >> 2008/10/8 James Hay <jimmyhay at gmail.com>> >>> >>> Does anyone know if it's possible to make the movieClips that I might> >>> have in a movieClip that I use as a material interactive through a 3D plane?> >>> So for instance, say I have a movieClip and inside this I have another> >>> movieClip called "buttonOne_mc". I then want to make this "buttonOne_mc"> >>> interactive in my 3D scene with a mouse down event. Anyone know if this is> >>> possible or not, or will I have to create 3D planes or particles over all> >>> the buttons that I want to make interactive and then add 3D interactive> >>> events to these 3D objects?> >>>> >>> Cheers, Jimmy H.> >>>> >>> _______________________________________________> >>> Papervision3D mailing list> >>> Papervision3D at osflash.org> >>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org> >>>> >>>> >>> >> _______________________________________________> >> Papervision3D mailing list> >> Papervision3D at osflash.org> >> http://osflash.org/mailman/listinfo/papervision3d_osflash.org> >>> >>> >> > _______________________________________________> > Papervision3D mailing list> > Papervision3D at osflash.org> > http://osflash.org/mailman/listinfo/papervision3d_osflash.org> >> >> -------------- next part --------------> An HTML attachment was scrubbed...> URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20081008/98776554/attachment-0001.html > > ------------------------------> > Message: 4> Date: Wed, 8 Oct 2008 03:59:11 -0700 (PDT)> From: 360fusion <darrell at 360fusion.co.uk>> Subject: Re: [Papervision3D] adding filters to a plane> To: papervision3D at osflash.org> Message-ID: <19876308.post at talk.nabble.com>> Content-Type: text/plain; charset=us-ascii> > > Or if you are using Papervision 2.0, add your object to a ViewportLayer and> apply the filters to the ViewportLayer in a function called from the> InteractiveScene3DEvent:> > plane.name = "myPlane";> var map_layer:ViewportLayer = Viewport.getChildLayer(myPlane);> var myFilter:GlowFilter = new GlowFilter (); // set your parameters> > // In InteractiveScene3DEvent's Function call:> map_layer.filters = [myFilter];> > > > > > > michael svendsen wrote:> > > > Hey Guys,> > > > I have been looking around on the net but I haven't been able to find > > any good tutorials that explain how to apply filters to the outside > > edge of a plane. I would like it so that when you mouse over the > > plane there is a glow on the outer edge. Do any of you know of any > > tutorials, or have any sample code that could lead me in the right > > direction.> > > > Thanks for any help that can be offered,> > > > Michael> > > > _______________________________________________> > Papervision3D mailing list> > Papervision3D at osflash.org> > http://osflash.org/mailman/listinfo/papervision3d_osflash.org> > > > > > > -----> Darrell Martin> Senior AS3/PV Programmer> http://www.360fusion.co.uk www.360fusion.co.uk > -- > View this message in context: http://www.nabble.com/adding-filters-to-a-plane-tp19867844p19876308.html> Sent from the Papervision3D mailing list archive at Nabble.com.> > > > > ------------------------------> > Message: 5> Date: Wed, 8 Oct 2008 12:15:53 +0100> From: "John Brookes" <jbpv3d at googlemail.com>> Subject: Re: [Papervision3D] adding filters to a plane> To: papervision3d at osflash.org> Message-ID:> <3522fe140810080415vc631606vd0d800ce62f3f75d at mail.gmail.com>> Content-Type: text/plain; charset="iso-8859-1"> > Not a tutorial but at least you can mess about with the code.> The left plane does what you want> > Important bits are> super(800, 600, false, true, "Target"); // the true switch makes the> viewport interactive> blackSolidColour.interactive = true; // means this material listens for> mouse events> plane.useOwnContainer = true; // as Gordon said makes filters work> > try and make one of the other plane interactive.> HTH> > > // Filters in CS3> // http://www.adobe.com/devnet/flash/articles/graphic_effects_guide_03.html> package> {> import flash.display.Sprite;> import flash.events.Event;> import flash.filters.BevelFilter;> import flash.filters.GlowFilter;> import flash.filters.GradientGlowFilter;> import flash.filters.BitmapFilterQuality;> import flash.filters.BitmapFilterType;> import org.papervision3d.events.InteractiveScene3DEvent;> import org.papervision3d.lights.PointLight3D;> import org.papervision3d.materials.shadematerials.PhongMaterial;> > import org.papervision3d.materials.ColorMaterial;> import org.papervision3d.objects.primitives.Plane;> import org.papervision3d.view.BasicView;> > /**> * ...> * @author me> */> public class Main extends BasicView> {> private var bevelPlane:Plane;> private var gradientPlane:Plane;> private var glowFilterPlane:Plane;> private var solidBlueColour:ColorMaterial;> private var blackP:PhongMaterial;> private var bevel:BevelFilter;> private var glow:GlowFilter;> > public function Main():void> {> super(800, 600, false, true, "Target");> init();> startRendering();> }> > private function init(e:Event = null):void> {> //------------------------> //> // Glow Filter> //> var blackSolidColour:ColorMaterial = new> ColorMaterial(0x000000);> blackSolidColour.interactive = true;> > glow = new GlowFilter();> glow.color = 0x00ff00;> glow.alpha = 1;> glow.blurX = 25;> glow.blurY = 25;> glow.quality = BitmapFilterQuality.MEDIUM;> > glowFilterPlane = new Plane(blackSolidColour);> glowFilterPlane.useOwnContainer = true;> glowFilterPlane.x = -600;> > scene.addChild(glowFilterPlane);> > > glowFilterPlane.addEventListener(InteractiveScene3DEvent.OBJECT_OVER,> addFilter);> > glowFilterPlane.addEventListener(InteractiveScene3DEvent.OBJECT_OUT,> removeFilter);> > //-------------------------------------> //> // Horrid Bevel Example> //> solidBlueColour = new ColorMaterial(0x0000ff);> solidBlueColour.doubleSided = true;> > var bevel:BevelFilter = new BevelFilter(4, 45, 0x99CCFF, 1,> 0x003399, 1, 10, 10, 2, 3);> bevel.strength = 5> > bevelPlane = new Plane(solidBlueColour);> bevelPlane.useOwnContainer = true;> bevelPlane.filters = [bevel];> scene.addChild(bevelPlane);> > var Light:PointLight3D = new PointLight3D();> Light.x = 500;> Light.y = 500;> Light.z = -800;> > //-----------------------------------------> //> // GradientGlowFilter example> //> blackP = new PhongMaterial(Light, 0xffffff, 0x333333, 2);> blackP.doubleSided = true;> > var gradientGlow:GradientGlowFilter = new GradientGlowFilter();> gradientGlow.distance = 0;> gradientGlow.angle = 45;> gradientGlow.colors = [0x000000, 0xFFFFFF];> gradientGlow.alphas = [0, 1];> gradientGlow.ratios = [0, 255];> gradientGlow.blurX = 10;> gradientGlow.blurY = 10;> gradientGlow.strength = 2;> gradientGlow.quality = BitmapFilterQuality.HIGH;> gradientGlow.type = BitmapFilterType.OUTER;> > gradientPlane = new Plane(blackP);> gradientPlane.useOwnContainer = true;> gradientPlane.x = 600;> gradientPlane.filters = [gradientGlow];> scene.addChild(gradientPlane);> }> > private function removeFilter(e:InteractiveScene3DEvent):void> {> glowFilterPlane.filters = null;> }> > private function addFilter(e:InteractiveScene3DEvent):void> {> glowFilterPlane.filters = [glow];> }> > > override protected function onRenderTick(event:Event = null):void {> bevelPlane.yaw(1);> gradientPlane.pitch(1);> glowFilterPlane.roll(1);> super.onRenderTick(event);> }> }> > }> -------------- next part --------------> An HTML attachment was scrubbed...> URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20081008/171ea1ce/attachment.html > > ------------------------------> > _______________________________________________> Papervision3D mailing list> Papervision3D at osflash.org> http://osflash.org/mailman/listinfo/papervision3d_osflash.org> > > End of Papervision3D Digest, Vol 25, Issue 29> *********************************************
_________________________________________________________________
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20081008/4586f1c4/attachment-0001.html
More information about the Papervision3D
mailing list