fullScreenTakeOver kills VideoEvent.COMPLETE

Advertisements

Listening to CuePoints from .f4v is different to .flv

It took me hours to get that out:

I’ve tried to listen to CuePoints from my freshly taged .f4v files and nothing happened. Dammmm!  First i thought MediaEncoder did’nt inserted the CuePoints right. So i repeadted the whole procedure. Dammm! Still nothing happens. Then suddently it worked?! What happened? Same settings, same CuePoints – but wait – now i had .flv as fileformat. Ohhhh my good – thats it? Realy? F…ck! Yes – seams that .f4v CuePoints have to be handeled different to .flv. After some research i found the answer: http://www.video-flash.de/index/cuepoints-aus-f4v-videos-uber-xmp-auslesen/


Why is the texture of my DAE file not loading?

If you wondering why the texture of your DAE file is not shown in Papervision nameconflicts can be the reason:

Go into you DAE file, look for the ‘symbol’  attribute in the  <instance_material … > Tag and compare the value with the one you assigned to the name parameter in your addMaterial() statement.

‘symbol’ attribute value in dae file == ‘name’ parameter in addMaterial() method


Event handler for onComplete Event not dispatch in TimelineMax

It took me some time to realize, that if you set the autoRemoveChildren property in your TimeLineMax instance to “true” all events e.g. the onComplete event wont be dispatched. So if you wonder why your coresponding handlers dont get called, check the autoRemoveChildren property!

ffHeOmgP@Nv7

Why i dont see my RigidBody object …

I was wondering why i dont see my RigidBody object in my jiglib physicalized Papervision3D scene.

var visualObject:DAE = new DAE(“elipsoide.dae”);
var visualObjectMesh:P3DMesh = new P3DMesh(visualObject);
var physicalObject:RigidBody = new JSphere(visualObjectMesh, 10);

var physics:Papervision3DPhysics = new Papervision3DPhysics(scene, 10);
physics.addBody(physicalObject);

Who has the answer?

I forgot to add the visualObject to the scene:

var visualObject:DAE = new DAE(“elipsoide.dae”);
scene.addChild(visualObject);
var visualObjectMesh:P3DMesh = new P3DMesh(visualObject);
var physicalObject:RigidBody = new JSphere(visualObjectMesh, 10);

var physics:Papervision3DPhysics = new Papervision3DPhysics(scene, 10);
physics.addBody(physicalObject);

So always remember – the visualObject is the “visual” representation of the physicalObject – while the physicalObject is the “physical” representation of the visualObject. Sounds logic but i had to make this clear to me….

So the answer to my question must be:
You can’t see a RigidBody object!


How to embed a COLLADA (.dae) file into swf?

Just simply as you would embed other sources in Flash:

[Embed (source=”assets/yourColladaFile.dae”,mimeType=”application/octet-stream”)]
private var Model:Class;

var myDAE:DAE = new DAE();
myDAE.load(new Model());

thats it!


How to get the geometry of a DAE object in Papervision3D

Lately i was looking for a way to get the geometry of a DAE DisplayObject3D in Papervision. Normaly you can get the geometry property of a DO3D by accessing myDO3D.geometry. But as soon as you try to get it from a DAE object, the geometry property returns null. After some googleling i found a solution to my problem:

var geometry:GeometryObject3D = myDAE.getChildByName(“COLLADA_Scene”).getChildByName(“nameOfTheObject”).geometry;
for short you can also write:
var geometry:GeometryObject3D = myDAE.getChildByName(“nameOfTheObject”, true).geometry; // note the true flag for recursive search

Now we can get things like calculating a BoundingBox ore better – a BoundingSphere by accessing the boundingSphere property like this:
geometry.boundingSphere

Notice! If you for exsample want to get the real dimension of the BoundingSphere in the scene you have to thake account of the actual scale faktor of the myDAE object.

Example:

var myDAEWidthAndHight:Number = myDAE.scale * geometry.boundingSphere.radius;

I agree with you that this is quite a ugly hack – but it was the only way to access the geometry prop.  Better ways of doing that are welcome!