This content has been marked as final. Show 3 replies
The issue of container.addChild (array), I think if you kick the container a little, by calling LayoutManager's validateNow() function, it will display as you expect.
For your second question, I don't fully understand how you arrived at Error 1065. Could you post more code to show what you're doing?
Thanks for you reply.
var comp:MyComponent = new MyComponent(); //Error 1065
//Where MyComponent is the Flash CS3 clip that was converted to Flex component
I have a workaround for this -
I first add the component as an Mxml tag with visibility false and then remove the component
with actionscript. Now all instantiations work normally (this includes all components in the SWC).
<mx:Canvas id="container" >
<local:MyComponent visible="false" />
and in <mx:Script>
var comp:MyComponent = new MyComponent(); //Works
var anotherComp:MyOtherComponent = new MyOtherComponent();
//From the same swc; This also works.
I have a feeling this problem is similar to the 'shared fonts' problem that
existed with Flash MX and below.
Anyway, even though I don't really know whats happening, my project can
move ahead. Hopefully some Guru will explain this.
Until then...thank you very much.
Do you know what version of the Flash/Flex Component Kit you are using (1.0.0, 1.1.0)? And which version of the SDK are you running? Was it the Labs beta 1 release, or have you tried installing a newer nightly build?
There have been a lot of changes/fixes/improvements in the Component Kit since its first release and you may want to install the latest copy of the SDK/MXP and try your code. What you're seeing doesnt sound quite right.
If you still see the same behavior after updating the SDK and Component Kit, please file a bug in the bugbase ( http://bugs.adobe.com/flex/ -- and please include your source files -- MXML and FLA/SWF) and post the bug number here so I can track the issue.