pokemon yiff art wedding invitations wording samples in spanish online melbourne chat sample student resume cigarette brands nicotine content t shirt printing machine for sale google earth free download sawgrass mills mall directory map evil desktop themes mercedes benz parts diagrams download dragonball game pontiac g8 gxp for sale used subwoofer wiring diagram crutchfield download balkan download gamecube emulator mac salary calculator pocket tanks deluxe download mac check engine mitsubishi eclipse of land pollution 3d kitchen design software flashget download mercury outboard serial identification free ball licking movies happy jesus song download the fuji viewer wine enthusiast coupon codes salary of professional athletes free pron movies radio flyer scooter target minivan rental orlando florida drug ultram mozzila slo download harley davidson sportster parts accessories nikon coolpix l100 10mp digital camera review nikon d3000 dslr camera price vintage cigarette cases for women scheduling software paige jeans funny quotes from movies hangover levitra clinical trials online pharmacy phentermine xenical hair cuttery coupons printable downloadable dbz computer games mitsubishi lancer evolution x body kits digital camera reviews canon powershot sx120 cheap usb flash drives bulk rpg maker xp download free full costumes for cats musical guitar pro 5 free download torrent furniture warehouse san diego kearny mesa autodesk revit architecture 2010 crack rapidshare antares auto tune mac crack winter olympics locations history glass pipes and bongs for sale honeymoon packages in india with prices free website builder for mac os x free animated powerpoint backgrounds subwoofer reviews home audio pizza hut menu and price list rolex watches for men uk yamaha atv parts diagrams free models download kia sorento 2011 reviews weather channel radar florida mitsubishi electric mr slim air conditioning atheros ar5005g wireless network adapter driver xp camera reviews nikon coolpix s203 used toyota tacoma prerunner double cab for sale family cruises deals 2010 honda generators for sale used laminate kitchen countertops belkin n1 wireless router setup guide egyptian symbols alphabet malayalam movies 2009 watch online autodesk sketchbook pro 2010 mac torrent dell printer drivers for mac os x big trucks parking games fruity loops download golf magazine top 100 courses you can play nintendo dsi xl reviews bmw x5 repair manual haircuts fine hair free 2d animation software for beginners 1999 chrysler sebring convertible problems hyundai sonata 2011 pictures shu uemura art of hair autodesk inventor 2010 student download movies on demand brighthouse list snow white and the seven dwarfs story online 2010 subaru forester xt limited review tattoos designs for men free dvd release schedule 2010 wireless g usb network adapter driver download mitsubishi tv remote codes free nintendo 64 emulators for mac funny pictures of people with no teeth bluetooth dongle software download vista gps reviews consumer reports hyundai sonata 2011 prices samsung lcd tv problems no picture plants vs zombies free download full version mac samsung omnia apps free download honda crv maintenance schedule 2004 microsoft flight simulator x demo crack honda civic type r for sale in us race v3 download playstation network card numbers for free flowers by zoe website wine country gift baskets coupon code free shipping xbox live gold subscription trial generator atheros ar5007eg wireless network adapter vista driver rpg maker xp keygen download cool desktop backgrounds for macbook football for dummies positions roses department store employment camcorders for sale uk flashget for mac free download honda civic 2010 pictures uae download sim city full toyota gas pedal recall list free flight simulator games online mattress factory direct post wedding reception invitation wording examples jeep cherokee accessories rpg maker vx resources battlers sony vegas 9 torrent mininova dvd decrypter download mac jewelry exchange reviews tustin nissan leaf release date honda crv parts used genuine subaru parts online harley davidson dealers in california hp compaq presario v5000 memory laminate wood flooring stairs active desktop calendar download free nintendo ds roms download professor layton playstation network card numbers rolex oyster perpetual datejust prices spanish music lyrics for free cable modem hack comcast original xbox live codes for free windowblinds serial red pubic hair japanese dating sim games ds free download full poker nikon d90 prices dubai sof2 wallhack download snowflake patterns to cut out for kids doctor serial number compaq laptops drivers cq40 kode gta san download bmw x6 reviews pinewood derby templates 2003 bmw m3 convertible hardtop star wars download jeep grand cherokee srt8 for sale in texas vadivel comedy download mud tires for sale cheap download pokemon game on pc mitsubishi lancer evolution x wallpaper female shaving pubic hair volkswagen cc reviews 2010 genuine microsoft software download windows click 1979 volkswagen beetle convertible for sale soccer practice drills honda generators prices in pakistan autodesk maya 2010 serial number and product key isuzu trooper diesel craigslist windows digital desktop background siding brake video down jackets for tall women xnxx flash jeep grand cherokee laredo 2000 manual rolex submariner used fonts calibri download replica handbags flight simulator 2004 demo free download w200i games free download download indian video songs conexant modem drivers for xp sony vegas 9 keygen serial flash player for mac snow leopard kaspersky internet key generator cowgirl boots for women cheap samsung eternity applications free download autodesk autocad 2010 torrent download winter olympics 2010 hockey bonzi download compaq presario v6000 wireless driver download winter olympics 2010 hockey teams download antares autotune 5 free download igra nfs subaru impreza outback sport forum cigarette prices by state map xbox live gold membership card 12 months buttmans art gallery youtube to mp3 converter for mac os x free download avid liquid linux mint 8 usb bootable dvd43 64 bit windows 7 virtual dj software download free full version warcraft 2 cheat codes small tattoos for girls on feet plants vs zombies free full version download link samsung i8000 omnia 2 reviews cricket flash games free download for pc evening dresses to buy online hindi movies released in 2009 list mobile phone free nintendo ds emulator download for pc camping checklist excel xbox live gold code generator download belkin wireless g usb network adapter driver download atheros ar928x wireless network adapter driver windows 7 hair gallery free flash hair photos hentai sim game tonya harding honeymoon video beowulf the movie monster trucks games for kids online download winzip incest chat rooms free rated movie clips honda accord body kit racer v3 download music player download for nokia 3110c enclosure subwoofer box dangerous dave download hot cartoon games lolita art handbags outlet online nudist art watch hindi movies free online without downloading msn account cracker download program football manager training schedules 2010 pictures of pubic hair styles download titans free oompa loompa costumes restaurant organizational chart met art underwear models photos play for free slot machine design your own wedding dress virtual antivirus bit torrent guild keygen inflation game adobe flash player for iphone safari dresses to wear to a wedding as a guest halo download mugen download microsoft office phone activation code keygen als scan download combofix mazda 626 manual book women their pubic hair black movies gamecube isos direct download marketing sample download free counter strike cd key nikon d40 kit refurbished at work brazzer hairstyles for women over 50 years old pictures free software downloads for blackberry curve 8520 printable viagra coupon lavetria plus size bra sony handycam dcr 30 driver vista tifa flash antivirus free download key gen sony vegas 9 serial number generator free download tamil mp3 songs download entrance theme adobe cs2 serial number activation code kaspersky keyboard symbol art download microsoft frontpage skype emoticons art happy birthday ubuntu smb password small bathroom remodeling ideas pictures free guitar pro download full version suzuki kizashi forum pizza hut delivery number malaysia dvdfab platinum 6 keygen dating rpg games online compaq evo drivers downloads dvdfab 6 registration key torrent malayalam movies free online watch famous graffiti artists list nokia 3110c music player download free slow down flash games freeware gamecube roms zelda the wind waker snow patrol chasing cars mp3 4shared opel astra parts catalog volkswagen beetle convertible for sale used guitar pro tabs free download summer fashion internships for high school students in nyc honda fit 2009 owners manual pdf opel astra wagon 2010 flash games index swf iskysoft dvd ripper for mac serial number autodesk maya 2010 crack nudity games compaq presario v2000 drivers skype download for blackberry curve 8900 compaq presario v6000 drivers for xp download porsche cayenne reliability 2004 warcraft 3 frozen throne torrent download free buy vans shoes online cheap desi movies watch online free kawasaki mule 3010 service manual dating sim rpg games for girls boeing 747 flight simulator games online windows server 2008 activation crack download toyota recall list of cars samsung cdma mobile phones microsoft points and xbox live gold membership generator sony vegas 9 keygen digital insanity tattoo ideas for men leg summer 2010 internships nintendo gamecube roms free download warcraft 3 download full game torrent best juice fasting recipes delta airlines flight attendant jobs rolex datejust oyster perpetual price wedding dresses for sale second hand flight simulator 2004 free download full version free skype video recorder for mac samsung led tv 6000 best settings sister wedding invitation wordings india miniclip flash games free download for pc kia sportage 2010 review hindu wedding card invitation wordings jacket sewing patterns free funny wedding invitation wording examples nokia 6300 music player download free best snow leopard hackintosh netbook porsche cayenne hybrid release date winterbells no sound dvd shrink for vista 64 bit download guitar pro 5 free download with crack 48 hour xbox live codes generator winterbells full screen game dvd shrink free download windows 7 volkswagen beetle for sale by owner watch movies online streaming megavideo sony vegas movie studio 9 platinum keygen warcraft 3 torrent limewire extended pro free download car battery trickle charger reviews gamecube emulator for psp satellite tv for pc 2009 titanium edition crack ar rehman video download compaq presario f700 drivers download nismo nissan skyline r34 gtr z tune for sale transparent desktop calendar freeware rpg maker vx activation code motorcycle superstore coupon 20 off chrysler town and country commercial music dvdfab 6 crack code dvd43 windows 7 compatible equipment rental agreement template free flight simulator x deluxe edition download volkswagen parts catalog online desktop themes for mac os x leopard xbox 360 hard drive transfer disc iso compaq presario c700 drivers malayalam movies free online watching snowboard boots reviews 2010 compaq presario drivers c500 samsung led tv 6000 problems xbox live gold membership codes free marlboro cigarette prices in north carolina isuzu trooper engine rebuild dvdfab 6 registration key free software testing tutorial pdf burton snowboard boots clearance famous quotes about life lessons bluetooth hack software nokia samsung omnia apps torrent samsung moment battery life issues sony ericsson k550i mazda miata parts diagram morgan movies compaq presario sound drivers free download soccer poems download vga for windows xp live satellite view of my house free t shirt gallery facebook bypass proxy server download full version gta3 birthday cake templates satellite view of my house real time nokia maps code hack ford motor company recalls 2009 cigarette lighting misa photoshoot download samsung impression apps free igre za mobitel download battery charger circuit schematic coolest desktop theme account cracker free download offline rpgs for pc sagem unlock codes mazda 626 timing belt monitor repair manual aurora snow flash flash revolution resonance take off my bra desktop destroyer 2 game moto racer download download dat mcafee update wow armory ensidia skinhead tattoo galleries free online templates for business cards free fretwork scroll saw patterns nature art gallery clips pants off dance off unedited sunny download free applications for mobile phones compaq evo drivers d51c games in eboot zip files tattoo magazines caribbean cruise line bahamas celebration scam youtube headshave golf gps comparison reviews download habbo hack mercedes 300sl gullwing sofa beds for sale ikea repossessed cars for jeeps for sale in pa pictures of highlighted hair download klm caribbean cruise line free cruise voucher lingerie models nude clothes steamer comparison norton antivirus code mms jamshedpur schools warcraft armory blackberry download pokemon ruby version wedding invitations wording samples microsoft security center antivirus override free antivirus for p3300 rpg maker vx sprite generator micro download keyboard symbols pictures sign in sheet templates free program templates download inspirat free wet t shirt wedding invitation wording templates soccer bulge current job vacancies in nigeria cashman slot donkey pc full download replica toy guns for sale i a japanese game show house of brides free powerpoint templates business free game download guitar chord chart for beginners antivirus plus v10 license key marathi download how to yourself a blow job free download form defend your castle flash game autoplay removal tool john mccain official website download san andreas where i download simtractor free free pantyhose movies samsung unlock codes fuse box diagram dodge dakota hidden games completly free avast antivirus free software sissy husband dress armpit hair galleries programi download glasbe free honda atv manuals online vista 64bit sony drivers bust move free download the perfume movie download spam list sign up software architecture design document sample contract template xbox 360 60gb hard drive transfer cable live satellite images of my house free buy rohypnol online ancient egypt food recipes for kids sony outlet short funny jokes one liners email marketing software freeware adobe raider download new marathi movies watch online student examples of letter writing flight simulator x acceleration expansion pack rapidshare cheap replica chanel designer handbags stronghold download compaq presario c700 drivers for vista free download certificate templates autodesk revit mep 2010 training compaq presario v6000 drivers download sample birth certificate nintendo ds emulator download for pc free sissy dress battery warehouse direct reviews compaq presario c700 hard drive replacement kalonline download t shirt printing machines for sale uk mazda protege free repair manuals dvdfab 6 registration key generator torrent nintendo ds roms torrent download wedding dance by amador daguio sony cybershot dsc s930 digital camera price in india free agenda templates summary of trojan war


