WMODE and Color Transfom weirdness…
Just the other day, while I was building a Flash site, I noticed that the color transform that I was applying to my menu items did not work in FF (ver 3 in this case, not sure same across versions), but worked fine in IE and standalone Flash player.
I figured it would have to be caused by the embed code, and after playing around and changing params around, I found that it was due to the wmode param. If I set it to either “opaque” or “transparent” the transform failed to show. But worked fine when set to “window”, the default value. It seems strange that all other thing worked except for the transform?! What is it about it that would stop it working in the other wmodes…?
The winning code:
<script type="text/javascript">
// <![CDATA[
var flashVars = {
};
var params = {
wmode: 'window'
, allowscriptaccess: "sameDomain"
}
var attributes = {
id: 'flashcontent'
};
var expressInstall = false;
swfobject.embedSWF( "main.swf", "flashcontent", "100%", "100%", "9.0.115", expressInstall, flashVars, params, attributes );
// ]]>
</script>
Etienne De Crecy!
Real awesome visiual effects! Wonder how its done…? Projected on to a screen, maybe.
The LED – A movie about the origins of the LED and how to make your own from carborundum!
MAKE presents: The LED from make magazine on Vimeo.
Pv3D – Tips and resources for getting started
These are some of the finding from my initial experience Papervision3D.
Tips:
- To render both sides of a Plane; MovieMaterrial.oneSide = false or BitmatMaterial.doubleSided = true, depending on the type of material being used.
- To apply alpha and filters, first you will need to set the primitives’ useOwnContainer property to true. Spent quite a bit of time trying to figure out why my alpha value wasn’t being applied! So if you’re like me and dive in head first before reading the docs, this will save some time.
- In order to view your 3D objects at their actual ( 100% scale ) size, I found the following values to work:
camera.zoom = 10; camera.focus = 200; camera.z = -2000;
- When using BitmapMaterial, set the smooth property to true to apply smoothing to the loaded bitmap.
- To make an object interactive, set the object’s material interactive property to true
Resources:
- http://www.thetechlabs.com/3d/ – Well written, top quality bunch of tutorials. Although they are built with Away3D, it’s quite easy to transfer the techniques to Pv3D. These tutorials a very valuable for the 3D techniques that are tought, rather than the actual code.
- http://dev.papervision3d.org/ – Pv3D dev blog
- http://dev.papervision3d.org/2008/09/01/first-steps-in-papervision3d/ – First steps in Papervision3D is a great series of tutorials by Tartiflop. A must read!
- http://www.madvertices.com/search/label/Papervision%203D – Tutorials by Mad Vertices. Lots of great examples and inspiration.
- http://pv3d.org/ – Collection of very useful code samples on how to perform various functions.
- more links can be found at http://delicious.com/sprit3.
- http://papervision2.com/tutorial-list/
