[osflash] Papervision FileLoadEvent

John Grden neoriley at gmail.com
Thu May 17 13:03:00 EDT 2007


Dan's right, add the listener to the collada object, since that's what's
dispatching the event:

myCollada.addEventListener();

hth,

John

On 5/17/07, Dan Shryock <dan.shryock at gmail.com> wrote:
>
> I've never used Paper Vision, but I believe that if the event is being
> dispatched from the myCollada object, you need to do your
> addEventListener on the myCollada object instead of the this reference
> you are using. Not sure though as I've never used that framework.
>
> Dan
>
> On 5/17/07, Tony Grimes <tony.grimes at gmail.com> wrote:
> > Hi,
> >
> > i am having trouble displaying a .dae file that i load into my
> application
> > via Papervision's Collada class. I think that the problem is to do with
> my
> > own class HouseScene.as not picking up the LOAD_COMPLETE event that the
> > Collada.as class dispatches once it has loaded in and parsed the .dae
> file.
> >
> > So, in my HouseScene class i have the following:
> >
> > this.addEventListener(FileLoadEvent.LOAD_COMPLETE, render3D);
> > this.myCollada = new Collada("screen.dae");
> >
> > It is my understanding that HouseScene.render3D method will fire off
> once
> > FileLoadEvent.LOAD_COMPLETE is dispatched by the Collada class.
> >
> > Within the Collada class the following lines are executed, which i have
> > tested via a trace, so i presume the event has been dispatched:
> >
> >
> > var fileEvent:FileLoadEvent = new FileLoadEvent(
> > FileLoadEvent.LOAD_COMPLETE, _filename );
> > this.dispatchEvent( fileEvent );
> > this.loaded = true;
> > trace(this.loaded) // traces 'true'
> >
> > However, my HouseScene.render3D() method never gets executed. And so the
> > Collada xml data is neveravailbel to render.
> >
> > This is my first foray into AS3 so I am not very familiar with the new
> event
> > model but having looked through the documentation i think I have it
> right.
> > Am i missing something obvious?
> >
> > Any help appreciated - thanks
> >
> > _______________________________________________
> > osflash mailing list
> > osflash at osflash.org
> > http://osflash.org/mailman/listinfo/osflash_osflash.org
> >
> >
>
> _______________________________________________
> osflash mailing list
> osflash at osflash.org
> http://osflash.org/mailman/listinfo/osflash_osflash.org
>



-- 
[  JPG  ]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/osflash_osflash.org/attachments/20070517/a5fcccc2/attachment.htm


More information about the osflash mailing list