9. Basic Interactivity

In this tutorial, we're going to learn how to handle "interactive scene3d events", in particular the events which occur when your mouse moves over an object, out of an object and clicks an object. We're going to make something like this:

When you place your mouse over the plane, the material will change. When you click it, it will spin in the opposite direction.

Unfortunately we have to edit the base class.. again.. All we need to do is change one line so that the viewport becomes interactive when we initialise it.

Open up PaperBase.as, and find this line:

Actionscript:
  1. viewport = new Viewport3D(vpWidth, vpHeight);

Swap it for this line:

Actionscript:
  1. viewport = new Viewport3D(vpWidth, vpHeight, false, true);

This will make the viewport interactive, which means it can trigger events.

Now that you've updated the base class, create a new project. Make the Main class extend PaperBase as usual and then add the following imports:

Actionscript:
  1. import org.papervision3d.materials.BitmapFileMaterial;
  2.     import org.papervision3d.objects.DisplayObject3D;
  3.     import org.papervision3d.events.InteractiveScene3DEvent;
  4.     import org.papervision3d.objects.primitives.Plane;

Now, add the following declarations under "public class Main extends PaperBase {" :

Actionscript:
  1. private var ourMaterial:BitmapFileMaterial = new BitmapFileMaterial("http://papervision2.com/wp-content/pvTex/front.jpg");
  2.         private var ourOverMaterial:BitmapFileMaterial = new BitmapFileMaterial("http://papervision2.com/wp-content/pvTex/front_over.jpg");
  3.         private var yawspeed:Number = 5;
  4.         private var plane :DisplayObject3D;

