Hi,

I created a component using the Flex Component Kit for Flash CS3. (The
examples I followed are
http://lordbron.wordpress.com/2007/05/01/flex-component-kit-step-by-step/
and
http://jessewarden.com/2006/12/integrating-a-flash-interface-into-flex-2.html)

So, I'm able to import the component successfully into my Flex app. At
some point, I need to perform an effect on the component.

However, when I do this I get an error "effectStarted is not a
function". The debugger shows me the ff code in EffectInstance.as:

                if (target is IUIComponent)
                {
                        Object(target).effectStarted(this);
                        // Hide the focus ring if the target already has one 
drawn
                        Object(target).drawFocus(false);
                }

So, apparently, the exported component satisfies IUIComponent
interface but does not have the effectStarted method? Am I missing
something?

To workaround this, I assigned dummy functions to those that threw the
error, ie:

                        private function init() :void
                        {
                                p.effectStarted = doNothing;
                                p.drawFocus = doNothing;
                                p.effectFinished = doNothing;
                        }
                        private function doNothing(aParam:Object):void
                        {
                                
                        }

(p is my component) Is there something else I should be doing?

Thanks,

Roy



Reply via email to