gskinner.com: gBlog: FlashMX 2004 source code, news, reviews and opinions
Back to gBlog Main gskinner.com website: source code, portfolio, etc. contact Grant Skinner

Syndication
RSS 1.0
RSS 2.0


Subscribe
Enter your email address to be notified when posts are added.

Search

Resources
Conference Session Notes

Flash Blogs
Waxpraxis
Philterblog
W3Blog
Jonas Galvez
Josh Dura
Quasimondo
Flashguru
Sean Voisen
Colin Moock
Flazoom
Greg Burch
Pope De Flash
Peter Hall
Glyn Thomas
actionscript.com
Princess Pegg


Aggregators
Flog
FullAsAGoog
MXNA
Hall of Justhese


« GDispatcher bug fixed. | Back to Main | New Ultrashock Tutorials! »

October 01, 2003


IMPORTANT NOTE: This is an old archive. It is only here to support outdated external links. To view the updated version of this archive, please go to the blog index, and search for the title of this document using the search form.

ClassPath "bug": you should fix this now
Posted by Grant

For whatever reason, it appears Macromedia shipped FlashMX04 with the classPath order mixed up. Thankfully, we can fix it - and I REALLY urge you to do so, right now!

As with any system of this sort, the order in which Flash should search for class files should be explicit to implicit, local to global. This should translate into Flash searching classPaths in this order:


  1. Paths you explicitly set in the publish settings of a project (FLA)

  2. The implicit project path (ie. the path of the FLA)

  3. The implicit global path (ie. the built in global classPath)

Unfortunately, by default F04 searches in this order: explicit, global, project. This can really throw you through a loop if you try to override the built in classes for a project.

Fortunately, you can fix this problem:


  1. In preferences, under the ActionScript tab click the "ActionScript 2.0 Settings..." button

  2. In the Classpath listing, you should see two entries. The first should be something like "$(UserConfig)/Classes" (this is the global path). The second will just be a "." (this is the project path).

  3. Click on the first entry, and click the down arrow button to swap its position with the second (".").

  4. Click OK to exit the dialogs

There, now Flash will act logically when searching classPaths. Thanks to Phil for noticing the "." (project path) - I really gotta clean my monitor! :)

Posted @ 10:51 AM by Grant | TrackBack


Comments

Luckily, I had modified the settings since the early days in the order, myCustomPath, then the project Path and then the global path.

Posted by: Brajeshwar at October 1, 2003 11:37 AM

Well, they're correct as shipped in as much as we didn't anticipate that folks would want to override the built in class structure in favor of having the classes in your project (for the built in classes...)

--
Regards,

Bentley Wolfe
Senior Support Engineer, Macromedia
Flash Senior Escalation Engineer

Announcing MX 2004. New versions of Dreamweaver,
Flash, Fireworks, Studio and the new Flash Pro. www.MX2004.com

Posted by: Bentley Wolfe at October 2, 2003 11:34 AM

No offense intended Bentley, but that's kind of a naive statement. If developers didn't want to override built in classes, they simply wouldn't replicate those package/class names in their local project. As is, the default settings will only serve to confuse people (myself included) when they try to override existing classes.

I expect this was just an oversight, but fortunately it is easily corrected - however, I do anticipate it will cause some confusion as people start sharing enhanced versions of the built in classes (such as the enhanced versions of EventDispatcher and UIEventDispatcher I will be releasing shortly).

Posted by: Grant Skinner at October 2, 2003 11:50 AM

Anyway, useful post. It is better for developers to understand these nuances %)

Posted by: Rostik at October 3, 2003 06:19 AM


Hosting by NetKeepers.ca | Powered by Movable Type 2.661
The text content of this blog is licensed under a Creative Commons License. Graphics are ©2003 Grant Skinner.