ourMaterial is the material that we'll put onto the plane.
ourOverMaterial is the material that will be activated on mouse over.
We'll load both of these materials from files on my server.
yawspeed will be how much we're going to yaw() the plane by each frame
and "plane" will be the plane.

This next function will show you how to make the material interactive, and how to add an event listener to the stage:

Actionscript:
  1. override protected function init3d():void {
  2.             ourMaterial.interactive = true; // You need to set the interactive property of the materal to true.
  3.             ourMaterial.doubleSided = true; // We want to be able to see both sides of the plane
  4.             ourOverMaterial.interactive = true; // Same for the mouseover material
  5.             ourOverMaterial.doubleSided = true;
  6.            
  7.             plane = new Plane(ourMaterial, 1000, 1000, 4, 4); // Create a new plane
  8.             default_scene.addChild(plane); // Add it to the scene
  9.            
  10.             // These lines add event listeners to the plane which will trigger the functions on the event specified.
  11.             plane.addEventListener( InteractiveScene3DEvent.OBJECT_PRESS, onPress ); // Will trigger "onPress" when the object is pressed (clicked)
  12.             plane.addEventListener( InteractiveScene3DEvent.OBJECT_OVER, onOver ); // Will trigger "onOver" when the mouse rolls over the object
  13.             plane.addEventListener( InteractiveScene3DEvent.OBJECT_OUT, onOut ); // Will trigger "onOut" when the mouse rolls out of the object
  14.         }

