Papervision3D: Lava RockWorking with Papervision3D and 3ds Max, I demo a model of a rock with an animated lava texture applied to it.

Lava
I have to say Papervision3D really is great.

I’ve had my eye on it for a while but just never seemed to find the time to start playing around with it.
I actually come from a 3D background (which you can see if you go way back in my blog) but slowly found myself creeping into the Flash world and haven’t had a chance to look back. The opportunity to combine these two interests is hard to resist, but up until Papervision wasn’t very viable.

With the advent of Papervision3D 2 and Andy Zupko‘s effects addition, 3D in Flash is not only viable but seems to really be taking off.

When I heard there was going to be a Papervision class in NYC, I couldn’t pass it up. Since the class, I’ve been digging in and messing around and once Andy added his effects classes to SVN I jumped and started working on the lava rock at the top of the page.

Its basically a sphere primitive with a video texture applied to it.
I created a procedural texture in 3ds Max and applied it to a sphere primitive until I was happy with this:

lava

Once I had the look I was happy with, I animated the texture. From there, I rendered out the texture as a flat series of images. I then created a Photoshop action that took the flat texture and created a seamless spherical texture. I then took the series of spherical images and created an flv. Once there, I applied that texture to the primitive sphere in Papervision.

To top it all off, I used some of Andy’s effect classes and created steam that seems to come from the actual cracks in the lava rock.

It took a little while to get it all setup and learn the ins and outs of Papervision, but now I’m hooked and can’t wait to keep messing around with it.

Posted in Flash | 9 Comments
SyntaxHighlighter in phpBBIf you've setup a phpBB forum, you might want to check out this SyntaxHighlighter mod for displaying code blocks.

After adding AS3 support to SyntaxHighlighter, I got hooked on it.

I offered to setup a forum at work, and after some time debating between phpBB and Vanilla, I decided upon the latest phpBB 3.
After getting it all setup, one of the most annoying things was how code blocks looked when posted. The default code block in phpBB allows for only php syntax. So I got to work on adding in SyntaxHighlighter.

It was surprisingly harder than I thought. I ended up having to manipulate some of the underlying php code of the forum to get it to function 100% (before doing that, the forum would always adjust the code to show up on one single line).

To make it easier for other people, I’ve created a phpBB SyntaxHighlighter mod.

As I said above, this was built for phpBB 3, not 2.

Please update me here or at the phpBB forum if you find any bugs or have any requests.

Posted in Flex | 6 Comments
Reunion ShowJust got back from playing an awesome reunion show with my old band. Be sure to check out the pics and videos!

Quad
I usually try to keep digitalflipbook focused on programming and design and use my other blog to keep people updated on my family and personal life, but I had so much fun doing this that I had to post it for all to check out.

My old band, Quadiliacha, was asked to play a reunion show a few months back and the big day finally came October 18th. I flew back to our hometown Atlanta and everything immediately felt like 1996 all over again.
The show was more fun than I could’ve ever imagined and I have to thank everyone that was able to come out.

Here are some great pics from that night.

And here is a video of some of the show.

… and in case you’re wondering, I’m the one in red.

If you like what you see and you happen to live near Gainesville, FL, we’re playing one more show, so get you’re ass out there!

Posted in General | 1 Comment
AIR Application ActionScript Project with Flex Builder 3How to setup an ActionScript-based AIR project (not Flex-based) with Flex Builder 3.

Until the final version of Flex Builder 3 comes out (which should have application type as an option under new ActionScript project), there is an easy way to create an AIR application ActionScript Project with the new beta.

All you have to do is create a new Flex Project, set the Application type as AIR, and on the last screen of the new project wizard change the Main application file extension from .mxml to .as. This will then create the main .as file just like it would if you were creating a new ActionScript Project.

That’s it. Hit Debug like you would a Flex AIR application and you’re well on your way to creating an AS3-only AIR app.

Posted in AIR | 13 Comments
FABridge: Flex(and now Flash)-Ajax BridgeA way to use FABridge with AS3-only projects, not just Flex-based projects.

The Flex-Ajax Bridge is a wonderful little code library that completely opens up a swf to be controlled via JavaScript. Quoting the Flex-Ajax Bridge Labs page, “essentially anything you can do with ActionScript, you can do with JavaScript.” At least as far as I know, up until now this has been limited to use with the Flex framework and could not be used with a standard AS3 project.

