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)

December 14, 2005

[Flash] Erroneous Flash 8 AS Error when Accessing Static Members

When accessing static members inside of a class I always reference it using the class name to visually identify the variable as a static member (e.g Foo.bar).

This is a naming convention that I have been using for years and the only naming convention for static members that I really like. However, I came across a unique use case where check syntax (ctrl-t on windows) throws a "static members can only be accessed directly through classes." error in Flash 8:

class Foo
{

private static var bar = "bar";

public function getBar()
{
trace(Foo.bar) //error
}

}

After some digging, the problem was that I didn’t define a constructor function (which I shouldn’t have to):

class Foo
{

private static var bar = "bar";

public function Foo(){}

public function getBar()
{
trace(Foo.bar) //works
}

}

Because an error isn’t thrown at compile time and because this issue isn’t present in Flash 7 I am lead to believe that this wasn’t an intentional feature.

(Longest Title Ever)

-erik
comments are still dead, thanks spamers!

Posted by erikbianchi at 06:25 PM | Comments (0)

October 10, 2005

[Flash] @ MAX / OC Visitor Info

I’ll be attending this year’s Macromedia MAX conference which is being held near my hometown in Anaheim California! Anaheim is home to both Disneyland and the Anaheim Angels (who are going to put the beat down on the Yanks tonight!).

If you’re attending the conference and this is your first time out to the OC I highly recommended making trips out to:

The Block at Orange
http://www.theblockatorange.com

The Irvine Spectrum
http://www.shopirvinespectrumcenter.com/

Main Street / The Pier: Huntington Beach
http://www.hbonline.com/

Taco Loco, Laguna Beach
http://www.shopirvinespectrumcenter.com/

And don't miss In & Out (be sure to get a cheese burger animal style)!

P.S. Comments are back up again.

-erik

Posted by erikbianchi at 09:03 PM | Comments (0)

July 10, 2005

[Flash] Coauthor of an upcoming Flash book

I recently signed a deal to be a Coauthor of an upcoming Flash book. I’ve contributed to books before in the past and have been a tech editor on several but this will be my first full blown authorship!

More information to follow in the coming weeks as my coauthor and I get closer to completion.

-erik

Posted by erikbianchi at 02:04 AM | Comments (3)

April 18, 2005

Adobe + Macromedia Acquisition FAQ

I'm still taking it all in this morning but overall I'm feeling pretty good and am looking forward to the future. For those of you who haven't seen it yet be sure to check the Adobe + Macromedia Acquisition FAQ: http://www.adobe.com/aboutadobe/invrelations/pdfs/AdobeMacromediaFAQ.pdf

Posted by erikbianchi at 07:20 PM | Comments (203)

November 29, 2004

Experienced Flash ActionScript Developer for Hire

I am now officially looking for full-time or contract Flash applications or games development work. While I will still be working at Blitz as a contractor (until I can find a more permanent position) they just didn’t have enough work coming in to keep me on full time.

I have worked on a number of large scale enterprise wide applications, web sites, rich internet applications (RIAs) and games for fortune 500 companies in the entertainment, telecommunications and healthcare industries.

If you or anyone you know is looking for an experienced Flash developer feel free to shoot me an email: erik@erikbianchi.com

Resume, work experience, references and code samples available upon request.

-erik

Posted by erikbianchi at 06:08 AM | Comments (629)

November 18, 2004

Library / Prototype Extension Organization

When Flash MX first debuted a couple years back I started working on an enterprise wide Flash based application that utilized a Java / Oracle backend. All of our code was external because it had to be versioned and backed-up regularly. To better organize my external ActionScript files I started utilizing a package structure. Then in the fla itself I found it more intuitive to copy the external package structure in the library using folders even if it didn’t mean anything (classes and packages where not supported until Flash MX 2004 Pro)

A few months back Grant Skinner and his team posted about a similar method they where using to organize their libraries. So to add to his post and as a follow up to my Prototype Extensions article I’d like to share a technique that I’ve been using that you might find useful.

For core Flash classes (MovieClip, Array, Object, etc) or components I like to place my prototype extensions into an Extensions folder in the main library:

Library>Extensions

Then for each class that I am extending I create a folder for it:

Library>Extensions>MovieClip

I then create a MovieClip symbol for the method or methods that I am adding:

Library>Extensions>MovieClip>method(s)

The actual code would go into that method MovieClip symbol. If I’m adding a group of methods that go together I’d name the symbol something more general.

So say for example I want to create a setColor method for all MovieClips. My library might look something like this:

Library>Extensions>MovieClip>setColor

Inside the setColor MovieClip would be my extension’s ActionScript:

#initclip

// color example: 0xff0000
MovieClip.prototype.setColor = function (color){
var c = new Color(this);
c.setRGB(color);
}

#endinitclip

For the setColor’s MovieClip Linkage properties I would check “Export for ActionScript” then set its’ linkage Identifier to “Extensions.MovieClip.setColor” and then check “Export in first frame”. This allows me to see exactly what extensions I have in any given fla and allows me to enable / disable them by checking or un-checking “Export for ActionScript”. When working in a team environment or going back into older code setting this standard helps avoid having to look for magic code / hacks.

For Grant’s original post check out:

http://www.gskinner.com/blog/archives/000107.html


-erik

Posted by erikbianchi at 11:07 AM | Comments (603)