How to Tween the Alpha Value of a Plane with MovieMaterial in Papervision 3D 2.0

5 months ago

I spent an inordinate amount of time figuring out how to tween the alpha value of a Plane with MovieMaterial in Papervision 3D today. In case it saves anyone out there some time, here's how to access it:

MovieMaterial(plane.material).movie.alpha

The DisplayObject3D class has an alpha property, but it doesn't seem to affect the material inside the object. I can't say I completely understand why it works, but it works. Note: The "animated" property of your MovieMaterial must be set to "true."

Oddly, this does not work:

plane.material.movie.alpha

Even though "plane.material" seems to be a MovieMaterial object, "movie" comes back as an undefined property when compiling. I'm sure it has something to do with data type information in AS3 that I don't quite comprehend yet.

In case this happens to be a weird version issue, I'm using OS X 10.5.8, Flash CS4 and Papervision3D 2.0.869. Lastly, here's the gotoAndLearn() forum thread that pointed me in the right direction.

Google Analytics Tracking for Adobe Flash

1 year ago

This week at Adobe MAX, the Google Analytics team unveiled Google Analytics Tracking for Adobe Flash. According to Google:

This feature is a translation of the current Google Analytics tracking code into the ActionScript 3 programming language that dramatically simplifies the ability to track Flash, Flex and AS3 content. This new Flash tracking code provides all the rich features of the current JavaScript-based version, including campaign, pageview and event tracking and can be used to track Flash content such as embedded videos, branded microsites and distributed widgets, such as online games.

Developers have the choice of using a Flash Component or a AnalyticsLibrary Component, for complete control over tracking objects directly in AS3.

For more detailed information, check out the introduction and implementation guide over on Google Code. Then, watch the video demo on YouTube.

Augmented Reality

1 year ago

As this blog is essentially my soapbox to nerd out on web development, I'm occasionally torn about where to write about Flash. Since a handful of us in the Charlotte area are trying to get Flash Charlotte off the ground, I usually tend to post most of my Flash related news items there.

That said, I couldn't pass up the opportunity to mention the Augmented Reality project from Digital Pictures Interactive. You need to see it for yourself to really understand, but they've found a way to insert Papervision 3D objects into a webcam stream. If you have a webcam, you can try out the demo on their website.

Be sure to check out Flash Charlotte from time to time (especially if you work with Flash and live in the Charlotte, NC area). The group is still growing, but the blog is fairly active.

Accessing Trace Outside Flash

1 year ago

I recently upgraded to a new machine and Flash Player 10. Accordingly, I had to install a new debug Flash Player and setup my Flash log again. I figured I'd share the well-known setup, for posterity. As with most things on this blog, these instructions are for meant for those using OS X.

First, grab the Flash Player 10 debugger on the Adobe website and install.

Second, create a file named mm.cfg in this location:

/Library/Application Support/Macromedia/mm.cfg

In the file, add the following three lines:

ErrorReportingEnable=1
TraceOutputFileEnable=1
MaxWarnings=0

The first two should be self-explanatory, however the final line just allows more than the default 100 errors and messages to be logged.

Next time Flash fires a trace function, a file named flashlog.txt should be automatically created and begin logging output from Flash. Previous to Flash Player 9, you could specify the location of the log with TraceOutPutFileName. However, now it's created in an unchangeable location:

~/Library/Preferences/Macromedia/Flash Player/Logs/flashlog.txt

Of course, if you're working within Flash, you can view these messages in the Output window. However, when previewing Flash in a browser or the standalone Flash Player, the Output window is not available.

You have a few options for viewing the contents flashlog.txt. Usually, I go with Console. However, if you want to follow real-time, you can fire up Terminal and use tail:

tail -f ~/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt

Note: flashlog.txt is overwritten by each Flash movie, so it's contents will be cleared out each time you load up a SWF.

Flash Player 10

1 year ago

I mentioned it over on Flash Charlotte and I might as well mention it here: the official release of Flash Player 10 is now available. Update your engines!

1