I've commented the code so it should be easy to understand.

Now we need to add the "on..." functions. You can do whatever you want in these functions, but in this tutorial we're going to make the effect like above.

Actionscript:
  1. private function onOver ( e:InteractiveScene3DEvent ):void {
  2.             plane.material = ourOverMaterial; // Change the material to "ourOverMaterial"
  3.         }
  4.        
  5.         private function onOut ( e:InteractiveScene3DEvent ):void {
  6.             plane.material = ourMaterial; // Change the material back to "ourMaterial"
  7.         }
  8.        
  9.         private function onPress( e:InteractiveScene3DEvent ):void {
  10.             yawspeed *= -1; // Reverse the yaw speed
  11.         }

Finally, we need to add the processFrame code, to rotate the plane by the angle "yawspeed".

Actionscript:
  1. override protected function processFrame():void {
  2.             plane.yaw(yawspeed);
  3.         }

Done! Run the project and you should see the result like above. Here's the complete code:

Actionscript:
  1. package  {
  2.     import org.papervision3d.materials.BitmapFileMaterial;
  3.     import org.papervision3d.objects.DisplayObject3D;
  4.     import org.papervision3d.events.InteractiveScene3DEvent;
  5.     import org.papervision3d.objects.primitives.Plane;
  6.    
  7.     public class Main extends PaperBase {
  8.        
  9.         private var ourMaterial:BitmapFileMaterial = new BitmapFileMaterial("http://papervision2.com/wp-content/pvTex/front.jpg");
  10.         private var ourOverMaterial:BitmapFileMaterial = new BitmapFileMaterial("http://papervision2.com/wp-content/pvTex/front_over.jpg");
  11.         private var yawspeed:Number = 5;
  12.         private var plane :DisplayObject3D;
  13.        
  14.         public function Main() {
  15.             init();
  16.         }
  17.        
  18.         override protected function init3d():void {
  19.             ourMaterial.interactive = true;
  20.             ourMaterial.doubleSided = true;
  21.             ourOverMaterial.interactive = true;
  22.             ourOverMaterial.doubleSided = true;
  23.            
  24.             plane = new Plane(ourMaterial, 1000, 1000, 4, 4);
  25.             default_scene.addChild(plane);
  26.            
  27.             plane.addEventListener( InteractiveScene3DEvent.OBJECT_PRESS, onPress );
  28.             plane.addEventListener( InteractiveScene3DEvent.OBJECT_OVER, onOver );
  29.             plane.addEventListener( InteractiveScene3DEvent.OBJECT_OUT, onOut );
  30.         }
  31.        
  32.         private function onOver ( e:InteractiveScene3DEvent ):void {
  33.             plane.material = ourOverMaterial; // Change the material to "ourOverMaterial"
  34.         }
  35.        
  36.         private function onOut ( e:InteractiveScene3DEvent ):void {
  37.             plane.material = ourMaterial; // Change the material back to "ourMaterial"
  38.         }
  39.        
  40.         private function onPress( e:InteractiveScene3DEvent ):void {
  41.             yawspeed *= -1; // Reverse the yaw speed
  42.         }
  43.        
  44.         override protected function processFrame():void {
  45.             plane.yaw(yawspeed);
  46.         }
  47.     }
  48. }