With a recent project we worked on, we really didn’t need the entire Flex framework, but did however desperately want to use the capabilities of the Flex-Ajax Bridge. After a little digging in the framework code and a little more testing, we found out that its completely possible to use the Flex-Ajax Bridge with standard AS3 projects as well. Quite possibly the name should be changed to Flash-Ajax Bridge instead. We used this with the original FABridge source that was released quite a while ago, but right before posting this I tested it with the latest Flex Builder 3 Beta (which finally includes the code, so you don’t have to search random sites for it).

Note: I’m really not sure how this fits in with the EULA, so use at your own risk.

With the latest Flex Builder 3 Beta, copy the following sourcecode from the frameworks directory and paste them into your AS3 project source directory:

1) FABridge.as
from: /sdks/3.0.0/frameworks/javascript/fabridge/src/bridge/
to: bridge/

2) FABridge.js
from: /sdks/3.0.0/frameworks/javascript/fabridge/src/bridge/
to: your bin/js/ directory

3) IMXMLObject.as
from: /sdks/3.0.0/frameworks/projects/framework/src/mx/core/
to: mx/core/

4) Version.as
from: /sdks/3.0.0/frameworks/projects/framework/src/mx/core/
to: mx/core/

5) mx_internal.as
from: /sdks/3.0.0/frameworks/projects/framework/src/mx/core/
to: mx/core/

6) ItemPendingError.as
from: /sdks/3.0.0/frameworks/projects/framework/src/mx/collections/errors/
to: mx/collections/errors/

7) IResponder.as
from: /sdks/3.0.0/frameworks/projects/framework/src/mx/rpc/
to: mx/rpc/

Once you get those 6 classes and 1 js file into your AS3 project, you’re good to go!

To test, in your AS3 project base class create a new FABridge instance, then set the rootObject property of the instance to “this” (the base class reference). Give the bridgeName property of the instance a name and then in js you reference the flash bridge with that name, like the following: FABridge.[bridge name].root(). Now follow along to the tutorials on the Labs page.

That’s it… nothing to it.
Just remember, until we find out some more information regarding the EULA on this topic, use at your own risk.

Posted in Flex | 5 Comments
AS3 Syntax Highlighting (with SyntaxHighlighter)If you like to show code samples online, you should definitely check out SyntaxHighlighter. And with this addition, it now supports AS3.

I spent a little free time and added AS3 support to SyntaxHighlighter.

Here’s a sample.

According to Alex Gorbatchev (the creator of SyntaxHighlighter) it should be added to the next release. But until then, you can download the source here.

It’s pretty straight forward to use, but just in case:

  1. Download the latest SyntaxHighlighter source.
  2. Download my AS3 extension.
  3. Place the compressed script in SyntaxHighlighter’s Scripts directory.
  4. Replace the css file in SyntaxHighlighter’s Styles directory if you like my version of the code block more than the default.
  5. Upload the SyntaxHighlighter directory to your server.
  6. At the minimum, add the following to your head tag (pointing to wherever you have placed your js, css and flash files):

    			<link type="text/css" rel="stylesheet" href="css/SyntaxHighlighter.css"></link>
    			<script language="javascript" src="js/shCore.js"></script>
    			<script language="javascript" src="js/shBrushAS3.js"></script>
    			<script language="javascript" src="js/shBrushXml.js"></script>
    			<script language="javascript">
    				window.onload = function () {
    					dp.SyntaxHighlighter.ClipboardSwf = 'flash/clipboard.swf';
    					dp.SyntaxHighlighter.HighlightAll('code');
    				}
    			</script>
    			
  7. Create a pre block similar to the following:

    			<pre name="code" class="actionscript">
    				... some code here ...
    			</pre>
    			
Posted in Flex | 9 Comments
Complete Site OverhaulJust rebuilt the site from the ground up to take full advantage of Movable Type 4.

It might not look like much of a difference, but digitalflipbook has been rebuilt from the ground up.
Movable Type 4 came out last month and I finally got around to updating my site.

MT always allows for an easy upgrade process, but this latest version is quite a departure from their previous versions. To fully take advantage of all of the new capabilities and features, you can’t do a simple update. Instead, I had to backup my original and then build my site again from scratch using the new features.

