petkusj
July 18th, 2008, 02:30 AM
I've been feeling full of myself lately, but I think I might have run into a trap of my own devising and I'd really appreciate some help.
For the last year or two, I've been working on a Star Trek LCARS-themed website. The Flash 6 version of it can be found at http://www.personal-log.com/ I've since been working on the Flash 9 version (there's a sample at http://personal-log.com/newlog/logs.html; click SHOW PREFS).
I created all my components in a library file and I set the export and runtime sharing for the components. I'm able to import them into a new document and use them without a problem, until I create a symbol (the components work fine on the main timeline), insert the components and then link to a class.
When I test, I get: Error #1009: Cannot access a property or method of a null object reference.
Here are the complications: the library file and the file I'm working on use the same Document class (it defines variable that all the various pieces of the website will use). The components are based on the UIComponent (yeah, big mistake because I never take advantage of the UIComponent).
If, after I import my components, I break the link to the library swf, everything works fine. If the symbols I create aren't linked to a class (I just use frame scripts), everything works fine.
I guess my question is basically this: should I be creating components in the library or is this just asking for trouble? Should I only be importing the pieces of the components, but not the components themselves? I've assumed that it's more efficient to include the components into the runtime swf but I'm struggling to get this to work.
Thanks, Jennifer
BTW, just for grins, I created super stripped down components in a stripped down library, and imported them into a stripped down FLA, both sharing the same stripped down document class. I usually get the 1009, but not always.
For the last year or two, I've been working on a Star Trek LCARS-themed website. The Flash 6 version of it can be found at http://www.personal-log.com/ I've since been working on the Flash 9 version (there's a sample at http://personal-log.com/newlog/logs.html; click SHOW PREFS).
I created all my components in a library file and I set the export and runtime sharing for the components. I'm able to import them into a new document and use them without a problem, until I create a symbol (the components work fine on the main timeline), insert the components and then link to a class.
When I test, I get: Error #1009: Cannot access a property or method of a null object reference.
Here are the complications: the library file and the file I'm working on use the same Document class (it defines variable that all the various pieces of the website will use). The components are based on the UIComponent (yeah, big mistake because I never take advantage of the UIComponent).
If, after I import my components, I break the link to the library swf, everything works fine. If the symbols I create aren't linked to a class (I just use frame scripts), everything works fine.
I guess my question is basically this: should I be creating components in the library or is this just asking for trouble? Should I only be importing the pieces of the components, but not the components themselves? I've assumed that it's more efficient to include the components into the runtime swf but I'm struggling to get this to work.
Thanks, Jennifer
BTW, just for grins, I created super stripped down components in a stripped down library, and imported them into a stripped down FLA, both sharing the same stripped down document class. I usually get the 1009, but not always.