Post to Twitter Post to Delicious Delicious Post to Digg Digg This Post Post to Facebook Facebook Post to StumbleUpon Stumble This Post

72 Responses to “9. Basic Interactivity”


  • I’ve been working in Flex and trying to add interactivity to my papervision project. here’s whats happening, I add my papervision viewport3D to a mx:canvas components through canvas.rawChildren.addChild(view). I then create a pivot DisplayObject3D and add some objects to the pivot. I loop through all of the pivot.children and try adding the event listener to each item for an InteractiveScene3DEvent.OBJECT_CLICK but Im not getting my events to fire.

    Has anyone had a similar experience? Is there something I need to add to my canvas component?? Or is there a better way to add the event listener to the objects?

    Thanks a bunch for any help!!

  • I’m getting an error

    Warning: 1090: Migration issue: The onPress event handler is not triggered automatically by Flash Player at run time in ActionScript 3.0. You must first register this handler for the event using addEventListener ( ‘mouseDown’, callback_handler).

    and when I rename the function is simply does nothing.

  • The same as Nathaniel, I renamed the function but nothing happens. Also the other functions when mouse is over and out, are not working

  • Now it works for me, The problem was that I had renamed the PaperBase class to PaperBaseTres

    so I had to change the line where I extend the class…

    Hope it works for you!!

    public class Interact extends PaperBaseTres { …
    }

  • hi
    I’m getting this error:

    1024: Overriding a function that is not marked for override.

    into my main class.

  • hi
    I’m getting this error:

    Warning: 1090: Migration issue: The onPress event handler is not triggered automatically by Flash Player at run time in ActionScript 3.0. You must first register this handler for the event using addEventListener ( ‘mouseDown’, callback_handler).

    into my main class.

    what happend?

  • im sorry to ask the same question again, but how can i fix this Migration Issue? thanks for the tut by the way, its the best i found.

  • All the warning people are getting are 100% ignorable. They are meant to help catch some errors that come up switching from as 1 and 2 to as 3

  • The migration issue is due to the fact that the code is using “onPress” as the name of the handler. It is just a default compiler error message letting you know you are using AS2 terminology.

    This ignorable error is fixed by searching and replacing “onPress” to.. pretty much anything else you want as long as the name isn’t an Actionscript-reserved word.

  • Hi and thanks for those great tuto !
    I tried to realize something like that but I have a problem : the events are not fired when my mouse does not move.
    My object move and if the Mouse doesn’t, when the object came under the cursor, the event InteractiveScene3DEvent.OBJECT_OVER is not fired.
    I’d like to know if I missed something…
    Thanks a lot !

  • this is the most useful papervision site.

  • Hi, great tutorial, thanks!
    At first I wasn’t able to get the press event to fire, but I figured it out. When I set the interactive property of the viewport to true it solved everything.

    I didn’t use your base template class, so I’m sure you have included it there, but I missed it somehow.

    Peace

  • hi

    i’m on my first attempt to do a gallery using papervision 3d but it’s being tough.
    if someon could help me, i would really appreciate it.

    http://dev.globaz.pt/bial/site/homeReservada.html

    as you can see here, my “over” isn’t working properly. the bottom label should switch on every OBJECT_OVER/OBJECT_OUT, but it’s not working(especially when i stop mooving the mouse)

    I compared it with this tutorial and i can’t find out what’s the problem:S

    probabli this isn’t the best place to ask for help, but still…

    thank you

  • Hi! Very good and useful tutorial.
    By the way I have same problem as boulet. I have copied the tutorial word by word and it works, but if I don’t move mouse pointer InteractiveScene3DEvent.OBJECT_OVER is not fired. In flash movie you included heading the tutorial it works… Is it a version issue related with “Great White” code chnages?
    Is there a fix?

    Thank you very much!

  • Hi!

    to fix it, set viewport.interactive = true; in the init function.

    Then in your MouseEvent funtion also set viewport.interactive = true;

    That should work!

    cheerz,
    j

  • Thanks jolin, but it still doesn´t work for me… I have added the viewport.interactive lines and animation keeps showing the same behaviour…

    :-S

  • On Adobe Flash CS3 / 4.. on the eventListener.. the “OBJECT_PRESS, onPress” , the onPress is highlighted.. so I changed it to “onPresx” and the function to ” private function onPresx(e.Inter…” , .. so I don’t get the Migration error…

    Hope that helped out ;) .. and after 2 hours I finished to make my Plane Interactive xD.. ( Hey! It’s my first time that I work with Classes.. I never liked classes.. in PHP I don’t use them.. but that are very nice.. I would use them.. no I MUST use them to become better.. and more secure.. )

    - ZoRNdYuKe

  • Hi. Those tutorials are really great and helpful. This Interactivity is working fine for me when i use Your Plane Objects, however its now working with other objects like DAE objects at all :< dunno exacly why. i set viewport.interactive = true and i used
    var bitmapMaterial : BitmapMaterial = new BitmapMaterial(bm.bitmapData);
    bitmapMaterial.interactive = true;
    I think this material is still not interactive, i tried diffrent materials not only bitmaps and i found only way to set them interactive like above but this seem not working properly. Any ideas ?

  • Here is some code:
    var bm : Bitmap …
    var bitmapMaterial : BitmapMaterial = new BitmapMaterial(bm.bitmapData);
    bitmapMaterial.interactive = true;
    bitmapMaterial.doubleSided = true;
    var mats : MaterialsList = new MaterialsList();
    mats.addMaterial(bitmapMaterial, “sphere_Sphere_jpg-img”);
    this._obj = new DAE();
    this._obj.load(_dae,mats);
    then im passing this object model to the Main class, similiar to the one from this tutorial, even tried to add it to the scene as DisplayObject3D but no diffrence. Rest of code is same like here…Please help ;)

  • Ok i found the solution on other website:

    by zhivko :

    had the same problem. You need to attach the event to a child of the DAE object, not to the DAE object directly. It is a bit quirky getting down to the name of the child – you need to attach a Event.COMPLETE to your DAE, and within it try trace myDAE.childrenList() to get the name of the first object in your DAE, then myDAE.getChildByName(“name of the first object in your DAE”).childrenList() and so on until you reach the innermost object. my code looked like this:

    var plane:DAE = new DAE();
    plane.load(“plane.dae”, materialsList);
    plane.scale = 100;
    default_scene.addChild(plane);
    plane.addEventListener(Event.COMPLETE, daeCompleteHandler);
    function daeCompleteHandler( event:Event ):void
    { plane.getChildByName(“COLLADA_root”).getChildByName(“Plane”).getChildByName(“6″).addEventListener( InteractiveScene3DEvent.OBJECT_OVER, onOver );
    }

    I actually traced my DAE objects till the innermost like he said but i didnt use Event.COMPLETE function and just skipped and went straight to addEventListener like he wrote and it solved my problem. Cheers :)

  • Hi there, great tutorial
    I’ve managed to integrate the paperbase, the cone example and this basic interactive example into my flex project.

    I’ve also looked at the 3D Cube advanced interactivity example.

    I saw that it is possible to change the images assigned on each face of the cube.
    I’m wondering if its possible to do the same thing on this plane example?
    If so how?

    Thanks in advance

  • plane.addEventListener( InteractiveScene3DEvent.OBJECT_PRESS, onPress );
    plane.addEventListener( InteractiveScene3DEvent.OBJECT_OVER, onOver );
    plane.addEventListener( InteractiveScene3DEvent.OBJECT_OUT, onOut );
    Scense u have add set the material’s interactive = true,I think it should add the listener to the material

Leave a Reply


Follow papervision2 on Twitter

Flash and the City banner
2010 Flash And The City Speaker

RSS Feed