Its been quite a headache, but I am finally much happier with what’s behind-the-scenes.
Before, the css was all over the place, but now I’ve made a digitalflipbook theme. What this means is that all of the specific site styles and images are in a completely separate directory and if I want, I can now completely change the look of the site with the press of a button, but maintain the structure.

Another reason for the upgrade was that I was getting inundated with spam comments and needed a better way of managing them. MT4 is now built in with CAPTCHA support and allows for additional CAPTCHA plugins. I decided to go with reCAPTCHA, which so far seems great.

I did quite a bit of testing before replacing the previous site, but issues can always arise. If you notice anything, please let me know and use that updated comment system down there. :)

Posted in General | 3 Comments
Changing Selection Color on Dynamic TextFieldsHere's a class you can use to control the selection color on TextFields.

For some reason or another selection color is not an option on dynamic TextFields in Flash.
This has been one of those issues that I’ve just accepted up until now.

I’m currently working on a project that has a design featuring white text over a black background. The caveat was that the text needed to be selectable as well. As anyone working with selectable text knows, the selection color is always black. This posed a problem… the user couldn’t actually tell when the text was selected or what characters were actually selected. I remembered a while ago reading about applying a color transform to the text field to change the selection color. Only problem with that solution is that it applies the transform to the entire field as a whole, which means the text color and background color are affected by the transform as well.

I played around with this solution for quite a while and came up with a fairly reliable way of changing the selection color and maintaining the text and background colors that you initially chose. There are still some hiccups, but so far this is the best solution that I’ve found. First download the SelectionColor class and then test it with:

package
{
	import com.digitalflipbook.text.SelectionColor;
	import flash.display.Sprite;
	import flash.text.TextField;

	/**
	* The SelectionColorTest class runs a simple test changing a TextField selection color.
	*
	* @author Mark Walters
	* @since 2007.08.13
	*/
	public class SelectionColorTest extends Sprite
	{
		public function SelectionColorTest()
		{
			var tf:TextField = new TextField();
			this.addChild( tf );
			tf.width = 180;
			tf.height = 20;
			tf.text = "Here's some text to try selecting.";
			tf.background = true;
			tf.backgroundColor = 0x000000;
			tf.border = true;
			tf.borderColor = 0x000000;
			tf.textColor = 0xFFFFFF;

			SelectionColor.setFieldSelectionColor( tf, 0xD3D3D3 );
		}
	}
}

Now, this works with many color choices, but it is not a full proof solution. I have seen certain colors, depending on the colors chosen, not work out exactly as expected. If anyone notices anything in the code that could be perfected let me know and I will post an update. This seems to be one of those annoying things about Flash that would be nice to have a solid solution.

Posted in Flash | 15 Comments
Language ReferencesA single location to find all of the important Flash Platform language references.

These should always be one click away:

CORE LANGUAGE REFERENCES

Flash 10

Flex 3 and AIR 1

AIR 1 JavaScript

BETA LANGUAGE REFERENCES

Flex Gumbo

LIBRARY LANGUAGE REFERENCES

AS3CoreLib

Cairngorm

PureMVC

ARCHIVED CORE LANGUAGE REFERENCES

Flash 9

Flex 2

Flash 8

I’ll try and keep this page updated.

Posted in Flash | 1 Comment
Craziness…Lots of stuff going on right now... sorry for the lack of posts.

Its been way too long since I got a post up here, but I thought I would quickly let you know I wasn’t dead and give you a few of the reasons why it has been that long:

1) Buying a new place in Jersey City. Sooo much more time consuming, difficult, and expensive than buying in Atlanta.
2) Training our new french bulldog puppy ( Jacques Francois ).
3) Trying to spend as much time as possible with my wife.
4) Work, work and more work.
5) Freelance, freelance and you get the point.
6) Tech-editing the upcoming AS3 Bible.

One thing I have been meaning to write about, that I’ll quickly touch on, is FlashDevelop 3. The 2nd beta has already been released and I’ve been using it for all of my development for the past month and a half, building from the source daily. It is very stable and so much better to work with than FD2… and I was a big proponent of that.
So go download it, try it out, and shoot Philippe, Nick and the rest of the FD crew your comments and thank yous because its a great app for flash, and now flex, development.

Posted in Flash | 1 Comment
  • Pages

  • Categories

  • Archives