Monday, March 8, 2010

Problems with Loading Content off of Network or Local Harddrive Location

Problem: When testing a Flash application on a harddrive or a network drive, and if that movie loads other external files in to it that are located on your local machine or a network location, sometimes the application will not respond to these loads.

Gotchyas: When testing one of these Flash applications on someone else's computer it may often work fine. Flash does not issue any error when failing to connect to the external file so, it is not obvious what the problem is. Updating Flash after encountering this problem will not fix it.

Solution: Add your hard disk drives and commonly used network drives to your "trusted file locations" area of your Flash Player's Global Security Settings (right click anywhere within Flash application while it is running and go to [Settings]).

Directions:

Tuesday, March 2, 2010

Flash Compile Error [SOLVED]

Error produced with a perfectly error-free program (and what should be an error-free compile) of a Flash file (.fla):

The name of this class, ________, conflicts with the name of another class that was loaded.

This is a known bug with Flash CS3 and CS4. Flash may (seemingly at random) throw this error based on a custom class of yours or, any of flash's public classes. This usually happens when compiling a program off of a network drive or a flash drive.

Temporary Solution: Upon receiving this error in the Flash IDE, click on the error message in the Compiler Errors window which, should open up the .as file in the Flash IDE. Write a random character anywhere in the document, then erase it, then save and close the .as document. Open up any MovieClip in your Flash file's library and highlight then deselect some things. Save your Flash file then Publish. Since Flash thinks you have modified these files, it sets a new timestamp on them behind the scenes and should now compile without errors.

Long-Term Solution: Swear off using network drives altogether and work off your harddrive (although it may be possible that this error could occur on your harddrive, it is unlikely)

Search for the Real Solution (so far unsuccessful):

The best description of this error that I could find online:

http://peterkaptein.wordpress.com/2008/07/17/flash-cs3-the-name-of-this-class-conflicts-with-the-name-of-another-class-that-was-loaded/

I’ve noticed this will happen to me if I am compiling the same program frequently. If I wait and compile 30 - 45 minutes later, it will usually compile fine. Based on information found online, it seems that compiling Flash files off of a network server or external drive can be the source of this problem. The internal clock on the server or external drive is not synched with your computer's clock where Flash resides on your harddrive.

The Network Administrator at my office discovered that the network drive I was working off of was on a Linux server and that the server's clock was 45 minutes fast. He synched the server clock with the Windows servers (and our office's PCs) but, the error would still occur. We never did get this sorted out.

I believe this error can be avoided by compiling programs off my harddrive right from the start. However, if I do get this error and proceed to move the Flash application files to to my harddrive and compile it from there, it will still produce the same error. I’ve even tried clearing Flash’s ASO cache (.aso is the extension of temporary files that Flash creates on compile) and still received the error.