Make ImageViewer extend UIComponent instead of Sprite. In order to do
stuff like automatic layout, Flex containers expect their content
children to be UIComponents.

- Gordon


-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of sufibaba
Sent: Thursday, March 02, 2006 11:11 AM
To: [email protected]
Subject: [flexcoders] visual children must implement
mx.core.IUIComponent

Hi All,

I have the following:

1. ImageViewer.as
2. main.xml

in ImageViewer.as, I have this class definition:

public class ImageViewer extends Sprite {
   public funtion ImageViewer(){
    // code
   }
  // other functions and code
}


in main.xml, I am calling:  <ImageViewer/>

The error I am getting is:
---------------------------------------------------------------------
component declaration are now allowed in here.(Note: visual children
must implement mx.core.IUIComponent)
---------------------------------------------------------------------
Does anone know what the problem might be.

Any help is appreciated,

Cheers,

Tim






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links



 




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to