I am getting the following exception when I attempt tor run a JSFL script in Flash 8:
--------------Output Panel in Flash IDE-------------------
Updating MyCustomComponent in library.

At line 68 of file "C:\\apps\crtlash\BuildSupport.jsfl":

Exception thrown in native function.
-----------------------------------------------------------
Then I get some output with the new component initializing. The JSFL code looks like this:

if ( curr_doc.library.selectItem( components[ i ].symbolName ) )
                       {
                                   // Found item and was able to select it.
fl.trace( "Updating " + components[ i ].symbolName + " item in library." ); curr_doc.library.updateItem( env.FLASH_HOME + "/en/Configuration/Components/" + components[ i ].clipPath );
                       }

"components" and "env" are Javascript objects constructed with properties such as "symbolName" and passed as a parameter to the function containing the above code. The line with the updateItem is what is failing. Normally when you update a library item in the IDE it pops up a dialog asking whether you want to "Replace" the component and I say yes. Obviously with a batch process that is not possible, but is that causing the exception to be thrown? Has anyone else seen "Exception thrown in native function" before?

Is there another way to update a custom component in a .fla using JSFL? Should I try to update the instance on the stage instead? How do I select an item on the stage? Is there a better way to use a component from another .fla (ie: via the Property dialog and specify a relative path)?

I am trying to automate the build process of our project which includes several Flash Movies, which are in turn built on a set of common custom components. The JSFL is called by Ant, which later on bundles everything up in a .war. This would save a lot of time if I could get it to work. Please! Help!!

Fred.
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to