« December 2005 | Main | February 2006 »

January 18, 2006

[Flash] Flash IDE Crashes During Font Initialization Fix!

Today, for some reason out of the blue, both Flash MX 2004 Professional and Flash Professional 8 would crash during the font initialization message during the loading screen running on Windows XP. Thinking that there might be a corrupted font, I reinstalled all of my fonts, but this resolved nothing. I then googled it and found people with similar issues and even a macromedia patch for Mac. However some users still had the same issue even after running through the technote and downloading the fix.

After digging through the error logs on my machine it turns out that QuickTime was causing the problem (hu?). So I uninstalled QuickTime and Flash Video Encoders (just to be safe) and everything was gravy.

I don't have a Mac to test, but I am willing to bet that the same thing is happening on Mac as well. Before you try reinstalling Flash or rebuilding your box (as most users did) go after QuickTime and the Flash Video Encoder to see if that does the trick.

-erik

Posted by erikbianchi at 07:29 PM | Comments (0)

January 10, 2006

[Forehead Slapping Moment] Flvs not Playing

Today I had one of the forehead slapping moments when I couldn’t figure out why dynamically loading flvs weren’t playing in a custom Flash 7 Video Player component that I built.

I spent a good 30 minutes trying to figure out why my video wasn’t loading. At first I thought I had a naming conflict (nope), or that a class was silently not loading (negative) and then I quadrupled checked all my syntax and even went as far as copying and pasting the sample code (still didn’t work).

15 minutes later and I was still scratching my head so I start thinking that maybe the flv was corrupted. After trying 3 different "corrupted" flvs (I was in denial) I gave up and decided to take a break and get something to eat.

I was outside half way through with my Starkist Lunch To Go (http://www.starkist.com/products/lunchtogo.html) when it came to me; out of the blue, as clear as day, like a light from Heaven had shun down upon my very being:

I was declaring my NetConnection and NetStream Objects inside of a function:

// bad mojo
function loadFLV(source:String):Void
{
var connection = new NetConnection();
var connection.connect(null);
var stream = new NetStream(connection);

this.video_mc.attachVideo(stream);
stream.play(source);
}

// good times
function loadFLV(source:String):Void
{
this.connection = new NetConnection();
this.connection.connect(null);
this.stream = new NetStream(this.connection);

this.videoContainer.attachVideo(this.stream);
this.stream.play(source);
}

This is a simplified example, but illustrates my problem.

What through me off was that the code samples showed timeline code and declared both the NetConnection and NetStream objects in local variables so when I double checked my ActionScript that was in a method of a class everything seemed to match up.

To be honest this isn’t the first time I’ve done this so for future reference and to possibly help anyone else with a minor oversight I’m blogging it!

-erik

Posted by erikbianchi at 01:10 AM | Comments (0)